-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
195 lines (190 loc) · 6.39 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
{
description = "TheRealGramdalf's experimental config";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
anyrun = {
url = "github:anyrun-org/anyrun";
inputs.nixpkgs.follows = "nixpkgs";
};
minegrub-theme = {
url = "github:Lxtharia/minegrub-world-sel-theme";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ {
nixpkgs,
home-manager,
nixos-hardware,
...
}:
# Create convenience shorthands
let
inherit (nixpkgs.lib) nixosSystem;
in {
## Dev stuff
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShellNoCC {
name = "hecker";
meta.description = "The default development shell for my NixOS configurations";
# Enable flakes/nix3 for convenience
NIX_CONFIG = "extra-experimental-features = nix-command flakes";
# packages available in the dev shell
packages = with nixpkgs.legacyPackages.x86_64-linux; [
alejandra # nix formatter
git # flakes require git, and so do I
statix # lints and suggestions
deadnix # clean up unused nix code
disko # Declarative disk partitioning, easier than `nix run`
just
];
};
nixosConfigurations = {
"ripjaw" = nixosSystem {
specialArgs = {inherit inputs;};
modules = [
./hosts/ripjaw/main.nix
./mods/nixos/main.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {inherit inputs;};
sharedModules = [
./mods/home/main.nix
];
users."games" = import ./users/games/main.nix;
};
users.mutableUsers = false;
users.users."games" = {
isNormalUser = true;
hashedPasswordFile = "/persist/secrets/passwdfile.games";
extraGroups = ["video" "network"];
};
}
];
};
"aerwiar" = nixosSystem {
specialArgs = {inherit inputs;};
modules = [
nixos-hardware.nixosModules.framework-16-7040-amd
./hosts/aerwiar/main.nix
./mods/nixos/main.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {inherit inputs;};
sharedModules = [
./mods/home/main.nix
];
users."gramdalf" = import ./users/gramdalf/main.nix;
};
users.mutableUsers = false;
users.users."gramdalf" = {
isNormalUser = true;
extraGroups = ["wheel" "video" "netdev" "docker" "adbusers" "plugdev" "wireshark"];
hashedPasswordFile = "/persist/secrets/passwdfile.gramdalf";
group = "gramdalf";
};
users.groups."gramdalf" = {};
}
];
};
"muffin-time" = nixosSystem {
specialArgs = {inherit inputs;};
modules = [
nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
./hosts/muffin-time/main.nix
];
};
"atreus" = nixosSystem {
modules = [
./hosts/atreus/main.nix
./mods/nixos/main.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {inherit inputs;};
sharedModules = [
./mods/home/main.nix
];
users."meebling" = import ./users/meebling/main.nix;
users."meeblingthedevilish" = import ./users/meebling/devilish.nix;
users."zoom" = import ./users/meebling/zoom.nix;
users."music" = import ./users/meebling/music.nix;
};
users.mutableUsers = false;
users.users."meebling" = {
isNormalUser = true;
hashedPasswordFile = "/persist/secrets/passwdfile.meebling";
extraGroups = ["video" "networkmanager"];
};
users.users."meeblingthedevilish" = {
isNormalUser = true;
hashedPasswordFile = "/persist/secrets/passwdfile.meeblingthedevilish";
extraGroups = ["video" "networkmanager"];
};
users.users."zoom" = {
isNormalUser = true;
hashedPasswordFile = "/persist/secrets/passwdfile.meeblingthedevilish";
extraGroups = ["video" "networkmanager"];
};
users.users."music" = {
isNormalUser = true;
hashedPasswordFile = "/persist/secrets/passwdfile.meeblingthedevilish";
extraGroups = ["video" "networkmanager"];
};
}
];
};
"aer" = nixosSystem {
specialArgs = {inherit inputs;};
modules = [
./hosts/aer/main.nix
./mods/nixos/main.nix
];
};
"orthanc" = nixosSystem {
specialArgs = {inherit inputs;};
modules = [
./hosts/orthanc/main.nix
./mods/nixos/main.nix
];
};
"iso" = nixosSystem {
system = "x86_64-linux";
modules = [
./common/tomeutils.nix
({modulesPath, ...}: {
imports = [
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
];
users.users."root".openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL5ibKzd+V2eR1vmvBAfSWcZmPB8zUYFMAN3FS6xY9ma"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKkR0w0kYy8ad6ulnF9o7ULZXOMy7kOdoxXzTEi5dqcq"
];
services.openssh.openFirewall = true;
})
];
};
};
packages.x86_64-linux = let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
in {
dashy-ui = pkgs.callPackage ./pkgs/dashy-ui.nix {};
};
};
}