From 9fb9ed110c1aaf6e40806c9173a15b490e49faff Mon Sep 17 00:00:00 2001 From: Artturin Date: Fri, 24 Dec 2021 16:44:27 +0200 Subject: [PATCH] nixos/systemd: disable systemd-gpt-auto-generator by default --- .../doc/manual/from_md/release-notes/rl-2205.section.xml | 8 ++++++++ nixos/doc/manual/release-notes/rl-2205.section.md | 2 ++ nixos/modules/system/boot/systemd.nix | 6 ++++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml index 4d3d5700ffca1..1ece055d53799 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml @@ -117,6 +117,14 @@ virtualisation.docker.daemon.settings. + + + systemd-gpt-auto-generator is now disabled + by default due to conflicting with our declarative mount + management, Issue + #4002. + +
diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md index 966de78893738..9928c95f7370d 100644 --- a/nixos/doc/manual/release-notes/rl-2205.section.md +++ b/nixos/doc/manual/release-notes/rl-2205.section.md @@ -43,6 +43,8 @@ In addition to numerous new and upgraded packages, this release has the followin - If you previously used `/etc/docker/daemon.json`, you need to incorporate the changes into the new option `virtualisation.docker.daemon.settings`. +- `systemd-gpt-auto-generator` is now disabled by default due to conflicting with our declarative mount management, Issue [#4002](https://github.com/NixOS/nixpkgs/issues/4002). + ## Other Notable Changes {#sec-release-22.05-notable-changes} - The option [services.redis.servers](#opt-services.redis.servers) was added diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index ec5dea075bbce..27c7466ac463f 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -512,12 +512,14 @@ in systemd.generators = mkOption { type = types.attrsOf types.path; default = {}; - example = { systemd-gpt-auto-generator = "/dev/null"; }; + example = literalExpression ''{ systemd-gpt-auto-generator = "${config.systemd.package}/lib/systemd/system-generators/systemd-gpt-auto-generator"; };''; description = '' Definition of systemd generators. For each NAME = VALUE pair of the attrSet, a link is generated from /etc/systemd/system-generators/NAME to VALUE. + Note: systemd-gpt-auto-generator is disabled by default due to not being declarative. ''; + # systemd-gpt-auto-generator issue https://github.com/NixOS/nixpkgs/issues/4002 }; systemd.shutdown = mkOption { @@ -1053,7 +1055,7 @@ in '') config.system.build.etc.passthru.targets; }) + "/*"; - "systemd/system-generators" = { source = hooks "generators" cfg.generators; }; + "systemd/system-generators" = { source = hooks "generators" ({ systemd-gpt-auto-generator = "/dev/null"; } // cfg.generators); }; "systemd/system-shutdown" = { source = hooks "shutdown" cfg.shutdown; }; });