nichts/modules/services/wayneko/module.nix

56 lines
1.6 KiB
Nix
Raw Normal View History

2025-03-04 19:37:59 +01:00
{
lib,
pkgs,
...
}: let
inherit (lib.meta) getExe;
in {
systemd.user.services.wayneko = {
description = "Wayneko, as a systemd service";
# makes the graphical session start this service when it starts
2025-03-04 19:37:59 +01:00
wantedBy = ["graphical-session.target"];
# when graphical session restarts or gets stopped, this also gets restarted/stopped.
partOf = ["graphical-session.target"];
# gets started only after graphical session
2025-03-04 19:37:59 +01:00
after = ["graphical-session.target"];
serviceConfig = {
ExecStart = "${getExe pkgs.wayneko} --layer top --follow-pointer false";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
2025-03-04 19:37:59 +01:00
2025-04-09 15:31:18 +02:00
CapabilityBoundingSet = [""];
DevicePolicy = "closed";
2025-03-04 19:37:59 +01:00
LockPersonality = true;
MemoryDenyWriteExecute = true;
NoNewPrivileges = true;
PrivateDevices = true;
PrivateNetwork = true;
2025-04-09 15:31:18 +02:00
PrivateTmp = true;
PrivateUsers = true;
ProcSubset = "pid";
2025-03-04 19:37:59 +01:00
ProtectClock = true;
ProtectControlGroups = true;
ProtectControlGroup = true;
ProtectHome = "read-only";
2025-04-09 15:31:18 +02:00
ProtectHostname = true;
2025-03-04 19:37:59 +01:00
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
2025-04-09 15:31:18 +02:00
ProtectProc = "invisible";
2025-03-04 19:37:59 +01:00
ProtectSystem = "strict";
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictRealTime = true;
RestrictSUIDSGID = true;
2025-04-09 15:31:18 +02:00
SystemCallArchitectures = ["native"];
SystemCallFilter = "~@clock @cpu-emulation @debug @obsolete @module @mount @raw-io @reboot @swap @privileged";
2025-03-04 19:37:59 +01:00
};
};
}