add vulkan layer back

This commit is contained in:
mjallen18
2024-02-28 19:54:37 -06:00
parent 58fb2f1810
commit 33c0b054d6
5 changed files with 56 additions and 188 deletions

170
flake.lock generated
View File

@@ -34,22 +34,6 @@
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1673956053,
@@ -90,24 +74,6 @@
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
@@ -123,28 +89,6 @@
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"kde",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1703887061,
"narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gitignore_2": {
"inputs": {
"nixpkgs": [
"lanzaboote",
@@ -201,32 +145,12 @@
"type": "github"
}
},
"kde": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1707218112,
"narHash": "sha256-GXwhrTyeIj38aBi8t6fxasuJ3h2AhvxDypAxQjKrrTY=",
"owner": "nix-community",
"repo": "kde2nix",
"rev": "285ae35495f7a39aacf91598ecf154035bc5d2e8",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "kde2nix",
"type": "github"
}
},
"lanzaboote": {
"inputs": {
"crane": "crane",
"flake-compat": "flake-compat_2",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
],
@@ -281,37 +205,21 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1706812040,
"narHash": "sha256-pxgWZApBfqHi4I6Hz7nL/rSt0vGE62HvBwvuVXFXeOk=",
"lastModified": 1709145408,
"narHash": "sha256-sS7DOx3nvFUm2p9wFvPGX1pgetLOPg0R1lXMdRQhVnw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5c5bca5a97c0982ea37a2fcf6d3860349b9f9a35",
"rev": "d4164730d41de41525032cacb2d3139906cb1c03",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable-small",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1704874635,
"narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1678872516,
"narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=",
@@ -327,50 +235,6 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1708984720,
"narHash": "sha256-gJctErLbXx4QZBBbGp78PxtOOzsDaQ+yw1ylNQBuSUY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "13aff9b34cc32e59d35c62ac9356e4a41198a538",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": [
"kde",
"flake-utils"
],
"gitignore": "gitignore",
"nixpkgs": [
"kde",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1706424699,
"narHash": "sha256-Q3RBuOpZNH2eFA1e+IHgZLAOqDD9SKhJ/sszrL8bQD4=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "7c54e08a689b53c8a1e5d70169f2ec9e2a68ffaf",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"pre-commit-hooks-nix": {
"inputs": {
"flake-compat": [
@@ -381,12 +245,12 @@
"lanzaboote",
"flake-utils"
],
"gitignore": "gitignore_2",
"gitignore": "gitignore",
"nixpkgs": [
"lanzaboote",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable_2"
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1681413034,
@@ -406,11 +270,10 @@
"inputs": {
"home-manager": "home-manager",
"impermanence": "impermanence",
"kde": "kde",
"lanzaboote": "lanzaboote",
"nix-flatpak": "nix-flatpak",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs"
}
},
"rust-overlay": {
@@ -452,21 +315,6 @@
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

View File

@@ -3,10 +3,11 @@
inputs = {
# Common
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/master";
# Desktop
kde.url = "github:nix-community/kde2nix";
# kde.url = "github:nix-community/kde2nix";
nix-flatpak.url = "github:gmodena/nix-flatpak";
impermanence.url = "github:nix-community/impermanence";
home-manager.url = "github:nix-community/home-manager";
@@ -20,7 +21,7 @@
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
};
outputs = { self, nixpkgs, lanzaboote, impermanence, kde, nix-flatpak, home-manager, nixos-hardware } @ inputs: {
outputs = { self, nixpkgs, lanzaboote, impermanence, nix-flatpak, home-manager, nixos-hardware } @ inputs: {
nixosConfigurations = {
# Desktop
"matt-nixos" = nixpkgs.lib.nixosSystem {
@@ -28,7 +29,7 @@
modules = [
impermanence.nixosModules.impermanence
lanzaboote.nixosModules.lanzaboote
kde.nixosModules.plasma6
# kde.nixosModules.plasma6
nix-flatpak.nixosModules.nix-flatpak
./hosts/desktop/configuration.nix
./hosts/desktop/impermanence.nix

View File

@@ -220,6 +220,7 @@ in
clinfo
neofetch
gamescope
gamescope-wsi
mangohud
goverlay
heroic

View File

@@ -1,5 +1,8 @@
# Matt home.nix
{ pkgs, ... }: {
{ pkgs, ... }:
let
vulkan-hdr-layer = import ./vulkan-hdr-layer.nix { inherit (pkgs) lib stdenv fetchFromGitHub meson pkg-config vulkan-loader ninja writeText vulkan-headers vulkan-utility-libraries jq wayland; libX11 = pkgs.xorg.libX11; libXrandr = pkgs.xorg.libXrandr; libxcb = pkgs.xorg.libxcb; };
in
{
home.username = "matt";
home.homeDirectory = "/home/matt";
@@ -17,25 +20,6 @@
home.packages = [
# Other packages
vulkan-hdr-layer
];
# custom systemd services
# systemd.user.services.fix-wifi = {
# Unit = {
# Description = "Reset wifi adapter so that it works on boot consistently.";
# };
# Install = {
# WantedBy = [ "default.target" ];
# };
# Service = {
# ExecStart = "/home/matt/nix-config/scripts/reset_wifi";
# # ExecStart = "${pkgs.writeShellScript "fix-wifi" ''
# # #!/usr/bin/env bash
# # echo 1 | sudo -u root tee /sys/bus/pci/devices/0000\:09\:00.0/reset
# # sudo rmmod iwlwifi
# # sudo modprobe iwlwifi
# # ''}";
# };
# };
}
}

View File

@@ -0,0 +1,34 @@
{ lib, stdenv, fetchFromGitHub, meson, pkg-config, vulkan-loader, ninja, writeText, vulkan-headers, vulkan-utility-libraries, jq, libX11, libXrandr, libxcb, wayland }:
stdenv.mkDerivation rec {
pname = "vulkan-hdr-layer";
version = "63d2eec";
src = (fetchFromGitHub {
owner = "Zamundaaa";
repo = "VK_hdr_layer";
rev = "869199cd2746e7f69cf19955153080842b6dacfc";
fetchSubmodules = true;
hash = "sha256-xfVYI+Aajmnf3BTaY2Ysg5fyDO6SwDFGyU0L+F+E3is=";
}).overrideAttrs (_: {
GIT_CONFIG_COUNT = 1;
GIT_CONFIG_KEY_0 = "url.https://github.com/.insteadOf";
GIT_CONFIG_VALUE_0 = "git@github.com:";
});
nativeBuildInputs = [ vulkan-headers meson ninja pkg-config jq ];
buildInputs = [ vulkan-headers vulkan-loader vulkan-utility-libraries libX11 libXrandr libxcb wayland ];
# Help vulkan-loader find the validation layers
setupHook = writeText "setup-hook" ''
addToSearchPath XDG_DATA_DIRS @out@/share
'';
meta = with lib; {
description = "Layers providing Vulkan HDR";
homepage = "https://github.com/Zamundaaa/VK_hdr_layer";
platforms = platforms.linux;
license = licenses.mit;
};
}