nixos/nix-channel: fix subscribing to default channel
Fixes https://github.com/NixOS/nixpkgs/issues/264602
This commit is contained in:
parent
ed9263dc61
commit
8c1739cafe
2 changed files with 4 additions and 3 deletions
|
@ -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''
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
'';
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue