flake.nix (view raw)
1{
2 description = "icy's nixos config";
3
4 inputs = {
5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6 nixpkgs-master.url = "github:NixOS/nixpkgs/master";
7
8 nixos-hardware.url = "github:nixos/nixos-hardware";
9
10 home-manager = {
11 url = "github:nix-community/home-manager";
12 inputs.nixpkgs.follows = "nixpkgs";
13 };
14
15
16 darwin = {
17 url = "github:lnl7/nix-darwin/master";
18 inputs.nixpkgs.follows = "nixpkgs";
19 };
20
21 prompt = {
22 url = "git+https://git.peppe.rs/cli/prompt";
23 inputs.nixpkgs.follows = "nixpkgs";
24 };
25
26 nix-snapshotter = {
27 url = "github:pdtpartners/nix-snapshotter";
28 inputs.nixpkgs.follows = "nixpkgs";
29 };
30
31 nix-your-shell = {
32 url = "github:MercuryTechnologies/nix-your-shell";
33 inputs.nixpkgs.follows = "nixpkgs";
34 };
35 };
36
37 outputs =
38 { self
39 , nixpkgs
40 , nixpkgs-master
41 , nixos-hardware
42 , nix-snapshotter
43 , nix-your-shell
44 , home-manager
45 , prompt
46 , darwin
47 , ...
48 } @ inputs: {
49
50 overlays = {
51 prompt = prompt.overlay;
52 };
53
54 darwinConfigurations = {
55 syl = darwin.lib.darwinSystem {
56 system = "x86_64-darwin";
57 modules = [
58 {
59 imports = [ ./hosts/syl/configuration.nix ];
60 _module.args.self = self;
61 }
62 home-manager.darwinModules.home-manager
63 {
64 home-manager.useGlobalPkgs = true;
65 home-manager.useUserPackages = true;
66 home-manager.users.icy = {
67 imports = [ ./darwin/home.nix ];
68 _module.args.self = self;
69 _module.args.host = "syl";
70 _module.args.inputs = inputs;
71 };
72 }
73 ];
74 };
75
76 kvothe = darwin.lib.darwinSystem {
77 system = "aarch64-darwin";
78 modules = [
79 {
80 imports = [ ./hosts/kvothe/configuration.nix ];
81 _module.args.self = self;
82 }
83 home-manager.darwinModules.home-manager
84 {
85 home-manager.useGlobalPkgs = true;
86 home-manager.useUserPackages = true;
87 home-manager.users.icy = {
88 imports = [ ./darwin/home.nix ];
89 _module.args.self = self;
90 _module.args.host = "kvothe";
91 _module.args.inputs = inputs;
92 };
93 }
94 ];
95 };
96 };
97
98 nixosConfigurations = {
99 wyndle = nixpkgs.lib.nixosSystem {
100 system = "x86_64-linux";
101 modules = [
102 {
103 imports = [ ./hosts/wyndle/configuration.nix ];
104 _module.args.self = self;
105 nixpkgs.overlays = [ nix-your-shell.overlays.default ];
106 }
107 home-manager.nixosModules.home-manager
108 {
109 home-manager.useGlobalPkgs = true;
110 home-manager.useUserPackages = true;
111 home-manager.users.icy = {
112 imports = [ ./home.nix ];
113 _module.args.self = self;
114 _module.args.host = "wyndle";
115 _module.args.inputs = inputs;
116 };
117 }
118 ];
119 };
120 };
121
122 nixosConfigurations = {
123 sini = nixpkgs.lib.nixosSystem {
124 system = "x86_64-linux";
125 modules = [
126 ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; })
127 ({ config, pkgs, ... }: {
128 services.pixelfed.package = nixpkgs-master.legacyPackages."x86_64-linux".pixelfed;
129 services.pixelfed.phpPackage = nixpkgs-master.legacyPackages."x86_64-linux".php82;
130 })
131 # ({ pkgs, ... }: {
132 # imports = [ nix-snapshotter.nixosModules.default ];
133 # nixpkgs.overlays = [ nix-snapshotter.overlays.default ];
134 # })
135 {
136 imports = [ ./hosts/sini/configuration.nix ];
137 _module.args.self = self;
138 }
139 ];
140 };
141 };
142
143 nixosConfigurations = {
144 denna = nixpkgs.lib.nixosSystem {
145 system = "x86_64-linux";
146 modules = [
147 ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; })
148 {
149 imports = [ ./hosts/denna/configuration.nix ];
150 _module.args.self = self;
151 }
152 ];
153 };
154 };
155
156 nixosConfigurations = {
157 iso = nixpkgs.lib.nixosSystem {
158 system = "x86_64-linux";
159 modules = [
160 ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; })
161 {
162 imports = [ ./hosts/iso/configuration.nix ];
163 _module.args.self = self;
164 }
165 ];
166 };
167 };
168 };
169}