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

{

  programs.sway = {
    enable = true;
    wrapperFeatures.gtk = true;
  };

  services.xserver = {
    enable = true;
    layout = "us";
    libinput.enable = true;

    displayManager = {
      gdm.enable = true;
      gdm.wayland = true;
      defaultSession = "sway";
    };
  };

  services = {
    dbus.packages = [ pkgs.gnome3.dconf ];
    udev.packages = [ pkgs.gnome3.gnome-settings-daemon ];
    gnome.gnome-keyring.enable = true;
    gvfs.enable = true;

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

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

  environment = {
    # Activate home-manager environment, if not already enabled
    loginShellInit = ''
      [ -d "$HOME/.nix-profile" ] || /nix/var/nix/profiles/per-user/$USER/home-manager/activate &> /dev/null
    '';
    homeBinInPath = true;
    localBinInPath = true;
  };
}