Merge pull request #282758 from rht/hardware_no_network

hddfancontrol & thinkfan: disable network access.
This commit is contained in:
Michele Guerini Rocco 2024-02-24 00:15:24 +01:00 committed by GitHub
commit ed9121e5d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 2 deletions

View file

@ -60,6 +60,10 @@ in
systemd.services.hddfancontrol = {
wantedBy = [ "multi-user.target" ];
environment.HDDFANCONTROL_ARGS = lib.escapeShellArgs args;
serviceConfig = {
# Hardening
PrivateNetwork = true;
};
};
}
);

View file

@ -217,8 +217,13 @@ in {
systemd.services = {
thinkfan.environment.THINKFAN_ARGS = escapeShellArgs ([ "-c" configFile ] ++ cfg.extraArgs);
thinkfan.serviceConfig.Restart = "on-failure";
thinkfan.serviceConfig.RestartSec = "30s";
thinkfan.serviceConfig = {
Restart = "on-failure";
RestartSec = "30s";
# Hardening
PrivateNetwork = true;
};
# must be added manually, see issue #81138
thinkfan.wantedBy = [ "multi-user.target" ];