home: amneesh: wrap hyprland in nixGL

Signed-off-by: Amneesh Singh <amneesh@ti.com>
This commit is contained in:
Amneesh Singh
2025-08-25 18:05:27 +05:30
parent abd567a8a5
commit 4decf54e13
3 changed files with 61 additions and 33 deletions

View File

@@ -1,6 +1,39 @@
{
description = "dotfiles";
outputs =
inputs@{ self, ... }:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
];
imports = [
./hosts
./home
./pkgs
./conf
];
perSystem =
{ system, pkgs, ... }:
rec {
formatter = pkgs.nixfmt-rfc-style;
devShells.default =
with pkgs;
mkShell {
packages = [
nixd
formatter
];
};
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
};
};
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
@@ -46,38 +79,7 @@
agenix.url = "github:ryantm/agenix";
ags.url = "github:Aylur/ags/v1";
};
outputs =
inputs@{ self, ... }:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
];
imports = [
./hosts
./home
./pkgs
./conf
];
perSystem =
{ system, pkgs, ... }:
rec {
formatter = pkgs.nixfmt-rfc-style;
devShells.default =
with pkgs;
mkShell {
packages = [
nixd
formatter
];
};
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
};
};
nixgl.url = "github:nix-community/nixGL";
};
}

View File

@@ -15,6 +15,7 @@
imports = [
./pkgs.nix
./nixgl.nix
# From personal
../natto/ags

25
home/amneesh/nixgl.nix Normal file
View File

@@ -0,0 +1,25 @@
{
config,
lib,
pkgs,
inputs,
...
}:
let
inherit (inputs) nixgl;
inherit (inputs.hyprland.packages.${pkgs.system}) hyprland;
inherit (config.lib.nixGL) wrap;
in
{
nixGL = {
packages = nixgl.packages;
defaultWrapper = "mesa";
offloadWrapper = "nvidiaPrime";
installScripts = [
"mesa"
"nvidiaPrime"
];
};
wayland.windowManager.hyprland.package = lib.mkForce (wrap hyprland);
}