my nix dotfiles
1{
2 description = "icy's nixos config";
3
4 inputs = {
5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6 nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.05";
7 nixpkgs-master.url = "github:NixOS/nixpkgs/master";
8
9
10 nixos-hardware.url = "github:nixos/nixos-hardware";
11
12 home-manager = {
13 url = "github:nix-community/home-manager";
14 inputs.nixpkgs.follows = "nixpkgs";
15 };
16
17 darwin = {
18 url = "github:lnl7/nix-darwin/nix-darwin-25.05";
19 inputs.nixpkgs.follows = "nixpkgs-stable";
20 };
21
22 prompt = {
23 url = "git+https://git.peppe.rs/cli/prompt?ref=master";
24 inputs.nixpkgs.follows = "nixpkgs";
25 };
26
27
28 nix-your-shell = {
29 url = "github:MercuryTechnologies/nix-your-shell";
30 inputs.nixpkgs.follows = "nixpkgs";
31 };
32 };
33
34 outputs =
35 { self
36 , nixpkgs
37 , nixpkgs-master
38 , nixos-hardware
39 , nix-your-shell
40 , home-manager
41 , prompt
42 , darwin
43 , ...
44 }@inputs:
45
46 let
47 supportedSystems = [
48 "x86_64-linux"
49 "x86_64-darwin"
50 "aarch64-linux"
51 "aarch64-darwin"
52 ];
53 forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
54 in
55 {
56
57 darwinConfigurations = {
58 kvothe = darwin.lib.darwinSystem {
59 system = "aarch64-darwin";
60 modules = [
61 {
62 imports = [ ./hosts/kvothe/configuration.nix ];
63 _module.args.self = self;
64 nixpkgs.overlays = [
65 nix-your-shell.overlays.default
66 # prompt.overlay
67 ];
68 }
69 home-manager.darwinModules.home-manager
70 {
71 home-manager.useGlobalPkgs = true;
72 home-manager.useUserPackages = true;
73 home-manager.users.icy = {
74 imports = [ ./darwin/home.nix ];
75 _module.args.self = self;
76 _module.args.host = "kvothe";
77 _module.args.inputs = inputs;
78 };
79 }
80 ];
81 };
82 };
83
84 nixosConfigurations = {
85 wyndle = nixpkgs.lib.nixosSystem {
86 system = "x86_64-linux";
87 modules = [
88 {
89 imports = [ ./hosts/wyndle/configuration.nix ];
90 _module.args.self = self;
91 nixpkgs.overlays = [
92 nix-your-shell.overlays.default
93 prompt.overlay
94 ];
95 }
96 home-manager.nixosModules.home-manager
97 {
98 home-manager.useGlobalPkgs = true;
99 home-manager.useUserPackages = true;
100 home-manager.users.icy = {
101 imports = [ ./home.nix ];
102 _module.args.self = self;
103 _module.args.host = "wyndle";
104 _module.args.inputs = inputs;
105 };
106 }
107 ];
108 };
109 };
110
111 nixosConfigurations = {
112 sini = nixpkgs.lib.nixosSystem {
113 system = "x86_64-linux";
114 modules = [
115 ({
116 config = {
117 nix.registry.nixpkgs.flake = nixpkgs;
118 };
119 })
120 (
121 { config, pkgs, ... }:
122 {
123 services.pixelfed.package = nixpkgs-master.legacyPackages."x86_64-linux".pixelfed;
124 services.pixelfed.phpPackage = nixpkgs-master.legacyPackages."x86_64-linux".php82;
125 }
126 )
127 # ({ pkgs, ... }: {
128 # imports = [ nix-snapshotter.nixosModules.default ];
129 # nixpkgs.overlays = [ nix-snapshotter.overlays.default ];
130 # })
131 {
132 imports = [ ./hosts/sini/configuration.nix ];
133 _module.args.self = self;
134 }
135 ];
136 };
137 };
138
139 nixosConfigurations = {
140 denna = nixpkgs.lib.nixosSystem {
141 system = "x86_64-linux";
142 modules = [
143 ({
144 config = {
145 nix.registry.nixpkgs.flake = nixpkgs;
146 };
147 })
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 ({
161 config = {
162 nix.registry.nixpkgs.flake = nixpkgs;
163 };
164 })
165 {
166 imports = [ ./hosts/iso/configuration.nix ];
167 _module.args.self = self;
168 }
169 ];
170 };
171 };
172
173 devShells = forAllSystems (
174 system:
175 let
176 nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
177 pkgs = nixpkgsFor.${system};
178 in
179 {
180 default = pkgs.mkShell {
181 nativeBuildInputs = with pkgs; [
182 nixd
183 nixfmt-rfc-style
184 ];
185 };
186 }
187 );
188 };
189}