diff options
Diffstat (limited to 'nixos/modules/system')
-rw-r--r-- | nixos/modules/system/boot/kernel.nix | 4 | ||||
-rw-r--r-- | nixos/modules/system/boot/systemd-nspawn.nix | 71 | ||||
-rw-r--r-- | nixos/modules/system/boot/systemd-unit-options.nix | 3 | ||||
-rw-r--r-- | nixos/modules/system/boot/systemd.nix | 4 |
4 files changed, 42 insertions, 40 deletions
diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix index 51b3b8a3dca..e751ff141f7 100644 --- a/nixos/modules/system/boot/kernel.nix +++ b/nixos/modules/system/boot/kernel.nix @@ -214,8 +214,8 @@ in "hid_generic" "hid_lenovo" "hid_apple" "hid_logitech_dj" "hid_lenovo_tpkbd" "hid_roccat" - # Misc. stuff. - "pcips2" "atkbd" + # Misc. keyboard stuff. + "pcips2" "atkbd" "i8042" # Temporary fix for https://github.com/NixOS/nixpkgs/issues/18451 # Remove as soon as upstream gets fixed - marking it: diff --git a/nixos/modules/system/boot/systemd-nspawn.nix b/nixos/modules/system/boot/systemd-nspawn.nix index 2527ab35719..f765db275e7 100644 --- a/nixos/modules/system/boot/systemd-nspawn.nix +++ b/nixos/modules/system/boot/systemd-nspawn.nix @@ -41,41 +41,43 @@ let ]; instanceOptions = { + options = { + + execConfig = mkOption { + default = {}; + example = { Parameters = "/bin/sh"; }; + type = types.addCheck (types.attrsOf unitOption) checkExec; + description = '' + Each attribute in this set specifies an option in the + <literal>[Exec]</literal> section of this unit. See + <citerefentry><refentrytitle>systemd.nspawn</refentrytitle> + <manvolnum>5</manvolnum></citerefentry> for details. + ''; + }; - execConfig = mkOption { - default = {}; - example = { Parameters = "/bin/sh"; }; - type = types.addCheck (types.attrsOf unitOption) checkExec; - description = '' - Each attribute in this set specifies an option in the - <literal>[Exec]</literal> section of this unit. See - <citerefentry><refentrytitle>systemd.nspawn</refentrytitle> - <manvolnum>5</manvolnum></citerefentry> for details. - ''; - }; - - filesConfig = mkOption { - default = {}; - example = { Bind = [ "/home/alice" ]; }; - type = types.addCheck (types.attrsOf unitOption) checkFiles; - description = '' - Each attribute in this set specifies an option in the - <literal>[Files]</literal> section of this unit. See - <citerefentry><refentrytitle>systemd.nspawn</refentrytitle> - <manvolnum>5</manvolnum></citerefentry> for details. - ''; - }; + filesConfig = mkOption { + default = {}; + example = { Bind = [ "/home/alice" ]; }; + type = types.addCheck (types.attrsOf unitOption) checkFiles; + description = '' + Each attribute in this set specifies an option in the + <literal>[Files]</literal> section of this unit. See + <citerefentry><refentrytitle>systemd.nspawn</refentrytitle> + <manvolnum>5</manvolnum></citerefentry> for details. + ''; + }; - networkConfig = mkOption { - default = {}; - example = { Private = false; }; - type = types.addCheck (types.attrsOf unitOption) checkNetwork; - description = '' - Each attribute in this set specifies an option in the - <literal>[Network]</literal> section of this unit. See - <citerefentry><refentrytitle>systemd.nspawn</refentrytitle> - <manvolnum>5</manvolnum></citerefentry> for details. - ''; + networkConfig = mkOption { + default = {}; + example = { Private = false; }; + type = types.addCheck (types.attrsOf unitOption) checkNetwork; + description = '' + Each attribute in this set specifies an option in the + <literal>[Network]</literal> section of this unit. See + <citerefentry><refentrytitle>systemd.nspawn</refentrytitle> + <manvolnum>5</manvolnum></citerefentry> for details. + ''; + }; }; }; @@ -99,8 +101,7 @@ in { systemd.nspawn = mkOption { default = {}; - type = types.attrsOf types.optionSet; - options = [ instanceOptions ]; + type = with types; attrsOf (submodule instanceOptions); description = "Definition of systemd-nspawn configurations."; }; diff --git a/nixos/modules/system/boot/systemd-unit-options.nix b/nixos/modules/system/boot/systemd-unit-options.nix index 731b1701e00..4c3fc30358c 100644 --- a/nixos/modules/system/boot/systemd-unit-options.nix +++ b/nixos/modules/system/boot/systemd-unit-options.nix @@ -316,7 +316,7 @@ in rec { startAt = mkOption { type = with types; either str (listOf str); - default = ""; + default = []; example = "Sun 14:00:00"; description = '' Automatically start this unit at the given date/time, which @@ -326,6 +326,7 @@ in rec { to adding a corresponding timer unit with <option>OnCalendar</option> set to the value given here. ''; + apply = v: if isList v then v else [ v ]; }; }; diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index d44c2e234b0..d1f3f923e5e 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -777,7 +777,7 @@ in { wantedBy = [ "timers.target" ]; timerConfig.OnCalendar = service.startAt; }) - (filterAttrs (name: service: service.enable && service.startAt != "") cfg.services); + (filterAttrs (name: service: service.enable && service.startAt != []) cfg.services); # Generate timer units for all services that have a ‘startAt’ value. systemd.user.timers = @@ -785,7 +785,7 @@ in { wantedBy = [ "timers.target" ]; timerConfig.OnCalendar = service.startAt; }) - (filterAttrs (name: service: service.startAt != "") cfg.user.services); + (filterAttrs (name: service: service.startAt != []) cfg.user.services); systemd.sockets.systemd-journal-gatewayd.wantedBy = optional config.services.journald.enableHttpGateway "sockets.target"; |