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

nixos/nix-channel: fix subscribing to default channel
This commit is contained in:
nikstur 2023-10-31 18:42:06 +01:00 committed by GitHub
commit 37209a6799
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -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''
];
};
}

View File

@ -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"
'';
}