Update files

This commit is contained in:
2026-03-22 21:23:48 +00:00
parent e41939f2e1
commit 5885f86813
2 changed files with 18 additions and 1 deletions

View File

@@ -0,0 +1 @@
$6$MCVd.EUOYYB0A1eS$S1/gSfAq1c2dBCofvJp9RtW.o5mLi78h0Y39LABIeIauPRjlEny/1R5aXEA7uPrZ3TPxhnYOYxTdbCi0imFZp.

View File

@@ -4,7 +4,7 @@
users.users.chris = {
uid = 1000;
isNormalUser = true;
initialPassword = "changeme123";
hashedPasswordFile = "/persist/passwords/chris";
shell = pkgs.zsh;
extraGroups = [
"chris"
@@ -13,4 +13,20 @@
"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
'';
};
};
}