Rollback devenv config

This commit is contained in:
2025-06-25 22:30:54 -07:00
parent 51ccb26c4b
commit 40bfd1cdf6
3 changed files with 1 additions and 69 deletions

View File

@@ -28,7 +28,6 @@
aider-chat
sops
just
devenv
];
imports = [

View File

@@ -64,40 +64,6 @@ let tide_conf = builtins.readFile ./tide_config.fish; in
command ssh $argv
end
function mkenv --description "Initialize a devenv environment or configure its .envrc"
argparse --name=mkenv h/here -- $argv
or return 1 # Exit if parsing fails
# Default target directory is the current directory.
set -l target_dir "."
# Check if we are inside a Git repository's working tree.
if git rev-parse --is-inside-work-tree >/dev/null 2>&1
if not set -q _flag_here; and not test -f devenv.nix
set target_dir (git rev-parse --show-toplevel)
end
end
pushd "$target_dir"
# Check for the existence of the primary devenv configuration file.
if not test -f "devenv.nix"
devenv init
else
# If devenv.nix exists, check for the direnv configuration file.
if not test -f ".envrc"
echo 'eval "$(devenv direnvrc)"' > .envrc
direnv allow
end
end
if test -f "devenv.nix"
emacsclient devenv.nix
else
echo -e "\e[31mCould not open devenv.nix as it was not created.\e[0m"
end
end
if test -f $HOME/.cargo/env.fish
source "$HOME/.cargo/env.fish"
end