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:
parent
6eea250b10
commit
3fce9fb038
17 changed files with 24 additions and 32 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
|
|
|
|||
|
|
@ -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
|
||||
''
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
}:
|
||||
let
|
||||
theme = config.lib.stylix.colors {
|
||||
templateRepo = config.lib.stylix.templates.tinted-zed;
|
||||
templateRepo = config.stylix.inputs.tinted-zed;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,6 +152,12 @@ in
|
|||
internal = true;
|
||||
readOnly = true;
|
||||
};
|
||||
|
||||
inputs = lib.mkOption {
|
||||
description = "Inputs of the Stylix flake.";
|
||||
internal = true;
|
||||
readOnly = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue