diff --git a/flake.nix b/flake.nix index 330127c..f4eb9c0 100644 --- a/flake.nix +++ b/flake.nix @@ -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"; + + nixgl.url = "github:nix-community/nixGL"; }; - - 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; - }; - }; - }; } diff --git a/home/amneesh/default.nix b/home/amneesh/default.nix index 465bb06..b7e89b7 100644 --- a/home/amneesh/default.nix +++ b/home/amneesh/default.nix @@ -15,6 +15,7 @@ imports = [ ./pkgs.nix + ./nixgl.nix # From personal ../natto/ags diff --git a/home/amneesh/nixgl.nix b/home/amneesh/nixgl.nix new file mode 100644 index 0000000..6a240a2 --- /dev/null +++ b/home/amneesh/nixgl.nix @@ -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); +}