aboutsummaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-02-24 21:02:29 +0100
committerAdrian Kummerlaender2019-02-24 21:02:29 +0100
commitf87582250fd324cd04886cd84a7ee58d03133b13 (patch)
tree6e49ead9beb5a806d6525ea0f8e0034ccb34346c /tasks
parent68e680721c875c5b677b5c60e754cdf81cc0e909 (diff)
downloadnixos_home-f87582250fd324cd04886cd84a7ee58d03133b13.tar
nixos_home-f87582250fd324cd04886cd84a7ee58d03133b13.tar.gz
nixos_home-f87582250fd324cd04886cd84a7ee58d03133b13.tar.bz2
nixos_home-f87582250fd324cd04886cd84a7ee58d03133b13.tar.lz
nixos_home-f87582250fd324cd04886cd84a7ee58d03133b13.tar.xz
nixos_home-f87582250fd324cd04886cd84a7ee58d03133b13.tar.zst
nixos_home-f87582250fd324cd04886cd84a7ee58d03133b13.zip
Add nix-shell environment type to tasker
Allows for convenient management of non-project-specific shell environments.
Diffstat (limited to 'tasks')
-rw-r--r--tasks/default.nix23
1 files changed, 21 insertions, 2 deletions
diff --git a/tasks/default.nix b/tasks/default.nix
index e851c24..6966fd2 100644
--- a/tasks/default.nix
+++ b/tasks/default.nix
@@ -1,6 +1,15 @@
-{ pkgs ? import <nixpkgs> { }, ... }:
+{ pkgs, ... }:
-{
+let
+ mkShellDerivation = n: ps: pkgs.stdenvNoCC.mkDerivation rec {
+ name = n;
+ buildInputs = ps;
+ shellHook = ''
+ export NIX_SHELL_NAME="${name}"
+ '';
+ };
+
+in {
custom.tasks = {
bsc_edit = {
description = "Grid refinement BSc thesis editor";
@@ -29,5 +38,15 @@
directory = "~/projects/contrib/openlb";
command = "nix-shell --command fish";
};
+ cpp_shell = {
+ description = "Generic C++ shell environment";
+ type = "environment";
+ directory = "~/";
+ environment = mkShellDerivation "cpp-env" (with pkgs; [
+ cmake
+ gcc8
+ gdb cgdb
+ ]);
+ };
};
}