From 359c6fc719a5f588ba6844b724c93190f99674bb 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:52 +0000 Subject: [PATCH] Correct username prefix check Co-authored-by: ragusa-it <196988693+ragusa-it@users.noreply.github.com> --- README.md | 8 ++++---- flake.nix | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6cd1497..6a6ae97 100644 --- a/README.md +++ b/README.md @@ -138,10 +138,10 @@ sudo nixos-rebuild boot --profile-name gaming --flake .#gaming 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/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 +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 ``` ### Setup MangoWC diff --git a/flake.nix b/flake.nix index e8f591a..f792485 100644 --- a/flake.nix +++ b/flake.nix @@ -43,7 +43,7 @@ usernameValid = builtins.match "^[a-z_][a-z0-9_]*$" username != null && builtins.match "^_+$" username == null - && builtins.match "^nix" username == null + && builtins.match "^nix.*" username == null && username != "root"; hostConfig = (./hosts + "/${hostname}") + "/hardware-configuration.nix"; passwordHashPath = "/etc/nixos/secrets/${username}/password.hash";