{ description = "Portfolio hugo configuration"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; flake-utils.url = "github:numtide/flake-utils"; nixgl = { # Revert this to community version when https://github.com/nix-community/nixGL/pull/187 is merged url = "github:phirsch/nixGL/fix-versionMatch"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; }; }; outputs = { nixpkgs, flake-utils, nixgl, ... }: flake-utils.lib.eachSystem flake-utils.lib.allSystems (system: let overlays = [ nixgl.overlay ]; pkgs = import nixpkgs { inherit system overlays; config.allowUnfree = true; }; buildInputs = with pkgs; [ vulkan-headers vulkan-loader vulkan-validation-layers renderdoc ]; mkCustomShell = { extraPkgs ? [] }: pkgs.mkShell { LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs; VK_LAYER_PATH = "${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d:${pkgs.renderdoc}/share/vulkan/implicit_layer.d"; packages = with pkgs; [ jdk22 maven ] ++ extraPkgs; }; in { devShells = { default = mkCustomShell { extraPkgs = [ pkgs.nixgl.auto.nixVulkanNvidia pkgs.nixgl.nixVulkanMesa ]; }; nixos = mkCustomShell {}; }; }); }