feat(home): NixGL working!!

Wezterm hates it for some reason tho :(
This commit is contained in:
punkfairie 2024-11-22 21:37:45 -08:00
parent 3f7d0e58fe
commit d185e489cf
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696
7 changed files with 86 additions and 11 deletions

View file

@ -7,7 +7,7 @@ defuser := env_var('USER')
alias dh := deployhome alias dh := deployhome
[group('home')] [group('home')]
deployhome user=defuser host=defhost: deployhome user=defuser host=defhost:
nh home switch -c {{user}}@{{host}} -b bak . nh home switch -c {{user}}@{{host}} -b bak . -- --impure
[group('home')] [group('home')]
refreshhome: refreshhome:

View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1732016537, "lastModified": 1732324260,
"narHash": "sha256-XwXUK+meYnlhdQz2TVE4Wv+tsx1CkdGbDPt1tRzCNH4=", "narHash": "sha256-0xzQvoId/P008QkTSAdFVv465P9rL9nYkIOWXL5pdsY=",
"owner": "LnL7", "owner": "LnL7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "61cee20168a3ebb71a9efd70a55adebaadfbe4d4", "rev": "698a62c628c2ec423aa770d8ec0e1d0bcf4fca1a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -149,7 +149,7 @@
}, },
"flake-utils-plus_2": { "flake-utils-plus_2": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_4" "flake-utils": "flake-utils_5"
}, },
"locked": { "locked": {
"lastModified": 1715533576, "lastModified": 1715533576,
@ -203,6 +203,21 @@
} }
}, },
"flake-utils_4": { "flake-utils_4": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_5": {
"inputs": { "inputs": {
"systems": "systems_4" "systems": "systems_4"
}, },
@ -298,11 +313,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1732025103, "lastModified": 1732303962,
"narHash": "sha256-qjEI64RKvDxRyEarY0jTzrZMa8ebezh2DEZmJJrpVdo=", "narHash": "sha256-5Umjb5AdtxV5jSJd5jxoCckh5mlg+FBQDsyAilu637g=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "a46e702093a5c46e192243edbd977d5749e7f294", "rev": "8cf9cb2ee78aa129e5b8220135a511a2be254c0c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -377,7 +392,7 @@
"narHash": "sha256-6U0CyPycIBc04hbYy2hBINnVso58n/ZyywY2BD3hu+s=", "narHash": "sha256-6U0CyPycIBc04hbYy2hBINnVso58n/ZyywY2BD3hu+s=",
"rev": "9098ac95768f7006d7e070b88bae76939f6034e6", "rev": "9098ac95768f7006d7e070b88bae76939f6034e6",
"type": "tarball", "type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/9098ac95768f7006d7e070b88bae76939f6034e6.tar.gz" "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/9098ac95768f7006d7e070b88bae76939f6034e6.tar.gz?rev=9098ac95768f7006d7e070b88bae76939f6034e6"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@ -445,6 +460,27 @@
"type": "github" "type": "github"
} }
}, },
"nixgl": {
"inputs": {
"flake-utils": "flake-utils_4",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1713543440,
"narHash": "sha256-lnzZQYG0+EXl/6NkGpyIz+FEOc/DSEG57AP1VsdeNrM=",
"owner": "nix-community",
"repo": "nixGL",
"rev": "310f8e49a149e4c9ea52f1adf70cdc768ec53f8a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixGL",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1732014248, "lastModified": 1732014248,
@ -536,6 +572,7 @@
"home-manager": "home-manager", "home-manager": "home-manager",
"lix": "lix", "lix": "lix",
"marleyvim": "marleyvim", "marleyvim": "marleyvim",
"nixgl": "nixgl",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"rofi-themes": "rofi-themes", "rofi-themes": "rofi-themes",
"rose-pine": "rose-pine", "rose-pine": "rose-pine",

View file

@ -18,7 +18,7 @@
overlays = with inputs; [ overlays = with inputs; [
lix.overlays.default lix.overlays.default
marleyvim.overlays.default marleyvim.overlays.default
]; ];
systems.modules.darwin = with inputs; [ systems.modules.darwin = with inputs; [
@ -62,6 +62,11 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixgl = {
url = "github:nix-community/nixGL";
inputs.nixpkgs.follows = "nixpkgs";
};
rose-pine.url = "git+https://codewith.babesonthe.net/punkfairie/rose-pine-nix"; rose-pine.url = "git+https://codewith.babesonthe.net/punkfairie/rose-pine-nix";
marleyvim = { marleyvim = {

View file

@ -22,6 +22,7 @@ in
marleyos = { marleyos = {
isDesktop = true; isDesktop = true;
nixGL = enabled;
appearance = { appearance = {
base = enabled; base = enabled;

View file

@ -1,7 +1,9 @@
_: { pkgs, config, ... }:
{ {
config = { config = {
nix = { nix = {
package = pkgs.lix;
# Enable flakes. # Enable flakes.
settings.experimental-features = [ settings.experimental-features = [
"nix-command" "nix-command"
@ -17,5 +19,13 @@ _:
gc.automatic = true; gc.automatic = true;
}; };
nixpkgs.config.import = "${config.xdg.configHome}/nixpkgs/config.nix";
xdg.configFile."nixpkgs/config.nix".text = # nix
''
{
allowUnfree = true;
}
'';
}; };
} }

View file

@ -0,0 +1,21 @@
{
lib,
config,
inputs,
...
}:
let
inherit (lib) mkEnableOption mkIf;
cfg = config.marleyos.nixGL;
in
{
options.marleyos.nixGL.enable = mkEnableOption "nixGL";
config = mkIf cfg.enable {
nixGL = {
inherit (inputs.nixgl) packages;
defaultWrapper = "nvidia";
};
};
}

View file

@ -20,6 +20,7 @@ in
services.polybar = { services.polybar = {
enable = true; enable = true;
package = config.lib.nixGL.wrap pkgs.polybar;
script = # bash script = # bash
'' ''