Unverified Commit b29e9123 authored by nikstur's avatar nikstur Committed by GitHub
Browse files

nixos/tmpfiles: fix layer inversion (#507873)

parents 306919f6 b6f7d1c8
Loading
Loading
Loading
Loading
+89 −78
Original line number Diff line number Diff line
@@ -297,7 +297,17 @@ in

  ###### implementation

  config = lib.mkIf (cfg.enable && nixPackage.pname != "lix") {
  config = lib.mkMerge [
    (lib.mkIf cfg.enable {
      systemd.tmpfiles.rules = [
        "d  /nix/var                           0755 root root - -"
        "L+ /nix/var/nix/gcroots/booted-system 0755 root root - /run/booted-system"
        # Boot-time cleanup
        "R! /nix/var/nix/gcroots/tmp           -    -    -    - -"
        "R! /nix/var/nix/temproots             -    -    -    - -"
      ];
    })
    (lib.mkIf (cfg.enable && nixPackage.pname != "lix") {
      environment.systemPackages = [
        nixPackage
        pkgs.nix-info
@@ -385,6 +395,7 @@ in

      # Legacy configuration conversion.
      nix.settings.sandbox-fallback = false;
  };
    })
  ];

}
+0 −8
Original line number Diff line number Diff line
@@ -350,19 +350,11 @@ in
      "d  /var/db                            0755 root root - -"
      "L  /var/lock                          -    -    -    - ../run/lock"
    ]
    ++ lib.optionals config.nix.enable [
      "d  /nix/var                           0755 root root - -"
      "L+ /nix/var/nix/gcroots/booted-system 0755 root root - /run/booted-system"
    ]
    # Boot-time cleanup
    ++ [
      "R! /etc/group.lock                    -    -    -    - -"
      "R! /etc/passwd.lock                   -    -    -    - -"
      "R! /etc/shadow.lock                   -    -    -    - -"
    ]
    ++ lib.optionals config.nix.enable [
      "R! /nix/var/nix/gcroots/tmp           -    -    -    - -"
      "R! /nix/var/nix/temproots             -    -    -    - -"
    ];

    boot.initrd.systemd = {