fix: move bin to toplevel and add reuid-slurm.sh

This commit is contained in:
2025-09-27 13:42:09 +02:00
parent 398af17797
commit 34c28e18bf
5 changed files with 25 additions and 0 deletions

View File

@@ -1,29 +0,0 @@
#!/usr/bin/env bash
id=$1
user=$2
name="$3"
grp="\ $user = { gid = "$id"; };"
read -d '' usr << EOF
\\\ $user = {\\\n\
description = "$name";\\\n\
home = "/home/$user";\\\n\
group = "$user";\\\n\
extraGroups = [\\\n\
"users"\\\n\
"docker"\\\n\
];\\\n\
uid = $id;\\\n\
isNormalUser = true;\\\n\
createHome = true;\\\n\
openssh.authorizedKeys.keys = [];\\\n\
};\\\n\
EOF
sed -i "
/# @grp@/i $grp
/# @usr@/i $usr
" stokes/users.nix

View File

@@ -1,18 +0,0 @@
#!/usr/bin/env bash
TOP="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)/.."
if [ "x$1" = "x" ]; then
echo "usage: initca.sh {cluster}"
exit 1
fi
ca=$TOP/modules/initca.nix
cd $TOP/$1
echo "--- Preparing CA certificate"
nix-build -o ca $ca
echo "--- Safeguarding CA certificate"
nix-store --add-root $(pwd)/ca --indirect -r $(nix-instantiate --add-root $ca)

View File

@@ -1,3 +0,0 @@
#!/bin/sh
dd if=/dev/random of=jwt_hs256.key bs=32 count=1
chmod 400 jwt_hs256.key

View File

@@ -1,2 +0,0 @@
#!/bin/sh
mungekey -c -b 2048 -k munge.key