From 4c978e0ccbed6e6a7fdaa2cde21f3951aa0a8ab8 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 2 Aug 2024 22:40:47 +0200 Subject: refactor(nixos/openssh): Migrate from `system/services` --- modules/nixos/vhack/openssh/default.nix | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 modules/nixos/vhack/openssh/default.nix (limited to 'modules/nixos/vhack/openssh/default.nix') diff --git a/modules/nixos/vhack/openssh/default.nix b/modules/nixos/vhack/openssh/default.nix new file mode 100644 index 0000000..30d16a6 --- /dev/null +++ b/modules/nixos/vhack/openssh/default.nix @@ -0,0 +1,31 @@ +{ + config, + lib, + ... +}: let + cfg = config.vhack.openssh; +in { + options.vhack.openssh = { + enable = lib.mkEnableOption '' + a sane openssh implementation. + ''; + }; + + config = lib.mkIf cfg.enable { + services.openssh = { + enable = true; + settings.PasswordAuthentication = false; + hostKeys = [ + { + # See the explanation for this in /system/impermanence/mods/openssh.nix + # path = "/var/lib/sshd/ssh_host_ed25519_key"; + + # FIXME: Remove this workaround + path = "/srv/var/lib/sshd/ssh_host_ed25519_key"; + rounds = 1000; + type = "ed25519"; + } + ]; + }; + }; +} -- cgit 1.4.1