summaryrefslogtreecommitdiff
path: root/modules/root/software.nix
blob: 19ffe4d1fff47e1ddff10d326d9841195567416c (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{ pkgs, lib, config, ... }: {
	options = {
		software = {
			desktop = {
				enable = lib.mkEnableOption "enables desktop apps";
				extra.enable = lib.mkEnableOption "enables extra desktop apps";
			};
			dev = {
				enable = lib.mkEnableOption "enables development utilities";
				extra.enable = lib.mkEnableOption "enables extra development utilities";
			};
			utils = {
				enable = lib.mkEnableOption "enables general utilities";
			};
		};
	};

	config = {
		environment.systemPackages = with pkgs; pkgs.lib.optionals config.software.desktop.enable [
			# Desktop
			(callPackage ./resources/derivations/pavolctld { })
			alacritty
			arandr
			dmenu
			firefox
			mpv
			pavucontrol
			pcmanfm
			redshift
			sxiv
			zathura
		] ++ pkgs.lib.optionals config.software.desktop.extra.enable [
			# Desktop Extra
			geeqie
			gimp
			inkscape
			qbittorrent
			qdirstat
			thunderbird
			ungoogled-chromium
		] ++ pkgs.lib.optionals config.software.dev.enable [
			# Development
			dash  # TODO should be default /bin/sh
			entr
			gcc
			git
			gnumake
			jq
			lm_sensors
			nmap
			openssl
			python3
			sassc
			sslscan
			wget
		] ++ pkgs.lib.optionals config.software.dev.extra.enable [
			# Development Extra
			android-tools
			cargo
			hugo
			#python-pip  # TODO figure this one out
			uhubctl
			wireguard-tools
		] ++ pkgs.lib.optionals config.software.utils.enable [
			# Utilities
			ddcutil # TODO
			fastfetch
			htop
			light
			neovim
			p7zip
			powertop
			pv
			rsync
			screen
			scrot
			smartmontools
			stress
			testdisk
			tmux
			xxHash
			(callPackage ../../derivations/lowbat {})
			(callPackage ../../derivations/pavolctld {})
		];

		# More desktop
		programs.dconf.enable = config.software.desktop.enable;  # For home-manager to configure gtk TODO this should be there instead

		# More utilities
		programs.zsh.enable = config.software.utils.enable;
		users.defaultUserShell = lib.mkIf config.software.utils.enable pkgs.zsh;
		services.openssh.enable = config.software.utils.enable;
	};
}