feat(desktop): move prism-launcher and steam config to nixos gaming module
This commit is contained in:
parent
da52d32c91
commit
af7226d30e
4 changed files with 41 additions and 10 deletions
37
modules/nixos/desktop/gaming/default.nix
Normal file
37
modules/nixos/desktop/gaming/default.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
mkEnableOption
|
||||
mkIf
|
||||
mkMerge
|
||||
singleton
|
||||
;
|
||||
cfg = config.desktop.gaming;
|
||||
in
|
||||
{
|
||||
options.desktop.gaming = {
|
||||
steam.enable = mkEnableOption "";
|
||||
prism-launcher.enable = mkEnableOption "";
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf cfg.steam.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
home-manager.sharedModules = singleton { persistDirs = singleton ".local/share/Steam"; };
|
||||
})
|
||||
(mkIf cfg.prism-launcher.enable {
|
||||
home-manager.sharedModules = singleton {
|
||||
home.packages = singleton pkgs.prismlauncher;
|
||||
persistDirs = singleton ".local/share/PrismLauncher";
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue