checks: remove nixChannels check
I don’t think this is very important given the `nixPath` check, and it doesn’t fit very well into a post‐user‐activation world.
This commit is contained in:
parent
ae406c0457
commit
1f7ed1c7fe
1 changed files with 4 additions and 26 deletions
|
|
@ -152,25 +152,6 @@ let
|
|||
fi
|
||||
'';
|
||||
|
||||
nixChannels = ''
|
||||
channelsLink=$(readlink "$HOME/.nix-defexpr/channels") || true
|
||||
case "$channelsLink" in
|
||||
*"$USER"*)
|
||||
;;
|
||||
"")
|
||||
;;
|
||||
*)
|
||||
echo "[1;31merror: The ~/.nix-defexpr/channels symlink does not point your users channels, aborting activation[0m" >&2
|
||||
echo "Running nix-channel will regenerate it" >&2
|
||||
echo >&2
|
||||
echo " rm ~/.nix-defexpr/channels" >&2
|
||||
echo " nix-channel --update" >&2
|
||||
echo >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
'';
|
||||
|
||||
nixInstaller = ''
|
||||
if grep -q 'etc/profile.d/nix-daemon.sh' /etc/profile; then
|
||||
echo "[1;31merror: Found nix-daemon.sh reference in /etc/profile, aborting activation[0m" >&2
|
||||
|
|
@ -315,6 +296,10 @@ let
|
|||
in
|
||||
|
||||
{
|
||||
imports = [
|
||||
(mkRemovedOptionModule [ "system" "checks" "verifyNixChannels" ] "This check has been removed.")
|
||||
];
|
||||
|
||||
options = {
|
||||
system.checks.verifyNixPath = mkOption {
|
||||
type = types.bool;
|
||||
|
|
@ -322,12 +307,6 @@ in
|
|||
description = "Whether to run the NIX_PATH validation checks.";
|
||||
};
|
||||
|
||||
system.checks.verifyNixChannels = mkOption {
|
||||
type = types.bool;
|
||||
default = config.nix.channel.enable;
|
||||
description = "Whether to run the nix-channels validation checks.";
|
||||
};
|
||||
|
||||
system.checks.verifyBuildUsers = mkOption {
|
||||
type = types.bool;
|
||||
default =
|
||||
|
|
@ -361,7 +340,6 @@ in
|
|||
nixStore
|
||||
(mkIf (config.nix.gc.automatic && config.nix.gc.user == null) nixGarbageCollector)
|
||||
(mkIf (config.nix.optimise.automatic && config.nix.optimise.user == null) nixStoreOptimiser)
|
||||
(mkIf cfg.verifyNixChannels nixChannels)
|
||||
nixInstaller
|
||||
(mkIf cfg.verifyNixPath nixPath)
|
||||
oldSshAuthorizedKeysDirectory
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue