Skip to content

Commit

Permalink
nixos/systemd/nspawn: Add missing nspawn unit options
Browse files Browse the repository at this point in the history
A few options have been added to the `systemd.nspawn` unit type are
missing from `systemd.nspawn.*.*Config`. See systemd.nspawn(5).
  • Loading branch information
devplayer0 committed Apr 24, 2022
1 parent 87d34a6 commit 568cb2d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nixos/modules/system/boot/systemd/nspawn.nix
Expand Up @@ -16,7 +16,7 @@ let
"LimitNOFILE" "LimitAS" "LimitNPROC" "LimitMEMLOCK" "LimitLOCKS"
"LimitSIGPENDING" "LimitMSGQUEUE" "LimitNICE" "LimitRTPRIO" "LimitRTTIME"
"OOMScoreAdjust" "CPUAffinity" "Hostname" "ResolvConf" "Timezone"
"LinkJournal"
"LinkJournal" "Ephemeral" "AmbientCapability"
])
(assertValueOneOf "Boot" boolValues)
(assertValueOneOf "ProcessTwo" boolValues)
Expand All @@ -26,11 +26,13 @@ let
checkFiles = checkUnitConfig "Files" [
(assertOnlyFields [
"ReadOnly" "Volatile" "Bind" "BindReadOnly" "TemporaryFileSystem"
"Overlay" "OverlayReadOnly" "PrivateUsersChown"
"Overlay" "OverlayReadOnly" "PrivateUsersChown" "BindUser"
"Inaccessible" "PrivateUserOwnership"
])
(assertValueOneOf "ReadOnly" boolValues)
(assertValueOneOf "Volatile" (boolValues ++ [ "state" ]))
(assertValueOneOf "PrivateUsersChown" boolValues)
(assertValueOneOf "PrivateUserOwnership" [ "off" "chown" "map" "auto" ])
];

checkNetwork = checkUnitConfig "Network" [
Expand Down

0 comments on commit 568cb2d

Please sign in to comment.