LordOS — a free, fast and secure GNU/Linux distribution based on Debian, with its own desktop environment: display server and Wayland compositor in C, a React UI engine on QuickJS, and private native apps.
C cdebiandesktop-environmentebpffirewalllandlocklinuxlinux-distributionopen-sourceprivacyquickjsraspberry-pi-5reactsecuritywaylandwayland-compositor
[Unit]
Description=LordOS: fan control by temperature (lord-fand)
Documentation=file:///usr/share/doc/lordos/README.md
# early: the fans follow the temperature before anyone logs in
DefaultDependencies=no
After=local-fs.target systemd-udevd.service
Before=lordos.service shutdown.target
Conflicts=shutdown.target
[Service]
Type=simple
ExecStart=/usr/lib/lordos/bin/lord-fand
# after a stop or a crash the fans go back to the kernel (trip points) or the firmware
ExecStopPost=/usr/lib/lordos/bin/lord-fand --restore
Restart=always
RestartSec=1
StandardOutput=journal
StandardError=journal
RuntimeDirectory=lordos
RuntimeDirectoryPreserve=yes
ConfigurationDirectory=lordos
ConfigurationDirectoryMode=0755
# root only for sysfs writes: no capabilities beyond reading other users' groups is needed
CapabilityBoundingSet=
AmbientCapabilities=
NoNewPrivileges=yes
RestrictAddressFamilies=AF_UNIX
IPAddressDeny=any
ProtectSystem=strict
ReadWritePaths=/etc/lordos /run/lordos
# the only sysfs files it writes: pwmN/pwmN_enable of fan controllers and the board fan, thermal
# trip points and the fan's cooling state
ReadWritePaths=-/sys/devices/platform -/sys/devices/virtual/thermal -/sys/devices/pci0000:00
ProtectHome=yes
ProtectControlGroups=yes
ProtectKernelModules=yes
ProtectKernelLogs=yes
ProtectClock=yes
ProtectHostname=yes
PrivateTmp=yes
PrivateDevices=yes
PrivateNetwork=yes
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
LockPersonality=yes
MemoryDenyWriteExecute=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
SystemCallFilter=~@privileged @resources @mount @clock @debug @module @reboot @swap @raw-io
UMask=0022
[Install]
WantedBy=sysinit.target