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

let cfg = config.roles.desktop; in {
  imports = [
    ./input.nix
    ./xserver.nix
  ];

  options.roles.desktop = {
    enable = mkEnableOption "desktop";
  };

  config = mkIf cfg.enable {
    security.rtkit.enable = true;

    i18n.inputMethod.enable = true;

    services = {
      displayManager.enable = true;

      xserver = {
        enable = true;
        displayManager.lightdm.enable = true;
        windowManager.i3.enable = true;
      };
      
      keyd.enable = true;

      pipewire = {
        enable = true;

        pulse.enable = true;
        alsa.enable = true;
        alsa.support32Bit = true;
        #jack.enable = true;
      };
    };

    fonts = {
      packages = with pkgs; [
        nerdfonts
        noto-fonts
        noto-fonts-cjk
        noto-fonts-cjk-sans
        noto-fonts-cjk-serif
        noto-fonts-emoji

        minecraftia
      ];

      fontconfig = {
        defaultFonts = {
          monospace = [ "CaskaydiaMono Nerd Font" ];
          sansSerif = [ "DejaVu Sans" "Noto Sans CJK JP" "Noto Sans" ];
          serif = [ "DejaVu Serif" "Noto Serif CJK JP" "Noto Serif" ];
        };
      };
    };
  };
}