programs: add nixgl
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
5ae4cbd0b2
commit
b6fa1ee221
4 changed files with 57 additions and 0 deletions
|
@ -33,6 +33,7 @@
|
||||||
aagl-gtk-on-nix-stable = flake "github:ezKEa/aagl-gtk-on-nix/release-24.11" // stable "nixpkgs";
|
aagl-gtk-on-nix-stable = flake "github:ezKEa/aagl-gtk-on-nix/release-24.11" // stable "nixpkgs";
|
||||||
home-manager-stable = flake "github:nix-community/home-manager/release-24.11" // stable "nixpkgs";
|
home-manager-stable = flake "github:nix-community/home-manager/release-24.11" // stable "nixpkgs";
|
||||||
nix-index-database-stable = flake "github:nix-community/nix-index-database" // stable "nixpkgs";
|
nix-index-database-stable = flake "github:nix-community/nix-index-database" // stable "nixpkgs";
|
||||||
|
nixgl-stable = flake "github:nix-community/nixGL" // stable "nixpkgs";
|
||||||
stylix-stable = flake "github:danth/stylix/release-24.11" // stable "nixpkgs";
|
stylix-stable = flake "github:danth/stylix/release-24.11" // stable "nixpkgs";
|
||||||
|
|
||||||
### Unstable
|
### Unstable
|
||||||
|
@ -64,6 +65,7 @@
|
||||||
nix-index-database-unstable = flake "github:nix-community/nix-index-database" // unstable "nixpkgs";
|
nix-index-database-unstable = flake "github:nix-community/nix-index-database" // unstable "nixpkgs";
|
||||||
nix-vscode-extensions = flake "github:nix-community/nix-vscode-extensions" // unstable "nixpkgs";
|
nix-vscode-extensions = flake "github:nix-community/nix-vscode-extensions" // unstable "nixpkgs";
|
||||||
nixd = flake "github:nix-community/nixd" // unstable "nixpkgs";
|
nixd = flake "github:nix-community/nixd" // unstable "nixpkgs";
|
||||||
|
nixgl-unstable = flake "github:nix-community/nixGL" // unstable "nixpkgs";
|
||||||
stylix-unstable = flake "github:danth/stylix" // unstable "nixpkgs";
|
stylix-unstable = flake "github:danth/stylix" // unstable "nixpkgs";
|
||||||
walker = flake "github:abenz1267/walker?ref=v0.12.8" // unstable "nixpkgs";
|
walker = flake "github:abenz1267/walker?ref=v0.12.8" // unstable "nixpkgs";
|
||||||
|
|
||||||
|
@ -139,6 +141,11 @@
|
||||||
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||||
inputs.walker.homeManagerModules.default
|
inputs.walker.homeManagerModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Branch-specific overlays
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
inputs."nixgl-${branch}".overlays.default
|
||||||
|
];
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
|
|
|
@ -128,6 +128,14 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||||
url = "github:nix-community/nixd";
|
url = "github:nix-community/nixd";
|
||||||
};
|
};
|
||||||
|
nixgl-stable = {
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||||
|
url = "github:nix-community/nixGL";
|
||||||
|
};
|
||||||
|
nixgl-unstable = {
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||||
|
url = "github:nix-community/nixGL";
|
||||||
|
};
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||||
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
|
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
|
||||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11";
|
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||||
|
|
|
@ -18,6 +18,7 @@ with lib; {
|
||||||
nano.enable = true;
|
nano.enable = true;
|
||||||
nh.enable = true;
|
nh.enable = true;
|
||||||
nix-index.enable = true;
|
nix-index.enable = true;
|
||||||
|
nixgl.enable = true;
|
||||||
nushell.enable = true;
|
nushell.enable = true;
|
||||||
polkit.enable = true;
|
polkit.enable = true;
|
||||||
ssh.enable = true;
|
ssh.enable = true;
|
||||||
|
|
41
options/custom/programs/nixgl.nix
Normal file
41
options/custom/programs/nixgl.nix
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.custom.programs.nixgl;
|
||||||
|
in {
|
||||||
|
options.custom.programs.nixgl = {
|
||||||
|
enable = mkOption {default = false;};
|
||||||
|
wrapper = mkOption {default = "mesa";};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
# https://github.com/nix-community/nixGL
|
||||||
|
#?? nixGL PROGRAM
|
||||||
|
environment.systemPackages = with pkgs.nixgl;
|
||||||
|
optionals (cfg.wrapper == "auto") [
|
||||||
|
#!! Impure autodetection
|
||||||
|
auto.nixGLDefault
|
||||||
|
]
|
||||||
|
++ optionals (cfg.wrapper == "mesa") [
|
||||||
|
nixGLIntel
|
||||||
|
nixVulkanIntel
|
||||||
|
|
||||||
|
# Wrapper for the wrappers
|
||||||
|
#?? nixgl PROGRAM
|
||||||
|
(pkgs.writeShellApplication {
|
||||||
|
name = "nixgl";
|
||||||
|
runtimeInputs = [nixGLIntel nixVulkanIntel];
|
||||||
|
text = ''exec nixGLIntel nixVulkanIntel "$@"'';
|
||||||
|
})
|
||||||
|
]
|
||||||
|
++ optionals (cfg.wrapper == "nvidia") [
|
||||||
|
#!! Impure autodetection
|
||||||
|
auto.nixGLNvidia
|
||||||
|
auto.nixVulkanNvidia
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue