about summary refs log tree commit diff
path: root/modules/wayland.nix
blob: 1ad4fe3ea8b6de0a40f69b1dc54ad8b7a46b38b6 (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
{
  config,
  lib,
  pkgs,
  ...
}:
with lib;
let
  cfg = config.nixfiles.modules.wayland;
in
{
  options.nixfiles.modules.wayland.enable = mkEnableOption "Wayland";

  config = mkIf cfg.enable {
    nixfiles.modules.foot.enable = true;

    hm.home = {
      packages = with pkgs; [
        grim
        slurp
        wl-clipboard
        wlr-randr
      ];

      sessionVariables = {
        NIXOS_OZONE_WL = 1;
        QT_QPA_PLATFORM = "wayland";
        SDL_VIDEODRIVER = "wayland";
        XDG_SESSION_TYPE = "wayland";
      };
    };
  };
}

Consider giving Nix/NixOS a try! <3