Tighten path/docs clarity

Co-authored-by: ragusa-it <196988693+ragusa-it@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-01 20:59:23 +00:00
parent 0a24c471aa
commit 78fb822374
3 changed files with 8 additions and 8 deletions

View File

@@ -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/<username>/password.hash` (required before applying the config):
Generate a password hash and save it to `/etc/nixos/secrets/<username>/password.hash` (replace `<username>` with your actual username):
```bash
sudo mkdir -p /etc/nixos/secrets/<username>
sudo chmod 700 /etc/nixos/secrets/<username>
mkpasswd -m sha-512 | sudo tee /etc/nixos/secrets/<username>/password.hash
sudo chmod 600 /etc/nixos/secrets/<username>/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

View File

@@ -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

View File

@@ -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.";
}
];
# --------------------------------------------------------------------------