Unverified Commit c39781c5 authored by Jared Baur's avatar Jared Baur
Browse files

nixos/activation-script: only setup nix tmpfiles if nix is enabled

If nix is not installed on the end system, the tmpfiles settings related
to it do not need to be setup.
parent 3d6e7d7b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -234,11 +234,12 @@ in
    system.activationScripts.var = ""; # obsolete

    systemd.tmpfiles.rules = [
      "D /var/empty 0555 root root -"
      "h /var/empty - - - - +i"
    ] ++ lib.optionals config.nix.enable [
      # Prevent the current configuration from being garbage-collected.
      "d /nix/var/nix/gcroots -"
      "L+ /nix/var/nix/gcroots/current-system - - - - /run/current-system"
      "D /var/empty 0555 root root -"
      "h /var/empty - - - - +i"
    ];

    system.activationScripts.usrbinenv = if config.environment.usrbinenv != null