mirror of
https://github.com/danth/stylix
synced 2024-11-22 20:23:15 +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;
|
with lib;
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ with lib;
|
||||||
|
|
||||||
xdg.dataFile."themes/Stylix/gnome-shell/gnome-shell.css" = {
|
xdg.dataFile."themes/Stylix/gnome-shell/gnome-shell.css" = {
|
||||||
source =
|
source =
|
||||||
let theme = import ./theme.nix { inherit pkgs config; };
|
let theme = import ./theme.nix args;
|
||||||
in "${theme}/share/gnome-shell/gnome-shell.css";
|
in "${theme}/share/gnome-shell/gnome-shell.css";
|
||||||
onChange = ''
|
onChange = ''
|
||||||
if [ -x "$(command -v gnome-extensions)" ]; then
|
if [ -x "$(command -v gnome-extensions)" ]; then
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }@args:
|
||||||
|
|
||||||
let
|
let
|
||||||
# We use this imported lib instead of the one from the module arguments
|
# 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
|
# to avoid infinite loops if the lib in arguments depends on nixpkgs.overlays
|
||||||
lib = (builtins.getFlake "github:nix-community/nixpkgs.lib/c9d4f2476046c6a7a2ce3c2118c48455bf0272ea").lib;
|
lib = (builtins.getFlake "github:nix-community/nixpkgs.lib/c9d4f2476046c6a7a2ce3c2118c48455bf0272ea").lib;
|
||||||
|
|
||||||
|
theme = import ./theme.nix args;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
options.stylix.targets.gnome.enable =
|
options.stylix.targets.gnome.enable =
|
||||||
lib.mkOption {
|
lib.mkOption {
|
||||||
|
@ -24,12 +27,10 @@ in {
|
||||||
nixpkgs.overlays = [(self: super: {
|
nixpkgs.overlays = [(self: super: {
|
||||||
gnome = super.gnome.overrideScope' (gnomeSelf: gnomeSuper: {
|
gnome = super.gnome.overrideScope' (gnomeSelf: gnomeSuper: {
|
||||||
gnome-shell = gnomeSuper.gnome-shell.overrideAttrs (oldAttrs: {
|
gnome-shell = gnomeSuper.gnome-shell.overrideAttrs (oldAttrs: {
|
||||||
postFixup =
|
postFixup = (oldAttrs.postFixup or "") + ''
|
||||||
let theme = import ./theme.nix { inherit config; pkgs = super; };
|
cp ${theme}/share/gnome-shell/gnome-shell-theme.gresource \
|
||||||
in ''
|
$out/share/gnome-shell/gnome-shell-theme.gresource
|
||||||
cp ${theme}/share/gnome-shell/gnome-shell-theme.gresource \
|
'';
|
||||||
$out/share/gnome-shell/gnome-shell-theme.gresource
|
|
||||||
'';
|
|
||||||
patches = (oldAttrs.patches or []) ++ [
|
patches = (oldAttrs.patches or []) ++ [
|
||||||
./shell_remove_dark_mode.patch
|
./shell_remove_dark_mode.patch
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, config }:
|
{ pkgs, config, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
colors = config.lib.stylix.colors {
|
colors = config.lib.stylix.colors {
|
||||||
|
|
Loading…
Reference in a new issue