-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
116 lines (90 loc) · 3.09 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{
description = "yhr_C's very basic flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware";
nur.url = "github:nix-community/NUR";
emacs-overlay.url = "https://github.com/nix-community/emacs-overlay/archive/master.tar.gz";
};
outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, nixos-hardware, nur, ... }:
let
system = "x86_64-linux";
overlay-unstable = self: super: {
unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
config.allowBroken = true;
};
};
extra-pkgs = self: super: {
};
common-modules = [
./modules
./cachix.nix
{
nixpkgs.overlays =
[ overlay-unstable extra-pkgs nur.overlay (import self.inputs.emacs-overlay) ];
}
({ lib, pkgs, nix, ... }: {
system.stateVersion = "24.05";
# Enable using the same nixpkgs commit in the imperative tools
nix.registry = {
nixpkgs.flake = nixpkgs;
nixpkgs-unstable.flake = nixpkgs-unstable;
};
nix.package = pkgs.nixFlakes;
nix.settings.auto-optimise-store = true;
nix.extraOptions = "experimental-features = nix-command flakes";
system.configurationRevision = lib.mkIf (self ? rev) self.rev;
})
];
in {
nixosConfigurations.cybermega = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
nixos-hardware.nixosModules.common-cpu-amd
nixos-hardware.nixosModules.common-gpu-amd
nixos-hardware.nixosModules.common-pc-ssd
nixos-hardware.nixosModules.common-pc
./boxes/cybermega.nix
] ++ common-modules;
};
nixosConfigurations.tpx1c = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
nixos-hardware.nixosModules.lenovo-thinkpad-x1
./boxes/tpx1c.nix
{ systemd.services.NetworkManager-wait-online.enable = false; }
] ++ common-modules;
};
nixosConfigurations.k26 = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
nixos-hardware.nixosModules.common-cpu-amd
nixos-hardware.nixosModules.common-pc-ssd
nixos-hardware.nixosModules.common-pc
./boxes/k26.nix
] ++ common-modules;
};
nixosConfigurations.frame = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
nixos-hardware.nixosModules.framework-12th-gen-intel
./boxes/frame.nix
] ++ common-modules;
};
nixosConfigurations.mechrev = nixpkgs.lib.nixosSystem {
inherit system;
modules = with nixos-hardware.nixosModules; [
common-pc-laptop-ssd
common-pc-laptop
common-cpu-amd
common-cpu-amd-raphael-igpu
common-cpu-amd-pstate
common-gpu-amd
./boxes/mechrev.nix
] ++ common-modules;
};
};
}