my system configurations ^-^
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor(flake): host definitions helper functions

willow b2a96e38 92381050

+21 -42
+21 -42
flake.nix
··· 7 7 nix-darwin, 8 8 home-manager, 9 9 ... 10 - } @ inputs: { 11 - darwinConfigurations = { 12 - starling = nix-darwin.lib.darwinSystem { 13 - modules = [ 14 - ./hosts/starling 15 - home-manager.darwinModules.home-manager 16 - ]; 17 - specialArgs = { 18 - inherit self inputs; 19 - }; 20 - }; 21 - }; 22 - nixosConfigurations = { 23 - earthy = nixos-stable.lib.nixosSystem { 10 + } @ inputs: let 11 + mkNixosSystem = name: hostPath: 12 + nixos-stable.lib.nixosSystem { 24 13 modules = [ 25 - ./hosts/earthy 14 + hostPath 26 15 home-manager.nixosModules.home-manager 27 16 ]; 28 - specialArgs = { 29 - inherit self inputs; 30 - }; 17 + specialArgs = {inherit self inputs;}; 31 18 }; 32 - anemone = nixos-stable.lib.nixosSystem { 19 + 20 + mkDarwinSystem = name: hostPath: 21 + nix-darwin.lib.darwinSystem { 33 22 modules = [ 34 - ./hosts/anemone 35 - home-manager.nixosModules.home-manager 23 + hostPath 24 + home-manager.darwinModules.home-manager 36 25 ]; 37 - specialArgs = { 38 - inherit self inputs; 39 - }; 26 + specialArgs = {inherit self inputs;}; 40 27 }; 41 - lily = nixos-stable.lib.nixosSystem { 42 - modules = [ 43 - ./hosts/lily 44 - home-manager.nixosModules.home-manager 45 - ]; 46 - specialArgs = { 47 - inherit self inputs; 48 - }; 49 - }; 50 - zinnia = nixos-stable.lib.nixosSystem { 51 - modules = [ 52 - ./hosts/zinnia 53 - home-manager.nixosModules.home-manager 54 - ]; 55 - specialArgs = { 56 - inherit self inputs; 57 - }; 58 - }; 28 + in { 29 + nixosConfigurations = builtins.mapAttrs mkNixosSystem { 30 + earthy = ./hosts/earthy; 31 + anemone = ./hosts/anemone; 32 + lily = ./hosts/lily; 33 + zinnia = ./hosts/zinnia; 34 + }; 35 + 36 + darwinConfigurations = builtins.mapAttrs mkDarwinSystem { 37 + starling = ./hosts/starling; 59 38 }; 60 39 }; 61 40