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": {
|
||||
"lastModified": 1759490292,
|
||||
"narHash": "sha256-T6iWzDOXp8Wv0KQOCTHpBcmAOdHJ6zc/l9xaztW6Ivc=",
|
||||
"lastModified": 1750621377,
|
||||
"narHash": "sha256-8u6b5oAdX0rCuoR8wFenajBRmI+mzbpNig6hSCuWUzE=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprgraphics",
|
||||
"rev": "9431db625cd9bb66ac55525479dce694101d6d7a",
|
||||
"rev": "b3d628d01693fb9bb0a6690cd4e7b80abda04310",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -631,11 +631,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1758927902,
|
||||
"narHash": "sha256-LZgMds7M94+vuMql2bERQ6LiFFdhgsEFezE4Vn+Ys3A=",
|
||||
"lastModified": 1750371198,
|
||||
"narHash": "sha256-/iuJ1paQOBoSLqHflRNNGyroqfF/yvPNurxzcCT0cAE=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprlang",
|
||||
"rev": "4dafa28d4f79877d67a7d1a654cddccf8ebf15da",
|
||||
"rev": "cee01452bca58d6cadb3224e21e370de8bc20f0b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -651,22 +651,23 @@
|
|||
"hyprutils": "hyprutils_3",
|
||||
"hyprwayland-scanner": "hyprwayland-scanner_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs-stable"
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760023949,
|
||||
"narHash": "sha256-fu0B4duamVdbkPio/czu1XhsPLRXUJpZLDrSk3nih4U=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "36ec73f166d9434a3f27c96c575198906f77644a",
|
||||
"revCount": 401,
|
||||
"type": "git",
|
||||
"url": "https://code.hyprland.org/hyprwm/hyprlock.git"
|
||||
"lastModified": 1759399385,
|
||||
"narHash": "sha256-ucJ5C83hJy8XFO8Y+PL9hVcwdrQnj63BjXcO5A4qyNU=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprlock",
|
||||
"rev": "c48279d1e0f0a4399b5a2d56c16f2ec677ba18f8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://code.hyprland.org/hyprwm/hyprlock.git"
|
||||
"owner": "hyprwm",
|
||||
"ref": "v0.9.2",
|
||||
"repo": "hyprlock",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprutils": {
|
||||
|
|
@ -733,11 +734,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759619523,
|
||||
"narHash": "sha256-r1ed7AR2ZEb2U8gy321/Xcp1ho2tzn+gG1te/Wxsj1A=",
|
||||
"lastModified": 1751061882,
|
||||
"narHash": "sha256-g9n8Vrbx+2JYM170P9BbvGHN39Wlkr4U+V2WLHQsXL8=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprutils",
|
||||
"rev": "3df7bde01efb3a3e8e678d1155f2aa3f19e177ef",
|
||||
"rev": "4737241eaf8a1e51671a2a088518071f9a265cf4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -783,11 +784,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1755184602,
|
||||
"narHash": "sha256-RCBQN8xuADB0LEgaKbfRqwm6CdyopE1xIEhNc67FAbw=",
|
||||
"lastModified": 1750371869,
|
||||
"narHash": "sha256-lGk4gLjgZQ/rndUkzmPYcgbHr8gKU5u71vyrjnwfpB4=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprwayland-scanner",
|
||||
"rev": "b3b0f1f40ae09d4447c20608e5a4faf8bf3c492d",
|
||||
"rev": "aa38edd6e3e277ae6a97ea83a69261a5c3aab9fd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
in {
|
||||
# generate a nixos configuration for every host in ./hosts
|
||||
nixosConfigurations = builtins.listToAttrs
|
||||
nixosConfigurations = builtins.listToAttrs
|
||||
(map (host: {
|
||||
name = host;
|
||||
value = lib.nixosSystem {
|
||||
|
|
@ -103,9 +103,8 @@
|
|||
};
|
||||
|
||||
hyprlock = {
|
||||
type = "git";
|
||||
url = "https://code.hyprland.org/hyprwm/hyprlock.git";
|
||||
inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||
url = "github:hyprwm/hyprlock/v0.9.2";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
plasma-manager = {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
# hardware
|
||||
cachy.enable = true;
|
||||
cachy.variant = "lts";
|
||||
bluetooth.enable = true;
|
||||
powerprofiles.enable = true;
|
||||
tlp.enable = false;
|
||||
|
|
@ -64,5 +65,5 @@
|
|||
services.xserver.videoDrivers = [ "i915" ];
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
# hardware
|
||||
cachy.enable = true;
|
||||
cachy.variant = "lts";
|
||||
bluetooth.enable = true;
|
||||
powerprofiles.enable = true;
|
||||
tlp.enable = false;
|
||||
|
|
@ -66,5 +67,5 @@
|
|||
services.displayManager.defaultSession = "hyprland";
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, inputs, ... }:
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
|
|
@ -22,33 +22,9 @@
|
|||
# https://wiki.nixos.org/wiki/Mesa
|
||||
hardware = {
|
||||
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; {
|
||||
enable = 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 ];
|
||||
|
|
@ -61,10 +37,9 @@
|
|||
|
||||
hardware.amdgpu.initrd.enable = true;
|
||||
hardware.amdgpu.opencl.enable = true;
|
||||
#hardware.amdgpu.amdvlk.enable = true;
|
||||
#hardware.amdgpu.overdrive.enable = true;
|
||||
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
|
||||
|
|
@ -72,7 +47,7 @@
|
|||
ACTION=="add|change", SUBSYSTEM=="block", ENV{ID_SERIAL_SHORT}=="BTKA121225GP512A", ATTR{queue/scheduler}="bfq"
|
||||
'';
|
||||
|
||||
#systemd.tmpfiles.rules =
|
||||
#systemd.tmpfiles.rules =
|
||||
# let
|
||||
# rocmEnv = pkgs.symlinkJoin {
|
||||
# name = "rocm-combined";
|
||||
|
|
@ -86,7 +61,7 @@
|
|||
# "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
|
||||
systemd.services.root-suspend = {
|
||||
enable = true;
|
||||
|
|
@ -134,7 +109,7 @@
|
|||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
# hardware
|
||||
cachy.enable = true;
|
||||
cachy.variant = "lts";
|
||||
bluetooth.enable = true;
|
||||
tlp.enable = true;
|
||||
printing.enable = true;
|
||||
|
|
@ -49,5 +50,5 @@
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
# hardware
|
||||
cachy.enable = true;
|
||||
cachy.variant = "lts";
|
||||
bluetooth.enable = true;
|
||||
tlp.enable = false; # intel doesn't work with tlp
|
||||
printing.enable = true;
|
||||
|
|
@ -62,5 +63,5 @@
|
|||
services.displayManager.defaultSession = "hyprland";
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ in
|
|||
enable = lib.mkEnableOption "Enable cachyos kernel";
|
||||
variant = lib.mkOption {
|
||||
default = null;
|
||||
type = lib.types.nullOr (lib.types.enum ["lto" "server" "hardened"]);
|
||||
type = lib.types.nullOr (lib.types.enum ["lto" "lts" "server" "hardened"]);
|
||||
description = ''
|
||||
This option determines the CachyOS kernel variant to use.
|
||||
'';
|
||||
|
|
@ -20,6 +20,7 @@ in
|
|||
config = lib.mkIf cfg.enable {
|
||||
boot.kernelPackages = lib.mkMerge [
|
||||
(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 == "server") pkgs.linuxPackages_cachyos-server)
|
||||
(lib.mkIf (cfg.variant == "hardened") pkgs.linuxPackages_cachyos-hardened)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue