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

nixos/nix-channel: fix subscribing to default channel

authored by nikstur and committed by GitHub 37209a67 0a1051cb

+4 -3
+1 -1
nixos/modules/config/nix-channel.nix
··· 99 99 100 100 systemd.tmpfiles.rules = lib.mkIf cfg.channel.enable [ 101 101 "f /root/.nix-channels -" 102 - ''w "/root/.nix-channels" - - - - "${config.system.defaultChannel} nixos\n"'' 102 + ''w+ "/root/.nix-channels" - - - - ${config.system.defaultChannel} nixos\n'' 103 103 ]; 104 104 }; 105 105 }
+3 -2
nixos/tests/activation/nix-channel.nix
··· 10 10 nix.channel.enable = true; 11 11 }; 12 12 13 - testScript = '' 14 - print(machine.succeed("cat /root/.nix-channels")) 13 + testScript = { nodes, ... }: '' 14 + assert machine.succeed("cat /root/.nix-channels") == "${nodes.machine.system.defaultChannel} nixos\n" 15 15 ''; 16 + 16 17 }