-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9eec46c
commit 88f1257
Showing
3 changed files
with
42 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
./i3 | ||
./kitty.nix | ||
./mpv | ||
./nixgl.nix | ||
./sway | ||
./theme | ||
./twenty-twenty-twenty.nix | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ config, lib, libEx, pkgs, ... }: | ||
|
||
let | ||
cfg = config.home-manager.desktop.nixgl; | ||
in | ||
{ | ||
options.home-manager.desktop.nixgl = { | ||
enable = lib.mkEnableOption "nixGL config" // { | ||
default = config.targets.genericLinux.enable; | ||
}; | ||
package = lib.mkPackageOption pkgs [ "nixgl" "auto" "nixGLDefault" ] { }; | ||
}; | ||
|
||
config = lib.mkIf cfg.enable { | ||
home.packages = with pkgs; [ | ||
cfg.package | ||
] ++ lib.optionals config.home-manager.desktop.firefox.enable [ | ||
# This may "overwrite" some of the personalizations from the | ||
# home-manager.desktop.firefox module, since the nixGLWrapper is | ||
# incompatible with it and we are prioritizing the nixGL wrapped binary | ||
(lib.hiPrio (libEx.nixGLWrapper { pkg = firefox; nixGL = cfg.package; })) | ||
]; | ||
|
||
programs = { | ||
mpv.package = libEx.nixGLWrapper { | ||
pkg = pkgs.mpv; | ||
nixGL = cfg.package; | ||
}; | ||
}; | ||
}; | ||
} |