about summary refs log tree commit diff
path: root/hosts/common/desktop/xserver.nix
blob: 8c60093493986c4caf86b739adf6daa6f5a0d734 (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
{ config, pkgs, lib, ... }:

{
  programs.sway = {
    enable = true;
    wrapperFeatures.gtk = true;
    extraPackages = with pkgs; [
      brightnessctl
      polkit_gnome
      xsettingsd
      swaylock
      swayidle
      wl-clipboard
    ];
    extraSessionCommands = ''
      export MOZ_ENABLE_WAYLAND=1
    '';
  };

  programs.dconf.enable = true;

  services = {
    dbus = {
      enable = true;
      packages = [
        pkgs.gcr
        pkgs.gnome3.dconf
        pkgs.gnome3.gnome-keyring
      ];
    };

    udev.packages = [
      pkgs.gnome3.gnome-settings-daemon
    ];

    gvfs = {
      enable = true;
      package = pkgs.gnome.gvfs;
    };

    gnome = {
      gnome-keyring.enable = true;

      # Sushi, a quick previewer for Nautilus
      sushi.enable = true;

      # !https://github.com/NixOS/nixpkgs/issues/16327
      at-spi2-core.enable = true;
    };
  };

  security = {
    polkit.enable = true;
    # enable gnome keyring unlock on login
    pam.services.gdm.enableGnomeKeyring = true;
  };

  xdg.portal = {
    enable = true;
    gtkUsePortal = true;
    extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr ];
  };

  environment = {
    pathsToLink = [ "/libexec" ];
    homeBinInPath = true;
    localBinInPath = true;
  };
}