Add mkUser Script

David Crompton 2023-09-01 11:00:19 -04:00
parent 749232ed04
commit 432d86acc9
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