From f4d91a0af7d9d8288006b85ad60f7e91bcdf6504 Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 10 Oct 2024 19:42:00 -0400 Subject: [PATCH] custom file for run alias --- home/dotfiles/run | 5 +++++ home/modules/term/default.nix | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 home/dotfiles/run diff --git a/home/dotfiles/run b/home/dotfiles/run new file mode 100644 index 0000000..0509177 --- /dev/null +++ b/home/dotfiles/run @@ -0,0 +1,5 @@ +if [[ -z "$2" ]]; then + nix-shell -p $1 --run zsh +else + nix-shell -p $1 --run "$2" +fi diff --git a/home/modules/term/default.nix b/home/modules/term/default.nix index f88e344..cbe47be 100644 --- a/home/modules/term/default.nix +++ b/home/modules/term/default.nix @@ -5,6 +5,7 @@ ... }: let pst = pkgs.writeShellScriptBin "pst" (builtins.readFile ../../dotfiles/pst); + runpkg = pkgs.writeShellScriptBin "run" (builtins.readFile ../../dotfiles/run); in { xdg.configFile."wezterm/colors/camellia-hope-dark.toml".text = builtins.readFile (pkgs.fetchFromGitHub { owner = "camellia-theme"; @@ -375,7 +376,8 @@ in { shellAliases = { tm = "tmuxifier"; t = "tmux"; - run = "nix-shell --command 'zsh' -p"; + # run = "nix-shell --command 'zsh' -p"; + run = "${runpkg}/bin/run"; fhs = "steam-run"; nsh = "nix-shell --command 'zsh'"; nd = "nix develop";