🔑 darkone.security.filesystem
Partitioning, file tree, and file permissions (R28–R29, R50–R57). (wip)
Covers secure mount options (R28), restriction of /boot (R29), permissions of sensitive files (R50), passwords kept out of the store (R51), sockets (R52), orphan files (R53), sticky bit (R54), per-user temporary directories (R55), and setuid (R56, R57).
Options
Section titled “Options”- enable
boolEnable ANSSI filesystem hardening (R28–R29, R50–R57). - allowedSetuid
listOf strAllowlist of tolerated setuid/setgid binaries (R56, R57). - tmpfs
boolWhether R28 owns/tmpas a hardened tmpfs sized onboot.tmp.tmpfsSize. Set tofalseto leave/tmpon the filesystem it already lives on — a host keeping several GB of persistent scratch there loses both the data and the RAM otherwise. - tmpNoexec
boolWhether the R28/tmpcarriesnoexec.noexecblocks direct execution anddlopen, so it breaks any runtime unpacking native libraries there (Bun, Electron, agent tooling) and anything compiling then running inTMPDIR. Only meaningful whentmpfsistrue. - extraMountHardening
listOf strMount points to harden withnosuid,nodev,noexec(R28). Each listed path MUST be a separate partition declared elsewhere (hardware- configuration / disko); the options are merged into its existingfileSystemsentry. An explicit list (rather than a global flag) avoids guessing the layout and never creates phantom mounts. Do not list/homeif users run scripts there —noexecwould break them.
darkone.security.filesystem = { enable = false; allowedSetuid = [ ]; tmpfs = true; tmpNoexec = true; extraMountHardening = [ ];};