diff --git a/flake.lock b/flake.lock index db0786a..f8c9cea 100644 --- a/flake.lock +++ b/flake.lock @@ -54,11 +54,11 @@ ] }, "locked": { - "lastModified": 1773779935, - "narHash": "sha256-O+cWba5TihRfwThiTBaM8iz0by6GuckfsYkJLhsa5Ho=", + "lastModified": 1775680940, + "narHash": "sha256-gFutz9eAiu3laqoP8YZJ1wDKYB8ILwTCzNsMpzgNFwg=", "owner": "tadfisher", "repo": "android-nixpkgs", - "rev": "ddc7380cd0d47ec138499a4d5d0adfa25ab22dae", + "rev": "8c228a25c9f28131d5467c550a4f8694a2692452", "type": "github" }, "original": { diff --git a/modules/server/sshd.nix b/modules/server/sshd.nix index 4ac4367..e4e973e 100644 --- a/modules/server/sshd.nix +++ b/modules/server/sshd.nix @@ -19,20 +19,13 @@ in { }; }; - config = mkIf cfg.sshd.enable { + config = mkIf cfg.sshd.enable ({ modules.server.sshd.allowUsers = [ user ]; users.users."${user}".openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGgNlwxQFRcZjnOyoNQ9HDkhGrESU8J5fwd0HeF6CiYg" ]; - systemd.services.sshd.serviceConfig = helpers.linuxAttrs { - MemoryMax = "8G"; - MemoryHigh = "6G"; - CPUWeight = 80; - TasksMax = 256; - }; - services.openssh = { enable = true; } // helpers.linuxAttrs { @@ -55,5 +48,12 @@ in { AllowUsers = cfg.sshd.allowUsers; }; }; - }; + } // helpers.linuxAttrs { + systemd.services.sshd.serviceConfig = { + MemoryMax = "8G"; + MemoryHigh = "6G"; + CPUWeight = 80; + TasksMax = 256; + }; + }); }