diff --git a/lib/shared/home-manager-packages.nix b/lib/shared/home-manager-packages.nix index 22023f8..af96f81 100644 --- a/lib/shared/home-manager-packages.nix +++ b/lib/shared/home-manager-packages.nix @@ -7,12 +7,14 @@ let scripts = { notetaker = writeShellApplication (import ./scripts/notetaker.nix); + run = writeShellApplication (import ./scripts/run.nix { inherit pkgs; }); t = writeShellApplication (import ./scripts/t.nix { inherit pkgs; }); }; in with pkgs; [ scripts.notetaker + scripts.run scripts.t awscli2 diff --git a/lib/shared/modules/zsh/aliases.nix b/lib/shared/modules/zsh/aliases.nix index bb3bd43..c7f5813 100644 --- a/lib/shared/modules/zsh/aliases.nix +++ b/lib/shared/modules/zsh/aliases.nix @@ -5,7 +5,6 @@ "...." = "cd ../../.."; "....." = "cd ../../../.."; cat = "bat"; - run = "./run"; s = "secrets"; secrets = ''doppler --project "$(whoami)" run''; tag = "tag-release"; diff --git a/lib/shared/scripts/run.nix b/lib/shared/scripts/run.nix new file mode 100644 index 0000000..8533c4e --- /dev/null +++ b/lib/shared/scripts/run.nix @@ -0,0 +1,16 @@ +{ pkgs }: + +{ + name = "run"; + + runtimeInputs = with pkgs; [ bashInteractive ]; + + text = '' + if [[ -e .ignored/run ]]; then + .ignored/run "$@" + exit $? + fi + + ./run "$@" + ''; +}