mirror of
https://codeberg.org/icewind/tasmota-backup.git
synced 2026-06-03 14:24:08 +02:00
module confinement
This commit is contained in:
parent
2806e31453
commit
369dd4d9f3
1 changed files with 15 additions and 2 deletions
17
module.nix
17
module.nix
|
|
@ -83,7 +83,7 @@ in
|
||||||
"mqtt_password:${cfg.mqtt.passwordFile}"
|
"mqtt_password:${cfg.mqtt.passwordFile}"
|
||||||
"device_password:${cfg.devicePasswordFile}"
|
"device_password:${cfg.devicePasswordFile}"
|
||||||
];
|
];
|
||||||
ReadWritePaths = [ cfg.outputPath ];
|
BindPaths = [ cfg.outputPath ];
|
||||||
User = "tasmota-backup";
|
User = "tasmota-backup";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
PrivateTmp = true;
|
PrivateTmp = true;
|
||||||
|
|
@ -106,10 +106,23 @@ in
|
||||||
RestrictRealtime = true;
|
RestrictRealtime = true;
|
||||||
ProtectProc = "noaccess";
|
ProtectProc = "noaccess";
|
||||||
SystemCallFilter = [ "@system-service" "~@resources" "~@privileged" ];
|
SystemCallFilter = [ "@system-service" "~@resources" "~@privileged" ];
|
||||||
IPAddressDeny = "multicast";
|
IPAddressDeny = mkDefault "multicast";
|
||||||
PrivateUsers = true;
|
PrivateUsers = true;
|
||||||
ProcSubset = "pid";
|
ProcSubset = "pid";
|
||||||
RestrictSUIDSGID = true;
|
RestrictSUIDSGID = true;
|
||||||
|
|
||||||
|
# needed for dns with confinement
|
||||||
|
BindReadOnlyPaths = [
|
||||||
|
"-/etc/resolv.conf"
|
||||||
|
"-/run/systemd"
|
||||||
|
"/etc/hosts"
|
||||||
|
"/etc/ssl/certs/ca-certificates.crt"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
confinement = {
|
||||||
|
enable = true;
|
||||||
|
binSh = null;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue