aboutsummaryrefslogtreecommitdiff
path: root/roles/home/desktop/default.nix
blob: 83192da57f6e30886d92717332325f604d00885b (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
{ config, pkgs, lib, inputs, ... }:
with lib;

let cfg = config.home.roles.desktop; in {
  imports = [
    ./theme.nix

    ./i3.nix
    ./picom.nix
    ./polybar.nix
    ./rofi.nix
    ./kitty.nix

    ./gtk.nix
    ./fcitx5.nix

    ./discord.nix
    ./eww.nix
    ./mpv.nix
    ./flameshot.nix
    ./fastfetch.nix
  ];

  options.home.roles.desktop = {
    enable = mkEnableOption "desktop home role";

    discord = mkOption {
      type = types.bool;
      default = true;
    };
    eww = mkOption {
      type = types.bool;
      default = true;
    };
    mpv = mkOption {
      type = types.bool;
      default = true;
    };
    screenshot = mkOption {
      type = types.bool;
      default = true;
    };
    fetch = mkOption {
      type = types.bool;
      default = true;
    };
  };

  config = mkIf cfg.enable {
    xsession.windowManager.i3.enable = true;

    gtk.enable = true;

    programs = {
      rofi.enable = true;
      kitty.enable = true;

      mpv.enable = cfg.mpv;
      fastfetch.enable = cfg.fetch;
    };

    services = {
      picom.enable = true;
      polybar.enable = true;

      flameshot.enable = cfg.screenshot;
    };
  };
}