Add modules.desktop.wine option

I'll experiment using Wine with NixOS. Let's just see how this goes.
This commit is contained in:
foo-dogsquared 2021-12-25 21:30:10 +08:00
parent 4c0f04266e
commit 875abade93
2 changed files with 19 additions and 0 deletions

View File

@ -20,6 +20,7 @@
fonts.enable = true;
hardware.enable = true;
cleanup.enable = true;
wine.enable = true;
};
dev = {
enable = true;

View File

@ -14,6 +14,14 @@ in {
hardware.enable =
lib.mkEnableOption "the common hardware-related configuration";
cleanup.enable = lib.mkEnableOption "activation of cleanup services";
wine = {
enable = lib.mkEnableOption "Wine and Wine-related tools";
package = lib.mkOption {
type = lib.types.package;
description = "The Wine package to be used for related tools.";
default = pkgs.wineWowPackages.stable;
};
};
};
config = lib.mkIf cfg.enable (lib.mkMerge [
@ -130,5 +138,15 @@ in {
};
};
})
# I try to avoid using Wine on NixOS because most of them uses FHS or something and I just want it to work but here goes.
(lib.mkIf cfg.wine.enable {
environment.systemPackages = with pkgs;
[
cfg.wine.package # The star of the show.
winetricks # We do a little trickery with missing Windows runtimes.
bottles # PlayOnLinux but better. :)
];
})
]);
}