revamp nixops structure(s)

This commit is contained in:
Jonas Juselius
2022-08-19 15:33:10 +02:00
parent ece1b22711
commit cf956c739e
86 changed files with 8 additions and 2644 deletions

18
nixops/bin/initca.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/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)