mirror of
https://github.com/danth/stylix
synced 2024-11-22 12:13:08 +00:00
parent
a1c5d01a40
commit
ecefdd8b7d
3 changed files with 11 additions and 10 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, config }:
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
let
|
||||
colors = config.lib.stylix.colors {
|
||||
|
|
Loading…
Reference in a new issue