This repository has been archived on 2024-08-18. You can view files and clone it, but cannot push or open issues or pull requests.
linux-hardened/systemd.nix

67 lines
1.1 KiB
Nix
Raw Normal View History

2024-08-12 21:12:18 +02:00
{ lib, ... }: with lib.kernel; {
2024-08-02 22:14:55 +02:00
# Base requirements
DEVTMPFS = yes;
CGROUPS = yes;
INOTIFY_USER = yes;
SIGNALFD = yes;
TIMERFD = yes;
EPOLL = yes;
UNIX = yes;
PROC_FS = yes;
FHANDLE = yes;
# Legacy interfaces
UEVENT_HELPER = no;
FW_LOADER_USER_HELPER = no;
# udev & virtualisation
DMIID = yes;
# SCSI device serial number retrieval
BLK_DEV_BSG = option yes;
# PrivateNetwork
NET_NS = yes;
# PrivateUser
USER_NS = yes;
# Optional but recommended
IPV6 = yes;
AUTOFS_FS = yes;
TMPFS_XATTR = yes;
TMPFS_POSIX_ACL = yes;
SECCOMP = yes;
SECCOMP_FILTER = yes;
KCMP = yes;
NET_SCHED = yes;
# CPUShares
CGROUP_SCHED = yes;
FAIR_GROUP_SCHED = yes;
# CPUQuota
CFS_BANDWIDTH = yes;
# IPaddress{Allow,Deny}, SocketBind{Allow,Deny}, RestrictNetworkInterfaces
BPF = yes;
BPF_SYSCALL = yes;
BPF_JIT = yes;
CGROUP_BPF = yes;
# EFI
EFIVAR_FS = option yes;
EFI_PARTITION = option yes;
# SMBIOS credentials
DMI = yes;
DMI_SYSFS = yes;
# Realtime scheduling
RT_GROUP_SCHED = no;
# systemd-oomd
PSI = yes;
MEMCG = yes;
}