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

    environment.systemPackages = with pkgs; [
      wineWow64Packages.stagingFull
      winetricks
    ];

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