From 02d7e42ab4f40d194065d06e5745cc5dfeb7e0b4 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 5 Apr 2018 13:06:39 +0200 Subject: uucp to odin --- hel.nix | 6 +++--- odin.nix | 22 ++++++++++++++++++++++ ymir.nix | 4 ++-- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/hel.nix b/hel.nix index 158ab2fa..60ae34c9 100644 --- a/hel.nix +++ b/hel.nix @@ -202,14 +202,14 @@ uucp = { enable = true; nodeName = "hel"; - remoteNodes = ["isaac" "ymir"]; # legacy name for odin + remoteNodes = ["odin" "ymir"]; sshUser = { openssh.authorizedKeys.keys = [ ''restrict,command="${config.security.wrapperDir}/uucico" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFH1QWdgoC03nzW5GBuCl2pqASHeIXIYtE9IInHdaKcO uucp@ymir'' - ''restrict,command="${pkgs.writeScript "odin.sh" "#!${pkgs.stdenv.shell}\necho .\nexec -a uucico ${config.security.wrapperDir}/uucico\n"}" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJhACtnt9+3j2ev4QVA2QBlPtblPnu7yol2njgfMlHtC uucp@odin'' + ''restrict,command="${config.security.wrapperDir}/uucico" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJhACtnt9+3j2ev4QVA2QBlPtblPnu7yol2njgfMlHtC uucp@odin'' ]; }; sshConfig = '' - Host isaac + Host odin Hostname odin.asgard.yggdrasil IdentityFile ~/.ssh/odin Host ymir diff --git a/odin.nix b/odin.nix index 24129d38..aa822d0e 100644 --- a/odin.nix +++ b/odin.nix @@ -9,6 +9,7 @@ [ # Include the results of the hardware scan. ./odin/hw.nix ./users.nix + ./custom/uucp.nix ]; # Use the GRUB 2 boot loader. @@ -73,6 +74,27 @@ services.haveged.enable = true; + services.uucp = { + enable = true; + nodeName = "odin"; + remoteNodes = [ "ymir" "hel" ]; + sshUser = { + openssh.authorizedKeys.keys = [ ''restrict,command="${config.security.wrapperDir}/uucico" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKD8ycFGfVkBL9wjA5Kc33cl6Qt5K2505G/38oH8Cy/e uucp@hel'' + ''restrict,command="${config.security.wrapperDir}/uucico" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGANj+LJ4CI6VrAgBRocKCGq74kZnwD1PdKr/gdlfVr1 uucp@ymir'' + ]; + }; + sshConfig = '' + Host ymir + Hostname ymir.niflheim.yggdrasil + IdentityFile ~/.ssh/ymir + Host hel + Hostname hel.midgard.yggdrasil + IdentityFile ~/.ssh/hel + ''; + commandPath = ["${pkgs.rmail}/bin"]; + defaultCommands = ["rmail"]; + }; + system.autoUpgrade.enable = true; system.stateVersion = "18.09"; diff --git a/ymir.nix b/ymir.nix index 7f582980..14d9b36c 100644 --- a/ymir.nix +++ b/ymir.nix @@ -850,14 +850,14 @@ in rec { services.uucp = { enable = true; nodeName = "ymir"; - remoteNodes = ["isaac" "hel"]; # legacy name for odin + remoteNodes = [ "odin" "hel" ]; sshUser = { openssh.authorizedKeys.keys = [ ''restrict,command="${config.security.wrapperDir}/uucico" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEgtDHA7oDIaRwggGGznNaKZF68rFTziqefSCn1t9ZKe uucp@odin'' ''restrict,command="${config.security.wrapperDir}/uucico" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOWBybBQKbPucqBgULQ1phv7IKFWl1Xc4drkCx3D5mIz uucp@hel'' ]; }; sshConfig = '' - Host isaac + Host odin Hostname odin.asgard.yggdrasil IdentityFile ~/.ssh/odin Host hel -- cgit v1.2.3