aboutsummaryrefslogtreecommitdiffstats
path: root/modules/scripts/default.nix
blob: 21b8399b3f19d52f1f62f99bb176ba792d67a074 (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
{ 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/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);
		};
	};
}