fix: hardening

This commit is contained in:
FUFSoB committed 2026-10-05 22:44:09 +05:00
1 parent 017a947a18
commit a435942b4f
168 files changed
+9166 -1644

No files matched your search

+15 -9
View File
@@ -27,14 +27,19 @@ rec {
};
# One system user per daemon, each in a group of its own, plus the userControl group.
systemUsersAndGroups = cfg: {
users.users = lib.genAttrs cfg.internal.systemUsers (name: {
isSystemUser = true;
group = name;
description = "proxy-suite daemons";
});
users.groups = lib.genAttrs (cfg.internal.systemUsers ++ cfg.internal.groups) (_: { });
};
systemUsersAndGroups =
cfg:
let
users = lib.unique cfg.internal.systemUsers;
in
{
users.users = lib.genAttrs users (name: {
isSystemUser = true;
group = name;
description = "proxy-suite daemons";
});
users.groups = lib.genAttrs (users ++ cfg.internal.groups) (_: { });
};
firewallPortForward = internal: {
networking.firewall = {
@@ -52,11 +57,12 @@ rec {
host,
internal,
hostPath ? null,
withSystemd ? true,
}:
let
units = import ./user-units.nix (
{
inherit lib pkgs;
inherit lib pkgs withSystemd;
inherit (host) runtimeDir;
stateDir = builtins.dirOf host.stateDir;
}