diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 21 |
1 files changed, 17 insertions, 4 deletions
@@ -4,9 +4,11 @@ | |||
4 | nixConfig = { | 4 | nixConfig = { |
5 | extra-substituters = [ | 5 | extra-substituters = [ |
6 | "https://nix-community.cachix.org" | 6 | "https://nix-community.cachix.org" |
7 | "https://niri.cachix.org" | ||
7 | ]; | 8 | ]; |
8 | extra-trusted-public-keys = [ | 9 | extra-trusted-public-keys = [ |
9 | "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" | 10 | "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" |
11 | "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" | ||
10 | ]; | 12 | ]; |
11 | }; | 13 | }; |
12 | 14 | ||
@@ -170,7 +172,7 @@ | |||
170 | type = "github"; | 172 | type = "github"; |
171 | owner = "gkleen"; | 173 | owner = "gkleen"; |
172 | repo = "Waybar"; | 174 | repo = "Waybar"; |
173 | ref = "feat/privacy-ignore"; | 175 | ref = "feat/niri-workspaces-hide"; |
174 | inputs = { | 176 | inputs = { |
175 | nixpkgs.follows = "nixpkgs"; | 177 | nixpkgs.follows = "nixpkgs"; |
176 | flake-compat.follows = "flake-compat"; | 178 | flake-compat.follows = "flake-compat"; |
@@ -182,9 +184,19 @@ | |||
182 | repo = "NixVirt"; | 184 | repo = "NixVirt"; |
183 | inputs.nixpkgs.follows = "nixpkgs"; | 185 | inputs.nixpkgs.follows = "nixpkgs"; |
184 | }; | 186 | }; |
187 | niri-flake = { | ||
188 | type = "github"; | ||
189 | owner = "sodiboo"; | ||
190 | repo = "niri-flake"; | ||
191 | ref = "main"; | ||
192 | inputs = { | ||
193 | nixpkgs.follows = "nixpkgs"; | ||
194 | niri-unstable.url = "github:gkleen/niri"; | ||
195 | }; | ||
196 | }; | ||
185 | }; | 197 | }; |
186 | 198 | ||
187 | outputs = { self, nixpkgs, home-manager, sops-nix, deploy-rs, nvfetcher, ... }@inputs: | 199 | outputs = { self, nixpkgs, home-manager, sops-nix, deploy-rs, nvfetcher, niri-flake, ... }@inputs: |
188 | let | 200 | let |
189 | inherit (builtins) attrNames attrValues elemAt toJSON isNull pathExists; | 201 | inherit (builtins) attrNames attrValues elemAt toJSON isNull pathExists; |
190 | inherit (nixpkgs) lib; | 202 | inherit (nixpkgs) lib; |
@@ -267,9 +279,10 @@ | |||
267 | mkAccountModule = dir: path: accountName: | 279 | mkAccountModule = dir: path: accountName: |
268 | let | 280 | let |
269 | userName = accountUserName accountName; | 281 | userName = accountUserName accountName; |
282 | hostName = accountHostName accountName; | ||
270 | in overrideModule | 283 | in overrideModule |
271 | (import (dir + "/${path}")) | 284 | (import (dir + "/${path}")) |
272 | (inputs: inputs // { inherit userName; }) | 285 | (inputs: inputs // { inherit userName hostName; }) |
273 | (outputs: { _file = dir + "/${path}"; } | 286 | (outputs: { _file = dir + "/${path}"; } |
274 | // outputs | 287 | // outputs |
275 | // { imports = [self.nixosModules.users.${userName} or ({...}: { imports = defaultUserProfiles userName; })] ++ (outputs.imports or []); }); | 288 | // { imports = [self.nixosModules.users.${userName} or ({...}: { imports = defaultUserProfiles userName; })] ++ (outputs.imports or []); }); |
@@ -322,7 +335,7 @@ | |||
322 | nixosConfigurations = installerNixosConfigurations // nixImport rec { dir = ./hosts; _import = mkNixosConfiguration [] dir; }; | 335 | nixosConfigurations = installerNixosConfigurations // nixImport rec { dir = ./hosts; _import = mkNixosConfiguration [] dir; }; |
323 | 336 | ||
324 | homeModules = nixImport rec { dir = ./home-modules; }; | 337 | homeModules = nixImport rec { dir = ./home-modules; }; |
325 | homeConfigurations = listToAttrs (concatLists (mapAttrsToList (hostname: nixosConfig: mapAttrsToList (username: configuration: nameValuePair "${username}@${hostname}" { inherit (configuration.home) activationPackage; }) nixosConfig.config.home-manager.users) self.nixosConfigurations)); | 338 | homeConfigurations = listToAttrs (concatLists (mapAttrsToList (hostname: nixosConfig: mapAttrsToList (username: configuration: nameValuePair "${username}@${hostname}" { inherit (configuration.home) activationPackage; inherit (configuration) home-files; }) nixosConfig.config.home-manager.users) self.nixosConfigurations)); |
326 | 339 | ||
327 | overlays = mapAttrs (_name: path: mkOverlay path) overlayPaths; | 340 | overlays = mapAttrs (_name: path: mkOverlay path) overlayPaths; |
328 | 341 | ||