summaryrefslogtreecommitdiff
path: root/users/seth/desktop/default.nix
blob: 60164e45147b0d07a8e132c19cc18ca58b86828c (plain)
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
{
  config,
  lib,
  pkgs,
  osConfig,
  ...
}:
let
  cfg = config.seth.desktop;
in
{
  options.seth.desktop = {
    enable = lib.mkEnableOption "desktop (Linux) settings" // {
      default = osConfig.desktop.enable or false;
      defaultText = lib.literalExpression "osConfig.desktop.enable or false";
    };
  };

  imports = [
    ./budgie.nix
    ./gnome.nix
    ./niri.nix
    ./plasma.nix
  ];

  config = lib.mkIf cfg.enable {
    # This is meant for Linux
    assertions = [ (lib.hm.assertions.assertPlatform "seth.desktop" pkgs lib.platforms.linux) ];

    home.packages = [
      (pkgs.discord-canary.overrideAttrs (old: {
        preInstall =
          old.preInstall or ""
          + ''
            gappsWrapperArgs+=(--add-flags "--enable-features=VaapiOnNvidiaGPUs,AcceleratedVideoDecodeLinuxGL")
          '';
      }))

      # Matrix client
      pkgs.element

      pkgs.prismlauncher

      (pkgs.spotify.overrideAttrs {
        # Spotify doesn't work well on Wayland natively. Don't force it
        preFixup = ''
          gappsWrapperArgs+=(--unset NIXOS_OZONE_WL)
        '';
      })
    ];
  };
}