im
Clone
https://git.tahinli.com/Tahinli/im.git
0 watching0 forksRustAGPL-3.0542.8 KiBb9f0726Tahinli27 days ago34 commits
| 1 | [Unit] |
| 2 | Description=im: the family's sign-in provider (OpenID Connect) |
| 3 | After=network-online.target |
| 4 | Wants=network-online.target |
| 5 | StartLimitIntervalSec=60 |
| 6 | StartLimitBurst=5 |
| 7 | |
| 8 | [Service] |
| 9 | Type=simple |
| 10 | User=im |
| 11 | Group=im |
| 12 | Environment=IM_CONFIG=/etc/im/im.toml |
| 13 | ExecStart=/usr/local/bin/im serve |
| 14 | WorkingDirectory=/var/lib/im |
| 15 | StateDirectory=im |
| 16 | StateDirectoryMode=0700 |
| 17 | Restart=on-failure |
| 18 | RestartSec=2 |
| 19 | LimitNOFILE=65536 |
| 20 | |
| 21 | # Hardening. The service writes only to its state directory: database, data_dir (instance key, photos) and |
| 22 | # the backup dir. If [backup] dir is set outside /var/lib/im, add that path to ReadWritePaths. |
| 23 | NoNewPrivileges=yes |
| 24 | ProtectSystem=strict |
| 25 | ProtectHome=yes |
| 26 | ReadWritePaths=/var/lib/im |
| 27 | PrivateTmp=yes |
| 28 | PrivateDevices=yes |
| 29 | PrivateUsers=yes |
| 30 | ProtectKernelTunables=yes |
| 31 | ProtectKernelModules=yes |
| 32 | ProtectKernelLogs=yes |
| 33 | ProtectControlGroups=yes |
| 34 | ProtectClock=yes |
| 35 | ProtectHostname=yes |
| 36 | RestrictSUIDSGID=yes |
| 37 | RestrictRealtime=yes |
| 38 | RestrictNamespaces=yes |
| 39 | RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 |
| 40 | LockPersonality=yes |
| 41 | MemoryDenyWriteExecute=yes |
| 42 | SystemCallArchitectures=native |
| 43 | SystemCallFilter=@system-service |
| 44 | SystemCallFilter=~@privileged |
| 45 | ProtectProc=invisible |
| 46 | ProcSubset=pid |
| 47 | RemoveIPC=yes |
| 48 | PrivateMounts=yes |
| 49 | KeyringMode=private |
| 50 | # A photo decode may use up to 96 MiB and two run at once; this leaves room for that and the rest. |
| 51 | MemoryMax=1G |
| 52 | CapabilityBoundingSet= |
| 53 | AmbientCapabilities= |
| 54 | UMask=0077 |
| 55 | |
| 56 | [Install] |
| 57 | WantedBy=multi-user.target |