[gaming] Add an emulation suboption
This commit is contained in:
@@ -17,7 +17,7 @@ with lib;
|
|||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
desktop = {
|
desktop = {
|
||||||
enable = true;
|
enable = true;
|
||||||
gaming = true;
|
gaming.enable = true;
|
||||||
kde = true;
|
kde = true;
|
||||||
sddm = true;
|
sddm = true;
|
||||||
wayland = true;
|
wayland = true;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
desktop = {
|
desktop = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wayland = true;
|
wayland = true;
|
||||||
gaming = false;
|
gaming.enable = false;
|
||||||
kde = true;
|
kde = true;
|
||||||
sddm = true;
|
sddm = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,11 +17,15 @@ with lib;
|
|||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
desktop = {
|
desktop = {
|
||||||
enable = true;
|
enable = true;
|
||||||
gaming = true;
|
gaming = {
|
||||||
|
enable = true;
|
||||||
|
emulation = true;
|
||||||
|
};
|
||||||
kde = true;
|
kde = true;
|
||||||
sddm = true;
|
sddm = true;
|
||||||
wayland = true;
|
wayland = true;
|
||||||
};
|
};
|
||||||
|
nfs-mounts.enable = true;
|
||||||
users.enable = true;
|
users.enable = true;
|
||||||
virtualisation.enable = true;
|
virtualisation.enable = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,7 +9,10 @@ with lib;
|
|||||||
x11 = mkOption { type = types.bool; default = false; description = "Enable X11 support."; };
|
x11 = mkOption { type = types.bool; default = false; description = "Enable X11 support."; };
|
||||||
wayland = mkOption { type = types.bool; default = false; description = "Enable Wayland support."; };
|
wayland = mkOption { type = types.bool; default = false; description = "Enable Wayland support."; };
|
||||||
kde = mkOption { type = types.bool; default = false; description = "Enable KDE."; };
|
kde = mkOption { type = types.bool; default = false; description = "Enable KDE."; };
|
||||||
gaming = mkOption { type = types.bool; default = false; description = "Enable gaming support."; };
|
gaming = {
|
||||||
|
enable = mkOption { type = types.bool; default = false; description = "Enable gaming support."; };
|
||||||
|
emulation = mkOption { type = types.bool; default = false; description = "Enable emulation support."; };
|
||||||
|
};
|
||||||
sddm = mkOption { type = types.bool; default = false; description = "Enable SDDM greeter."; };
|
sddm = mkOption { type = types.bool; default = false; description = "Enable SDDM greeter."; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -6,13 +6,22 @@ let
|
|||||||
cfg = config.roles.desktop;
|
cfg = config.roles.desktop;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = mkIf (cfg.enable && cfg.gaming) {
|
config = mkMerge [
|
||||||
environment.systemPackages = with pkgs; [
|
(mkIf (cfg.enable && cfg.gaming.enable) {
|
||||||
steam
|
environment.systemPackages = with pkgs; [
|
||||||
lutris
|
steam
|
||||||
moonlight
|
lutris
|
||||||
];
|
moonlight
|
||||||
|
];
|
||||||
|
|
||||||
# Possibly other gaming specific services or settings
|
# Possibly other gaming specific services or settings
|
||||||
};
|
})
|
||||||
|
|
||||||
|
(mkIf (cfg.enable && cfg.gaming.emulation) {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
ryujinx
|
||||||
|
dolphin-emu
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user