refactor: centralize host and user metadata
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
{ ... }:
|
||||
{
|
||||
flake.modules.nixos."ssh-agent-auth" = {
|
||||
security.pam = {
|
||||
sshAgentAuth.enable = true;
|
||||
services.sudo.sshAgentAuth = true;
|
||||
};
|
||||
};
|
||||
|
||||
flake.modules.nixos.openssh =
|
||||
{
|
||||
config,
|
||||
hostType ? "desktop",
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
isServer = hostType == "server";
|
||||
hostUserNames = builtins.attrNames (
|
||||
lib.filterAttrs (_: user: user.isNormalUser or false) config.users.users
|
||||
);
|
||||
isServer = config.meta.host.kind == "server";
|
||||
hostUserNames = builtins.attrNames config.meta.host.users;
|
||||
in
|
||||
{
|
||||
services.openssh = {
|
||||
|
||||
Reference in New Issue
Block a user