summaryrefslogtreecommitdiff
path: root/os/srv/compat.nix
blob: ab9560f13329e21ffd1ad305eff78b1d3582df0d (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
{ config, lib, pkgs, ... }:
let
  cfg = config.sys.srv.compat;
in
{
  options.sys.srv.compat.enable = lib.mkEnableOption "enables compatibility with windows & x11";
  config = lib.mkIf cfg.enable {
    programs.xwayland = {
      enable = true;
      package = pkgs.xwayland-satellite;
    };

    environment.sessionVariables = {
      NIXOS_OZONE_WL = "1";
      ELECTRON_ENABLE_WAYLAND = "1";
      WINE_RT_PRIO = "1";
    };

    environment.systemPackages = with pkgs; [
      winetricks
      wineWowPackages.waylandFull
    ];
  };
}