~sumner/home-manager-config

home-manager-config/modules/window-manager/default.nix -rw-r--r-- 1.6 KiB
54885923Sumner Evans display: use autorandr an hour ago
                                                                                
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
{ config, lib, pkgs, ... }: with lib; let
  editor = "${pkgs.neovim}/bin/nvim";
  menucalc = pkgs.callPackage ../../pkgs/menucalc.nix { };
  terminal = "${pkgs.alacritty}/bin/alacritty";
  waylandCfg = config.wayland;
  xorgCfg = config.xorg;
in
{
  imports = [
    ./autorandr.nix
    ./i3status-rust.nix
    ./rofi.nix
    ./wallpaper.nix
    ./wayland.nix
    ./writeping.nix
    ./xorg.nix
  ];

  options = {
    windowManager.modKey = mkOption {
      type = types.enum [ "Shift" "Control" "Mod1" "Mod2" "Mod3" "Mod4" "Mod5" ];
      default = "Mod4";
      description = "Modifier key that is used for all default keybindings.";
    };
  };

  config = mkIf (waylandCfg.enable || xorgCfg.enable) {
    home.packages = with pkgs; [
      brightnessctl
      menucalc
      screenkey
      wmctrl
    ];

    home.sessionVariables = {
      VISUAL = "${editor}";
      EDITOR = "${editor}";
      TERMINAL = "${terminal}";
    };

    gtk = {
      enable = true;
      iconTheme = {
        package = pkgs.arc-icon-theme;
        name = "Arc";
      };

      theme = {
        package = pkgs.arc-theme;
        name = "Arc-Dark";
      };

      gtk3.extraConfig = {
        gtk-application-prefer-dark-theme = 1;
        gtk-toolbar-style = "GTK_TOOLBAR_ICONS";
        gtk-toolbar-icon-size = "GTK_ICON_SIZE_LARGE_TOOLBAR";
      };
    };

    qt = {
      enable = true;
      platformTheme = "gtk";
    };

    # Enable GUI services
    services.blueman-applet.enable = true;
    services.kdeconnect = { enable = true; indicator = true; };
    services.network-manager-applet.enable = true;
  };
}