From 78fb8223744372bf1637922911b6fe98166f3859 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Feb 2026 20:59:23 +0000 Subject: [PATCH] Tighten path/docs clarity Co-authored-by: ragusa-it <196988693+ragusa-it@users.noreply.github.com> --- README.md | 10 +++++----- flake.nix | 4 ++-- modules/common.nix | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 5dac41d..6cd1497 100644 --- a/README.md +++ b/README.md @@ -136,12 +136,12 @@ sudo nixos-rebuild boot --profile-name gaming --flake .#gaming ### Change Password -Generate a password hash and save it to `/etc/nixos/secrets//password.hash` (required before applying the config): +Generate a password hash and save it to `/etc/nixos/secrets//password.hash` (replace `` with your actual username): ```bash -sudo mkdir -p /etc/nixos/secrets/ -sudo chmod 700 /etc/nixos/secrets/ -mkpasswd -m sha-512 | sudo tee /etc/nixos/secrets//password.hash -sudo chmod 600 /etc/nixos/secrets//password.hash +sudo mkdir -p /etc/nixos/secrets/john +sudo chmod 700 /etc/nixos/secrets/john +mkpasswd -m sha-512 | sudo tee /etc/nixos/secrets/john/password.hash +sudo chmod 600 /etc/nixos/secrets/john/password.hash ``` ### Setup MangoWC diff --git a/flake.nix b/flake.nix index 371ca30..e8f591a 100644 --- a/flake.nix +++ b/flake.nix @@ -45,8 +45,8 @@ && builtins.match "^_+$" username == null && builtins.match "^nix" username == null && username != "root"; - hostConfig = ./hosts + "/${hostname}/hardware-configuration.nix"; - passwordHashPath = assert usernameValid; "/etc/nixos/secrets/${username}/password.hash"; + hostConfig = (./hosts + "/${hostname}") + "/hardware-configuration.nix"; + passwordHashPath = "/etc/nixos/secrets/${username}/password.hash"; specialArgs = { inherit inputs system hostname username usernameValid passwordHashPath; }; # Verify mango flake exports the expected module diff --git a/modules/common.nix b/modules/common.nix index ec4924e..ec6f24e 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -4,7 +4,7 @@ assertions = [ { assertion = usernameValid; - message = "username must be a simple system user name and not reserved."; + message = "username must start with a-z or _, contain only lowercase letters, digits, and underscores, and must not be root or start with nix."; } ]; # --------------------------------------------------------------------------