aboutsummaryrefslogtreecommitdiff
path: root/snowfall
diff options
context:
space:
mode:
authorCaroline Larimore <caroline@larimo.re>2025-04-14 18:39:55 -0700
committerCaroline Larimore <caroline@larimo.re>2025-04-14 18:58:54 -0700
commit03d21c96eac95ea2d042366168c2510118ab44a5 (patch)
tree55ee0786d4815d479d57b3a62d25e9c35ab20c59 /snowfall
parentb651c0fbf47f58a6b1ba0663615832dbc578ebe1 (diff)
migration: openssh server
Diffstat (limited to 'snowfall')
-rw-r--r--snowfall/modules/nixos/services/ssh/default.nix28
-rw-r--r--snowfall/systems/x86_64-linux/copenhagen/default.nix5
2 files changed, 33 insertions, 0 deletions
diff --git a/snowfall/modules/nixos/services/ssh/default.nix b/snowfall/modules/nixos/services/ssh/default.nix
new file mode 100644
index 0000000..6856897
--- /dev/null
+++ b/snowfall/modules/nixos/services/ssh/default.nix
@@ -0,0 +1,28 @@
+{ options, config, lib, namespace, ... }:
+
+with lib; with lib.${namespace}; let
+ cfg = config.${namespace}.services.ssh;
+ impermanence = config.${namespace}.system.impermanence;
+in {
+ options.${namespace}.services.ssh = with types; {
+ enable = mkEnableOption "ssh server";
+
+ port = mkOption {
+ type = types.port;
+ default = 22;
+ description = "ssh server port";
+ };
+ };
+
+ config = mkIf cfg.enable {
+ openssh = {
+ enable = true;
+ ports = [ cfg.port ];
+
+ settings = {
+ PermitRootLogin = "no";
+ PasswordAuthentication = false;
+ };
+ };
+ };
+}
diff --git a/snowfall/systems/x86_64-linux/copenhagen/default.nix b/snowfall/systems/x86_64-linux/copenhagen/default.nix
index b980271..00bd761 100644
--- a/snowfall/systems/x86_64-linux/copenhagen/default.nix
+++ b/snowfall/systems/x86_64-linux/copenhagen/default.nix
@@ -16,6 +16,11 @@ with lib; with lib.${namespace}; {
};
services = {
+ ssh = {
+ enable = true;
+ port = 42069;
+ };
+
web = {
personal.enable = true;
landing.enable = true;