Gaming changes & KDE specialisation

This commit is contained in:
Lyes Saadi 2024-05-04 21:37:52 +02:00
parent 97d648948f
commit bda83fc5d0
No known key found for this signature in database
GPG key ID: 17418538BAA17767
3 changed files with 68 additions and 0 deletions

View file

@ -9,14 +9,27 @@
# ./hardware.nix # Set in the up.sh script among the files in hardware/
./networking.nix
./user/user.nix
./specialisation.nix
./gaming.nix
];
# Fails for some reason
documentation.nixos.enable = false;
nixpkgs.config.allowUnfree = true;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
nix.optimise.automatic = true;
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave

12
gaming.nix Normal file
View file

@ -0,0 +1,12 @@
{ pkgs, ... }:
{
programs.steam.enable = true;
programs.steam.gamescopeSession.enable = true;
programs.gamemode.enable = true;
users.users.lyes.packages = with pkgs; [
mangohud
protonup
];
}

43
specialisation.nix Normal file
View file

@ -0,0 +1,43 @@
{ lib, ... }:
{
specialisation = {
gaming.configuration = {
hardware.nvidia = {
prime.sync.enable = lib.mkForce true;
prime.offload = {
enable = lib.mkForce false;
enableOffloadCmd = lib.mkForce false;
};
};
};
kde.configuration = {
# GNOME
services.xserver.displayManager.gdm.enable = lib.mkForce false;
services.xserver.desktopManager.gnome.enable = lib.mkForce false;
# KDE
services.desktopManager.plasma6.enable = true;
services.displayManager.sddm.enable = true;
};
kde-gaming.configuration = {
hardware.nvidia = {
prime.sync.enable = lib.mkForce true;
prime.offload = {
enable = lib.mkForce false;
enableOffloadCmd = lib.mkForce false;
};
};
# GNOME
services.xserver.displayManager.gdm.enable = lib.mkForce false;
services.xserver.desktopManager.gnome.enable = lib.mkForce false;
# KDE
services.desktopManager.plasma6.enable = true;
services.displayManager.sddm.enable = true;
};
};
}