This commit is contained in:
2025-12-31 15:03:16 +02:00
parent c93c93a810
commit fa32ae5510
69 changed files with 1093 additions and 659 deletions
@@ -0,0 +1,29 @@
{
# config,
lib,
# pkgs,
...
}: let
systemd-services-hardened = fetchGit {
url = "https://github.com/wallago/nix-system-services-hardened.git";
ref = "main";
rev = "3c6c8738868277aa145e0f17c645172b1c9d81e3";
};
fromHardened = a: map (f: "${systemd-services-hardened}/services/${f}.nix") a;
in {
imports = fromHardened [
"accounts-daemon"
"getty"
# "nix-daemon" # TODO: breaks cgroups, ...
"nscd"
"rescue"
"sshd"
"systemd-machined"
"systemd-rfkill"
"systemd-udevd"
];
systemd.services = {
nix-daemon.serviceConfig.RestrictNamespaces = lib.mkForce [];
sshd.serviceConfig.ProtectHome = lib.mkForce "no";
};
}