diff --git a/hosts/common/core/sops.nix b/hosts/common/core/sops.nix new file mode 100644 index 0000000..2e1a03b --- /dev/null +++ b/hosts/common/core/sops.nix @@ -0,0 +1,17 @@ +{ + pkgs, + lib, + inputs, + config, + ... +}: let + sopsFolder = builtins.toString inputs.nix-secrets + "/sops"; +in { + sops = { + defaultSopsFile = "${sopsFolder}/${config.hostSpec.hostName}.yaml"; + validateSopsFiles = false; + age = { + sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"]; + }; + }; +} diff --git a/hosts/common/core/ssh.nix b/hosts/common/core/ssh.nix new file mode 100644 index 0000000..7bc87fe --- /dev/null +++ b/hosts/common/core/ssh.nix @@ -0,0 +1,19 @@ +{ + inputs, + config, + lib, + pkgs, + ... +}: { + programs.ssh = { + startAgent = true; + }; + + services.openssh = { + enable = true; + settings = { + PermitRootLogin = "no"; + PasswordAuthentication = false; + }; + }; +}