Add mkUser Script

master
David Crompton 2023-09-01 11:00:19 -04:00
parent 1b2e620123
commit 0d9b9ec9ef
1 changed files with 17 additions and 0 deletions

17
machines/kcnhub/users/mkUser.sh Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env bash
projId=$(grep -r "homeProjectId" *.nix | grep -o "[0-9]*" | sort | tail -n1)
cat <<EOF > $1.nix
{ pkgs, ... }: {
users.users.$1 = {
isNormalUser = true;
extraGroups = [ "wheel" ];
homeSize = "50g";
homeProjectId = $((projId+1));
packages = with pkgs; [
];
};
}
EOF