2026-03-09 21:43:40 +00:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
users.users.chris = {
|
|
|
|
|
uid = 1000;
|
|
|
|
|
isNormalUser = true;
|
2026-03-22 21:48:00 +00:00
|
|
|
hashedPasswordFile = "/persist/passwords/chris";
|
|
|
|
|
shell = pkgs.zsh;
|
|
|
|
|
extraGroups = [
|
|
|
|
|
"chris"
|
|
|
|
|
"wheel"
|
|
|
|
|
"networkmanager"
|
|
|
|
|
"docker"
|
|
|
|
|
];
|
|
|
|
|
};
|
2026-03-22 21:23:48 +00:00
|
|
|
system.activationScripts = {
|
|
|
|
|
setupInitialPassword = {
|
|
|
|
|
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
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
};
|
2026-03-09 21:43:40 +00:00
|
|
|
}
|