Compare commits

...

7 Commits

Author SHA1 Message Date
578f246519 working mesa-git 2026-02-12 23:54:34 +01:00
271658bf4d further tweaks 2026-02-12 20:16:32 +01:00
fbe9f8b3ec attempt tweaks 2026-02-12 20:16:19 +01:00
149641c87b fix override 2026-02-12 20:16:08 +01:00
21782c109e revert intel 2026-02-12 20:15:59 +01:00
8ee971cbf8 add mpv as home package 2026-02-12 20:14:42 +01:00
1ed2b9c130 clean up 2026-02-12 20:14:32 +01:00
9 changed files with 85 additions and 34 deletions

View File

@@ -94,12 +94,6 @@
# Use the exact kernel versions as defined in this repo. # Use the exact kernel versions as defined in this repo.
# Guarantees you have binary cache. # Guarantees you have binary cache.
nix-cachyos-kernel.overlays.pinned nix-cachyos-kernel.overlays.pinned
# Alternatively, build the kernels on top of nixpkgs version in your flake.
# This might cause version mismatch/build failures!
# nix-cachyos-kernel.overlays.default
# Only use one of the two overlays!
]; ];
nixos = with inputs; [ nixos = with inputs; [
@@ -109,7 +103,7 @@
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = false; # Disabled to allow system-level overlays to work
useUserPackages = true; useUserPackages = true;
}; };
} }

View File

