aboutsummaryrefslogtreecommitdiff
path: root/nix/modules/home/default.nix
blob: 06c43dc2dbbd3884a0815783c2995e98de5b71ce (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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
{ lib, config, pkgs, ... }:
{
  imports = [
    ../vars.nix
    ./fcitx.nix
    ./secrets.nix
    ./emacs.nix
    ./firefox.nix
    ./git.nix
    ./hyprland.nix
    ./mpv.nix
    ./yt-dlp.nix
    ./wofi.nix
    ./kitty.nix
    ./waybar.nix
    ./zsh.nix
    ./mbsync.nix
    ./msmtp.nix
    ./gammastep.nix
    ./mpd.nix
    ./mako.nix
    ./user.nix
    ./pantalaimon.nix
  ];

  options = {
    monorepo.profiles = {
	    enable = lib.mkEnableOption "Enables home manager desktop configuration";
	    # Programs
      graphics.enable = lib.mkEnableOption "Enables graphical programs for user";
	    lang-c.enable = lib.mkEnableOption "Enables C language support";
	    lang-sh.enable = lib.mkEnableOption "Enables sh language support";
	    lang-rust.enable = lib.mkEnableOption "Enables Rust language support";
	    lang-python.enable = lib.mkEnableOption "Enables python language support";
	    lang-sol.enable = lib.mkEnableOption "Enables solidity language support";
	    lang-openscad.enable = lib.mkEnableOption "Enables openscad language support";
	    lang-js.enable = lib.mkEnableOption "Enables javascript language support";
	    lang-nix.enable = lib.mkEnableOption "Enables nix language support";
	    lang-coq.enable = lib.mkEnableOption "Enables coq language support";

	    crypto.enable = lib.mkEnableOption "Enables various cryptocurrency wallets";
	    art.enable = lib.mkEnableOption "Enables various art programs";
	    music.enable = lib.mkEnableOption "Enables mpd";
	    workstation.enable = lib.mkEnableOption "Enables workstation packages (music production and others)";
	    cuda.enable = lib.mkEnableOption "Enables CUDA user package builds";
	    hyprland.enable = lib.mkEnableOption "Enables hyprland";

	    email = {
		    email = lib.mkOption {
			    type = lib.types.str;
			    default = "ret2pop@gmail.com";
			    example = "john@example.com";
			    description = "Email address and imaps/smtps account";
		    };
		    imapsServer = lib.mkOption {
			    type = lib.types.str;
			    default = "imap.gmail.com";
			    example = "imap.example.com";
			    description = "imaps server address";
		    };
		    smtpsServer = lib.mkOption {
			    type = lib.types.str;
			    default = "smtp.gmail.com";
			    example = "smtp.example.com";
			    description = "smtp server address";
		    };
		    enable = lib.mkEnableOption "Enables email";
	    };
    };
  };

  config = {
    home.packages = (if config.monorepo.profiles.email.enable then [ pkgs.mu ] else [])
					          ++
					          (if config.monorepo.profiles.lang-c.enable then (with pkgs; [
						          autobuild
						          clang
						          gdb
						          gnumake
						          bear
						          clang-tools
					          ]) else [])
					          ++
					          (if config.monorepo.profiles.lang-js.enable then (with pkgs; [
						          nodejs
						          bun
						          yarn
						          typescript
						          vscode-langservers-extracted
					          ]) else [])
					          ++
					          (if config.monorepo.profiles.lang-rust.enable then (with pkgs; [
						          cargo
						          rust-analyzer
						          rustfmt
					          ]) else [])
					          ++
					          (if config.monorepo.profiles.lang-python.enable then (with pkgs; [
						          poetry
						          python3
						          python312Packages.jedi
					          ]) else [])
					          ++
					          (if config.monorepo.profiles.lang-sol.enable then (with pkgs; [
						          solc
					          ]) else [])
					          ++
					          (if config.monorepo.profiles.lang-openscad.enable then (with pkgs; [
						          openscad
						          openscad-lsp
					          ]) else [])
					          ++
					          (if config.monorepo.profiles.lang-sh.enable then (with pkgs; [
						          bash-language-server
					          ]) else [])
					          ++
					          (if config.monorepo.profiles.lang-coq.enable then (with pkgs; [
						          coq
					          ]) else [])
					          ++
					          (if config.monorepo.profiles.lang-nix.enable then (with pkgs; [
						          nil
						          nixd
						          nixfmt-rfc-style
					          ]) else [])
					          ++
					          (if config.monorepo.profiles.crypto.enable then (with pkgs; [
						          bitcoin
						          electrum
						          monero-cli
						          monero-gui
					          ]) else [])
					          ++
					          (if config.monorepo.profiles.art.enable then (with pkgs; [
						          inkscape
						          krita
					          ]) else [])
					          ++
					          (if config.monorepo.profiles.music.enable then (with pkgs; [
						          mpc-cli
						          sox
					          ]) else [])
					          ++
					          (if config.monorepo.profiles.workstation.enable then (with pkgs; [
			                alsa-utils
			                alsa-scarlett-gui
				              ardour
				              audacity
					            blender
			                fluidsynth
			                qjackctl
			                qsynth
			                qpwgraph
			                imagemagick
			                inkscape
			                kdenlive
			                kicad
					          ]) else []);

    monorepo.profiles = {
	    enable = lib.mkDefault true;
	    music.enable = lib.mkDefault (true && config.monorepo.profiles.enable);
	    hyprland.enable = lib.mkDefault (true && config.monorepo.profiles.enable);
	    email.enable = lib.mkDefault (true && config.monorepo.profiles.enable);

	    # Programming
      graphics.enable = lib.mkDefault (true && config.monorepo.profiles.enable);
	    lang-c.enable = lib.mkDefault (true && config.monorepo.profiles.enable);
	    lang-rust.enable = lib.mkDefault (true && config.monorepo.profiles.enable);
	    lang-python.enable = lib.mkDefault (true && config.monorepo.profiles.enable);
	    lang-sol.enable = lib.mkDefault (true && config.monorepo.profiles.enable);
	    lang-sh.enable = lib.mkDefault (true && config.monorepo.profiles.enable);
	    lang-openscad.enable = lib.mkDefault (true && config.monorepo.profiles.enable);
	    lang-js.enable = lib.mkDefault (true && config.monorepo.profiles.enable);
	    lang-nix.enable = lib.mkDefault (true && config.monorepo.profiles.enable);
	    lang-coq.enable = lib.mkDefault (true && config.monorepo.profiles.enable);

	    crypto.enable = lib.mkDefault (true && config.monorepo.profiles.enable);
	    art.enable = lib.mkDefault (true && config.monorepo.profiles.enable);
	    workstation.enable = lib.mkDefault (true && config.monorepo.profiles.enable);
    };
  };
}