mirror of
https://github.com/nix-community/home-manager
synced 2025-02-18 14:15:08 +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";
|
Type = "exec";
|
||||||
ExecStart = "${cfg.package}/bin/espanso daemon";
|
ExecStart = "${cfg.package}/bin/espanso daemon";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
|
|
||||||
|
# Sandboxing.
|
||||||
|
LockPersonality = true;
|
||||||
|
MemoryDenyWriteExecute = true;
|
||||||
|
NoNewPrivileges = true;
|
||||||
|
PrivateUsers = true;
|
||||||
|
RestrictNamespaces = true;
|
||||||
|
SystemCallArchitectures = "native";
|
||||||
|
SystemCallFilter = "@system-service";
|
||||||
};
|
};
|
||||||
Install = { WantedBy = [ "default.target" ]; };
|
Install = { WantedBy = [ "default.target" ]; };
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,14 @@ WantedBy=default.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=@espanso@/bin/espanso daemon
|
ExecStart=@espanso@/bin/espanso daemon
|
||||||
|
LockPersonality=true
|
||||||
|
MemoryDenyWriteExecute=true
|
||||||
|
NoNewPrivileges=true
|
||||||
|
PrivateUsers=true
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
RestrictNamespaces=true
|
||||||
|
SystemCallArchitectures=native
|
||||||
|
SystemCallFilter=@system-service
|
||||||
Type=exec
|
Type=exec
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
|
|
Loading…
Add table
Reference in a new issue