Skip to content

Commit

Permalink
flake.nix: drop nixos 22.11 compat in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
astro committed Feb 14, 2024
1 parent 628f7d6 commit 8daed5f
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,8 @@
networking.firewall.allowedTCPPorts = lib.optional (hypervisor == "qemu") 22;
services.openssh = lib.optionalAttrs (hypervisor == "qemu") {
enable = true;
} // (
if builtins.compareVersions lib.version "22.11" <= 0
then {
# NixOS<23.05 option
permitRootLogin = "yes";
} else {
# NixOS>=23.05 setting
settings.PermitRootLogin = "yes";
}
);
settings.PermitRootLogin = "yes";
};
})
config
];
Expand All @@ -238,16 +230,8 @@
networking.firewall.allowedTCPPorts = [ 22 ];
services.openssh = {
enable = true;
} // (
if builtins.compareVersions lib.version "22.11" <= 0
then {
# NixOS<23.05 option
permitRootLogin = "yes";
} else {
# NixOS>=23.05 setting
settings.PermitRootLogin = "yes";
}
);
settings.PermitRootLogin = "yes";
};
};
};
};
Expand Down

0 comments on commit 8daed5f

Please sign in to comment.