aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2021-04-11 14:03:58 +0530
committerAkshay Nair <phenax5@gmail.com>2021-04-11 14:03:58 +0530
commitf8b7b030d293c17232753103564eba7e2f417a24 (patch)
tree7abbccfea61558b90b4ebd67e9cc787c09ac0055 /scripts
parent23dc78eff4857942a1af3cdf86fddb9fb0404607 (diff)
downloadnixos-config-f8b7b030d293c17232753103564eba7e2f417a24.tar.gz
nixos-config-f8b7b030d293c17232753103564eba7e2f417a24.zip
Adds collection of shell files and new-shell command
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bin/new-shell12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/bin/new-shell b/scripts/bin/new-shell
new file mode 100755
index 0000000..313ef91
--- /dev/null
+++ b/scripts/bin/new-shell
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+kind=$1;
+
+[[ -f "$kind" ]] && echo "You need to specify the type of shell" && exit 1;
+
+shell_path="$HOME/nixos/shell/$kind.nix";
+
+[[ ! -f "$shell_path" ]] && echo "Shell $kind doesn't exist" && exit 1;
+
+cp $shell_path ./default.nix;
+