mirror of
https://github.com/librephoenix/nixos-config
synced 2025-11-30 14:43:59 +05:30
Graphics fixes :|
This commit is contained in:
parent
68e2da66c8
commit
98b74c560c
8 changed files with 41 additions and 61 deletions
45
flake.lock
generated
45
flake.lock
generated
|
|
@ -430,11 +430,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1759490292,
|
"lastModified": 1750621377,
|
||||||
"narHash": "sha256-T6iWzDOXp8Wv0KQOCTHpBcmAOdHJ6zc/l9xaztW6Ivc=",
|
"narHash": "sha256-8u6b5oAdX0rCuoR8wFenajBRmI+mzbpNig6hSCuWUzE=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprgraphics",
|
"repo": "hyprgraphics",
|
||||||
"rev": "9431db625cd9bb66ac55525479dce694101d6d7a",
|
"rev": "b3d628d01693fb9bb0a6690cd4e7b80abda04310",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -631,11 +631,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758927902,
|
"lastModified": 1750371198,
|
||||||
"narHash": "sha256-LZgMds7M94+vuMql2bERQ6LiFFdhgsEFezE4Vn+Ys3A=",
|
"narHash": "sha256-/iuJ1paQOBoSLqHflRNNGyroqfF/yvPNurxzcCT0cAE=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprlang",
|
"repo": "hyprlang",
|
||||||
"rev": "4dafa28d4f79877d67a7d1a654cddccf8ebf15da",
|
"rev": "cee01452bca58d6cadb3224e21e370de8bc20f0b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -651,22 +651,23 @@
|
||||||
"hyprutils": "hyprutils_3",
|
"hyprutils": "hyprutils_3",
|
||||||
"hyprwayland-scanner": "hyprwayland-scanner_2",
|
"hyprwayland-scanner": "hyprwayland-scanner_2",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs-stable"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"systems": "systems_3"
|
"systems": "systems_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1760023949,
|
"lastModified": 1759399385,
|
||||||
"narHash": "sha256-fu0B4duamVdbkPio/czu1XhsPLRXUJpZLDrSk3nih4U=",
|
"narHash": "sha256-ucJ5C83hJy8XFO8Y+PL9hVcwdrQnj63BjXcO5A4qyNU=",
|
||||||
"ref": "refs/heads/main",
|
"owner": "hyprwm",
|
||||||
"rev": "36ec73f166d9434a3f27c96c575198906f77644a",
|
"repo": "hyprlock",
|
||||||
"revCount": 401,
|
"rev": "c48279d1e0f0a4399b5a2d56c16f2ec677ba18f8",
|
||||||
"type": "git",
|
"type": "github"
|
||||||
"url": "https://code.hyprland.org/hyprwm/hyprlock.git"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "git",
|
"owner": "hyprwm",
|
||||||
"url": "https://code.hyprland.org/hyprwm/hyprlock.git"
|
"ref": "v0.9.2",
|
||||||
|
"repo": "hyprlock",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hyprutils": {
|
"hyprutils": {
|
||||||
|
|
@ -733,11 +734,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1759619523,
|
"lastModified": 1751061882,
|
||||||
"narHash": "sha256-r1ed7AR2ZEb2U8gy321/Xcp1ho2tzn+gG1te/Wxsj1A=",
|
"narHash": "sha256-g9n8Vrbx+2JYM170P9BbvGHN39Wlkr4U+V2WLHQsXL8=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprutils",
|
"repo": "hyprutils",
|
||||||
"rev": "3df7bde01efb3a3e8e678d1155f2aa3f19e177ef",
|
"rev": "4737241eaf8a1e51671a2a088518071f9a265cf4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -783,11 +784,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1755184602,
|
"lastModified": 1750371869,
|
||||||
"narHash": "sha256-RCBQN8xuADB0LEgaKbfRqwm6CdyopE1xIEhNc67FAbw=",
|
"narHash": "sha256-lGk4gLjgZQ/rndUkzmPYcgbHr8gKU5u71vyrjnwfpB4=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprwayland-scanner",
|
"repo": "hyprwayland-scanner",
|
||||||
"rev": "b3b0f1f40ae09d4447c20608e5a4faf8bf3c492d",
|
"rev": "aa38edd6e3e277ae6a97ea83a69261a5c3aab9fd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -103,9 +103,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
hyprlock = {
|
hyprlock = {
|
||||||
type = "git";
|
url = "github:hyprwm/hyprlock/v0.9.2";
|
||||||
url = "https://code.hyprland.org/hyprwm/hyprlock.git";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-stable";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
plasma-manager = {
|
plasma-manager = {
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
# hardware
|
# hardware
|
||||||
cachy.enable = true;
|
cachy.enable = true;
|
||||||
|
cachy.variant = "lts";
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
powerprofiles.enable = true;
|
powerprofiles.enable = true;
|
||||||
tlp.enable = false;
|
tlp.enable = false;
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
# hardware
|
# hardware
|
||||||
cachy.enable = true;
|
cachy.enable = true;
|
||||||
|
cachy.variant = "lts";
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
powerprofiles.enable = true;
|
powerprofiles.enable = true;
|
||||||
tlp.enable = false;
|
tlp.enable = false;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, inputs, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
|
|
@ -22,33 +22,9 @@
|
||||||
# https://wiki.nixos.org/wiki/Mesa
|
# https://wiki.nixos.org/wiki/Mesa
|
||||||
hardware = {
|
hardware = {
|
||||||
graphics =
|
graphics =
|
||||||
let
|
|
||||||
fn = oa: {
|
|
||||||
nativeBuildInputs = oa.nativeBuildInputs ++ [ pkgs.glslang ];
|
|
||||||
mesonFlags = oa.mesonFlags ++ [ "-Dvulkan-layers=device-select,overlay" ];
|
|
||||||
# patches = oa.patches ++ [ ./mesa-vulkan-layer-nvidia.patch ]; See below
|
|
||||||
postInstall = oa.postInstall + ''
|
|
||||||
mv $out/lib/libVkLayer* $drivers/lib
|
|
||||||
|
|
||||||
#Device Select layer
|
|
||||||
layer=VkLayer_MESA_device_select
|
|
||||||
substituteInPlace $drivers/share/vulkan/implicit_layer.d/''${layer}.json \
|
|
||||||
--replace "lib''${layer}" "$drivers/lib/lib''${layer}"
|
|
||||||
|
|
||||||
#Overlay layer
|
|
||||||
layer=VkLayer_MESA_overlay
|
|
||||||
substituteInPlace $drivers/share/vulkan/explicit_layer.d/''${layer}.json \
|
|
||||||
--replace "lib''${layer}" "$drivers/lib/lib''${layer}"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
with pkgs; {
|
with pkgs; {
|
||||||
enable = true;
|
enable = true;
|
||||||
enable32Bit = true;
|
enable32Bit = true;
|
||||||
package = (mesa.overrideAttrs fn).drivers;
|
|
||||||
package32 = (pkgsi686Linux.mesa.overrideAttrs fn).drivers;
|
|
||||||
#extraPackages = with pkgs; [ amdvlk ];
|
|
||||||
#extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
hardware.opengl.extraPackages = [ pkgs.rocmPackages.clr.icd ];
|
hardware.opengl.extraPackages = [ pkgs.rocmPackages.clr.icd ];
|
||||||
|
|
@ -61,10 +37,9 @@
|
||||||
|
|
||||||
hardware.amdgpu.initrd.enable = true;
|
hardware.amdgpu.initrd.enable = true;
|
||||||
hardware.amdgpu.opencl.enable = true;
|
hardware.amdgpu.opencl.enable = true;
|
||||||
#hardware.amdgpu.amdvlk.enable = true;
|
|
||||||
#hardware.amdgpu.overdrive.enable = true;
|
#hardware.amdgpu.overdrive.enable = true;
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
VK_ICD_FILENAMES = "/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json"; # fix for godot
|
#VK_ICD_FILENAMES = "/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json"; # fix for godot
|
||||||
};
|
};
|
||||||
|
|
||||||
# makes disk io not freeze the computer
|
# makes disk io not freeze the computer
|
||||||
|
|
@ -86,7 +61,7 @@
|
||||||
# "L+ /opt/rocm - - - - ${rocmEnv}"
|
# "L+ /opt/rocm - - - - ${rocmEnv}"
|
||||||
# ];
|
# ];
|
||||||
|
|
||||||
# my stupid usb hub crashes systemct suspend half of the time now
|
# my stupid usb hub crashes systemctl suspend half of the time now
|
||||||
# https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Sleep_hooks
|
# https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Sleep_hooks
|
||||||
systemd.services.root-suspend = {
|
systemd.services.root-suspend = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
# hardware
|
# hardware
|
||||||
cachy.enable = true;
|
cachy.enable = true;
|
||||||
|
cachy.variant = "lts";
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
tlp.enable = true;
|
tlp.enable = true;
|
||||||
printing.enable = true;
|
printing.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
# hardware
|
# hardware
|
||||||
cachy.enable = true;
|
cachy.enable = true;
|
||||||
|
cachy.variant = "lts";
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
tlp.enable = false; # intel doesn't work with tlp
|
tlp.enable = false; # intel doesn't work with tlp
|
||||||
printing.enable = true;
|
printing.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ in
|
||||||
enable = lib.mkEnableOption "Enable cachyos kernel";
|
enable = lib.mkEnableOption "Enable cachyos kernel";
|
||||||
variant = lib.mkOption {
|
variant = lib.mkOption {
|
||||||
default = null;
|
default = null;
|
||||||
type = lib.types.nullOr (lib.types.enum ["lto" "server" "hardened"]);
|
type = lib.types.nullOr (lib.types.enum ["lto" "lts" "server" "hardened"]);
|
||||||
description = ''
|
description = ''
|
||||||
This option determines the CachyOS kernel variant to use.
|
This option determines the CachyOS kernel variant to use.
|
||||||
'';
|
'';
|
||||||
|
|
@ -20,6 +20,7 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
boot.kernelPackages = lib.mkMerge [
|
boot.kernelPackages = lib.mkMerge [
|
||||||
(lib.mkIf (cfg.variant == null) pkgs.linuxPackages_cachyos)
|
(lib.mkIf (cfg.variant == null) pkgs.linuxPackages_cachyos)
|
||||||
|
(lib.mkIf (cfg.variant == "lts") pkgs.linuxPackages_cachyos-lts)
|
||||||
(lib.mkIf (cfg.variant == "lto") pkgs.linuxPackages_cachyos-lto)
|
(lib.mkIf (cfg.variant == "lto") pkgs.linuxPackages_cachyos-lto)
|
||||||
(lib.mkIf (cfg.variant == "server") pkgs.linuxPackages_cachyos-server)
|
(lib.mkIf (cfg.variant == "server") pkgs.linuxPackages_cachyos-server)
|
||||||
(lib.mkIf (cfg.variant == "hardened") pkgs.linuxPackages_cachyos-hardened)
|
(lib.mkIf (cfg.variant == "hardened") pkgs.linuxPackages_cachyos-hardened)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue