Fix GNOME extensions app not launching 🐛

Fixes #88.
This commit is contained in:
Daniel Thwaites 2023-04-21 18:58:34 +01:00
parent a1c5d01a40
commit ecefdd8b7d
No known key found for this signature in database
GPG key ID: D8AFC4BF05670F9D
3 changed files with 11 additions and 10 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, config, lib, ... }:
{ pkgs, config, lib, ... }@args:
with lib;
@ -28,7 +28,7 @@ with lib;
xdg.dataFile."themes/Stylix/gnome-shell/gnome-shell.css" = {
source =
let theme = import ./theme.nix { inherit pkgs config; };
let theme = import ./theme.nix args;
in "${theme}/share/gnome-shell/gnome-shell.css";
onChange = ''
if [ -x "$(command -v gnome-extensions)" ]; then

View file

@ -1,9 +1,12 @@
{ pkgs, config, ... }:
{ pkgs, config, ... }@args:
let
# We use this imported lib instead of the one from the module arguments
# to avoid infinite loops if the lib in arguments depends on nixpkgs.overlays
lib = (builtins.getFlake "github:nix-community/nixpkgs.lib/c9d4f2476046c6a7a2ce3c2118c48455bf0272ea").lib;
theme = import ./theme.nix args;
in {
options.stylix.targets.gnome.enable =
lib.mkOption {
@ -24,12 +27,10 @@ in {
nixpkgs.overlays = [(self: super: {
gnome = super.gnome.overrideScope' (gnomeSelf: gnomeSuper: {
gnome-shell = gnomeSuper.gnome-shell.overrideAttrs (oldAttrs: {
postFixup =
let theme = import ./theme.nix { inherit config; pkgs = super; };
in ''
cp ${theme}/share/gnome-shell/gnome-shell-theme.gresource \
$out/share/gnome-shell/gnome-shell-theme.gresource
'';
postFixup = (oldAttrs.postFixup or "") + ''
cp ${theme}/share/gnome-shell/gnome-shell-theme.gresource \
$out/share/gnome-shell/gnome-shell-theme.gresource
'';
patches = (oldAttrs.patches or []) ++ [
./shell_remove_dark_mode.patch
];

View file

@ -1,4 +1,4 @@
{ pkgs, config }:
{ pkgs, config, ... }:
let
colors = config.lib.stylix.colors {