Assert host config exists
Co-authored-by: ragusa-it <196988693+ragusa-it@users.noreply.github.com>
This commit is contained in:
@@ -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; };
|
||||
|
||||
|
||||
@@ -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 --
|
||||
|
||||
Reference in New Issue
Block a user