aboutsummaryrefslogtreecommitdiff
path: root/tasks/default.nix
blob: 6966fd2cf935961ae9dbfc1f784638c92a00e365 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ 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";
      directory = "~/university/documents/bachelor/arbeit";
      command = "nix-shell --run 'nvim-qt --no-ext-tabline'";
    };
    bsc_shell = {
      description = "Grid refinement BSc thesis shell";
      type = "terminal";
      directory = "~/university/documents/bachelor/arbeit";
      command = "nix-shell --command fish";
    };
    bsc_view = {
      description = "Grid refinement BSc thesis PDF";
      directory = "~/university/documents/bachelor/arbeit";
      command = "evince build/main.pdf";
    };
    olb_edit = {
      description = "OpenLB editor";
      directory = "~/projects/contrib/openlb";
      command = "nix-shell --run 'nvim-qt --no-ext-tabline'";
    };
    olb_shell = {
      description = "OpenLB shell";
      type = "terminal";
      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
      ]);
    };
  };
}