From f4e8b4083f217f04b6bf9c22feac613188c09068 Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Sun, 6 Jul 2025 15:42:02 -0500 Subject: [PATCH] nixgl flake input attempt --- flake.nix | 6 +++++- homeManagerModules/ghostty.nix | 7 +++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 3d8882b..4a09fa2 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,10 @@ inputs.nixpkgs.follows = "nixpkgs"; }; _1password-shell-plugins.url = "github:1Password/shell-plugins"; + nixgl = { + url = "github:nix-community/nixGL"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self, nixpkgs, ... }@inputs: @@ -77,7 +81,7 @@ home-manager = { useUserPackages = true; - extraSpecialArgs = { inherit inputs; }; + extraSpecialArgs = { inherit inputs; nixgl = inputs.nixgl; }; users = { ${config.user} = { imports = mkhomeManagerModules config; diff --git a/homeManagerModules/ghostty.nix b/homeManagerModules/ghostty.nix index f8ae8b6..1ac4a9e 100644 --- a/homeManagerModules/ghostty.nix +++ b/homeManagerModules/ghostty.nix @@ -1,12 +1,11 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, nixgl, ... }: { home.sessionVariables = lib.mkIf (config.enableShell && config.graphical) { TERMINAL = "ghostty"; }; - # https://github.com/nix-community/nixGL?tab=readme-ov-file#nix-channel-recommended - # nix-channel --add https://github.com/nix-community/nixGL/archive/main.tar.gz nixgl && nix-channel --update - nixGL.packages = import { inherit pkgs; }; + # nixGL is now provided as a flake input + nixGL.packages = nixgl.packages.${pkgs.system}; nixGL.defaultWrapper = "mesa"; nixGL.installScripts = [ "mesa" ];