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" "favFont" ] [ "fonts" "favFont" ])
|
||||
(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 ./colors.nix inputs)
|
||||
./gaming.nix
|
||||
./fonts.nix
|
||||
];
|
||||
}
|
||||
|
@ -94,18 +94,6 @@ in
|
||||
options.ezpcusr = {
|
||||
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 {
|
||||
default = false;
|
||||
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 {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
@ -668,27 +650,12 @@ in
|
||||
|
||||
fonts.fontconfig.enable = lib.mkDefault true;
|
||||
|
||||
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
|
||||
[
|
||||
home.packages = with pkgs; [
|
||||
waybar
|
||||
wl-clipboard # important actually, for vim and other things
|
||||
xwayland
|
||||
libappindicator-gtk3
|
||||
|
||||
oldwine
|
||||
oldwinetricks
|
||||
|
||||
jq
|
||||
|
||||
ezDrv
|
||||
@ -715,27 +682,6 @@ in
|
||||
gitAndTools.hub
|
||||
nmap
|
||||
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 = {
|
||||
|
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