diff --git a/configuration.nix b/configuration.nix index 2f8a7a3..39a8f47 100644 --- a/configuration.nix +++ b/configuration.nix @@ -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. It‘s perfectly fine and recommended to leave diff --git a/gaming.nix b/gaming.nix new file mode 100644 index 0000000..8135175 --- /dev/null +++ b/gaming.nix @@ -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 + ]; +} diff --git a/specialisation.nix b/specialisation.nix new file mode 100644 index 0000000..7aefeb3 --- /dev/null +++ b/specialisation.nix @@ -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; + }; + }; +}