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:
parent
2b13611eae
commit
0678a95352
2 changed files with 16 additions and 0 deletions
|
@ -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" ]; };
|
||||
};
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue