diff options
author | makefu <github@syntax-fehler.de> | 2023-07-28 22:24:15 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2023-07-28 22:24:15 +0200 |
commit | 060a8f28fa1fc648bdf66afb31a5d1efac868837 (patch) | |
tree | 2b354eacc7897365ee45244fe7a51720e0d0333f /makefu/5pkgs/stockholm-new-host | |
parent | cbfcc890e3b76d942b927809bf981a5fa7289e6a (diff) |
makefu: move out to own repo, add vacation-note
Diffstat (limited to 'makefu/5pkgs/stockholm-new-host')
-rw-r--r-- | makefu/5pkgs/stockholm-new-host/default.nix | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/makefu/5pkgs/stockholm-new-host/default.nix b/makefu/5pkgs/stockholm-new-host/default.nix deleted file mode 100644 index 39e08808b..000000000 --- a/makefu/5pkgs/stockholm-new-host/default.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ pkgs }: -pkgs.writers.writeDashBin "sthockholm-new-host" '' - set -eu - PATH=${lib.makePathBin with pkgs;[ mkpasswd pwqgen sshd coreutils openssh tinc_pre pass ]}:$PATH - HOSTNAME=$1 - STOCKHOLM=~/stockholm - KARTEI=$STOCKHOLM/kartei/makefu - export PASSWORD_STORE_DIR=$HOME/.secrets-pass - TMPDIR=$(mktemp -d) - - PASSWORD=$(pwqgen) - HASHED_PASSWORD=$(echo $PASSWORD | mkpasswd -m sha-512 -s) - - cd "$TMPDIR" - cat <<EOF > hashedPasswords.nix - { - root = "$HASHED_PASSWORD"; - } - EOF - - tinc --config "$PWD" generate-keys 4096 - mv ed25519_key.priv retiolum.ed25519_key.priv - mv rsa_key.priv retiolum.rsa_key.priv - mv ed25519_key.pub retiolum.ed25519_key.pub - mv rsa_key.pub retiolum.rsa_key.pub - - ssh-keygen -t ed25519 -f ssh_host_ed25519_key -P "" - ssh-keygen -t rsa -f ssh_host_rsa_key -P "" - - wg genkey > wireguard.key - wg pubkey < wireguard.key > wireguard.pub - - for i in *;do - cat "$i" | pass insert -m "$HOSTNAME/$i" - done - - cp retiolum.ed25519_key.pub "$KARTEI/retiolum/$HOSTNAME_ed25519.pub" - cp retiolum.rsa_key.pub "$KARTEI/retiolum/$HOSTNAME.pub" - cp ssh_host_ed25519_key.pub "$KARTEI/sshd/$HOSTNAME.pub" - echo "$PASSWORD" | pass insert -m "$HOSTNAME/root" - - - cat <<EOF - # add to $KARTEI/default.nix - # then git add $KARTEI && git commit -m "ma $HOSTNAME.r: add to kartei" - $HOSTNAME = { - nets.retiolum.ipv4.addr = "10.243.12.XXX"; - }; - EOF -'' |