-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
159 lines (137 loc) · 4.15 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
{
description = "the silliest NixOS config!";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11-small";
sops-nix.url = "github:Mic92/sops-nix";
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
alejandra.url = "github:kamadorueda/alejandra/3.0.0";
alejandra.inputs.nixpkgs.follows = "nixpkgs";
nix-secrets = {
url = "git+https://git.hypervirtual.world/harry123/nix-secrets.git"; # replace with your own repo
flake = false;
};
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
anyrun = {
url = "github:anyrun-org/anyrun";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1";
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
};
outputs =
{
self,
nixpkgs,
sops-nix,
nixos-generators,
nix-darwin,
nix-flatpak,
anyrun,
home-manager,
...
}@inputs:
let
username = "harry123";
secrets = builtins.toString inputs.nix-secrets;
specialArgs = {
inherit username;
inherit secrets;
inherit inputs;
};
in
{
nixosConfigurations = {
sisyphe = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = specialArgs;
modules = [
./hosts/sisyphe/configuration.nix
sops-nix.nixosModules.sops
];
};
# athena = nixpkgs.lib.nixosSystem {}:
labouse = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/labouse/configuration.nix
];
};
goober = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = specialArgs;
modules = [
./hosts/goober/configuration.nix
nix-flatpak.nixosModules.nix-flatpak
{environment.systemPackages = [ anyrun.packages."x86_64-linux".anyrun ];}
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./home-manager/home.nix;
home-manager.extraSpecialArgs = {inherit inputs;};
}
];
};
dionysos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit specialArgs;
};
modules = [
./hosts/dionysos/configuration.nix
];
};
};
isos = {
goober = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./features/isos/goober.nix
];
};
};
proxmox = {
sisyphe = nixos-generators.nixosGenerate {
system = "x86_64-linux";
specialArgs = {
diskSize = 600 * 1024;
inherit specialArgs;
};
modules = [
./hosts/sisyphe/configuration.nix
sops-nix.nixosModules.sops
];
format = "proxmox";
};
dionysos = nixos-generators.nixosGenerate {
system = "x86_64-linux";
specialArgs = {
diskSize = 20 * 1024;
inherit specialArgs;
};
modules = [
(
{ ... }:
{
nix.registry.nixpkgs.flake = nixpkgs;
}
)
./hosts/dionysos/configuration.nix
];
format = "proxmox";
};
};
darwinConfigurations."iMac-de-Eddie" = nix-darwin.lib.darwinSystem {
modules = [ ./hosts/dadarwin/configuration.nix
{system.configurationRevision = self.rev or self.dirtyRev or null;}
];
};
# Expose the package set, including overlays, for convenience.
darwinPackages = self.darwinConfigurations."iMac-de-Eddie".pkgs;
};
}