feat: add host device type metadata
This commit is contained in:
@@ -3,13 +3,12 @@
|
||||
flake.modules.nixos.openssh =
|
||||
{
|
||||
config,
|
||||
hostType ? "desktop",
|
||||
lib,
|
||||
host ? {
|
||||
isServer = false;
|
||||
},
|
||||
...
|
||||
}:
|
||||
let
|
||||
isServer = hostType == "server";
|
||||
hostUserNames = builtins.attrNames (
|
||||
lib.filterAttrs (_: user: user.isNormalUser or false) config.users.users
|
||||
);
|
||||
@@ -17,7 +16,7 @@
|
||||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
openFirewall = host.isServer;
|
||||
openFirewall = isServer;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
|
||||
Reference in New Issue
Block a user