diff --git a/flake.lock b/flake.lock index 47c2782..f412779 100644 --- a/flake.lock +++ b/flake.lock @@ -377,11 +377,11 @@ "secrets": { "flake": false, "locked": { - "lastModified": 1713776544, - "narHash": "sha256-EQW8P1TfkYQV0EEK1n3Gh9wRp9KlC0EbidH2j+niCaE=", + "lastModified": 1713107869, + "narHash": "sha256-TniJoCQfJ3OXrcqhH/8xcV6o4Sa5C/4KSRtk0c0/RK4=", "ref": "refs/heads/main", - "rev": "61410d68f15b3b970067a3fdd39667fdd9a89edd", - "revCount": 12, + "rev": "a00a07cd931b6eab722727a0606837cb895997f0", + "revCount": 11, "type": "git", "url": "ssh://forgejo@git.everest.sable-pancake.ts.net:4222/Toast/nix-secrets" }, diff --git a/roles/server/ssh.nix b/roles/server/ssh.nix index 14ee0b6..ede04a3 100755 --- a/roles/server/ssh.nix +++ b/roles/server/ssh.nix @@ -1,37 +1,10 @@ -{ - flakeSelf, - config, - ... -}: let - hostSecrets = "${flakeSelf.inputs.secrets}/" + config.networking.hostName + "/"; - hostKeyPath = "/etc/ssh/everest_host_key"; -in { - age.secrets = { - everest-host-key = { - file = hostSecrets + "host-private-key.age"; - path = hostKeyPath; - mode = "0400"; - }; - "everest-host-key.pub" = { - file = hostSecrets + "host-public-key.age"; - path = hostKeyPath + ".pub"; - }; - }; - +{...}: { services.openssh = { enable = true; settings = { - UseDns = true; PermitRootLogin = "no"; PasswordAuthentication = false; }; - hostKeys = [ - { - path = hostKeyPath; - type = "ed25519"; - comment = "Everest host key"; - } - ]; startWhenNeeded = true; }; }