mirror of
https://github.com/kaesaecracker/nixos-configuration.git
synced 2025-01-18 18:40:14 +01:00
make home manager optional
This commit is contained in:
parent
e65ba7c8a6
commit
69026cb461
|
@ -1,7 +1,7 @@
|
||||||
{lib, ...}: {
|
{lib, ...}: {
|
||||||
mkIfElse = p: yes: no:
|
mkIfElse = p: yes: no:
|
||||||
lib.mkMerge [
|
lib.mkMerge [
|
||||||
(mkIf p yes)
|
(lib.mkIf p yes)
|
||||||
(mkIf (!p) no)
|
(lib.mkIf (!p) no)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ in {
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
PermitRootLogin = helpers.mkIfElse config.my.server.enable "yes" "no";
|
# PermitRootLogin = "no"; # this is managed through authorized keys
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
KbdInteractiveAuthentication = false;
|
KbdInteractiveAuthentication = false;
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,12 +6,13 @@
|
||||||
}: let
|
}: let
|
||||||
cfg = config.my.home;
|
cfg = config.my.home;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports =
|
||||||
|
[
|
||||||
./vinzenz.nix
|
./vinzenz.nix
|
||||||
./ronja.nix
|
./ronja.nix
|
||||||
# enable home manager
|
# enable home manager
|
||||||
<home-manager/nixos>
|
]
|
||||||
];
|
++ lib.optional (builtins.pathExists <home-manager/nixos>) <home-manager/nixos>;
|
||||||
|
|
||||||
options.my.home = {
|
options.my.home = {
|
||||||
enable = lib.mkEnableOption "my home management";
|
enable = lib.mkEnableOption "my home management";
|
||||||
|
|
Loading…
Reference in a new issue