Personal-use NixOS configuration

Automatically set networking hostname

+9 -7
-2
hosts/decryption/default.nix
··· 29 29 nvidiaBusId = "PCI:1:0:0"; 30 30 }; 31 31 32 - networking.hostName = "decryption"; 33 - 34 32 system.stateVersion = "25.05"; 35 33 }
-2
hosts/encryption/default.nix
··· 27 27 28 28 time.timeZone = "US/Eastern"; 29 29 30 - networking.hostName = "encryption"; 31 - 32 30 system.stateVersion = "24.05"; 33 31 }
+7 -1
lib/mkSystem.nix
··· 4 4 }: 5 5 6 6 { 7 - name, 7 + hostName, 8 8 system, 9 9 extraModules ? [ ], 10 10 isLaptop ? false, ··· 37 37 inputs.disko.nixosModules.disko 38 38 39 39 ../hosts/${name} 40 + ../hosts/${hostName} 41 + 42 + { 43 + networking.hostName = hostName; 44 + } 40 45 ] 41 46 ++ inputs.nixpkgs.lib.optional isLaptop ../hardware/laptop.nix 42 47 ++ extraModules; ··· 48 53 pkgs 49 54 pkgs-unstable 50 55 isLaptop 56 + hostName 51 57 ; 52 58 53 59 lanzaboote = inputs.lanzaboote;
+2 -2
outputs.nix
··· 12 12 13 13 nixosConfigurations = { 14 14 encryption = mkSystem { 15 - name = "encryption"; 15 + hostName = "encryption"; 16 16 system = "x86_64-linux"; 17 17 }; 18 18 19 19 decryption = mkSystem { 20 - name = "decryption"; 20 + hostName = "decryption"; 21 21 system = "x86_64-linux"; 22 22 23 23 isLaptop = true;