-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OPS-1161] Add withHardeningProfile helper
Problem: We want to harden our systemd services by using previously defined profiles, so we need a way to easily apply them to our systemd service configurations. Solution: Add withHardeningProfile helper, remove DeviceAllow from profiles, because it is used incorrectly (systemd complains and skips this option), and the semantics of this use is already covered by PrivateDevices.
- Loading branch information
Showing
3 changed files
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
{ lib }: | ||
{ | ||
|
||
hardeningProfiles = import ./profiles.nix; | ||
|
||
hardenServices = import ./harden-services.nix; | ||
|
||
userLevelServices = import ./user-level-services.nix; | ||
|
||
withHardeningProfile = profile: serviceConfig: lib.mkMerge [ | ||
(builtins.mapAttrs (_: lib.mkDefault) profile) | ||
serviceConfig | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters