18 lines
316 B
Bash
Executable File
18 lines
316 B
Bash
Executable File
#!/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
|