From 668e2dafb6b1aa2d57cd438979ad25b98d5e5764 Mon Sep 17 00:00:00 2001 From: r-vdp Date: Sun, 23 Jul 2023 15:32:15 +0200 Subject: nixos/nix-channel: fix editorconfig warnings and apply nixpkgs-fmt --- nixos/modules/config/nix-channel.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'nixos/modules/config') diff --git a/nixos/modules/config/nix-channel.nix b/nixos/modules/config/nix-channel.nix index 8f6caaabde86a..a152933e9095c 100644 --- a/nixos/modules/config/nix-channel.nix +++ b/nixos/modules/config/nix-channel.nix @@ -3,8 +3,8 @@ configuration to work. See also - - ./nix.nix - - ./nix-flakes.nix + - ./nix.nix + - ./nix-flakes.nix */ { config, lib, ... }: let @@ -28,9 +28,9 @@ in Whether the `nix-channel` command and state files are made available on the machine. The following files are initialized when enabled: - - `/nix/var/nix/profiles/per-user/root/channels` - - `/root/.nix-channels` - - `$HOME/.nix-defexpr/channels` (on login) + - `/nix/var/nix/profiles/per-user/root/channels` + - `/root/.nix-channels` + - `$HOME/.nix-defexpr/channels` (on login) Disabling this option will not remove the state files from the system. ''; @@ -48,7 +48,7 @@ in "nixos-config=/etc/nixos/configuration.nix" "/nix/var/nix/profiles/per-user/root/channels" ] - else []; + else [ ]; defaultText = '' if nix.channel.enable then [ -- cgit 1.4.1 From b825f65c90107d5ae49cb5fdcd0c52532f60fc42 Mon Sep 17 00:00:00 2001 From: r-vdp Date: Sun, 23 Jul 2023 15:33:50 +0200 Subject: nixos/nix-channel: only try to remove the nix-channel binary if it exists It may not be there if `system.disableInstallerTools = true`. --- nixos/modules/config/nix-channel.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/modules/config') diff --git a/nixos/modules/config/nix-channel.nix b/nixos/modules/config/nix-channel.nix index a152933e9095c..3f8e088ede929 100644 --- a/nixos/modules/config/nix-channel.nix +++ b/nixos/modules/config/nix-channel.nix @@ -86,7 +86,7 @@ in ''; environment.extraSetup = mkIf (!cfg.channel.enable) '' - rm $out/bin/nix-channel + rm --force $out/bin/nix-channel ''; # NIX_PATH has a non-empty default according to Nix docs, so we don't unset -- cgit 1.4.1