summaryrefslogtreecommitdiff
path: root/modules/gnome/default.nix
blob: bcd31c38196cc75a8859db01b7869497be3e2ca0 (plain) (blame)
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
{ config, lib, pkgs, ...}: with lib; {
  imports = [
    ./extensions.nix
  ];
  options.santi-modules.gnome = {
    enable = mkEnableOption "Enable gnome";
    extensions = mkOption {
      description = "Extensions to gnome";
      type = with types; attrsOf (submodule {
        options = {
          package = mkOption {
            type = package;
            description = "Extension package";
          };
          email = mkOption {
            type = nullOr str;
            default = null;
            description = "Extensions' maintainer email";
          };
          dconf-settings = mkOption {
            type = attrs;
            default = {};
            description = "Extra configuration to be passed to dconf";
          };
          enabled = mkEnableOption {
            description = "Enable extension";
          };
        };
      });
    };
  };
  config = mkIf config.santi-modules.gnome.enable {
    programs.dconf.enable = true;
    environment.gnome.excludePackages = with pkgs; [
      decibels
      gnome-font-viewer
      gnome-connections
      simple-scan
      gnome-contacts
      gnome-photos
      gnome-tour
      gnome-notes
      gnome-text-editor
      gedit
      cheese
      gnome-terminal
      epiphany # web browser
      geary # email reader
      evince # document viewer
      totem # video player
      gnome-music
      gnome-characters
      tali # poker game
      iagno # go game
      hitori # sudoku game
      atomix # puzzle game
    ];
    services.xserver = {
      displayManager.gdm = {
        enable = true;
        wayland = true;
      };
      desktopManager.gnome.enable = true;
      excludePackages = [ pkgs.xterm ];
    };
    services.udev.packages = [ pkgs.gnome-settings-daemon ];
    services.gnome = {
      gnome-browser-connector.enable = true;
      gnome-keyring.enable = true;
    };
    home-manager.users.leonardo.dconf.settings = {
      "org/gnome/desktop/background" = {
        picture-uri = "${../../wallpaper.png}";
        picture-uri-dark = "${../../wallpaper.png}";
        picture-options = "zoom";
      };
      "org/gnome/desktop/interface" = {
        color-scheme="prefer-dark";
        enable-hot-corners=false;
        font-antialiasing="grayscale";
        font-hinting="slight";
        gtk-theme="Adwaita";
        cursor-theme="Hackneyed";
        icon-theme="Tela-brown-light";
        show-battery-percentage=true;
      };
      "org/gnome/settings-daemon/plugins/power" = { 
        power-button-action="hibernate";
        sleep-inactive-ac-type="nothing";
      };
      "org/gnome/mutter" = {
        dynamic-workspaces= true;
        edge-tiling= true;
        workspaces-only-on-primary= true;
        experimental-features = [ "scale-monitor-framebuffer" "variable-refresh-rate"];
      };
      "org/gnome/shell" = {
        disabled-extensions= [
          "[email protected]"
          "[email protected]"
        ];
      };
      "org/gnome/shell/app-switcher".current-workspace-only = true;
    };
  };
}