Mutualize gaming configuration

(NixOS + Home Manager)
This commit is contained in:
Quentin Boyer 2023-03-26 17:23:45 +02:00
parent 5f7db10995
commit 84367de7eb
4 changed files with 56 additions and 6 deletions

View file

@ -95,6 +95,7 @@
};
personal-cli = import ./personal-cli/hm.nix;
personal-gui = import ./personal-gui/hm.nix;
gaming = import ./gaming/hm.nix;
};
nixosModules = {
@ -104,6 +105,7 @@
personal-cli = import ./personal-cli/nixos.nix;
personal-gui = import ./personal-gui/nixos.nix;
roaming = import ./roaming/nixos.nix;
gaming = import ./gaming/nixos.nix;
};
overlays.x86_64-linux = final: prev: pkgList "x86_64-linux" prev.callPackage;
@ -116,6 +118,7 @@
self.nixosModules.minimal
self.nixosModules.personal-cli
self.nixosModules.personal-gui
self.nixosModules.gaming
({pkgs, ...}: {
nixpkgs.overlays = [
inputs.nur.overlay
@ -141,6 +144,7 @@
self.hmModules.minimal
self.hmModules.personal-cli
self.hmModules.personal-gui
self.hmModules.gaming
./home.nix
./graphical.nix
./extra_info.nix

35
gaming/hm.nix Normal file
View file

@ -0,0 +1,35 @@
{
pkgs,
config,
lib,
...
}: {
home.packages = with pkgs; [
bottles
heroic
lutris
simulationcraft
warcraftlogs
wine-ge
winetricks
wowup
xivlauncher
];
home.file = {
".config/heroic/tools/wine/wine-system" = {
source = pkgs.wine-ge;
recursive = true;
};
};
home.activation = {
proton-ge = lib.hm.dag.entryAfter ["writeBoundary"] ''
target="${config.home.homeDirectory}/.steam/root/compatibilitytools.d/Proton-${pkgs.proton-ge.version}"
if ! [ -d "$target" ]; then
cp -R ${pkgs.proton-ge} "$target"
chmod -R u+w "$target"
fi
'';
};
}

17
gaming/nixos.nix Normal file
View file

@ -0,0 +1,17 @@
{pkgs, ...}: {
nixpkgs.config = {
allowUnfree = true;
};
programs.steam.enable = true;
hardware.steam-hardware.enable = true;
security.wrappers = {
gamescope = {
owner = "root";
group = "root";
source = "${pkgs.gamescope}/bin/gamescope";
capabilities = "cap_sys_nice+ep";
};
};
}

View file

@ -10,10 +10,6 @@ in {
# boot.extraModulePackages = [ ashmem binder ];
# boot.kernelModules = [ "ashmem_linux" "binder_linux" ];
nixpkgs.config = {
allowUnfree = true;
};
/*
nixpkgs.config.packageOverrides = pkgs: {
steam = pkgs.steam.override {
@ -21,6 +17,4 @@ in {
};
};
*/
programs.steam.enable = true;
}