summaryrefslogtreecommitdiff
path: root/home-modules/apps/default.nix
blob: 20a3f33110d203011c09d2a3a9667e138c3bd403 (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
{lib, pkgs, inputs, config, ...}:
with lib;
let
cfg = config.homeapps.presets;
in 
{
   imports = [
     ./nvim
     ./desktop 
     ./zsh.nix
   ];

  options.homeapps.presets = {
    base.enable = lib.mkOption { 
      type = lib.types.bool; 
      default = true; 
        description ="Enable basics for home-config";
    } ;
    full.enable = lib.mkEnableOption  "Enable everything" ;
    email.enable = lib.mkEnableOption "Enable email-related config";
    browser.enable = lib.mkEnableOption "Enable the browser (librewolf)";
    comms.enable = lib.mkEnableOption "Enable communication-related config";
    utils.enable = lib.mkEnableOption "Enable utilities" ;
    note-taking.enable = lib.mkEnableOption "Enable note taking apps"; 
    art.enable = lib.mkEnableOption "Enable art apps config"; 
    work.enable = lib.mkEnableOption "Enable research-related config"; 
    dev.enable = lib.mkEnableOption "Enable development apps"; 
    connectivity.enable = lib.mkEnableOption "Enable connectivity"; 
    multimedia.enable = lib.mkEnableOption "Enable multimedia apps"; 
    games.enable = lib.mkEnableOption "Enable games"; 
  };
  

  config = lib.mkMerge [
    (lib.mkIf cfg.full.enable {
      homeapps.presets = { 
        base.enable = true;
        email.enable = true;
        browser.enable = true;
        comms.enable = true;
        utils.enable = true;
        note-taking.enable = true;
        art.enable = true;
        work.enable = true;
        dev.enable = true;
        connectivity.enable = true;
        multimedia.enable = true;
        games.enable = true;
      };
    })
    (lib.mkIf cfg.base.enable {
      home.packages = with pkgs; [
        lm_sensors 
      ];
      homeapps.zsh.enable = true; 
      homeapps.nvim.enable = true; 
    })
    (lib.mkIf cfg.email.enable {
      home.packages = with pkgs; [
      ];
    })
    (lib.mkIf cfg.comms.enable {
      home.packages = with pkgs; [
        iamb
      ];
    })
    (lib.mkIf cfg.utils.enable {
      home.packages = with pkgs; [
        htop
        btop 
        nmap 
        dig
        ripgrep 
        unzip 
        unrar
        sshfs
        xdg-user-dirs
        zsh
        ranger
        file
      ];
    })
    (lib.mkIf cfg.note-taking.enable {
      home.packages = with pkgs; [ ];
      # Todo force synthing to be on here 
    })
    (lib.mkIf cfg.work.enable {
      home.packages = with pkgs; [
      ];
    })
    (lib.mkIf cfg.dev.enable {
      home.packages = with pkgs; [
        cmake 
        ( hiPrio gcc)
        gnumake
        clang
        rustup
        pkg-config
      ];
      homeapps.nvim.enable = true;
      homesv.direnv.enable = true;
    })
    (lib.mkIf cfg.connectivity.enable {
      home.packages = with pkgs; [
        libsForQt5.kdeconnect-kde
        syncthingtray
        eduvpn-client 
      ];
      services.syncthing = {
        enable = true; 
      }; 
    })
    (lib.mkIf cfg.multimedia.enable {
      home.packages = with pkgs; [
        ani-cli
        playerctl
      ];

      services.playerctld.enable = true; 
    })
    (lib.mkIf cfg.games.enable {
      home.packages = with pkgs; [
      ];
    })
  ];
}