treewide: propagate inputs and remove templates (#926)

Closes: https://github.com/danth/stylix/issues/238
Link: https://github.com/danth/stylix/pull/926

Reviewed-by: Daniel Thwaites <danth@danth.me>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
This commit is contained in:
Flameopathic 2025-03-09 10:46:36 -04:00 committed by GitHub
parent 6eea250b10
commit 3fce9fb038
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 24 additions and 32 deletions

View file

@ -219,6 +219,7 @@
(import ./stylix/nixos inputs)
{
stylix = {
inherit inputs;
paletteGenerator = self.packages.${pkgs.system}.palette-generator;
base16 = base16.lib args;
homeManagerIntegration.module = self.homeManagerModules.stylix;
@ -234,6 +235,7 @@
(import ./stylix/hm inputs)
{
stylix = {
inherit inputs;
paletteGenerator = self.packages.${pkgs.system}.palette-generator;
base16 = base16.lib args;
};
@ -248,6 +250,7 @@
(import ./stylix/darwin inputs)
{
stylix = {
inherit inputs;
paletteGenerator = self.packages.${pkgs.system}.palette-generator;
base16 = base16.lib args;
homeManagerIntegration.module = self.homeManagerModules.stylix;

View file

@ -6,7 +6,7 @@
}:
let
inherit (config.lib.stylix.templates) firefox-gnome-theme;
inherit (config.stylix.inputs) firefox-gnome-theme;
targets = [
{
path = "firefox";
@ -46,7 +46,7 @@ let
g = colors."${color}-rgb-g";
b = colors."${color}-rgb-b";
};
nur = config.lib.stylix.templates.nur.legacyPackages.${pkgs.system};
nur = config.stylix.inputs.nur.legacyPackages.${pkgs.system};
in
{
options.stylix.targets = lib.listToAttrs (

View file

@ -2,7 +2,7 @@ config:
let
theme = config.lib.stylix.colors {
templateRepo = config.lib.stylix.templates.base16-fish;
templateRepo = config.stylix.inputs.base16-fish;
};
in
''

View file

@ -4,7 +4,7 @@ let
cfg = config.stylix.targets.foot;
theme = config.lib.stylix.colors {
templateRepo = config.lib.stylix.templates.tinted-foot;
templateRepo = config.stylix.inputs.tinted-foot;
};
in

View file

@ -93,7 +93,8 @@ in
source =
let
theme = pkgs.callPackage ./theme.nix {
inherit (config.lib.stylix) colors templates;
inherit (config.lib.stylix) colors;
inherit (config.stylix) inputs;
};
in
"${theme}/share/gnome-shell/gnome-shell.css";

View file

@ -7,7 +7,8 @@
let
theme = pkgs.callPackage ./theme.nix {
inherit (config.lib.stylix) colors templates;
inherit (config.lib.stylix) colors;
inherit (config.stylix) inputs;
};
in

View file

@ -3,7 +3,7 @@
sass,
glib,
colors,
templates,
inputs,
}:
let
@ -15,7 +15,7 @@ let
in
stdenv.mkDerivation {
name = "${colors.slug}-gnome-shell-theme";
src = templates.gnome-shell;
src = inputs.gnome-shell;
patches = [ ./shell_colors.patch ];
postPatch = ''
rm data/theme/gnome-shell-sass/{_colors.scss,_default-colors.scss,_palette.scss}

View file

@ -7,7 +7,7 @@
let
theme = config.lib.stylix.colors {
templateRepo = config.lib.stylix.templates.base16-helix;
templateRepo = config.stylix.inputs.base16-helix;
};
# Removing the background exposes transparency from the terminal. The

View file

@ -3,7 +3,7 @@
let
cfg = config.stylix.targets.kitty;
theme = config.lib.stylix.colors {
templateRepo = config.lib.stylix.templates.tinted-kitty;
templateRepo = config.stylix.inputs.tinted-kitty;
target = if cfg.variant256Colors then "default-256" else "default";
};
in

View file

@ -2,7 +2,7 @@
let
theme = config.lib.stylix.colors {
templateRepo = config.lib.stylix.templates.tinted-tmux;
templateRepo = config.stylix.inputs.tinted-tmux;
target = "base16";
};

View file

@ -7,7 +7,7 @@
let
themeFile = config.lib.stylix.colors {
templateRepo = config.lib.stylix.templates.base16-vim;
templateRepo = config.lib.stylix.input.base16-vim;
target = "base16";
};

View file

@ -5,7 +5,7 @@
}:
let
theme = config.lib.stylix.colors {
templateRepo = config.lib.stylix.templates.tinted-zed;
templateRepo = config.stylix.inputs.tinted-zed;
};
in
{

View file

@ -18,6 +18,5 @@ in
"${inputs.self}/stylix/palette.nix"
"${inputs.self}/stylix/pixel.nix"
"${inputs.self}/stylix/target.nix"
(import ../templates.nix inputs)
] ++ autoload;
}

View file

@ -21,6 +21,5 @@ in
"${inputs.self}/stylix/palette.nix"
"${inputs.self}/stylix/pixel.nix"
"${inputs.self}/stylix/target.nix"
(import ../templates.nix inputs)
] ++ autoload;
}

View file

@ -20,6 +20,5 @@ in
"${inputs.self}/stylix/palette.nix"
"${inputs.self}/stylix/pixel.nix"
"${inputs.self}/stylix/target.nix"
(import ../templates.nix inputs)
] ++ autoload;
}

View file

@ -152,6 +152,12 @@ in
internal = true;
readOnly = true;
};
inputs = lib.mkOption {
description = "Inputs of the Stylix flake.";
internal = true;
readOnly = true;
};
};
config = {

View file

@ -1,16 +0,0 @@
inputs: {
config.lib.stylix.templates = {
inherit (inputs)
base16-fish
base16-helix
base16-vim
gnome-shell
tinted-foot
tinted-kitty
tinted-tmux
tinted-zed
firefox-gnome-theme
nur
;
};
}