aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatasha Moongrave <natasha@256phi.eu>2026-04-14 22:31:51 +0200
committerNatasha Moongrave <natasha@256phi.eu>2026-04-14 22:31:51 +0200
commitfe1dfac54c9c1e81403fa820328794d0f725051f (patch)
tree86ec1268c19deb0eacdacc0d1d55fd0cf6f6c8f8
parent46637fa84672750c8d737be1dd45b30ec816740f (diff)
parent7000bb210b405aebab3e21927ec69f13d0612c5b (diff)
Merge branch 'main' of cgit:/srv/git/NixOS-config
-rw-r--r--hosts/herra/configuration.nix1
-rw-r--r--hosts/herra/drivers.nix26
-rw-r--r--hosts/herra/file-system.nix7
-rw-r--r--hosts/herra/packages.nix12
-rw-r--r--hosts/herra/steam.nix20
5 files changed, 59 insertions, 7 deletions
diff --git a/hosts/herra/configuration.nix b/hosts/herra/configuration.nix
index 2857ca1..34e1c32 100644
--- a/hosts/herra/configuration.nix
+++ b/hosts/herra/configuration.nix
@@ -5,6 +5,7 @@
}: {
imports = [
./hardware-configuration.nix
+ ./file-system.nix
./packages.nix
./audio.nix
./drivers.nix
diff --git a/hosts/herra/drivers.nix b/hosts/herra/drivers.nix
index 596adf7..53971a7 100644
--- a/hosts/herra/drivers.nix
+++ b/hosts/herra/drivers.nix
@@ -1,4 +1,30 @@
{...}: {
services.xserver.videoDrivers = ["amdgpu"]; # AMD GPU drivers
boot.kernel.sysctl."kernel.sched_rt_runtime_us" = -1; # Realtime audio
+
+ hardware = {
+ graphics = {
+ enable = true;
+ enable32Bit = true; # CRITICAL for Steam/Proton
+ extraPackages = with pkgs; [
+ amdvlk
+ rocmPackages.clr.icd # OpenCL
+ ];
+ extraPackages32 = with pkgs; [
+ driversi686Linux.amdvlk
+ ];
+};
+
+cpu.intel.updateMicrocode = true;
+
+enableRedistributableFirmware = true;
+
+boot.extraModulePackages = with config.boot.kernelPackages; [
+ v4l2loopback
+];
+boot.kernelModules = [ "v4l2loopback" ];
+boot.extraModprobeConfig = ''
+ options v4l2loopback devices=1 video_nr=1 card_label="OBS Virtual Camera" exclusive_caps=1
+'';
+ };
}
diff --git a/hosts/herra/file-system.nix b/hosts/herra/file-system.nix
new file mode 100644
index 0000000..71a77fd
--- /dev/null
+++ b/hosts/herra/file-system.nix
@@ -0,0 +1,7 @@
+{...}: {
+ fileSystems."/nix" = {
+ device = "/dev/disk/by-label/nixstore";
+ fsType = "btrfs";
+ options = [ "subvol=@nix" "compress=zstd:3" "noatime" ];
+};
+} \ No newline at end of file
diff --git a/hosts/herra/packages.nix b/hosts/herra/packages.nix
index 517ceec..e822493 100644
--- a/hosts/herra/packages.nix
+++ b/hosts/herra/packages.nix
@@ -31,5 +31,17 @@
ffmpeg
v4l-utils
cheese
+
+ # Gayming
+ mangohud # In-game overlay (FPS, GPU/CPU usage)
+ corectrl # AMD GPU fan/power control (WX 5100 has no software controls otherwise)
+ vulkan-tools # vulkaninfo for debugging
+ mesa-demos # glxinfo, glxgears
];
+
+ programs.corectrl = {
+ enable = true;
+ gpuOverclock.enable = true; # optional
+ };
+
}
diff --git a/hosts/herra/steam.nix b/hosts/herra/steam.nix
index a916af3..e3d5142 100644
--- a/hosts/herra/steam.nix
+++ b/hosts/herra/steam.nix
@@ -1,21 +1,27 @@
-{lib, ...}: {
+{lib, pkgs, ...}: {
programs.steam = {
enable = true;
- remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
- dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
- localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
+ package = pkgs.steam.override {
+ extraEnv = {
+ LD_PRELOAD = "${pkgs.gamemode.lib}/lib/libgamemodeauto.so";
+ };
+ extraLibraries = pkgs: with pkgs; [
+ gamemode
+ ];
+ };
+ remotePlay.openFirewall = true;
+ dedicatedServer.openFirewall = true;
+ localNetworkGameTransfers.openFirewall = true;
};
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
- # Allow some unfree dependencies
"steam"
"steam-original"
"steam-unwrapped"
"steam-run"
];
- # Allow steam to execute appimage games
programs.appimage.enable = true;
programs.appimage.binfmt = true;
-}
+} \ No newline at end of file