⚙ darkone.system.security
ANSSI BP-028 v2.0 (GNU/Linux) system hardening. (wip)
Recommended module, enabled in certain host profiles or manually depending on needs. Progressively applies ANSSI recommendations according to the chosen level and machine category. Each host profile defines its level and category:
darkone.system.security = { level = "intermediary"; # minimal | intermediary | reinforced | high category = "server"; # base | client | server};Rules incompatible with the environment are excluded by tag:
darkone.system.security.excludes = [ "needs-jit" "needs-hibernation" ];A specific rule can be bypassed with a mandatory rationale:
darkone.system.security.exceptions = { R9.rationale = "Docker rootless required during development.";};Options
Section titled “Options”- enable
boolEnable the ANSSI BP-028 v2.0 hardening module. - level
enum [ "minimal" "intermediary" "reinforced" "high" ]Targeted ANSSI hardening level. - category
enum [ "base" "client" "server" ]Machine category that selects rule subsets. - excludes
listOf strTags that disable entire rule groups. - exceptions
attrsPer-rule exceptions with mandatory rationale. Merged with the structural SELinux exceptions (R46–R49). - adminMailbox
strAdministrator email address (sudo R39, MTA aliases R75). - useHardenedKernel
boolUse linuxPackages_hardened (R60, C1) instead of the default kernel. - allowedActiveUsers
listOf strHuman accounts allowed to authenticate (R30). Defaults to every user declared in config.yaml (host.users) plus the framework deploy accountnix. Disabled accounts (no password credential) and service accounts (not normal users) need not be listed.
darkone.system.security = { enable = false; level = "minimal"; category = "base"; excludes = [ ]; exceptions = { }; adminMailbox = "admin@exemple.fr"; useHardenedKernel = false; allowedActiveUsers = [ ];};Source: modules/system/security.nix 🡕