@@ -23,6 +23,7 @@ in
packages = [ packages = [
pkgs.nil pkgs.nil
pkgs.beeper pkgs.beeper
pkgs.mpv
pkgs.my-namespace.udev-steelseries pkgs.my-namespace.udev-steelseries
pkgs.qbittorrent pkgs.qbittorrent
pkgs.hyfetch pkgs.hyfetch

View File

@@ -1,5 +1,4 @@
{ pkgs { config
, config
, lib , lib
, ... , ...
}: }:

View File

@@ -3,7 +3,7 @@
let let
cfg = config.${namespace}.performance-tuning; cfg = config.${namespace}.performance-tuning;
in { in {
options.${namespace}.performance-tuning.enable = lib.mkEnableOption "XFCE desktop environment"; options.${namespace}.performance-tuning.enable = lib.mkEnableOption "performance tuning settings for gaming and general use";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
boot.kernelParams = [ boot.kernelParams = [
"nvme_core.default_ps_max_latency_us=0" "nvme_core.default_ps_max_latency_us=0"

View File

@@ -1,7 +1,40 @@
{ ... }: { ... }:
final: prev: { final: prev: {
mesa = prev.mesa.overrideAttrs (old: { mesa = (prev.mesa.overrideAttrs (old: rec {
version = "git-unstable-2026-02-12";
src = prev.fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "mesa";
repo = "mesa";
rev = "main";
hash = "sha256-5gpLORvbV3skALrQa0VxTJJarYjuq+KyTxDm9HtZNbQ=";
};
patches = [];
buildInputs = old.buildInputs ++ (with prev.llvmPackages_21; [
clang-unwrapped
libclang
]);
# Create symlinks to clang libraries so meson can find them
preConfigure = (old.preConfigure or "") + ''
mkdir -p $NIX_BUILD_TOP/clang-libs
for lib in ${prev.llvmPackages_21.clang-unwrapped.lib}/lib/*.a; do
ln -sf "$lib" "$NIX_BUILD_TOP/clang-libs/"
done
export LIBRARY_PATH="$NIX_BUILD_TOP/clang-libs:''${LIBRARY_PATH:-}"
export CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
'';
mesonFlags =
(builtins.filter (flag:
!(prev.lib.hasPrefix "-Dclang-libdir=" flag) &&
flag != "--sysconfdir=/etc"
) old.mesonFlags) ++ [
"-Dsysconfdir=${placeholder "out"}/etc"
] ++ (if prev.stdenv.hostPlatform.is64bit then [ "-Dintel-rt=enabled" ] else [ "-Dintel-rt=disabled" ]);
})).override {
stdenv = prev.gcc14Stdenv; stdenv = prev.gcc14Stdenv;
}); };
} }

View File

@@ -13,9 +13,8 @@
./hardware/hardware-configuration.nix ./hardware/hardware-configuration.nix
]; ];
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; # boot.loader.systemd-boot.enable = true; # managed by lanzaboote
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
networking.hostName = "drivebystation-nix"; # Define your hostname. networking.hostName = "drivebystation-nix"; # Define your hostname.

View File

@@ -10,23 +10,23 @@
inputs, inputs,
# Additional metadata is provided by Snowfall Lib. # Additional metadata is provided by Snowfall Lib.
# The namespace used for your flake, defaulting to "internal" if not set. # The namespace used for your flake, defaulting to "internal" if not set.
namespace, # namespace,
# The system architecture for this host (eg. `x86_64-linux`). # The system architecture for this host (eg. `x86_64-linux`).
system, # system,
# The Snowfall Lib target for this system (eg. `x86_64-iso`). # The Snowfall Lib target for this system (eg. `x86_64-iso`).
target, # target,
# A normalized name for the system target (eg. `iso`). # A normalized name for the system target (eg. `iso`).
format, # format,
# A boolean to determine whether this system is a virtual target using nixos-generators. # A boolean to determine whether this system is a virtual target using nixos-generators.
virtual, # virtual,
# An attribute map of your defined hosts. # An attribute map of your defined hosts.
systems, # systems,
# All other arguments come from the system system. # All other arguments come from the system system.
config # config,
, ... ...
}: }:
let let
inherit (lib.my-namespace) enabled; # inherit (lib.my-namespace) systemPackages;
inherit pkgs; inherit pkgs;
installedPackages = lib.my-namespace.mkPackages pkgs; installedPackages = lib.my-namespace.mkPackages pkgs;
in in
@@ -47,6 +47,7 @@ in
my-namespace.desktop-environment.kde.enable = true; my-namespace.desktop-environment.kde.enable = true;
my-namespace.desktop-environment.cosmic.enable = true; my-namespace.desktop-environment.cosmic.enable = true;
my-namespace.performance-tuning.enable = true; my-namespace.performance-tuning.enable = true;
my-namespace.file-organization.enable = true;
# GNOME-keyring # GNOME-keyring
my-namespace.gnome-keyring.enable = true; my-namespace.gnome-keyring.enable = true;
@@ -62,7 +63,7 @@ in
"gamemode" "gamemode"
]; ];
packages = with pkgs; [ packages = with pkgs; [
# Packages from inputs # Packages from inputsq
inputs.game-of-life.packages.x86_64-linux.default inputs.game-of-life.packages.x86_64-linux.default
inputs.zen-browser.packages.x86_64-linux.default inputs.zen-browser.packages.x86_64-linux.default
inputs.trilium-next-pr.legacyPackages.x86_64-linux.trilium-next-desktop inputs.trilium-next-pr.legacyPackages.x86_64-linux.trilium-next-desktop
@@ -79,8 +80,10 @@ in
trilium-desktop trilium-desktop
terraform terraform
virt-manager virt-manager
nil
# thunderbird # thunderbird
]; ];
}; };
programs.anime-game-launcher.enable = true; # Adds launcher and /etc/hosts rules programs.anime-game-launcher.enable = true; # Adds launcher and /etc/hosts rules
@@ -133,26 +136,30 @@ in
# End the session cleanly # End the session cleanly
loginctl terminate-session "$XDG_SESSION_ID" loginctl terminate-session "$XDG_SESSION_ID"
'') '')
(pkgs.writeShellScriptBin "steamos-session-select" '' (pkgs.writeShellScriptBin "steamos-session-select" ''
#!/bin/sh #!/bin/sh
exec switch-to-desktop exec switch-to-desktop
'') '')
# Vulkan packages for Steam # Vulkan packages for Steam
pkgs.mesa mesa
pkgs.vulkan-loader vulkan-loader
pkgs.vulkan-validation-layers vulkan-validation-layers
pkgs.vulkan-extension-layer vulkan-extension-layer
pkgs.vulkan-tools vulkan-tools
pkgs.libva libva
pkgs.libva-utils libva-utils
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget # wget
] ]
++ installedPackages.packages; ++ installedPackages.packages;
programs.nix-ld = { programs.nix-ld = {
enable = true; enable = true;
package = pkgs.nix-ld; #replaces nix-ld-rs package = pkgs.nix-ld; #replaces nix-ld-rs
}; };
services.flatpak.enable = true; services.flatpak.enable = true;
systemd.services.flatpak-repo = { systemd.services.flatpak-repo = {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
@@ -180,6 +187,7 @@ in
# Disable the GNOME3/GDM auto-suspend feature that cannot be disabled in GUI! # Disable the GNOME3/GDM auto-suspend feature that cannot be disabled in GUI!
# If no user is logged in, the machine will power down after 20 minutes. # If no user is logged in, the machine will power down after 20 minutes.
systemd.targets.sleep.enable = false; systemd.targets.sleep.enable = false;
systemd.targets.suspend.enable = false; systemd.targets.suspend.enable = false;
systemd.targets.hibernate.enable = false; systemd.targets.hibernate.enable = false;

View File

@@ -18,7 +18,12 @@
boot.kernelParams = [ boot.kernelParams = [
"console=tty0" "console=tty0"
# "efifb=off" # "efifb=off"
# "xe.force_probe=*" "xe.force_probe=e20b"
# Xe stability improvements for B580
"xe.guc_log_level=0" # Reduce GuC logging overhead
"xe.enable_display=1" # Ensure display is enabled
# Memory/performance parameters
"mitigations=off" # Disable CPU mitigations for better performance
"module_blacklist=nouveau,nvidia,nvidia_drm,nvidia_modeset,nvidia_uvm" "module_blacklist=nouveau,nvidia,nvidia_drm,nvidia_modeset,nvidia_uvm"
]; ];
@@ -48,7 +53,19 @@
]; ];
environment.variables = { environment.variables = {
# Force Intel GPU for all graphics operations
KWIN_DRM_DEVICES = "/dev/dri/card0"; KWIN_DRM_DEVICES = "/dev/dri/card0";
# Vulkan/DXVK optimizations for B580
ANV_ENABLE_PIPELINE_CACHE = "1";
# Shader cache settings
MESA_SHADER_CACHE_DISABLE = "false";
MESA_SHADER_CACHE_MAX_SIZE = "10G";
# DXVK optimizations
DXVK_HUD = "compiler"; # Monitor shader compilation
# DXVK_ASYNC = "1"; # Enable if you want async shader compilation (may cause issues)
}; };

View File

@@ -7,8 +7,8 @@
imports = imports =
[ [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
# ./graphics/intel.nix ./graphics/intel.nix
./graphics/intel_i915.nix # ./graphics/intel_i915.nix
# ./graphics/nvidia.nix # ./graphics/nvidia.nix
./acer-monitor-edid.nix ./acer-monitor-edid.nix
./samsung-monitor-edid.nix ./samsung-monitor-edid.nix