From eb96816af6e4fb51eacd5c6001e89d54eaf86b5a Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 20 Jul 2024 04:31:09 +0200 Subject: [PATCH] Split `nix` configuration properly --- scripts/Common/Software/nix/main.fish | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/Common/Software/nix/main.fish b/scripts/Common/Software/nix/main.fish index fc2ab74e..3b82f530 100644 --- a/scripts/Common/Software/nix/main.fish +++ b/scripts/Common/Software/nix/main.fish @@ -4,14 +4,14 @@ begin source "$dir/../../Scripts/software.fish" function configureSW -V dir -a scope - if [ "$scope" = "user" ] - set -l configFile ~/.config/nix/nix.conf - mkdir -p (dirname "$configFile") - cp "$dir/../../../../archiso/airootfs/root/.config/nix/nix.conf" "$configFile" - else - sudo nix-channel --add https://nixos.org/channels/nixpkgs-unstable - sudo nix-channel --update - end + sudo nix-channel --add https://nixos.org/channels/nixpkgs-unstable + sudo nix-channel --update + end + + function userConfig -S -V dir -a name + set -l configFile ~"$name"/.config/nix/nix.conf + mkdir -p (dirname "$configFile") + cp "$dir/../../../../archiso/airootfs/root/.config/nix/nix.conf" "$configFile" end runInstaller $argv