[Windows/Wine] make wine package configurable

This commit is contained in:
Antoine Viallon 2023-04-27 18:15:48 +02:00
parent 6c9bf18d43
commit 250820cb82
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -1,13 +1,21 @@
{ config, pkgs, lib, ... }:
with lib;
{
let
cfg = config.aviallon.windows.wine;
in {
options.aviallon.windows.wine = {
enable = mkEnableOption "windows executable support on Linux";
package = mkOption {
description = "Wine package to use";
type = types.package;
default = pkgs.wineWowPackages.waylandFull;
example = pkgs.winePackages.stable;
};
};
config = {
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
bottles
wineWowPackages.waylandFull
cfg.package
];
};
}