aboutsummaryrefslogtreecommitdiffstats
path: root/modules/scripts/default.nix
blob: 8e7d7d29dd6f734796202fee089a5e00a3ec6439 (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
{ config, lib, pkgs, ... }:

{
  config = {
    home.sessionPath = [
      "${config.home.homeDirectory}/scripts"
    ];

    home.file = let
      shellScript = path: {
        text = ''
          #!${pkgs.bash}/bin/bash
          ${builtins.readFile path}
        '';
        executable = true;
      };
    in {
      "scripts/deep-clean" = shellScript ./deep-clean.sh;
      "scripts/system-monitor" =
        lib.mkIf
          (config.tools.bottom.enable &&
          config.tools.nvtop.enable &&
          config.tools.tmux.enable &&
          config.tools.kitty.enable)
        (shellScript ./system-monitor.sh);
      "scripts/warp-start" =
        lib.mkIf
          config.tools.cloudflare-warp.enable
        (shellScript ./warp-start.sh);
      "scripts/warp-stop" =
        lib.mkIf
          config.tools.cloudflare-warp.enable
        (shellScript ./warp-stop.sh);
    };
  };
}