1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-26 21:19:45 +01:00

espanso: add sandboxing for systemd service

This commit is contained in:
Muhammad Talal Anwar 2024-10-18 22:20:18 +02:00
parent 2b13611eae
commit 0678a95352
2 changed files with 16 additions and 0 deletions

View file

@ -124,6 +124,15 @@ in {
Type = "exec";
ExecStart = "${cfg.package}/bin/espanso daemon";
Restart = "on-failure";
# Sandboxing.
LockPersonality = true;
MemoryDenyWriteExecute = true;
NoNewPrivileges = true;
PrivateUsers = true;
RestrictNamespaces = true;
SystemCallArchitectures = "native";
SystemCallFilter = "@system-service";
};
Install = { WantedBy = [ "default.target" ]; };
};

View file

@ -3,7 +3,14 @@ WantedBy=default.target
[Service]
ExecStart=@espanso@/bin/espanso daemon
LockPersonality=true
MemoryDenyWriteExecute=true
NoNewPrivileges=true
PrivateUsers=true
Restart=on-failure
RestrictNamespaces=true
SystemCallArchitectures=native
SystemCallFilter=@system-service
Type=exec
[Unit]