Move modules inside /nixos
This commit is contained in:
74
modules/nixos/desktop/gaming/emulators.nix
Normal file
74
modules/nixos/desktop/gaming/emulators.nix
Normal file
@@ -0,0 +1,74 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.modules.desktop.gaming.emulators;
|
||||
in {
|
||||
options.modules.desktop.gaming.emulators = {
|
||||
ds.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
gb.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
gba.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
gamecube.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
ps1.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
ps2.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
ps3.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
psp.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
snes.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
switch.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
wii.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
xbox.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
user.packages = with pkgs; [
|
||||
(lib.mkIf cfg.ps1.enable duckstation)
|
||||
(lib.mkIf cfg.ps2.enable unstable.pcsx2)
|
||||
(lib.mkIf cfg.ps3.enable rpcs3)
|
||||
(lib.mkIf cfg.psp.enable unstable.ppsspp)
|
||||
(lib.mkIf cfg.ds.enable desmume)
|
||||
(lib.mkIf (cfg.gba.enable ||
|
||||
cfg.gb.enable ||
|
||||
cfg.snes.enable)
|
||||
higan)
|
||||
(lib.mkIf cfg.switch.enable yuzuPackages.mainline)
|
||||
(lib.mkIf (cfg.wii.enable ||
|
||||
cfg.gamecube.enable)
|
||||
dolphin-emu)
|
||||
(lib.mkIf cfg.xbox.enable unstable.xemu)
|
||||
];
|
||||
};
|
||||
}
|
29
modules/nixos/desktop/gaming/lutris.nix
Normal file
29
modules/nixos/desktop/gaming/lutris.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.modules.desktop.gaming.lutris;
|
||||
in {
|
||||
options.modules.desktop.gaming.lutris = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
(lutris.override {
|
||||
extraPkgs = pkgs: [
|
||||
winePackages.staging
|
||||
wine64Packages.staging
|
||||
];
|
||||
})
|
||||
vulkan-loader
|
||||
vulkan-tools
|
||||
];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
};
|
||||
}
|
17
modules/nixos/desktop/gaming/steam.nix
Normal file
17
modules/nixos/desktop/gaming/steam.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.modules.desktop.gaming.steam;
|
||||
in {
|
||||
options.modules.desktop.gaming.steam = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.steam.enable = true;
|
||||
|
||||
systemd.extraConfig = "DefaultLimitNOFILE=1048576";
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user