aboutsummaryrefslogtreecommitdiff
path: root/nix/modules/default.nix
blob: 42843485ae7241e7f32ba9bfd9556b6bdb03da8c (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
{ lib, config, pkgs, ... }:
{
  imports = [
    ./configuration.nix
    ./home/home.nix
    ./vars.nix
  ];

  options = {
    monorepo = {
	profiles = {
		cuda.enable = lib.mkEnableOption "Enables CUDA support";
		documentation.enable = lib.mkEnableOption "Enables documentation on system.";
		secureBoot.enable = lib.mkEnableOption "Enables secure boot. See sbctl.";
		pipewire.enable = lib.mkEnableOption "Enables pipewire low latency audio setup";
		tor.enable = lib.mkEnableOption "Enables tor along with torsocks";
		home.enable = lib.mkEnableOption "Enables home user";
		server.enable = lib.mkEnableOption "Enables server services";
	};
    };
  };

  config = {
    home-manager.users."${config.monorepo.vars.userName}" = {
	programs.home-manager.enable = config.monorepo.profiles.home.enable;
    };

    environment.systemPackages = lib.mkIf config.monorepo.profiles.documentation.enable (with pkgs; [
	linux-manual
	man-pages
	man-pages-posix
    ]);

    monorepo = {
	profiles = {
		documentation.enable = lib.mkDefault true;
		pipewire.enable = lib.mkDefault true;
		tor.enable = lib.mkDefault true;
		home.enable = lib.mkDefault true;
	};
    };
  };
}