From 69026cb4614d3501b55ee19a4140559379d908e0 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Mon, 11 Sep 2023 18:46:47 +0200 Subject: [PATCH] make home manager optional --- helpers/default.nix | 4 ++-- modules/default.nix | 2 +- modules/home/default.nix | 13 +++++++------ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/helpers/default.nix b/helpers/default.nix index 1a1041b..4845b6f 100644 --- a/helpers/default.nix +++ b/helpers/default.nix @@ -1,7 +1,7 @@ {lib, ...}: { mkIfElse = p: yes: no: lib.mkMerge [ - (mkIf p yes) - (mkIf (!p) no) + (lib.mkIf p yes) + (lib.mkIf (!p) no) ]; } diff --git a/modules/default.nix b/modules/default.nix index 74584f5..48e1990 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -23,7 +23,7 @@ in { services.openssh = { enable = true; settings = { - PermitRootLogin = helpers.mkIfElse config.my.server.enable "yes" "no"; + # PermitRootLogin = "no"; # this is managed through authorized keys PasswordAuthentication = false; KbdInteractiveAuthentication = false; }; diff --git a/modules/home/default.nix b/modules/home/default.nix index 6d85a0d..5e63d11 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -6,12 +6,13 @@ }: let cfg = config.my.home; in { - imports = [ - ./vinzenz.nix - ./ronja.nix - # enable home manager - - ]; + imports = + [ + ./vinzenz.nix + ./ronja.nix + # enable home manager + ] + ++ lib.optional (builtins.pathExists ) ; options.my.home = { enable = lib.mkEnableOption "my home management";