diff options
-rw-r--r-- | .dir-locals.el | 2 | ||||
-rw-r--r-- | .envrc | 7 | ||||
l--------- | bin/darwin-rebuild (renamed from darwin-rebuild) | 0 | ||||
-rwxr-xr-x | bin/home-manager (renamed from home-manager) | 10 | ||||
l--------- | bin/nixos-rebuild (renamed from nixos-rebuild) | 0 |
5 files changed, 12 insertions, 7 deletions
diff --git a/.dir-locals.el b/.dir-locals.el index 5535ffa9..e352b5ac 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -1,4 +1,4 @@ ;;; Directory Local Variables ;;; For more information see (info "(emacs) Directory Variables") -((nil . ((compile-command . "home-manager switch")))) +((nil . ((compile-command . "./bin/home-manager switch")))) diff --git a/.envrc b/.envrc index fa82cfc4..97eccbae 100644 --- a/.envrc +++ b/.envrc @@ -1,7 +1,8 @@ if type -P lorri &>/dev/null; then - eval "$(lorri direnv)" + eval "$(lorri direnv)" else - echo 'while direnv evaluated .envrc, could not find the command "lorri" [https://github.com/nix-community/lorri]' - use flake + echo 'while direnv evaluated .envrc, could not find the command "lorri" [https://github.com/nix-community/lorri]' + use flake fi +PATH_add bin FLAKE=$PWD diff --git a/darwin-rebuild b/bin/darwin-rebuild index 2eaccdef..2eaccdef 120000 --- a/darwin-rebuild +++ b/bin/darwin-rebuild diff --git a/home-manager b/bin/home-manager index f351b2f3..fa4e1df8 100755 --- a/home-manager +++ b/bin/home-manager @@ -68,7 +68,7 @@ end 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 (path resolve (status dirname)/../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 @@ -85,7 +85,7 @@ switch $current_script_name 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 (path resolve (status dirname)/../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 @@ -94,7 +94,6 @@ switch $current_script_name end set --function old_channels (path basename $channel_root/*) -set --function --export HOME_MANAGER_CONFIG (path resolve (status dirname)/user/$hostname.nix) for np in $NIX_PATH echo $np | read --function --delimiter "=" channel new_src_rel @@ -123,6 +122,11 @@ for old in $channel_root/$old_channels rm $old end +set --function i (contains --index (status dirname) $PATH) +if test -n $i + set --erase PATH[$i] +end + set --function cmd $current_script_name $argv if set --query IN_NIX_SHELL diff --git a/nixos-rebuild b/bin/nixos-rebuild index 2eaccdef..2eaccdef 120000 --- a/nixos-rebuild +++ b/bin/nixos-rebuild |