Tighten path/docs clarity
Co-authored-by: ragusa-it <196988693+ragusa-it@users.noreply.github.com>
This commit is contained in:
10
README.md
10
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/<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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.";
|
||||
}
|
||||
];
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user