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

Merge pull request #264608 from nikstur/nix-channel-fix-default

nixos/nix-channel: fix subscribing to default channel
parents 0a1051cb 8c1739ca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ in

    systemd.tmpfiles.rules = lib.mkIf cfg.channel.enable [
      "f /root/.nix-channels -"
      ''w "/root/.nix-channels" - - - - "${config.system.defaultChannel} nixos\n"''
      ''w+ "/root/.nix-channels" - - - - ${config.system.defaultChannel} nixos\n''
    ];
  };
}
+3 −2
Original line number Diff line number Diff line
@@ -10,7 +10,8 @@
    nix.channel.enable = true;
  };

  testScript = ''
    print(machine.succeed("cat /root/.nix-channels"))
  testScript = { nodes, ... }: ''
    assert machine.succeed("cat /root/.nix-channels") == "${nodes.machine.system.defaultChannel} nixos\n"
  '';

}