separate gaming module
This commit is contained in:
parent
77e4b275c1
commit
08891bd65c
@ -6,9 +6,13 @@ inputs:
|
|||||||
(lib.mkAliasOptionModule [ "ezpcusr" "favColors" ] [ "colors" "favColors" ])
|
(lib.mkAliasOptionModule [ "ezpcusr" "favColors" ] [ "colors" "favColors" ])
|
||||||
(lib.mkAliasOptionModule [ "ezpcusr" "favFont" ] [ "fonts" "favFont" ])
|
(lib.mkAliasOptionModule [ "ezpcusr" "favFont" ] [ "fonts" "favFont" ])
|
||||||
(lib.mkAliasOptionModule [ "ezpcusr" "waybarCss" ] [ "programs" "waybar" "style" ])
|
(lib.mkAliasOptionModule [ "ezpcusr" "waybarCss" ] [ "programs" "waybar" "style" ])
|
||||||
|
(lib.mkAliasOptionModule [ "ezpcusr" "gaming" ] [ "gaming" "enable" ])
|
||||||
|
(lib.mkAliasOptionModule [ "ezpcusr" "flatSteam" ] [ "gaming" "flatSteam" ])
|
||||||
|
(lib.mkAliasOptionModule [ "ezpcusr" "newWine" ] [ "gaming" "newWine" ])
|
||||||
|
|
||||||
(import ./ezpcusr.nix inputs)
|
(import ./ezpcusr.nix inputs)
|
||||||
(import ./colors.nix inputs)
|
(import ./colors.nix inputs)
|
||||||
|
./gaming.nix
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -94,18 +94,6 @@ in
|
|||||||
options.ezpcusr = {
|
options.ezpcusr = {
|
||||||
enable = mkEnableOption "Enable simple PC user config";
|
enable = mkEnableOption "Enable simple PC user config";
|
||||||
|
|
||||||
newWine = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "If you want to include wine-staging as new-wine";
|
|
||||||
};
|
|
||||||
|
|
||||||
flatSteam = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "If you use the flatpak Steam instead of NixOS";
|
|
||||||
};
|
|
||||||
|
|
||||||
babybar = mkOption {
|
babybar = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
description = ''Switch to using the "baby" swaybar rather than waybar'';
|
description = ''Switch to using the "baby" swaybar rather than waybar'';
|
||||||
@ -184,12 +172,6 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
gaming = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "If this PC is used for gaming";
|
|
||||||
};
|
|
||||||
|
|
||||||
bluetooth = mkOption {
|
bluetooth = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
@ -668,27 +650,12 @@ in
|
|||||||
|
|
||||||
fonts.fontconfig.enable = lib.mkDefault true;
|
fonts.fontconfig.enable = lib.mkDefault true;
|
||||||
|
|
||||||
home.packages = with pkgs;
|
home.packages = with pkgs; [
|
||||||
let
|
|
||||||
steam = pkgs.steam.override { withJava = true; };
|
|
||||||
|
|
||||||
steam-run = steam.run;
|
|
||||||
|
|
||||||
newwine = (pkgs.wineFull.override { wineBuild = "wineWow"; wineRelease = "staging"; });
|
|
||||||
newwinetricks = pkgs.winetricks.override { wine = newwine; };
|
|
||||||
|
|
||||||
oldwine = pkgs.wineWowPackages.full;
|
|
||||||
oldwinetricks = pkgs.winetricks.override { wine = oldwine; };
|
|
||||||
in
|
|
||||||
[
|
|
||||||
waybar
|
waybar
|
||||||
wl-clipboard # important actually, for vim and other things
|
wl-clipboard # important actually, for vim and other things
|
||||||
xwayland
|
xwayland
|
||||||
libappindicator-gtk3
|
libappindicator-gtk3
|
||||||
|
|
||||||
oldwine
|
|
||||||
oldwinetricks
|
|
||||||
|
|
||||||
jq
|
jq
|
||||||
|
|
||||||
ezDrv
|
ezDrv
|
||||||
@ -715,27 +682,6 @@ in
|
|||||||
gitAndTools.hub
|
gitAndTools.hub
|
||||||
nmap
|
nmap
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
] ++ lib.optionals cfg.gaming [
|
|
||||||
xlibs.xf86inputjoystick
|
|
||||||
oldwine
|
|
||||||
oldwinetricks
|
|
||||||
] ++ lib.optionals (cfg.gaming && !cfg.flatSteam) [
|
|
||||||
steam
|
|
||||||
steam-run
|
|
||||||
(writeScriptBin "steam-run-native" ''
|
|
||||||
#!${pkgs.stdenv.shell}
|
|
||||||
${(steam.override { nativeOnly = true; }).run}/bin/steam-run $@
|
|
||||||
'')
|
|
||||||
] ++ lib.optionals (cfg.gaming && cfg.newWine) [
|
|
||||||
(
|
|
||||||
pkgs.runCommand "new-wine-stuff"
|
|
||||||
{ } ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
ln -s ${newwine}/bin/wine $out/bin/new-wine
|
|
||||||
ln -s ${newwine}/bin/winecfg $out/bin/new-winecfg
|
|
||||||
ln -s ${newwinetricks}/bin/winetricks $out/bin/new-winetricks
|
|
||||||
''
|
|
||||||
)
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.rofi = {
|
programs.rofi = {
|
||||||
|
59
home-manager/modules/gaming.nix
Normal file
59
home-manager/modules/gaming.nix
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.gaming;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.gaming = {
|
||||||
|
enable = mkEnableOption "Enable gaming stuff";
|
||||||
|
|
||||||
|
newWine = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "If you want to include wine-staging as new-wine";
|
||||||
|
};
|
||||||
|
|
||||||
|
flatSteam = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "If you use the flatpak Steam instead of NixOS";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages =
|
||||||
|
let
|
||||||
|
steam = pkgs.steam.override { withJava = true; };
|
||||||
|
|
||||||
|
steam-run = steam.run;
|
||||||
|
|
||||||
|
newwine = (pkgs.wineFull.override { wineBuild = "wineWow"; wineRelease = "staging"; });
|
||||||
|
newwinetricks = pkgs.winetricks.override { wine = newwine; };
|
||||||
|
|
||||||
|
oldwine = pkgs.wineWowPackages.full;
|
||||||
|
oldwinetricks = pkgs.winetricks.override { wine = oldwine; };
|
||||||
|
in
|
||||||
|
with pkgs; [
|
||||||
|
xlibs.xf86inputjoystick
|
||||||
|
oldwine
|
||||||
|
oldwinetricks
|
||||||
|
] ++ lib.optionals (!cfg.flatSteam) [
|
||||||
|
steam
|
||||||
|
steam-run
|
||||||
|
(writeScriptBin "steam-run-native" ''
|
||||||
|
#!${pkgs.stdenv.shell}
|
||||||
|
${(steam.override { nativeOnly = true; }).run}/bin/steam-run $@
|
||||||
|
'')
|
||||||
|
] ++ lib.optionals cfg.newWine [
|
||||||
|
(
|
||||||
|
pkgs.runCommand "new-wine-stuff"
|
||||||
|
{ } ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
ln -s ${newwine}/bin/wine $out/bin/new-wine
|
||||||
|
ln -s ${newwine}/bin/winecfg $out/bin/new-winecfg
|
||||||
|
ln -s ${newwinetricks}/bin/winetricks $out/bin/new-winetricks
|
||||||
|
''
|
||||||
|
)
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user