From 443f109ee6c799d05b3c4765f06bd35b14bcb97e Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Thu, 5 Sep 2024 00:09:17 +0000 Subject: [PATCH] nixosMod: move sshSecurity to extends/openssh --- nix/nixos-modules/default.nix | 1 - nix/nixos-modules/extends/default.nix | 1 + nix/nixos-modules/{sshSecurity.nix => extends/openssh.nix} | 5 ++--- 3 files changed, 3 insertions(+), 4 deletions(-) rename nix/nixos-modules/{sshSecurity.nix => extends/openssh.nix} (83%) diff --git a/nix/nixos-modules/default.nix b/nix/nixos-modules/default.nix index 1aadb5c..5c2844b 100644 --- a/nix/nixos-modules/default.nix +++ b/nix/nixos-modules/default.nix @@ -36,7 +36,6 @@ in ./options.nix ./privacy.nix ./secrix.nix - ./sshSecurity.nix ./useable.nix ./vmCommon.nix ]; diff --git a/nix/nixos-modules/extends/default.nix b/nix/nixos-modules/extends/default.nix index 1f99c8e..88d9dcf 100644 --- a/nix/nixos-modules/extends/default.nix +++ b/nix/nixos-modules/extends/default.nix @@ -3,6 +3,7 @@ # files ./cpu.nix ./kernel.nix + ./openssh.nix ./podman.nix ./printing.nix ]; diff --git a/nix/nixos-modules/sshSecurity.nix b/nix/nixos-modules/extends/openssh.nix similarity index 83% rename from nix/nixos-modules/sshSecurity.nix rename to nix/nixos-modules/extends/openssh.nix index 57258a5..b7ba86d 100644 --- a/nix/nixos-modules/sshSecurity.nix +++ b/nix/nixos-modules/extends/openssh.nix @@ -1,7 +1,6 @@ { config, lib, - pkgs, ... }: let @@ -9,9 +8,9 @@ let in { - options = { + options.services.openssh = { - services.openssh.authorizedKeysOnly = lib.mkEnableOption '' + authorizedKeysOnly = lib.mkEnableOption '' only logins using ssh keys (improving over default settings) '';