{ pkgs, ... }: { users.users.chris = { uid = 1000; isNormalUser = true; hashedPasswordFile = "/persist/passwords/chris"; shell = pkgs.zsh; extraGroups = [ "chris" "wheel" "networkmanager" "docker" ]; }; system.activationScripts = { setupInitialPassword = { supportsDryRun = true; text = '' # Ensure the directory exists mkdir -p /persist/passwords # Copy the initial hash if the file is missing if [ ! -f /persist/passwords/chris ]; then cp ${../initial-configs/passwords/chris} /persist/passwords/chris chmod 600 /persist/passwords/chris chown root:root /persist/passwords/chris fi ''; }; }; }