bin: fix resolution of config sources
Alan Pearce alan@alanpearce.eu
Sat, 04 May 2024 09:26:23 +0200
1 files changed, 4 insertions(+), 3 deletions(-)
jump to
M bin/home-manager → bin/home-manager
@@ -7,6 +7,7 @@ end set --function channel_root $HOME/.nix-defexpr/channels set --function user_nixpkgs $HOME/.nixpkgs +set --function nixfiles (path resolve (status dirname)/..) if set --query XDG_CONFIG_HOME set --function hm_config_dir $XDG_CONFIG_HOME/home-manager @@ -68,14 +69,14 @@ set --function current_script_name (status basename) switch $current_script_name case darwin-rebuild - set --local darwin_config_source (path resolve (status dirname)/../system/$hostname.nix) + set --local darwin_config_source $nixfiles/system/$hostname.nix set --local darwin_config_target $user_nixpkgs/darwin-configuration.nix if test ! -e $darwin_config_target ln -s $darwin_config_source $darwin_config_target end set --append argv -I darwin-config=$darwin_config_source case nixos-rebuild - set --local nixos_config_source (path resolve (status dirname)/system/$hostname.nix) + set --local nixos_config_source $nixfiles/system/$hostname.nix set --local nixos_config_target $user_nixpkgs/configuration.nix if test ! -e $nixos_config_target ln -s $nixos_config_source $nixos_config_target @@ -85,7 +86,7 @@ set --append argv --use-remote-sudo end set --append argv -I nixos-config=$nixos_config_source case home-manager - set --local hm_config_source (path resolve (status dirname)/../user/$hostname.nix) + set --local hm_config_source $nixfiles/user/$hostname.nix set --local hm_config_target $hm_config_dir/home.nix if test ! -e $hm_config_target ln -s $hm_config_source $hm_config_target