Define nixGL with wrapper

main
Hektor Misplon 2025-10-03 21:35:46 +02:00
parent ec1a76dff1
commit a4bcea8834
3 changed files with 17 additions and 4 deletions

View File

@ -5,19 +5,24 @@
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixgl.url = "github:nix-community/nixGL";
}; };
outputs = { nixpkgs, home-manager, ... }: outputs = { nixpkgs, home-manager, nixgl, ... }:
let let
lib = nixpkgs.lib; lib = nixpkgs.lib;
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
overlays = [ nixgl.overlay ];
config.allowUnfree = true; config.allowUnfree = true;
}; };
in { in {
homeConfigurations = { homeConfigurations = {
work = home-manager.lib.homeManagerConfiguration { work = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
extraSpecialArgs = {
inherit nixgl;
};
modules = [ ./hosts/work ]; modules = [ ./hosts/work ];
}; };
}; };

View File

@ -1,9 +1,17 @@
{ pkgs, ... }: { pkgs, config, nixgl, ... }:
{ {
nixGL = {
packages = nixgl.packages;
defaultWrapper = "mesa";
};
home.username = "hektor"; home.username = "hektor";
home.homeDirectory = "/home/hektor"; home.homeDirectory = "/home/hektor";
home.stateVersion = "25.05"; home.stateVersion = "25.05";
home.packages = import ./packages.nix { inherit pkgs; }; home.packages = import ./packages.nix {
inherit pkgs;
inherit config;
};
} }

View File

@ -1,3 +1,3 @@
{ pkgs }: { pkgs, config, ... }:
with pkgs; [ ] with pkgs; [ ]