diff --git a/flake.nix b/flake.nix index c5f4752..448218a 100644 --- a/flake.nix +++ b/flake.nix @@ -45,7 +45,8 @@ && builtins.match "^_+$" username == null && builtins.match "^nix.*" username == null && username != "root"; - hostConfig = ./hosts + "/${hostname}/hardware-configuration.nix"; + hostConfig = assert builtins.pathExists (./hosts + "/${hostname}/hardware-configuration.nix"); + ./hosts + "/${hostname}/hardware-configuration.nix"; passwordHashPath = "/etc/nixos/secrets/${username}/password.hash"; specialArgs = { inherit inputs system hostname username usernameValid passwordHashPath; }; diff --git a/modules/common.nix b/modules/common.nix index ac3b882..20b71a3 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -117,7 +117,7 @@ isNormalUser = true; extraGroups = [ "wheel" "networkmanager" "video" "seat" ]; # IMPORTANT: Generate a password hash with: mkpasswd -m sha-512 - # Save it to the path defined in flake.nix (ensure permissions are 600) + # Save it to /etc/nixos/secrets/${username}/password.hash (ensure permissions are 600) hashedPasswordFile = passwordHashPath; packages = with pkgs; [ # -- Noctalia Shell --