mirror of
https://github.com/SuperSandro2000/nixos-modules.git
synced 2024-06-02 06:19:22 +02:00
nix: don't fail if no channel or channel directories exist
This commit is contained in:
parent
985d81927a
commit
e220c41cee
|
@ -60,12 +60,12 @@ in
|
|||
system.activationScripts = {
|
||||
deleteChannels = lib.mkIf cfg.deleteChannels ''
|
||||
echo "Deleting all channels..."
|
||||
rm -rf /root/.nix-channels /home/*/.nix-channels /nix/var/nix/profiles/per-user/*/channels*
|
||||
rm -rf /root/.nix-channels /home/*/.nix-channels /nix/var/nix/profiles/per-user/*/channels* || true
|
||||
'';
|
||||
|
||||
deleteUserProfiles = lib.mkIf cfg.deleteUserProfiles ''
|
||||
echo "Deleting all user profiles..."
|
||||
rm -rf /root/.nix-profile /home/*/.nix-profile /nix/var/nix/profiles/per-user/*/profile*
|
||||
rm -rf /root/.nix-profile /home/*/.nix-profile /nix/var/nix/profiles/per-user/*/profile* || true
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user