forge
Explore
Log in

Don't you dare go Hollow

personality

Clone
★ 0

0 watching0 forksRustGPL-3.0460.1 KiB4de8815Tahinli7 days ago22 commits

personality.service34 lines, 1.1 KiBHistoryRawDownload
1[Unit]
2Description=personality: personal website, as a user service
3# No network-online.target: it is a system unit that a user manager cannot see, and personality binds 127.0.0.1.
4StartLimitIntervalSec=60
5StartLimitBurst=5
6
7[Service]
8Type=simple
9# Runs as the account that owns this unit (for example `apps`), under its user manager. No User= or Group=.
10# The binary is installed by kur into ~/bin/personality.
11Environment=HOST=127.0.0.1
12Environment=PORT=2020
13ExecStart=%h/bin/personality
14Restart=on-failure
15RestartSec=2
16LimitNOFILE=65536
17MemoryMax=256M
18UMask=0077
19
20# Hardening. Only the options a user manager applies without special privileges. The namespace-based options
21# of the system unit (ProtectSystem, PrivateTmp, ProtectHome, PrivateDevices, and the rest) are left out:
22# a user manager can apply them only where unprivileged user namespaces are available.
23NoNewPrivileges=yes
24LockPersonality=yes
25RestrictRealtime=yes
26RestrictSUIDSGID=yes
27MemoryDenyWriteExecute=yes
28SystemCallArchitectures=native
29SystemCallFilter=@system-service
30SystemCallFilter=~@privileged
31RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
32
33[Install]
34WantedBy=default.target