Skip to content

Commit 27e2f9d

Browse files
committed
gnome: use overlay.nix
1 parent 46caa41 commit 27e2f9d

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

modules/gnome/overlay.nix

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
lib,
3+
pkgs,
4+
config,
5+
options,
6+
...
7+
}:
8+
let
9+
theme = pkgs.callPackage ./theme.nix {
10+
inherit (config.lib.stylix) colors;
11+
inherit (config.stylix) inputs;
12+
};
13+
in
14+
{
15+
overlay =
16+
lib.mkIf
17+
(
18+
pkgs.stdenv.hostPlatform.canExecute pkgs.gnome-shell
19+
&& options.stylix.targets ? gnome
20+
&& config.stylix.targets.gnome.enable
21+
)
22+
(
23+
_: super: {
24+
gnome-shell = super.gnome-shell.overrideAttrs (oldAttrs: {
25+
# Themes are usually applied via an extension, but extensions are
26+
# not available on the login screen. The only way to change the
27+
# theme there is by replacing the default.
28+
postFixup =
29+
(oldAttrs.postFixup or "")
30+
+ ''
31+
cp ${theme}/share/gnome-shell/gnome-shell-theme.gresource \
32+
$out/share/gnome-shell/gnome-shell-theme.gresource
33+
'';
34+
patches = (oldAttrs.patches or [ ]) ++ [
35+
./shell_remove_dark_mode.patch
36+
];
37+
});
38+
}
39+
);
40+
}

0 commit comments

Comments
 (0)