summaryrefslogtreecommitdiffstats
path: root/lass/5pkgs/l-gen-secrets
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2018-12-16 20:28:28 +0100
committerjeschli <jeschli@gmail.com>2018-12-16 20:28:28 +0100
commit8605ac91ae3a3859ab906a5fa2e9b0e3dfcd6e1e (patch)
tree77618847347d2526897e94da744ab57588947567 /lass/5pkgs/l-gen-secrets
parent5030b74cc5c578bb82619a24592504a6008f1a10 (diff)
parent8705b4dbc8e8cf0c4e09c114daad3f96026520ab (diff)
Merge branch 'master' of prism.r:stockholm
Diffstat (limited to 'lass/5pkgs/l-gen-secrets')
-rw-r--r--lass/5pkgs/l-gen-secrets/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/lass/5pkgs/l-gen-secrets/default.nix b/lass/5pkgs/l-gen-secrets/default.nix
index b6cb2ec7e..85b050644 100644
--- a/lass/5pkgs/l-gen-secrets/default.nix
+++ b/lass/5pkgs/l-gen-secrets/default.nix
@@ -8,6 +8,8 @@ pkgs.writeDashBin "l-gen-secrets" ''
${pkgs.openssh}/bin/ssh-keygen -t ed25519 -f $TMPDIR/ssh.id_ed25519 -P "" -C "" >/dev/null
${pkgs.openssl}/bin/openssl genrsa -out $TMPDIR/retiolum.rsa_key.priv 4096 2>/dev/null > /dev/null
${pkgs.openssl}/bin/openssl rsa -in $TMPDIR/retiolum.rsa_key.priv -pubout -out $TMPDIR/retiolum.rsa_key.pub 2>/dev/null > /dev/null
+ ${pkgs.wireguard}/bin/wg genkey > $TMPDIR/wiregrill.key
+ ${pkgs.coreutils}/bin/cat $TMPDIR/wiregrill.key | ${pkgs.wireguard}/bin/wg pubkey > $TMPDIR/wiregrill.pub
cat <<EOF > $TMPDIR/hashedPasswords.nix
{
root = "$HASHED_PASSWORD";
@@ -35,6 +37,15 @@ pkgs.writeDashBin "l-gen-secrets" ''
$(cat $TMPDIR/retiolum.rsa_key.pub)
${"''"};
};
+ wiregrill = {
+ ip6.addr = (wip6 "changeme").address;
+ aliases = [
+ "$HOSTNAME.w"
+ ];
+ wireguard.pubkey = ${"''"}
+ $(cat $TMPDIR/wiregrill.pub)
+ ${"''"};
+ };
};
ssh.privkey.path = <secrets/ssh.id_ed25519>;
ssh.pubkey = "$(cat $TMPDIR/ssh.id_ed25519.pub)";