From dfc859f54d937a31b954901ed01f3d6961cd2ead Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Sat, 19 Jul 2025 11:28:36 +0200 Subject: [PATCH] treewide: optionalize mkTarget's humanName and name arguments Optionalize mkTarget's 'humanName' and 'name' arguments by inferring 'humanName' from the 'name' attribute in the /modules//meta.nix file, and 'name' from the /modules// directory name. Inferring the 'humanName' and 'name' arguments ensures consistency and reduces boilerplate. The 'humanName' and 'name' arguments are optionalized instead of removed because complex modules generating target derivations need to distinguish between them. Closes: https://github.com/nix-community/stylix/issues/1661 --- doc/src/modules.md | 3 --- modules/alacritty/hm.nix | 2 -- modules/anki/hm.nix | 3 --- modules/ashell/hm.nix | 3 --- modules/avizo/hm.nix | 3 --- modules/bat/hm.nix | 3 --- modules/bemenu/hm.nix | 3 --- modules/blender/hm.nix | 3 --- modules/bspwm/hm.nix | 3 --- modules/btop/hm.nix | 3 --- modules/cava/hm.nix | 3 --- modules/cavalier/hm.nix | 3 --- modules/chromium/nixos.nix | 3 --- modules/console/droid.nix | 3 --- modules/console/nixos.nix | 3 --- modules/dunst/hm.nix | 3 --- modules/emacs/hm.nix | 3 --- modules/eog/hm.nix | 3 --- modules/fcitx5/hm.nix | 3 --- modules/feh/hm.nix | 2 -- modules/feh/nixos.nix | 2 -- modules/firefox/each-config.nix | 2 +- modules/fish/hm.nix | 3 --- modules/fish/nixos.nix | 3 --- modules/fnott/hm.nix | 3 --- modules/foliate/hm.nix | 3 --- modules/font-packages/darwin.nix | 3 --- modules/font-packages/hm.nix | 3 --- modules/font-packages/nixos.nix | 3 --- modules/fontconfig/fontconfig.nix | 3 --- modules/foot/hm.nix | 3 --- modules/forge/hm.nix | 3 --- modules/fuzzel/hm.nix | 3 --- modules/fzf/hm.nix | 3 --- modules/gdu/hm.nix | 3 --- modules/gedit/hm.nix | 3 --- modules/ghostty/hm.nix | 3 --- modules/gitui/hm.nix | 3 --- modules/glance/hm.nix | 3 --- modules/glance/nixos.nix | 3 --- modules/gnome-text-editor/hm.nix | 3 --- modules/gnome-text-editor/nixos.nix | 6 +----- modules/gnome/hm.nix | 3 --- modules/gtk/hm.nix | 3 --- modules/gtk/nixos.nix | 3 --- modules/gtksourceview/hm.nix | 3 --- modules/gtksourceview/nixos.nix | 8 ++----- modules/halloy/hm.nix | 3 --- modules/helix/hm.nix | 3 --- modules/hyprland/hm.nix | 2 -- modules/hyprlock/hm.nix | 3 --- modules/hyprpanel/hm.nix | 3 --- modules/hyprpaper/hm.nix | 3 --- modules/i3/hm.nix | 3 --- modules/i3bar-river/hm.nix | 3 --- modules/jankyborders/darwin.nix | 3 --- modules/k9s/hm.nix | 3 --- modules/kitty/hm.nix | 3 --- modules/kmscon/nixos.nix | 3 --- modules/kubecolor/hm.nix | 3 --- modules/lazygit/hm.nix | 3 --- modules/lightdm/nixos.nix | 3 --- modules/limine/nixos.nix | 3 --- modules/mako/hm.nix | 3 --- modules/mangohud/hm.nix | 3 --- modules/micro/hm.nix | 3 --- modules/mpv/hm.nix | 2 -- modules/ncspot/hm.nix | 3 --- modules/nushell/hm.nix | 3 --- modules/obsidian/hm.nix | 3 --- modules/opencode/hm.nix | 3 --- modules/plymouth/nixos.nix | 3 --- modules/qutebrowser/hm.nix | 3 --- modules/regreet/nixos.nix | 3 --- modules/rio/hm.nix | 3 --- modules/rofi/hm.nix | 3 --- modules/spicetify/spicetify.nix | 3 --- modules/spotify-player/hm.nix | 3 --- modules/starship/hm.nix | 3 --- modules/swaylock/hm.nix | 3 --- modules/swaync/hm.nix | 3 --- modules/sxiv/hm.nix | 3 --- modules/tmux/hm.nix | 3 --- modules/tofi/hm.nix | 3 --- modules/vicinae/hm.nix | 3 --- modules/vivid/hm.nix | 3 --- modules/vscode/hm.nix | 3 --- modules/waybar/hm.nix | 3 --- modules/wayfire/hm.nix | 3 --- modules/wayprompt/hm.nix | 3 --- modules/wezterm/hm.nix | 2 -- modules/wob/hm.nix | 3 --- modules/wofi/hm.nix | 3 --- modules/wpaperd/hm.nix | 3 --- modules/xfce/hm.nix | 2 -- modules/xresources/hm.nix | 3 --- modules/yazi/hm.nix | 3 --- modules/zathura/hm.nix | 3 --- modules/zed/hm.nix | 3 --- modules/zellij/hm.nix | 3 --- modules/zen-browser/hm.nix | 3 --- stylix/autoload.nix | 10 +++++++-- stylix/darwin/default.nix | 9 ++++++-- stylix/droid/default.nix | 4 ++-- stylix/hm/default.nix | 9 ++++++-- stylix/mk-target.nix | 33 ++++++++++++++--------------- stylix/nixos/default.nix | 9 ++++++-- stylix/overlays.nix | 2 +- 108 files changed, 52 insertions(+), 327 deletions(-) diff --git a/doc/src/modules.md b/doc/src/modules.md index 75e91cdb..95c4e932 100644 --- a/doc/src/modules.md +++ b/doc/src/modules.md @@ -49,9 +49,6 @@ documentation for more details): ```nix { config, lib, mkTarget ... }: mkTarget { - name = "«name»"; - humanName = "«human readable name»"; - config = { colors }: { diff --git a/modules/alacritty/hm.nix b/modules/alacritty/hm.nix index f2fba176..eb9bbfd6 100644 --- a/modules/alacritty/hm.nix +++ b/modules/alacritty/hm.nix @@ -3,8 +3,6 @@ # - `man 5 alacritty` { mkTarget, ... }: mkTarget { - name = "alacritty"; - humanName = "Alacritty"; config = [ ( { colors }: diff --git a/modules/anki/hm.nix b/modules/anki/hm.nix index 6c70413d..2276c4d6 100644 --- a/modules/anki/hm.nix +++ b/modules/anki/hm.nix @@ -5,9 +5,6 @@ ... }: mkTarget { - name = "anki"; - humanName = "Anki"; - config = { colors }: { diff --git a/modules/ashell/hm.nix b/modules/ashell/hm.nix index 76830f91..e369229d 100644 --- a/modules/ashell/hm.nix +++ b/modules/ashell/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "ashell"; - humanName = "Ashell"; - config = [ ( { colors }: diff --git a/modules/avizo/hm.nix b/modules/avizo/hm.nix index 21de0fa2..60696649 100644 --- a/modules/avizo/hm.nix +++ b/modules/avizo/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "avizo"; - humanName = "Avizo"; - # Referenced https://github.com/stacyharper/base16-mako config = { colors, opacity }: diff --git a/modules/bat/hm.nix b/modules/bat/hm.nix index 48ab60c7..c9bf3475 100644 --- a/modules/bat/hm.nix +++ b/modules/bat/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "bat"; - humanName = "Bat"; - config = { colors }: { diff --git a/modules/bemenu/hm.nix b/modules/bemenu/hm.nix index 0438ea75..ee7817b6 100644 --- a/modules/bemenu/hm.nix +++ b/modules/bemenu/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "bemenu"; - humanName = "bemenu"; - options = { fonts }: { diff --git a/modules/blender/hm.nix b/modules/blender/hm.nix index b042fe38..4971ebd7 100644 --- a/modules/blender/hm.nix +++ b/modules/blender/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "blender"; - humanName = "Blender"; - options.themeBody = lib.mkOption { type = lib.types.lines; default = ""; diff --git a/modules/bspwm/hm.nix b/modules/bspwm/hm.nix index b30bcd86..54596468 100644 --- a/modules/bspwm/hm.nix +++ b/modules/bspwm/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "bspwm"; - humanName = "bspwm"; - config = { colors }: { diff --git a/modules/btop/hm.nix b/modules/btop/hm.nix index eb46381b..a6792c79 100644 --- a/modules/btop/hm.nix +++ b/modules/btop/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "btop"; - humanName = "btop"; - config = [ ( { opacity }: diff --git a/modules/cava/hm.nix b/modules/cava/hm.nix index 5fbfb08a..0a793165 100644 --- a/modules/cava/hm.nix +++ b/modules/cava/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "cava"; - humanName = "CAVA"; - options.rainbow.enable = lib.mkEnableOption "rainbow gradient theming"; config = diff --git a/modules/cavalier/hm.nix b/modules/cavalier/hm.nix index b922e71a..3e106048 100644 --- a/modules/cavalier/hm.nix +++ b/modules/cavalier/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "cavalier"; - humanName = "Cavalier"; - config = { colors }: { diff --git a/modules/chromium/nixos.nix b/modules/chromium/nixos.nix index 4154809c..fa20b10a 100644 --- a/modules/chromium/nixos.nix +++ b/modules/chromium/nixos.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "chromium"; - humanName = "Chromium, Google Chrome and Brave"; - config = { colors }: { diff --git a/modules/console/droid.nix b/modules/console/droid.nix index bb7fc37a..087426c6 100644 --- a/modules/console/droid.nix +++ b/modules/console/droid.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "console"; - humanName = "the Nix-on-Droid console"; - config = { colors }: { diff --git a/modules/console/nixos.nix b/modules/console/nixos.nix index 9c1230e0..9f1ddf12 100644 --- a/modules/console/nixos.nix +++ b/modules/console/nixos.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "console"; - humanName = "the Linux kernel console"; - config = { colors }: { diff --git a/modules/dunst/hm.nix b/modules/dunst/hm.nix index 61911221..d83b35fc 100644 --- a/modules/dunst/hm.nix +++ b/modules/dunst/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "dunst"; - humanName = "Dunst"; - config = [ ( { fonts }: diff --git a/modules/emacs/hm.nix b/modules/emacs/hm.nix index 0bb705fd..6b7827f9 100644 --- a/modules/emacs/hm.nix +++ b/modules/emacs/hm.nix @@ -1,8 +1,5 @@ { mkTarget, pkgs, ... }: mkTarget { - name = "emacs"; - humanName = "Emacs"; - config = [ ( { opacity }: diff --git a/modules/eog/hm.nix b/modules/eog/hm.nix index ff5d3c32..9e88c888 100644 --- a/modules/eog/hm.nix +++ b/modules/eog/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "eog"; - humanName = "Eye of GNOME Image Viewer"; - config = { colors }: { diff --git a/modules/fcitx5/hm.nix b/modules/fcitx5/hm.nix index 91b03610..ee31f5eb 100644 --- a/modules/fcitx5/hm.nix +++ b/modules/fcitx5/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "fcitx5"; - humanName = "fcitx5"; - config = [ ( { fonts }: diff --git a/modules/feh/hm.nix b/modules/feh/hm.nix index 4b5c4d70..0b1fa739 100644 --- a/modules/feh/hm.nix +++ b/modules/feh/hm.nix @@ -6,8 +6,6 @@ ... }: mkTarget { - name = "feh"; - humanName = "the desktop background using Feh"; autoEnable = with config.xsession.windowManager; bspwm.enable diff --git a/modules/feh/nixos.nix b/modules/feh/nixos.nix index 6049cc2c..3debf1a9 100644 --- a/modules/feh/nixos.nix +++ b/modules/feh/nixos.nix @@ -6,8 +6,6 @@ ... }: mkTarget { - name = "feh"; - humanName = "the desktop background using Feh"; autoEnable = with config.services.xserver.windowManager; xmonad.enable || i3.enable; diff --git a/modules/firefox/each-config.nix b/modules/firefox/each-config.nix index def60076..82b730d0 100644 --- a/modules/firefox/each-config.nix +++ b/modules/firefox/each-config.nix @@ -12,7 +12,7 @@ ... }: mkTarget { - inherit name humanName; + inherit humanName name; options = { profileNames = lib.mkOption { diff --git a/modules/fish/hm.nix b/modules/fish/hm.nix index f8e2f727..6acc5e13 100644 --- a/modules/fish/hm.nix +++ b/modules/fish/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "fish"; - humanName = "Fish"; - config = { colors, inputs }: { diff --git a/modules/fish/nixos.nix b/modules/fish/nixos.nix index f53e7f47..8487e280 100644 --- a/modules/fish/nixos.nix +++ b/modules/fish/nixos.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "fish"; - humanName = "Fish"; - config = { colors, inputs }: { diff --git a/modules/fnott/hm.nix b/modules/fnott/hm.nix index ff37d15c..473b9398 100644 --- a/modules/fnott/hm.nix +++ b/modules/fnott/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "fnott"; - humanName = "Fnott"; - config = [ ( { fonts }: diff --git a/modules/foliate/hm.nix b/modules/foliate/hm.nix index 2d9b7a40..01a29b9a 100644 --- a/modules/foliate/hm.nix +++ b/modules/foliate/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "foliate"; - humanName = "Foliate"; - config = { colors }: { diff --git a/modules/font-packages/darwin.nix b/modules/font-packages/darwin.nix index 6a067eb9..359d862d 100644 --- a/modules/font-packages/darwin.nix +++ b/modules/font-packages/darwin.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "font-packages"; - humanName = "Font packages"; - config = { fonts }: { diff --git a/modules/font-packages/hm.nix b/modules/font-packages/hm.nix index a45926b3..c2097750 100644 --- a/modules/font-packages/hm.nix +++ b/modules/font-packages/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "font-packages"; - humanName = "Font packages"; - config = { fonts }: { diff --git a/modules/font-packages/nixos.nix b/modules/font-packages/nixos.nix index 6a067eb9..359d862d 100644 --- a/modules/font-packages/nixos.nix +++ b/modules/font-packages/nixos.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "font-packages"; - humanName = "Font packages"; - config = { fonts }: { diff --git a/modules/fontconfig/fontconfig.nix b/modules/fontconfig/fontconfig.nix index dc4cd3e6..77eadf1a 100644 --- a/modules/fontconfig/fontconfig.nix +++ b/modules/fontconfig/fontconfig.nix @@ -1,9 +1,6 @@ { mkTarget }: { lib, ... }: mkTarget { - name = "fontconfig"; - humanName = "Fontconfig"; - config = { listTargetIndex, fonts }: { diff --git a/modules/foot/hm.nix b/modules/foot/hm.nix index 9b3dde9a..08ed47d1 100644 --- a/modules/foot/hm.nix +++ b/modules/foot/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "foot"; - humanName = "Foot"; - config = [ ( { fonts }: diff --git a/modules/forge/hm.nix b/modules/forge/hm.nix index c67d2ad0..330d2ae1 100644 --- a/modules/forge/hm.nix +++ b/modules/forge/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "forge"; - humanName = "Forge"; - config = { colors }: { diff --git a/modules/fuzzel/hm.nix b/modules/fuzzel/hm.nix index 0a3ab52d..7d7a1db2 100644 --- a/modules/fuzzel/hm.nix +++ b/modules/fuzzel/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "fuzzel"; - humanName = "Fuzzel"; - config = [ ( { fonts }: diff --git a/modules/fzf/hm.nix b/modules/fzf/hm.nix index f748c515..dda229b2 100644 --- a/modules/fzf/hm.nix +++ b/modules/fzf/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "fzf"; - humanName = "Fzf"; - config = { colors }: { diff --git a/modules/gdu/hm.nix b/modules/gdu/hm.nix index a36b1635..c1f2e4b4 100644 --- a/modules/gdu/hm.nix +++ b/modules/gdu/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "gdu"; - humanName = "go DiskUsage()"; - config = { colors }: { diff --git a/modules/gedit/hm.nix b/modules/gedit/hm.nix index fa8f78ca..82959a30 100644 --- a/modules/gedit/hm.nix +++ b/modules/gedit/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "gedit"; - humanName = "GEdit"; - config = { colors }: { diff --git a/modules/ghostty/hm.nix b/modules/ghostty/hm.nix index a2191935..a3ffec41 100644 --- a/modules/ghostty/hm.nix +++ b/modules/ghostty/hm.nix @@ -3,9 +3,6 @@ # - `man 5 ghostty` { mkTarget, pkgs, ... }: mkTarget { - name = "ghostty"; - humanName = "Ghostty"; - config = [ ( { fonts }: diff --git a/modules/gitui/hm.nix b/modules/gitui/hm.nix index 90b6e4df..aba87841 100644 --- a/modules/gitui/hm.nix +++ b/modules/gitui/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "gitui"; - humanName = "GitUI"; - config = { colors }: { diff --git a/modules/glance/hm.nix b/modules/glance/hm.nix index 5ba9162f..da68e487 100644 --- a/modules/glance/hm.nix +++ b/modules/glance/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "glance"; - humanName = "Glance"; - config = [ ( { polarity }: diff --git a/modules/glance/nixos.nix b/modules/glance/nixos.nix index 5ba9162f..da68e487 100644 --- a/modules/glance/nixos.nix +++ b/modules/glance/nixos.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "glance"; - humanName = "Glance"; - config = [ ( { polarity }: diff --git a/modules/gnome-text-editor/hm.nix b/modules/gnome-text-editor/hm.nix index c72ba084..32a007ec 100644 --- a/modules/gnome-text-editor/hm.nix +++ b/modules/gnome-text-editor/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "gnome-text-editor"; - humanName = "GNOME Text Editor"; - config = { dconf.settings."org/gnome/TextEditor".style-scheme = "stylix"; }; diff --git a/modules/gnome-text-editor/nixos.nix b/modules/gnome-text-editor/nixos.nix index 148b3cbd..22a0afa6 100644 --- a/modules/gnome-text-editor/nixos.nix +++ b/modules/gnome-text-editor/nixos.nix @@ -1,5 +1 @@ -{ mkTarget, ... }: -mkTarget { - name = "gnome-text-editor"; - humanName = "GNOME Text Editor"; -} +{ mkTarget, ... }: mkTarget { } diff --git a/modules/gnome/hm.nix b/modules/gnome/hm.nix index fe3cdf32..0e43b209 100644 --- a/modules/gnome/hm.nix +++ b/modules/gnome/hm.nix @@ -6,9 +6,6 @@ ... }: mkTarget { - name = "gnome"; - humanName = "GNOME"; - autoEnable = pkgs.stdenv.hostPlatform.isLinux; autoEnableExpr = "pkgs.stdenv.hostPlatform.isLinux"; diff --git a/modules/gtk/hm.nix b/modules/gtk/hm.nix index 88ebf8b6..e3eb283d 100644 --- a/modules/gtk/hm.nix +++ b/modules/gtk/hm.nix @@ -7,9 +7,6 @@ ... }: mkTarget { - name = "gtk"; - humanName = "all GTK3, GTK4 and Libadwaita apps"; - options = { extraCss = lib.mkOption { description = '' diff --git a/modules/gtk/nixos.nix b/modules/gtk/nixos.nix index 2300f90b..cb208716 100644 --- a/modules/gtk/nixos.nix +++ b/modules/gtk/nixos.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "gtk"; - humanName = "all GTK3, GTK4 and Libadwaita apps"; - config = { # Required for Home Manager's GTK settings to work programs.dconf.enable = true; diff --git a/modules/gtksourceview/hm.nix b/modules/gtksourceview/hm.nix index 00bd9e76..02bf853b 100644 --- a/modules/gtksourceview/hm.nix +++ b/modules/gtksourceview/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "gtksourceview"; - humanName = "GTKSourceView"; - config = { colors, ... }: { diff --git a/modules/gtksourceview/nixos.nix b/modules/gtksourceview/nixos.nix index e42e2d1c..40f8bd18 100644 --- a/modules/gtksourceview/nixos.nix +++ b/modules/gtksourceview/nixos.nix @@ -1,7 +1,3 @@ { mkTarget, ... }: -mkTarget { - name = "gtksourceview"; - humanName = "GTKSourceView"; - - # Used to enable overlay. -} +# Used to enable overlay. +mkTarget { } diff --git a/modules/halloy/hm.nix b/modules/halloy/hm.nix index b10f0727..fae67f7c 100644 --- a/modules/halloy/hm.nix +++ b/modules/halloy/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "halloy"; - humanName = "Halloy"; - config = { colors }: { diff --git a/modules/helix/hm.nix b/modules/helix/hm.nix index 1b4403bb..d7e37529 100644 --- a/modules/helix/hm.nix +++ b/modules/helix/hm.nix @@ -5,9 +5,6 @@ ... }: mkTarget { - name = "helix"; - humanName = "Helix"; - options.transparent = lib.mkEnableOption "transparent theming" // { internal = true; default = false; diff --git a/modules/hyprland/hm.nix b/modules/hyprland/hm.nix index e15b7b29..1a7e1e00 100644 --- a/modules/hyprland/hm.nix +++ b/modules/hyprland/hm.nix @@ -5,8 +5,6 @@ ... }: mkTarget { - name = "hyprland"; - humanName = "Hyprland"; options = { image }: { diff --git a/modules/hyprlock/hm.nix b/modules/hyprlock/hm.nix index abd03139..74c54a9c 100644 --- a/modules/hyprlock/hm.nix +++ b/modules/hyprlock/hm.nix @@ -5,9 +5,6 @@ ... }: mkTarget { - name = "hyprlock"; - humanName = "Hyprlock"; - options.useWallpaper = config.lib.stylix.mkEnableWallpaper "Hyprlock" true; config = [ diff --git a/modules/hyprpanel/hm.nix b/modules/hyprpanel/hm.nix index fb44e9a5..8b3af480 100644 --- a/modules/hyprpanel/hm.nix +++ b/modules/hyprpanel/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "hyprpanel"; - humanName = "HyprPanel"; - config = [ ( { fonts }: diff --git a/modules/hyprpaper/hm.nix b/modules/hyprpaper/hm.nix index e230f0c5..6018b217 100644 --- a/modules/hyprpaper/hm.nix +++ b/modules/hyprpaper/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "hyprpaper"; - humanName = "Hyprpaper"; - config = { image }: { diff --git a/modules/i3/hm.nix b/modules/i3/hm.nix index 019b4177..192ecf96 100644 --- a/modules/i3/hm.nix +++ b/modules/i3/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "i3"; - humanName = "i3"; - options.exportedBarConfig = lib.mkOption { type = lib.types.attrs; default = { }; diff --git a/modules/i3bar-river/hm.nix b/modules/i3bar-river/hm.nix index 2bd22a0f..d72d3f1c 100644 --- a/modules/i3bar-river/hm.nix +++ b/modules/i3bar-river/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "i3bar-river"; - humanName = "i3bar-river"; - config = [ ( { fonts }: diff --git a/modules/jankyborders/darwin.nix b/modules/jankyborders/darwin.nix index e4948769..10cd9402 100644 --- a/modules/jankyborders/darwin.nix +++ b/modules/jankyborders/darwin.nix @@ -5,9 +5,6 @@ ... }: mkTarget { - name = "jankyborders"; - humanName = "JankyBorders"; - config = { colors, opacity }: { diff --git a/modules/k9s/hm.nix b/modules/k9s/hm.nix index f0a0bc26..5f31999a 100644 --- a/modules/k9s/hm.nix +++ b/modules/k9s/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "k9s"; - humanName = "k9s"; - config = { colors }: { diff --git a/modules/kitty/hm.nix b/modules/kitty/hm.nix index d17b5262..e7349475 100644 --- a/modules/kitty/hm.nix +++ b/modules/kitty/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "kitty"; - humanName = "Kitty"; - options = { variant256Colors = lib.mkOption { description = '' diff --git a/modules/kmscon/nixos.nix b/modules/kmscon/nixos.nix index 830e3828..03b52795 100644 --- a/modules/kmscon/nixos.nix +++ b/modules/kmscon/nixos.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "kmscon"; - humanName = "the kmscon virtual console"; - config = [ ( { fonts }: diff --git a/modules/kubecolor/hm.nix b/modules/kubecolor/hm.nix index 4b461f84..f0fe9bc8 100644 --- a/modules/kubecolor/hm.nix +++ b/modules/kubecolor/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "kubecolor"; - humanName = "kubecolor"; - config = [ ( { polarity }: diff --git a/modules/lazygit/hm.nix b/modules/lazygit/hm.nix index 50850ea4..570178f3 100644 --- a/modules/lazygit/hm.nix +++ b/modules/lazygit/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "lazygit"; - humanName = "lazygit"; - config = { colors }: { diff --git a/modules/lightdm/nixos.nix b/modules/lightdm/nixos.nix index b0720711..fe512f0f 100644 --- a/modules/lightdm/nixos.nix +++ b/modules/lightdm/nixos.nix @@ -5,9 +5,6 @@ ... }: mkTarget { - name = "lightdm"; - humanName = "LightDM"; - options.useWallpaper = config.lib.stylix.mkEnableWallpaper "LightDM" true; config = diff --git a/modules/limine/nixos.nix b/modules/limine/nixos.nix index 74b79071..0283c07a 100644 --- a/modules/limine/nixos.nix +++ b/modules/limine/nixos.nix @@ -5,9 +5,6 @@ ... }: mkTarget { - name = "limine"; - humanName = "Limine"; - options.useWallpaper = config.lib.stylix.mkEnableWallpaper "Limine" true; config = [ diff --git a/modules/mako/hm.nix b/modules/mako/hm.nix index 312fab72..e93621f1 100644 --- a/modules/mako/hm.nix +++ b/modules/mako/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "mako"; - humanName = "Mako"; - # Referenced https://github.com/stacyharper/base16-mako config = [ ( diff --git a/modules/mangohud/hm.nix b/modules/mangohud/hm.nix index f513f9e0..fdb6ba45 100644 --- a/modules/mangohud/hm.nix +++ b/modules/mangohud/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "mangohud"; - humanName = "mangohud"; - config = [ ( { fonts }: diff --git a/modules/micro/hm.nix b/modules/micro/hm.nix index a1a76db8..a234583c 100644 --- a/modules/micro/hm.nix +++ b/modules/micro/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "micro"; - humanName = "micro"; - config = { # TODO: Provide a real colorscheme once [1] is resolved. # diff --git a/modules/mpv/hm.nix b/modules/mpv/hm.nix index 1c0db2fe..9c66f375 100644 --- a/modules/mpv/hm.nix +++ b/modules/mpv/hm.nix @@ -1,7 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "mpv"; - humanName = "mpv"; config = [ ( { fonts }: diff --git a/modules/ncspot/hm.nix b/modules/ncspot/hm.nix index d03a9ec3..41e8d1eb 100644 --- a/modules/ncspot/hm.nix +++ b/modules/ncspot/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "ncspot"; - humanName = "Ncspot"; - options.background = lib.mkOption { type = lib.types.nullOr lib.types.str; description = "Used to set bg even if `opacity` or `colors` is null."; diff --git a/modules/nushell/hm.nix b/modules/nushell/hm.nix index 61a4b164..12b4b1fa 100644 --- a/modules/nushell/hm.nix +++ b/modules/nushell/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "nushell"; - humanName = "Nushell"; - # Adapted from https://www.nushell.sh/book/coloring_and_theming.html#theming config = { colors }: diff --git a/modules/obsidian/hm.nix b/modules/obsidian/hm.nix index 017b5a8f..9ed3ab15 100644 --- a/modules/obsidian/hm.nix +++ b/modules/obsidian/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "obsidian"; - humanName = "Obsidian"; - options.vaultNames = lib.mkOption { description = "The obsidian vault names to apply styling on."; type = lib.types.listOf lib.types.str; diff --git a/modules/opencode/hm.nix b/modules/opencode/hm.nix index edbd04d0..ce83cfe2 100644 --- a/modules/opencode/hm.nix +++ b/modules/opencode/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "opencode"; - humanName = "OpenCode"; - config = { colors }: { diff --git a/modules/plymouth/nixos.nix b/modules/plymouth/nixos.nix index 06cffbef..6dc3deb4 100644 --- a/modules/plymouth/nixos.nix +++ b/modules/plymouth/nixos.nix @@ -5,9 +5,6 @@ ... }: mkTarget { - name = "plymouth"; - humanName = "the Plymouth boot screen"; - options = { logo = lib.mkOption { description = "Logo to be used on the boot screen."; diff --git a/modules/qutebrowser/hm.nix b/modules/qutebrowser/hm.nix index 4996a1f5..2a3aae27 100644 --- a/modules/qutebrowser/hm.nix +++ b/modules/qutebrowser/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "qutebrowser"; - humanName = "Qutebrowser"; - config = [ ( { fonts }: diff --git a/modules/regreet/nixos.nix b/modules/regreet/nixos.nix index 81f66933..234294b4 100644 --- a/modules/regreet/nixos.nix +++ b/modules/regreet/nixos.nix @@ -6,9 +6,6 @@ ... }: mkTarget { - name = "regreet"; - humanName = "ReGreet"; - autoEnable = pkgs.stdenv.hostPlatform.isLinux; autoEnableExpr = "pkgs.stdenv.hostPlatform.isLinux"; diff --git a/modules/rio/hm.nix b/modules/rio/hm.nix index e518670c..073cf4e1 100644 --- a/modules/rio/hm.nix +++ b/modules/rio/hm.nix @@ -2,9 +2,6 @@ # - https://raphamorim.io/rio/docs/config { mkTarget, ... }: mkTarget { - name = "rio"; - humanName = "Rio"; - config = [ ( { fonts }: diff --git a/modules/rofi/hm.nix b/modules/rofi/hm.nix index fbb8ce0c..7ccd1fdc 100644 --- a/modules/rofi/hm.nix +++ b/modules/rofi/hm.nix @@ -1,8 +1,5 @@ { mkTarget, config, ... }: mkTarget { - name = "rofi"; - humanName = "Rofi"; - config = [ ( { fonts }: diff --git a/modules/spicetify/spicetify.nix b/modules/spicetify/spicetify.nix index c1af818c..6c22479d 100644 --- a/modules/spicetify/spicetify.nix +++ b/modules/spicetify/spicetify.nix @@ -6,9 +6,6 @@ ... }: mkTarget { - name = "spicetify"; - humanName = "Spicetify"; - config = { colors }: lib.optionalAttrs (options.programs ? spicetify) { diff --git a/modules/spotify-player/hm.nix b/modules/spotify-player/hm.nix index a3745fe2..5d09be62 100644 --- a/modules/spotify-player/hm.nix +++ b/modules/spotify-player/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "spotify-player"; - humanName = "spotify-player"; - config = { colors }: { diff --git a/modules/starship/hm.nix b/modules/starship/hm.nix index 44aa23b9..ae832927 100644 --- a/modules/starship/hm.nix +++ b/modules/starship/hm.nix @@ -1,9 +1,6 @@ # Starship configuration documentation: https://starship.rs/config { mkTarget, ... }: mkTarget { - name = "starship"; - humanName = "Starship"; - config = { colors }: { diff --git a/modules/swaylock/hm.nix b/modules/swaylock/hm.nix index 0e2219e2..ee0e3570 100644 --- a/modules/swaylock/hm.nix +++ b/modules/swaylock/hm.nix @@ -6,9 +6,6 @@ ... }: mkTarget { - name = "swaylock"; - humanName = "Swaylock"; - # When the state version is older than 23.05, Swaylock enables itself # automatically if `settings != {}` [1]. Therefore, Swaylock theming # shouldn't be enabled by default for such state versions, to avoid diff --git a/modules/swaync/hm.nix b/modules/swaync/hm.nix index 1670e287..9a4395a6 100644 --- a/modules/swaync/hm.nix +++ b/modules/swaync/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "swaync"; - humanName = "SwayNC"; - config = [ ( { fonts }: diff --git a/modules/sxiv/hm.nix b/modules/sxiv/hm.nix index ddd40e9f..d40dc9d9 100644 --- a/modules/sxiv/hm.nix +++ b/modules/sxiv/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "sxiv"; - humanName = "Sxiv"; - config = [ ( { fonts }: diff --git a/modules/tmux/hm.nix b/modules/tmux/hm.nix index 6d3c8538..8aae5500 100644 --- a/modules/tmux/hm.nix +++ b/modules/tmux/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "tmux"; - humanName = "Tmux"; - config = { colors, inputs }: { diff --git a/modules/tofi/hm.nix b/modules/tofi/hm.nix index a9b43ab0..7fc5b1b5 100644 --- a/modules/tofi/hm.nix +++ b/modules/tofi/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "tofi"; - humanName = "Tofi"; - config = [ ( { fonts }: diff --git a/modules/vicinae/hm.nix b/modules/vicinae/hm.nix index 53dab221..baaa0ac0 100644 --- a/modules/vicinae/hm.nix +++ b/modules/vicinae/hm.nix @@ -5,9 +5,6 @@ ... }: mkTarget { - name = "vicinae"; - humanName = "Vicinae"; - config = lib.optionals (options.services ? vicinae) [ ( { colors, polarity }: diff --git a/modules/vivid/hm.nix b/modules/vivid/hm.nix index 66de1086..c9172957 100644 --- a/modules/vivid/hm.nix +++ b/modules/vivid/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "vivid"; - humanName = "vivid"; - config = { colors }: let diff --git a/modules/vscode/hm.nix b/modules/vscode/hm.nix index c4d7d72f..04a4a955 100644 --- a/modules/vscode/hm.nix +++ b/modules/vscode/hm.nix @@ -6,9 +6,6 @@ ... }: mkTarget { - name = "vscode"; - humanName = "VSCode"; - options.profileNames = lib.mkOption { description = "The VSCode profile names to apply styling on."; type = lib.types.listOf lib.types.str; diff --git a/modules/waybar/hm.nix b/modules/waybar/hm.nix index e0be29d2..4ad22dfa 100644 --- a/modules/waybar/hm.nix +++ b/modules/waybar/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "waybar"; - humanName = "Waybar"; - options = { background = lib.mkOption { type = lib.types.nullOr lib.types.str; diff --git a/modules/wayfire/hm.nix b/modules/wayfire/hm.nix index b3723ea3..d090e89d 100644 --- a/modules/wayfire/hm.nix +++ b/modules/wayfire/hm.nix @@ -6,9 +6,6 @@ ... }: mkTarget { - name = "wayfire"; - humanName = "Wayfire"; - options.useWallpaper = config.lib.stylix.mkEnableWallpaper "wayfire" true; config = [ diff --git a/modules/wayprompt/hm.nix b/modules/wayprompt/hm.nix index b88bc3f8..6f88c9cf 100644 --- a/modules/wayprompt/hm.nix +++ b/modules/wayprompt/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "wayprompt"; - humanName = "Wayprompt"; - config = { colors, opacity }: let diff --git a/modules/wezterm/hm.nix b/modules/wezterm/hm.nix index 92d08410..12d14f84 100644 --- a/modules/wezterm/hm.nix +++ b/modules/wezterm/hm.nix @@ -5,8 +5,6 @@ ... }: mkTarget { - name = "wezterm"; - humanName = "WezTerm"; options.luaBody = lib.mkOption { type = lib.types.lines; default = ""; diff --git a/modules/wob/hm.nix b/modules/wob/hm.nix index d7b5f29d..383affaf 100644 --- a/modules/wob/hm.nix +++ b/modules/wob/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "wob"; - humanName = "wob"; - config = { colors }: { diff --git a/modules/wofi/hm.nix b/modules/wofi/hm.nix index eb816d59..5bb41e1d 100644 --- a/modules/wofi/hm.nix +++ b/modules/wofi/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "wofi"; - humanName = "wofi"; - config = [ ( { fonts }: diff --git a/modules/wpaperd/hm.nix b/modules/wpaperd/hm.nix index 23fbefb9..35cd1e21 100644 --- a/modules/wpaperd/hm.nix +++ b/modules/wpaperd/hm.nix @@ -1,8 +1,5 @@ { mkTarget, lib, ... }: mkTarget { - name = "wpaperd"; - humanName = "wpaperd"; - config = { imageScalingMode, image }: ( diff --git a/modules/xfce/hm.nix b/modules/xfce/hm.nix index f258d7ea..01573694 100644 --- a/modules/xfce/hm.nix +++ b/modules/xfce/hm.nix @@ -1,7 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "xfce"; - humanName = "Xfce"; # Disabled by default due to https://github.com/nix-community/stylix/issues/180 autoEnable = false; diff --git a/modules/xresources/hm.nix b/modules/xresources/hm.nix index 826e1ce0..a9a5929b 100644 --- a/modules/xresources/hm.nix +++ b/modules/xresources/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "xresources"; - humanName = "Xresources"; - config = [ ( { fonts }: diff --git a/modules/yazi/hm.nix b/modules/yazi/hm.nix index c028b45f..b00eb4fb 100644 --- a/modules/yazi/hm.nix +++ b/modules/yazi/hm.nix @@ -1,9 +1,6 @@ # Based on the official catppuccin themes https://github.com/yazi-rs/themes { mkTarget, lib, ... }: mkTarget { - name = "yazi"; - humanName = "Yazi"; - options.boldDirectory = lib.mkOption { description = "Whether to use bold font for directories."; type = lib.types.bool; diff --git a/modules/zathura/hm.nix b/modules/zathura/hm.nix index 08c30af8..0feb61d7 100644 --- a/modules/zathura/hm.nix +++ b/modules/zathura/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "zathura"; - humanName = "Zathura"; - config = { colors, opacity }: { diff --git a/modules/zed/hm.nix b/modules/zed/hm.nix index 6e030866..b7300c1a 100644 --- a/modules/zed/hm.nix +++ b/modules/zed/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "zed"; - humanName = "zed"; - config = [ ( { fonts }: diff --git a/modules/zellij/hm.nix b/modules/zellij/hm.nix index bca443d9..2142b68d 100644 --- a/modules/zellij/hm.nix +++ b/modules/zellij/hm.nix @@ -1,8 +1,5 @@ { mkTarget, ... }: mkTarget { - name = "zellij"; - humanName = "zellij"; - config = { colors }: { diff --git a/modules/zen-browser/hm.nix b/modules/zen-browser/hm.nix index 44d97cce..cf2d1d76 100644 --- a/modules/zen-browser/hm.nix +++ b/modules/zen-browser/hm.nix @@ -6,9 +6,6 @@ ... }: mkTarget { - name = "zen-browser"; - humanName = "Zen Browser"; - options = { profileNames = lib.mkOption { description = "The Zen Browser profile names to apply styling on."; diff --git a/stylix/autoload.nix b/stylix/autoload.nix index 86babf57..3eeaf2f4 100644 --- a/stylix/autoload.nix +++ b/stylix/autoload.nix @@ -1,7 +1,10 @@ -{ lib }: +{ lib, pkgs }: # string -> [ path ] # List include path for either nixos modules or hm modules platform: +let + meta = import ./meta.nix { inherit lib pkgs; }; +in builtins.concatLists ( lib.mapAttrsToList ( target: kind: @@ -15,7 +18,10 @@ builtins.concatLists ( # NOTE: `mkTarget` cannot be distributed normally through the module system # due to issues of infinite recursion. - mkTarget = import ./mk-target.nix; + mkTarget = import ./mk-target.nix { + humanName = meta.${target}.name; + name = target; + }; in lib.optional (kind == "directory" && builtins.pathExists file) ( if useMkTarget then diff --git a/stylix/darwin/default.nix b/stylix/darwin/default.nix index bafe2bda..7e61dd00 100644 --- a/stylix/darwin/default.nix +++ b/stylix/darwin/default.nix @@ -1,6 +1,11 @@ -{ lib, config, ... }: +{ + lib, + pkgs, + config, + ... +}: let - autoload = import ../autoload.nix { inherit lib; } "darwin"; + autoload = import ../autoload.nix { inherit lib pkgs; } "darwin"; in { imports = [ diff --git a/stylix/droid/default.nix b/stylix/droid/default.nix index e23d7cfe..0394fc14 100644 --- a/stylix/droid/default.nix +++ b/stylix/droid/default.nix @@ -1,6 +1,6 @@ -{ lib, ... }: +{ lib, pkgs, ... }: let - autoload = import ../autoload.nix { inherit lib; } "droid"; + autoload = import ../autoload.nix { inherit lib pkgs; } "droid"; in { imports = [ diff --git a/stylix/hm/default.nix b/stylix/hm/default.nix index 8c533047..7aacf5a1 100644 --- a/stylix/hm/default.nix +++ b/stylix/hm/default.nix @@ -1,6 +1,11 @@ -{ lib, config, ... }: +{ + lib, + pkgs, + config, + ... +}: let - autoload = import ../autoload.nix { inherit lib; } "hm"; + autoload = import ../autoload.nix { inherit lib pkgs; } "hm"; in { imports = [ diff --git a/stylix/mk-target.nix b/stylix/mk-target.nix index f987c3d9..e5cf805f 100644 --- a/stylix/mk-target.nix +++ b/stylix/mk-target.nix @@ -19,9 +19,6 @@ ```nix { mkTarget, lib... }: mkTarget { - name = "«name»"; - humanName = "«human readable name»"; - unconditionalConfig = lib.mkIf complexCondition { home.packages = [ pkgs.hello ]; @@ -51,15 +48,7 @@ `config` (Attribute set) - : `name` (String) - : The target name used to generate options in the `stylix.targets.${name}` - namespace. - - `humanName` (String) - : The descriptive target name passed to the lib.mkEnableOption function - when generating the `stylix.targets.${name}.enable` option. - - `autoEnable` (Boolean) + : `autoEnable` (Boolean) : Whether the target should be automatically enabled by default according to the `stylix.autoEnable` option. @@ -115,6 +104,10 @@ automatically by `mkEnableTargetWith` and depends on `autoEnable` and whether an `autoEnableExpr` is used. + `humanName` (String) + : The descriptive target name passed to the lib.mkEnableOption function + when generating the `stylix.targets.${name}.enable` option. +   `imports` (List)   : The `imports` option forwarded to the Nixpkgs module system. @@ -128,6 +121,10 @@ { extension.enable = lib.mkEnableOption "the bloated dependency"; } ``` + `name` (String) + : The target name used to generate options in the `stylix.targets.${name}` + namespace. + `unconditionalConfig` (Attribute set or function or path) : This argument mirrors the `config` argument but intentionally lacks automatic safeguarding and should only be used for complex configurations @@ -146,9 +143,6 @@ # of modules: # # { -# name = "example"; -# humanName = "Example Target"; -# # unconditionalConfig = # { lib, pkgs }: # lib.mkIf complexCondition { @@ -173,15 +167,20 @@ # ) # ]; # } +{ humanName, name }: +let + humanName' = humanName; + name' = name; +in { - name, - humanName, autoEnable ? null, autoEnableExpr ? null, autoWrapEnableExpr ? null, config ? [ ], enableExample ? null, + humanName ? humanName', imports ? [ ], + name ? name', options ? { }, unconditionalConfig ? { }, }@args: diff --git a/stylix/nixos/default.nix b/stylix/nixos/default.nix index 431383f8..beced139 100644 --- a/stylix/nixos/default.nix +++ b/stylix/nixos/default.nix @@ -1,6 +1,11 @@ -{ lib, config, ... }: +{ + lib, + pkgs, + config, + ... +}: let - autoload = import ../autoload.nix { inherit lib; } "nixos"; + autoload = import ../autoload.nix { inherit lib pkgs; } "nixos"; in { imports = [ diff --git a/stylix/overlays.nix b/stylix/overlays.nix index 0d8f76e3..a6fdc6ea 100644 --- a/stylix/overlays.nix +++ b/stylix/overlays.nix @@ -32,5 +32,5 @@ attrs.overlay ]; } - ) (import ./autoload.nix { inherit lib; } "overlay"); + ) (import ./autoload.nix { inherit lib pkgs; } "overlay"); }