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 customPkgs = final: prev: {
53 zed-editor = inputs.nixpkgs-master.legacyPackages.${prev.system}.zed-editor;
54 };
55 };
56
57 darwinConfigurations = {
58 syl = darwin.lib.darwinSystem {
59 system = "x86_64-darwin";
60 modules = [
61 {
62 imports = [ ./hosts/syl/configuration.nix ];
63 _module.args.self = self;
64 }
65 home-manager.darwinModules.home-manager
66 {
67 home-manager.useGlobalPkgs = true;
68 home-manager.useUserPackages = true;
69 home-manager.users.icy = {
70 imports = [ ./darwin/home.nix ];
71 _module.args.self = self;
72 _module.args.host = "syl";
73 _module.args.inputs = inputs;
74 };
75 }
76 ];
77 };
78
79 kvothe = darwin.lib.darwinSystem {
80 system = "aarch64-darwin";
81 modules = [
82 {
83 imports = [ ./hosts/kvothe/configuration.nix ];
84 _module.args.self = self;
85 nixpkgs.overlays = [ nix-your-shell.overlays.default ];
86 }
87 home-manager.darwinModules.home-manager
88 {
89 home-manager.useGlobalPkgs = true;
90 home-manager.useUserPackages = true;
91 home-manager.users.icy = {
92 imports = [ ./darwin/home.nix ];
93 _module.args.self = self;
94 _module.args.host = "kvothe";
95 _module.args.inputs = inputs;
96 };
97 }
98 ];
99 };
100 };
101
102 nixosConfigurations = {
103 wyndle = nixpkgs.lib.nixosSystem {
104 system = "x86_64-linux";
105 modules = [
106 {
107 imports = [ ./hosts/wyndle/configuration.nix ];
108 _module.args.self = self;
109 nixpkgs.overlays = [ nix-your-shell.overlays.default ];
110 }
111 home-manager.nixosModules.home-manager
112 {
113 home-manager.useGlobalPkgs = true;
114 home-manager.useUserPackages = true;
115 home-manager.users.icy = {
116 imports = [ ./home.nix ];
117 _module.args.self = self;
118 _module.args.host = "wyndle";
119 _module.args.inputs = inputs;
120 };
121 }
122 ];
123 };
124 };
125
126 nixosConfigurations = {
127 sini = nixpkgs.lib.nixosSystem {
128 system = "x86_64-linux";
129 modules = [
130 ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; })
131 ({ config, pkgs, ... }: {
132 services.pixelfed.package = nixpkgs-master.legacyPackages."x86_64-linux".pixelfed;
133 services.pixelfed.phpPackage = nixpkgs-master.legacyPackages."x86_64-linux".php82;
134 })
135 # ({ pkgs, ... }: {
136 # imports = [ nix-snapshotter.nixosModules.default ];
137 # nixpkgs.overlays = [ nix-snapshotter.overlays.default ];
138 # })
139 {
140 imports = [ ./hosts/sini/configuration.nix ];
141 _module.args.self = self;
142 }
143 ];
144 };
145 };
146
147 nixosConfigurations = {
148 denna = nixpkgs.lib.nixosSystem {
149 system = "x86_64-linux";
150 modules = [
151 ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; })
152 {
153 imports = [ ./hosts/denna/configuration.nix ];
154 _module.args.self = self;
155 }
156 ];
157 };
158 };
159
160 nixosConfigurations = {
161 iso = nixpkgs.lib.nixosSystem {
162 system = "x86_64-linux";
163 modules = [
164 ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; })
165 {
166 imports = [ ./hosts/iso/configuration.nix ];
167 _module.args.self = self;
168 }
169 ];
170 };
171 };
172 };
173}