Update files
This commit is contained in:
1
initial-configs/passwords/chris
Normal file
1
initial-configs/passwords/chris
Normal file
@@ -0,0 +1 @@
|
|||||||
|
$6$MCVd.EUOYYB0A1eS$S1/gSfAq1c2dBCofvJp9RtW.o5mLi78h0Y39LABIeIauPRjlEny/1R5aXEA7uPrZ3TPxhnYOYxTdbCi0imFZp.
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
users.users.chris = {
|
users.users.chris = {
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
initialPassword = "changeme123";
|
hashedPasswordFile = "/persist/passwords/chris";
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"chris"
|
"chris"
|
||||||
@@ -13,4 +13,20 @@
|
|||||||
"docker"
|
"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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user