From f41ec53ee6bb44ab23563dfde9e415ee6087a772 Mon Sep 17 00:00:00 2001 From: Swarsel Date: Mon, 16 Dec 2024 21:01:06 +0100 Subject: [PATCH] feat: add vershell utility --- SwarselSystems.org | 19 +++++++++++++++++++ pkgs/default.nix | 1 + pkgs/vershell/default.nix | 9 +++++++++ profiles/common/home/custom-packages.nix | 1 + 4 files changed, 30 insertions(+) create mode 100644 pkgs/vershell/default.nix diff --git a/SwarselSystems.org b/SwarselSystems.org index 13a8c49..30158d8 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -1900,6 +1900,7 @@ Note: The structure of generating the packages was changed in commit =2cf03a3 re "bootstrap" "t2ts" "ts2t" + "vershell" ]; mkPackages = names: builtins.listToAttrs (map (name: { inherit name; @@ -2682,6 +2683,23 @@ This script allows for quick git branch switching. #+end_src +**** vershell + +This script allows for quick git branch switching. + +#+begin_src nix :tangle pkgs/vershell/default.nix + { writeShellApplication }: + + writeShellApplication { + name = "vershell"; + runtimeInputs = [ ]; + text = '' + nix shell github:nixos/nixpkgs/"$1"#"$2"; + ''; + } + +#+end_src + *** Overlays (additions, overrides, nixpkgs-stable) :PROPERTIES: :CUSTOM_ID: h:5e3e21e0-57af-4dad-b32f-6400af9b7aab @@ -7508,6 +7526,7 @@ This is just a separate container for derivations defined in [[#h:64a5cc16-6b16- hm-specialisation t2ts ts2t + vershell (pkgs.writeScriptBin "project" '' #! ${pkgs.bash}/bin/bash diff --git a/pkgs/default.nix b/pkgs/default.nix index 3226603..3e91c1c 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -19,6 +19,7 @@ let "bootstrap" "t2ts" "ts2t" + "vershell" ]; mkPackages = names: builtins.listToAttrs (map (name: { diff --git a/pkgs/vershell/default.nix b/pkgs/vershell/default.nix new file mode 100644 index 0000000..12d3e15 --- /dev/null +++ b/pkgs/vershell/default.nix @@ -0,0 +1,9 @@ +{ writeShellApplication }: + +writeShellApplication { + name = "vershell"; + runtimeInputs = [ ]; + text = '' + nix shell github:nixos/nixpkgs/"$1"#"$2"; + ''; +} diff --git a/profiles/common/home/custom-packages.nix b/profiles/common/home/custom-packages.nix index 1942942..bc00ff0 100644 --- a/profiles/common/home/custom-packages.nix +++ b/profiles/common/home/custom-packages.nix @@ -19,6 +19,7 @@ hm-specialisation t2ts ts2t + vershell (pkgs.writeScriptBin "project" '' #! ${pkgs.bash}/bin/bash