From 9bf8725a3d65b3ff0ba68ce13779657f5095e36b Mon Sep 17 00:00:00 2001 From: Kilian Mio <86004375+Mikilio@users.noreply.github.com> Date: Wed, 26 Nov 2025 20:30:40 +0100 Subject: [PATCH 01/40] regreet: explicitly apply GTK theme (#1964) Explicitly apply the GTK theme, as global GTK theming is scoped to individual derivations. Closes: https://github.com/nix-community/stylix/issues/690 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> (cherry picked from commit 687a8c1bf20124c66580679e3c87fe35eb7365b9) --- modules/regreet/gtk.css.mustache | 88 ++++++++++++++++++++++++++++ modules/regreet/nixos.nix | 39 +++++++++++- modules/regreet/testbeds/regreet.nix | 1 + 3 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 modules/regreet/gtk.css.mustache create mode 100644 modules/regreet/testbeds/regreet.nix diff --git a/modules/regreet/gtk.css.mustache b/modules/regreet/gtk.css.mustache new file mode 100644 index 00000000..3b2e9224 --- /dev/null +++ b/modules/regreet/gtk.css.mustache @@ -0,0 +1,88 @@ +@define-color accent_color #{{base0D-hex}}; +@define-color accent_bg_color #{{base0D-hex}}; +@define-color accent_fg_color #{{base00-hex}}; +@define-color destructive_color #{{base08-hex}}; +@define-color destructive_bg_color #{{base08-hex}}; +@define-color destructive_fg_color #{{base00-hex}}; +@define-color success_color #{{base0B-hex}}; +@define-color success_bg_color #{{base0B-hex}}; +@define-color success_fg_color #{{base00-hex}}; +@define-color warning_color #{{base0E-hex}}; +@define-color warning_bg_color #{{base0E-hex}}; +@define-color warning_fg_color #{{base00-hex}}; +@define-color error_color #{{base08-hex}}; +@define-color error_bg_color #{{base08-hex}}; +@define-color error_fg_color #{{base00-hex}}; +@define-color window_bg_color #{{base00-hex}}; +@define-color window_fg_color #{{base05-hex}}; +@define-color view_bg_color #{{base00-hex}}; +@define-color view_fg_color #{{base05-hex}}; +@define-color headerbar_bg_color #{{base01-hex}}; +@define-color headerbar_fg_color #{{base05-hex}}; +@define-color headerbar_border_color rgba({{base01-dec-r}}, {{base01-dec-g}}, {{base01-dec-b}}, 0.7); +@define-color headerbar_backdrop_color @window_bg_color; +@define-color headerbar_shade_color rgba(0, 0, 0, 0.07); +@define-color headerbar_darker_shade_color rgba(0, 0, 0, 0.07); +@define-color sidebar_bg_color #{{base01-hex}}; +@define-color sidebar_fg_color #{{base05-hex}}; +@define-color sidebar_backdrop_color @window_bg_color; +@define-color sidebar_shade_color rgba(0, 0, 0, 0.07); +@define-color secondary_sidebar_bg_color @sidebar_bg_color; +@define-color secondary_sidebar_fg_color @sidebar_fg_color; +@define-color secondary_sidebar_backdrop_color @sidebar_backdrop_color; +@define-color secondary_sidebar_shade_color @sidebar_shade_color; +@define-color card_bg_color #{{base01-hex}}; +@define-color card_fg_color #{{base05-hex}}; +@define-color card_shade_color rgba(0, 0, 0, 0.07); +@define-color dialog_bg_color #{{base01-hex}}; +@define-color dialog_fg_color #{{base05-hex}}; +@define-color popover_bg_color #{{base01-hex}}; +@define-color popover_fg_color #{{base05-hex}}; +@define-color popover_shade_color rgba(0, 0, 0, 0.07); +@define-color shade_color rgba(0, 0, 0, 0.07); +@define-color scrollbar_outline_color #{{base02-hex}}; +@define-color blue_1 #{{base0D-hex}}; +@define-color blue_2 #{{base0D-hex}}; +@define-color blue_3 #{{base0D-hex}}; +@define-color blue_4 #{{base0D-hex}}; +@define-color blue_5 #{{base0D-hex}}; +@define-color green_1 #{{base0B-hex}}; +@define-color green_2 #{{base0B-hex}}; +@define-color green_3 #{{base0B-hex}}; +@define-color green_4 #{{base0B-hex}}; +@define-color green_5 #{{base0B-hex}}; +@define-color yellow_1 #{{base0A-hex}}; +@define-color yellow_2 #{{base0A-hex}}; +@define-color yellow_3 #{{base0A-hex}}; +@define-color yellow_4 #{{base0A-hex}}; +@define-color yellow_5 #{{base0A-hex}}; +@define-color orange_1 #{{base09-hex}}; +@define-color orange_2 #{{base09-hex}}; +@define-color orange_3 #{{base09-hex}}; +@define-color orange_4 #{{base09-hex}}; +@define-color orange_5 #{{base09-hex}}; +@define-color red_1 #{{base08-hex}}; +@define-color red_2 #{{base08-hex}}; +@define-color red_3 #{{base08-hex}}; +@define-color red_4 #{{base08-hex}}; +@define-color red_5 #{{base08-hex}}; +@define-color purple_1 #{{base0E-hex}}; +@define-color purple_2 #{{base0E-hex}}; +@define-color purple_3 #{{base0E-hex}}; +@define-color purple_4 #{{base0E-hex}}; +@define-color purple_5 #{{base0E-hex}}; +@define-color brown_1 #{{base0F-hex}}; +@define-color brown_2 #{{base0F-hex}}; +@define-color brown_3 #{{base0F-hex}}; +@define-color brown_4 #{{base0F-hex}}; +@define-color brown_5 #{{base0F-hex}}; +@define-color light_1 #{{base05-hex}}; +@define-color light_2 #{{base05-hex}}; +@define-color light_3 #{{base05-hex}}; +@define-color light_4 #{{base05-hex}}; +@define-color light_5 #{{base05-hex}}; +@define-color dark_1 #{{base05-hex}}; +@define-color dark_2 #{{base05-hex}}; +@define-color dark_3 #{{base05-hex}}; +@define-color dark_4 #{{base05-hex}}; +@define-color dark_5 #{{base05-hex}}; diff --git a/modules/regreet/nixos.nix b/modules/regreet/nixos.nix index fc85a757..54ba913a 100644 --- a/modules/regreet/nixos.nix +++ b/modules/regreet/nixos.nix @@ -12,7 +12,17 @@ mkTarget { autoEnable = pkgs.stdenv.hostPlatform.isLinux; autoEnableExpr = "pkgs.stdenv.hostPlatform.isLinux"; - extraOptions.useWallpaper = config.lib.stylix.mkEnableWallpaper "ReGreet" true; + extraOptions = { + useWallpaper = config.lib.stylix.mkEnableWallpaper "ReGreet" true; + extraCss = lib.mkOption { + description = '' + Extra code added to `programs.regreet.extraCss` option. + ''; + type = lib.types.lines; + default = ""; + example = "window.background { border-radius: 0; }"; + }; + }; configElements = [ { @@ -34,6 +44,24 @@ mkTarget { name = "adw-gtk3"; }; } + ( + { cfg, colors }: + let + baseCss = colors { + # This is strongly inspired by ../gtk/gtk.mustache. + template = ./gtk.css.mustache; + extension = ".css"; + }; + + finalCss = pkgs.runCommandLocal "gtk.css" { } '' + cat ${baseCss} >>$out + echo ${lib.escapeShellArg cfg.extraCss} >>$out + ''; + in + { + programs.regreet.extraCss = finalCss.outPath; + } + ) ( { polarity }: { @@ -79,5 +107,14 @@ mkTarget { }; } ) + ( + { polarity, icons }: + { + programs.regreet.iconTheme = { + inherit (icons) package; + name = if (polarity == "dark") then icons.dark else icons.light; + }; + } + ) ]; } diff --git a/modules/regreet/testbeds/regreet.nix b/modules/regreet/testbeds/regreet.nix new file mode 100644 index 00000000..a4ec92ae --- /dev/null +++ b/modules/regreet/testbeds/regreet.nix @@ -0,0 +1 @@ +{ programs.regreet.enable = true; } From 1fdde45cb0d30936839a630b98660e1579603951 Mon Sep 17 00:00:00 2001 From: 0xda157 Date: Wed, 26 Nov 2025 11:16:50 -1000 Subject: [PATCH 02/40] ci: update dependencies on 25.11 branch (#2027) Link: https://github.com/nix-community/stylix/pull/2027 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> (cherry picked from commit 70c444a10d0c9ef71a25580dfa79af9cd43f3a5e) --- .github/dependabot.yml | 5 ++++- .github/workflows/update-flake.yml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 098d7bac..aa7c1742 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,6 +7,9 @@ updates: target-branch: "master" schedule: interval: daily - labels: ["topic: dependencies", "backport: release-25.05"] + labels: + - "topic: dependencies" + - "backport: release-25.05" + - "backport: release-25.11" commit-message: prefix: "ci" diff --git a/.github/workflows/update-flake.yml b/.github/workflows/update-flake.yml index 5b447f73..f84a3871 100644 --- a/.github/workflows/update-flake.yml +++ b/.github/workflows/update-flake.yml @@ -16,7 +16,7 @@ jobs: if: vars.APP_ID strategy: matrix: - branch: [master, release-25.05] + branch: [master, release-25.11, release-25.05] steps: - id: generate-token uses: actions/create-github-app-token@v2 From c9760a6a2ba532e6d0dcae804b7cb62ec7198f70 Mon Sep 17 00:00:00 2001 From: chillcicada <116548943+chillcicada@users.noreply.github.com> Date: Mon, 1 Dec 2025 01:11:06 +0800 Subject: [PATCH 03/40] gdu: properly rename module and option names (#2044) Fixes: b9b050183938 ("gdu: init (#1995)") Link: https://github.com/nix-community/stylix/pull/2044 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com> (cherry picked from commit 961e2f02afd47d78a86143c823df426e6fc77f46) --- modules/gdu/hm.nix | 2 +- modules/gdu/meta.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gdu/hm.nix b/modules/gdu/hm.nix index 48910178..dc6a637c 100644 --- a/modules/gdu/hm.nix +++ b/modules/gdu/hm.nix @@ -3,7 +3,7 @@ ... }: mkTarget { - name = "go DiskUsage()"; + name = "gdu"; humanName = "go DiskUsage()"; configElements = diff --git a/modules/gdu/meta.nix b/modules/gdu/meta.nix index 0b9140b7..071250e8 100644 --- a/modules/gdu/meta.nix +++ b/modules/gdu/meta.nix @@ -1,6 +1,6 @@ { lib, ... }: { - name = "gdu"; + name = "go DiskUsage()"; homepage = "https://github.com/dundee/gdu"; maintainers = [ lib.maintainers.omega-800 ]; } From 6d5708ee0c229eaaadf502a1198feaeb23280843 Mon Sep 17 00:00:00 2001 From: 0xda157 Date: Tue, 2 Dec 2025 06:40:02 -1000 Subject: [PATCH 04/40] flake: use 25.11 branch of dependencies (#2026) Link: https://github.com/nix-community/stylix/pull/2026 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> --- .editorconfig | 2 +- flake.lock | 8 ++++---- flake.nix | 2 +- flake/dev/flake.lock | 22 ++++++++++++---------- flake/dev/flake.nix | 6 +++--- 5 files changed, 21 insertions(+), 19 deletions(-) diff --git a/.editorconfig b/.editorconfig index cef70f21..e814d0f4 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,7 +6,7 @@ end_of_line = lf indent_style = space insert_final_newline = true trim_trailing_whitespace = true -charset = utf-8 +charset = unset [*.{diff,patch}] end_of_line = unset diff --git a/flake.lock b/flake.lock index 09eba77b..c6c5b041 100644 --- a/flake.lock +++ b/flake.lock @@ -141,16 +141,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1762977756, - "narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=", + "lastModified": 1764020296, + "narHash": "sha256-6zddwDs2n+n01l+1TG6PlyokDdXzu/oBmEejcH5L5+A=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c5ae371f1a6a7fd27823bc500d9390b38c05fa55", + "rev": "a320ce8e6e2cc6b4397eef214d202a50a4583829", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixos-25.11", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 9a0502da..0cb6d797 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Theming framework for NixOS, Home Manager, nix-darwin, and Nix-on-Droid"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; flake-parts = { url = "github:hercules-ci/flake-parts"; diff --git a/flake/dev/flake.lock b/flake/dev/flake.lock index d839b015..056445fc 100644 --- a/flake/dev/flake.lock +++ b/flake/dev/flake.lock @@ -22,16 +22,16 @@ }, "dev-nixpkgs": { "locked": { - "lastModified": 1762977756, - "narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=", + "lastModified": 1764020296, + "narHash": "sha256-6zddwDs2n+n01l+1TG6PlyokDdXzu/oBmEejcH5L5+A=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c5ae371f1a6a7fd27823bc500d9390b38c05fa55", + "rev": "a320ce8e6e2cc6b4397eef214d202a50a4583829", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixos-25.11", "repo": "nixpkgs", "type": "github" } @@ -117,15 +117,16 @@ ] }, "locked": { - "lastModified": 1760809591, - "narHash": "sha256-OxGcFcQdfOK8veZkPdQuqXIotFYiy4sBQB58dMNLeHY=", + "lastModified": 1764398914, + "narHash": "sha256-YPrpwlVQidzQlMh0OnquaJR+58rKe9YNnuRis293Ilo=", "owner": "nix-community", "repo": "home-manager", - "rev": "870883ba11ba1c84f756c0c1f9fa74cdb2a16c1e", + "rev": "d0c5fdc48db6f19471b8adc954eca09194e68036", "type": "github" }, "original": { "owner": "nix-community", + "ref": "release-25.11", "repo": "home-manager", "type": "github" } @@ -159,15 +160,16 @@ ] }, "locked": { - "lastModified": 1763393971, - "narHash": "sha256-FhgZD8pk3VE2SL0g4nCYKF0L6IO3uL110tfrBaZkdG0=", + "lastModified": 1764437343, + "narHash": "sha256-JK/vMdb71WIV9JtQXBCifs023EXL/chRT6CCct8iFaI=", "owner": "nix-community", "repo": "nixvim", - "rev": "7a30e6cf259d8db84aefc626058c074bd995d482", + "rev": "b09935ccf19e7d2f2bacf7ee056391c243b5f5ee", "type": "github" }, "original": { "owner": "nix-community", + "ref": "nixos-25.11", "repo": "nixvim", "type": "github" } diff --git a/flake/dev/flake.nix b/flake/dev/flake.nix index 1f0143a0..f078e3fa 100644 --- a/flake/dev/flake.nix +++ b/flake/dev/flake.nix @@ -120,7 +120,7 @@ # # [1]: https://github.com/NixOS/nix/blob/d4f67fd46dfe2bc950bdfa14273f87b8a4c32e47/doc/manual/source/release-notes/rl-2.26.md?plain=1#L3-L11 inputs = { - dev-nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + dev-nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; dev-flake-parts = { url = "github:hercules-ci/flake-parts"; @@ -142,12 +142,12 @@ }; home-manager = { - url = "github:nix-community/home-manager"; + url = "github:nix-community/home-manager/release-25.11"; inputs.nixpkgs.follows = "dev-nixpkgs"; }; nixvim = { - url = "github:nix-community/nixvim"; + url = "github:nix-community/nixvim/nixos-25.11"; inputs = { flake-parts.follows = "dev-flake-parts"; nixpkgs.follows = "dev-nixpkgs"; From a1e741dbce6e846129777c2a017e1354bc87b92b Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Tue, 2 Dec 2025 05:14:00 +0100 Subject: [PATCH 05/40] stylix/testbed/modules/application: add notification progress bar (#2021) Link: https://github.com/nix-community/stylix/pull/2021 Reviewed-by: 0xda157 (cherry picked from commit 71054adbc3629404b2f02e8385aec07f87980a2f) --- stylix/testbed/modules/application.nix | 42 ++++++++++++++++++++------ 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/stylix/testbed/modules/application.nix b/stylix/testbed/modules/application.nix index bab7e5eb..6d891bce 100644 --- a/stylix/testbed/modules/application.nix +++ b/stylix/testbed/modules/application.nix @@ -119,17 +119,39 @@ in name = "stylix-notification-check"; desktopName = "stylix-notification-check"; terminal = false; - exec = pkgs.writeShellScript "stylix-send-notifications" ( - lib.concatMapStringsSep " && " - ( - urgency: "${lib.getExe pkgs.libnotify} --urgency ${urgency} ${urgency} urgency" - ) + exec = + lib.pipe + { + name = "stylix-send-notifications"; + runtimeInputs = [ pkgs.libnotify ]; + + text = '' + for percent in {0..100}; do + ${lib.concatMapStrings + (urgency: '' + notify-send \ + --hint="int:value:$percent" \ + --hint=string:x-dunst-stack-tag:${urgency} \ + --urgency ${urgency} \ + ${urgency} \ + urgency \ + & + '') + [ + "low" + "normal" + "critical" + ] + } + + wait + done + ''; + } [ - "low" - "normal" - "critical" - ] - ); + pkgs.writeShellApplication + lib.getExe + ]; }; } ) From 228616717d4502f334d40d18441e79d686fcc349 Mon Sep 17 00:00:00 2001 From: 0xda157 Date: Tue, 2 Dec 2025 14:33:23 -1000 Subject: [PATCH 06/40] doc: recommend 25.11 as stable branch (#2025) Link: https://github.com/nix-community/stylix/pull/2025 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> (cherry picked from commit ddc49fd564a599474d6587df25553cbfd7325ece) --- doc/src/installation.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/src/installation.md b/doc/src/installation.md index 88768647..d86b9171 100644 --- a/doc/src/installation.md +++ b/doc/src/installation.md @@ -36,8 +36,8 @@ Stylix release. For example: ```nix { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; - stylix.url = "github:nix-community/stylix/release-25.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; + stylix.url = "github:nix-community/stylix/release-25.11"; } ``` @@ -190,9 +190,9 @@ matching Stylix release. For example: ```nix { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; - home-manager.url = "github:nix-community/home-manager/release-25.05"; - stylix.url = "github:nix-community/stylix/release-25.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; + home-manager.url = "github:nix-community/home-manager/release-25.11"; + stylix.url = "github:nix-community/stylix/release-25.11"; } ``` From cfde343ff369c8aa898f263ed3dad8c5eb095491 Mon Sep 17 00:00:00 2001 From: "stylix-automation[bot]" <190860676+stylix-automation[bot]@users.noreply.github.com> Date: Wed, 3 Dec 2025 22:04:11 +0100 Subject: [PATCH 07/40] flake: update all inputs (#2034) Link: https://github.com/nix-community/stylix/pull/2034 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> --- flake.lock | 54 +++++++++++----------- flake/dev/flake.lock | 105 +++++++++++++++++++++---------------------- 2 files changed, 77 insertions(+), 82 deletions(-) diff --git a/flake.lock b/flake.lock index c6c5b041..7a8aaf94 100644 --- a/flake.lock +++ b/flake.lock @@ -38,11 +38,11 @@ "base16-helix": { "flake": false, "locked": { - "lastModified": 1752979451, - "narHash": "sha256-0CQM+FkYy0fOO/sMGhOoNL80ftsAzYCg9VhIrodqusM=", + "lastModified": 1760703920, + "narHash": "sha256-m82fGUYns4uHd+ZTdoLX2vlHikzwzdu2s2rYM2bNwzw=", "owner": "tinted-theming", "repo": "base16-helix", - "rev": "27cf1e66e50abc622fb76a3019012dc07c678fac", + "rev": "d646af9b7d14bff08824538164af99d0c521b185", "type": "github" }, "original": { @@ -71,11 +71,11 @@ "firefox-gnome-theme": { "flake": false, "locked": { - "lastModified": 1758112371, - "narHash": "sha256-lizRM2pj6PHrR25yimjyFn04OS4wcdbc38DCdBVa2rk=", + "lastModified": 1764724327, + "narHash": "sha256-OkFLrD3pFR952TrjQi1+Vdj604KLcMnkpa7lkW7XskI=", "owner": "rafaelmardojai", "repo": "firefox-gnome-theme", - "rev": "0909cfe4a2af8d358ad13b20246a350e14c2473d", + "rev": "66b7c635763d8e6eb86bd766de5a1e1fbfcc1047", "type": "github" }, "original": { @@ -91,11 +91,11 @@ ] }, "locked": { - "lastModified": 1756770412, - "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", + "lastModified": 1763759067, + "narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "4524271976b625a4a605beefd893f270620fd751", + "rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0", "type": "github" }, "original": { @@ -124,11 +124,11 @@ "flake": false, "locked": { "host": "gitlab.gnome.org", - "lastModified": 1762869044, - "narHash": "sha256-nwm/GJ2Syigf7VccLAZ66mFC8mZJFqpJmIxSGKl7+Ds=", + "lastModified": 1764524476, + "narHash": "sha256-bTmNn3Q4tMQ0J/P0O5BfTQwqEnCiQIzOGef9/aqAZvk=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "680e3d195a92203f28d4bf8c6e8bb537cc3ed4ad", + "rev": "c0e1ad9f0f703fd0519033b8f46c3267aab51a22", "type": "gitlab" }, "original": { @@ -141,11 +141,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1764020296, - "narHash": "sha256-6zddwDs2n+n01l+1TG6PlyokDdXzu/oBmEejcH5L5+A=", + "lastModified": 1764522689, + "narHash": "sha256-SqUuBFjhl/kpDiVaKLQBoD8TLD+/cTUzzgVFoaHrkqY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a320ce8e6e2cc6b4397eef214d202a50a4583829", + "rev": "8bb5646e0bed5dbd3ab08c7a7cc15b75ab4e1d0f", "type": "github" }, "original": { @@ -165,11 +165,11 @@ ] }, "locked": { - "lastModified": 1758998580, - "narHash": "sha256-VLx0z396gDCGSiowLMFz5XRO/XuNV+4EnDYjdJhHvUk=", + "lastModified": 1764773531, + "narHash": "sha256-mCBl7MD1WZ7yCG6bR9MmpPO2VydpNkWFgnslJRIT1YU=", "owner": "nix-community", "repo": "NUR", - "rev": "ba8d9c98f5f4630bcb0e815ab456afd90c930728", + "rev": "1d9616689e98beded059ad0384b9951e967a17fa", "type": "github" }, "original": { @@ -248,11 +248,11 @@ "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1757716333, - "narHash": "sha256-d4km8W7w2zCUEmPAPUoLk1NlYrGODuVa3P7St+UrqkM=", + "lastModified": 1763914658, + "narHash": "sha256-Hju0WtMf3iForxtOwXqGp3Ynipo0EYx1AqMKLPp9BJw=", "owner": "tinted-theming", "repo": "schemes", - "rev": "317a5e10c35825a6c905d912e480dfe8e71c7559", + "rev": "0f6be815d258e435c9b137befe5ef4ff24bea32c", "type": "github" }, "original": { @@ -264,11 +264,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1757811970, - "narHash": "sha256-n5ZJgmzGZXOD9pZdAl1OnBu3PIqD+X3vEBUGbTi4JiI=", + "lastModified": 1764465359, + "narHash": "sha256-lbSVPqLEk2SqMrnpvWuKYGCaAlfWFMA6MVmcOFJjdjE=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "d217ba31c846006e9e0ae70775b0ee0f00aa6b1e", + "rev": "edf89a780e239263cc691a987721f786ddc4f6aa", "type": "github" }, "original": { @@ -280,11 +280,11 @@ "tinted-zed": { "flake": false, "locked": { - "lastModified": 1757811247, - "narHash": "sha256-4EFOUyLj85NRL3OacHoLGEo0wjiRJzfsXtR4CZWAn6w=", + "lastModified": 1764464512, + "narHash": "sha256-rCD/pAhkMdCx6blsFwxIyvBJbPZZ1oL2sVFrH07lmqg=", "owner": "tinted-theming", "repo": "base16-zed", - "rev": "824fe0aacf82b3c26690d14e8d2cedd56e18404e", + "rev": "907dbba5fb8cf69ebfd90b00813418a412d0a29a", "type": "github" }, "original": { diff --git a/flake/dev/flake.lock b/flake/dev/flake.lock index 056445fc..1e18a04e 100644 --- a/flake/dev/flake.lock +++ b/flake/dev/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1756770412, - "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", + "lastModified": 1763759067, + "narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "4524271976b625a4a605beefd893f270620fd751", + "rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "dev-nixpkgs": { "locked": { - "lastModified": 1764020296, - "narHash": "sha256-6zddwDs2n+n01l+1TG6PlyokDdXzu/oBmEejcH5L5+A=", + "lastModified": 1764522689, + "narHash": "sha256-SqUuBFjhl/kpDiVaKLQBoD8TLD+/cTUzzgVFoaHrkqY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a320ce8e6e2cc6b4397eef214d202a50a4583829", + "rev": "8bb5646e0bed5dbd3ab08c7a7cc15b75ab4e1d0f", "type": "github" }, "original": { @@ -53,11 +53,11 @@ }, "flake-compat": { "locked": { - "lastModified": 1761588595, - "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", + "lastModified": 1764712249, + "narHash": "sha256-DhsrZsMebdvpjZC2EzPsqiLGI84tD7kZz7zc6tTCmqg=", "owner": "NixOS", "repo": "flake-compat", - "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", + "rev": "3b279e4317ccfa4865356387935310531357d919", "type": "github" }, "original": { @@ -66,26 +66,6 @@ "type": "github" } }, - "flake-utils": { - "inputs": { - "systems": [ - "dev-systems" - ] - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "git-hooks": { "inputs": { "flake-compat": [ @@ -97,11 +77,11 @@ ] }, "locked": { - "lastModified": 1758108966, - "narHash": "sha256-ytw7ROXaWZ7OfwHrQ9xvjpUWeGVm86pwnEd1QhzawIo=", + "lastModified": 1763988335, + "narHash": "sha256-QlcnByMc8KBjpU37rbq5iP7Cp97HvjRP0ucfdh+M4Qc=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b", + "rev": "50b9238891e388c9fdc6a5c49e49c42533a1b5ce", "type": "github" }, "original": { @@ -117,11 +97,11 @@ ] }, "locked": { - "lastModified": 1764398914, - "narHash": "sha256-YPrpwlVQidzQlMh0OnquaJR+58rKe9YNnuRis293Ilo=", + "lastModified": 1764736872, + "narHash": "sha256-4mqLegNQeD54X7enm6EI9aNWl6CaIfyhl5PaYoGYwqk=", "owner": "nix-community", "repo": "home-manager", - "rev": "d0c5fdc48db6f19471b8adc954eca09194e68036", + "rev": "3366918730bb6b699395a9d237397f1d710a94b3", "type": "github" }, "original": { @@ -133,11 +113,11 @@ }, "mnw": { "locked": { - "lastModified": 1756659871, - "narHash": "sha256-v6Rh4aQ6RKjM2N02kK9Usn0Ix7+OY66vNpeklc1MnGE=", + "lastModified": 1758834834, + "narHash": "sha256-Y7IvY4F8vajZyp3WGf+KaiIVwondEkMFkt92Cr9NZmg=", "owner": "Gerg-L", "repo": "mnw", - "rev": "ed6cc3e48557ba18266e598a5ebb6602499ada16", + "rev": "cfbc7d1cc832e318d0863a5fc91d940a96034001", "type": "github" }, "original": { @@ -160,11 +140,11 @@ ] }, "locked": { - "lastModified": 1764437343, - "narHash": "sha256-JK/vMdb71WIV9JtQXBCifs023EXL/chRT6CCct8iFaI=", + "lastModified": 1764755396, + "narHash": "sha256-f6UrlGdwg+TIxxyDjeq1M7WGNZH/vpbOm0yzPgkMy9c=", "owner": "nix-community", "repo": "nixvim", - "rev": "b09935ccf19e7d2f2bacf7ee056391c243b5f5ee", + "rev": "64d9e2616f4ee2acee380d61ccf1f3d610e7e969", "type": "github" }, "original": { @@ -189,11 +169,11 @@ ] }, "locked": { - "lastModified": 1758271661, - "narHash": "sha256-ENqd2/33uP5vB44ClDjjAV+J78oF8q1er4QUZuT8Z7g=", + "lastModified": 1762622004, + "narHash": "sha256-NpzzgaoMK8aRHnndHWbYNKLcZN0r1y6icCoJvGoBsoE=", "owner": "NotAShelf", "repo": "nvf", - "rev": "b7571df4d6e9ac08506a738ddceeec0b141751b0", + "rev": "09470524a214ed26633ddc2b6ec0c9bf31a8b909", "type": "github" }, "original": { @@ -228,11 +208,11 @@ ] }, "locked": { - "lastModified": 1758584568, - "narHash": "sha256-FDxTheW6ynpbro/8eTZHhAY7J+HOf0jXeXq3jrJDcS8=", + "lastModified": 1764698597, + "narHash": "sha256-4f0y9Fo3AChngd/qRQ7wbcy6FH33NFZbyFXn7IeUI14=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "9e9e48ca16628bf09a02bc5449d4b0761e15eebd", + "rev": "1da6ebbbcf0301ff773e9c43bdd4c051af9523f7", "type": "github" }, "original": { @@ -241,6 +221,21 @@ "type": "github" } }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -263,17 +258,17 @@ }, "vicinae": { "inputs": { - "flake-utils": "flake-utils", "nixpkgs": [ "dev-nixpkgs" - ] + ], + "systems": "systems" }, "locked": { - "lastModified": 1763505293, - "narHash": "sha256-huleUPkt0iZJZy4e/KPhcHK4ueeqaqiMUu7Ft6NVDFU=", + "lastModified": 1764768018, + "narHash": "sha256-wgQUCbnfUPBWvhMnFUcwABH4qmNE8cxjFc+40u4ReB4=", "owner": "vicinaehq", "repo": "vicinae", - "rev": "e600ffc4ad1e87f3389327adfab8bb8d2f34261e", + "rev": "c5648e0a0727dd99ff2e2e18c683474881987641", "type": "github" }, "original": { @@ -292,11 +287,11 @@ ] }, "locked": { - "lastModified": 1759033338, - "narHash": "sha256-03GJ6F5jXuxEgazHE2A3WB/kEyHO/rF1VPA9qYodq0E=", + "lastModified": 1764736168, + "narHash": "sha256-CQcj/oWKH4zN8Xkc1RglX+uOJTW1fwNWvMQWRXRlEys=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "9f3b1a6f32771e47d1bab71fa38f4d74873540b3", + "rev": "df63ce4f706567e6efa083ba63d5e7792bf70ffa", "type": "github" }, "original": { From 6f3b50c8fa9c468fc787e211b700e46592bf9d56 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Wed, 3 Dec 2025 22:41:39 +0100 Subject: [PATCH 08/40] flake/dev/flake: override vicinae's system input (#2057) Link: https://github.com/nix-community/stylix/pull/2057 Reviewed-by: 0xda157 (cherry picked from commit 4b9e0e7ba3cccb86fe2bf0f4a2dd18256bef1cc6) --- flake/dev/flake.lock | 19 +++---------------- flake/dev/flake.nix | 2 +- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/flake/dev/flake.lock b/flake/dev/flake.lock index 1e18a04e..3149844f 100644 --- a/flake/dev/flake.lock +++ b/flake/dev/flake.lock @@ -221,21 +221,6 @@ "type": "github" } }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -261,7 +246,9 @@ "nixpkgs": [ "dev-nixpkgs" ], - "systems": "systems" + "systems": [ + "dev-systems" + ] }, "locked": { "lastModified": 1764768018, diff --git a/flake/dev/flake.nix b/flake/dev/flake.nix index f078e3fa..555182df 100644 --- a/flake/dev/flake.nix +++ b/flake/dev/flake.nix @@ -183,7 +183,7 @@ url = "github:vicinaehq/vicinae"; inputs = { nixpkgs.follows = "dev-nixpkgs"; - flake-utils.inputs.systems.follows = "dev-systems"; + systems.follows = "dev-systems"; }; }; From 62a3fa671e01ce325d4a745626c9844a8eb5b2db Mon Sep 17 00:00:00 2001 From: Louis Dalibard Date: Fri, 5 Dec 2025 20:04:53 +0100 Subject: [PATCH 09/40] fcitx5: conform to stylix styling guidelines (#2063) Link: https://github.com/nix-community/stylix/pull/2063 Closes: https://github.com/nix-community/stylix/issues/2062 (cherry picked from commit 46440f1bc877c467f2d31c5a825883437b8077f0) --- modules/fcitx5/highlight.svg.mustache | 2 +- modules/fcitx5/template.nix | 2 +- modules/fcitx5/testbeds/fcitx5.nix | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 modules/fcitx5/testbeds/fcitx5.nix diff --git a/modules/fcitx5/highlight.svg.mustache b/modules/fcitx5/highlight.svg.mustache index d9fc2f75..7a6d23da 100644 --- a/modules/fcitx5/highlight.svg.mustache +++ b/modules/fcitx5/highlight.svg.mustache @@ -79,5 +79,5 @@ sodipodi:type="rect" d="m 25.000001,10.000001 h 10 a 15,15 45 0 1 15,15 v 10 a 15,15 135 0 1 -15,15 h -10 a 15,15 45 0 1 -15,-15 v -10 a 15,15 135 0 1 15,-15 z" inkscape:path-effect="#path-effect998" - style="fill:#{{base04-hex}};fill-opacity:1" /> + style="fill:#{{base02-hex}};fill-opacity:1" /> diff --git a/modules/fcitx5/template.nix b/modules/fcitx5/template.nix index cd9103f6..fe108652 100644 --- a/modules/fcitx5/template.nix +++ b/modules/fcitx5/template.nix @@ -12,7 +12,7 @@ with colors; HighlightCandidateColor = base06; EnableBlur = false; FullWidthHighlight = true; - HighlightColor = base04; + HighlightColor = base02; HighlightBackgroundColor = base0E; }; "InputPanel/BlurMargin" = { diff --git a/modules/fcitx5/testbeds/fcitx5.nix b/modules/fcitx5/testbeds/fcitx5.nix new file mode 100644 index 00000000..bb816119 --- /dev/null +++ b/modules/fcitx5/testbeds/fcitx5.nix @@ -0,0 +1,18 @@ +{ + pkgs, + lib, + ... +}: +{ + stylix.testbed.ui.command.text = "fcitx5-config-qt"; + home-manager.sharedModules = lib.singleton { + i18n.inputMethod = { + enable = true; + type = "fcitx5"; + fcitx5.addons = with pkgs; [ + fcitx5-mozc + fcitx5-gtk + ]; + }; + }; +} From c3e7ce08aed33a9108fa0b0b174f935b93912b97 Mon Sep 17 00:00:00 2001 From: 0xda157 Date: Fri, 5 Dec 2025 14:05:09 -1000 Subject: [PATCH 10/40] treewide: use strict mode for nixfmt (#2041) Link: https://github.com/nix-community/stylix/pull/2041 Link: https://github.com/nix-community/stylix/pull/1976#discussion_r2539186937 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> (cherry picked from commit 3a332459f45b16c6df9d788e923f293a4c28d793) --- flake/default.nix | 9 ++---- flake/deprecation/default.nix | 10 ++---- flake/dev/packages.nix | 4 +-- flake/dev/pre-commit.nix | 4 +-- flake/dev/treefmt.nix | 1 + flake/packages.nix | 4 +-- flake/propagated-packages.nix | 4 +-- generated/all-maintainers.nix | 32 +++++-------------- modules/anki/testbeds/anki.nix | 4 +-- modules/ashell/testbeds/ashell.nix | 4 +-- modules/blender/hm.nix | 6 +--- modules/btop/hm.nix | 6 +--- modules/btop/testbeds/btop.nix | 4 +-- modules/cava/testbeds/cava.nix | 4 +-- modules/discord/common/theme-elements.nix | 4 +-- modules/discord/hm.nix | 6 +--- modules/discord/nixcord.nix | 4 +-- modules/discord/testbeds/vencord.nix | 9 ++---- modules/dunst/testbeds/dunst.nix | 4 +-- modules/fcitx5/hm.nix | 4 +-- modules/fcitx5/template.nix | 6 ++-- modules/fcitx5/testbeds/fcitx5.nix | 6 +--- modules/firefox/each-config.nix | 4 +-- modules/firefox/hm.nix | 10 ++---- modules/fish/testbeds/fish-hm.nix | 4 +-- modules/fnott/testbeds/fnott.nix | 4 +-- modules/font-packages/darwin.nix | 4 +-- modules/font-packages/hm.nix | 4 +-- modules/font-packages/nixos.nix | 4 +-- modules/fontconfig/hm.nix | 4 +-- modules/fontconfig/nixos.nix | 4 +-- modules/fuzzel/testbeds/fuzzel.nix | 4 +-- modules/fzf/testbeds/fzf.nix | 4 +-- modules/gdu/hm.nix | 5 +-- modules/gdu/testbeds/gdu.nix | 4 +-- modules/gnome/hm.nix | 4 +-- modules/gnome/nixos.nix | 20 +++--------- modules/gnome/testbeds/gnome.nix | 4 +-- modules/helix/hm.nix | 4 +-- modules/helix/testbeds/helix.nix | 4 +-- modules/hyprpanel/testbeds/hyprpanel.nix | 6 +--- modules/i3/hm.nix | 4 +-- modules/i3bar-river/hm.nix | 6 +--- modules/kde/hm.nix | 18 +++-------- modules/kde/testbeds/kde.nix | 5 +-- modules/limine/nixos.nix | 4 +-- modules/mako/testbeds/mako.nix | 4 +-- modules/micro/testbeds/micro.nix | 4 +-- modules/ncspot/testbeds/ncspot.nix | 4 +-- modules/neovim/neovim.nix | 6 +--- modules/neovim/nixvim.nix | 6 +--- modules/neovim/nvf.nix | 10 ++---- modules/neovim/testbeds/neovim.nix | 4 +-- modules/neovim/testbeds/vim.nix | 4 +-- modules/neovim/vim.nix | 6 +--- modules/nushell/testbeds/nushell.nix | 4 +-- modules/obsidian/hm.nix | 6 +--- modules/obsidian/testbeds/obsidian.nix | 5 +-- modules/opencode/testbeds/opencode.nix | 4 +-- modules/qt/hm.nix | 4 +-- modules/regreet/nixos.nix | 8 ++--- modules/spicetify/testbeds/spicetify.nix | 5 +-- modules/sxiv/testbeds/sxiv.nix | 4 +-- modules/tmux/testbeds/tmux.nix | 4 +-- modules/vicinae/testbeds/vicinae.nix | 4 +-- modules/vscode/templates/theme.nix | 24 ++++---------- modules/waybar/hm.nix | 5 +-- modules/waybar/testbeds/waybar.nix | 4 +-- modules/yazi/testbeds/yazi.nix | 4 +-- modules/zed/hm.nix | 4 +-- modules/zellij/testbeds/zellij.nix | 4 +-- modules/zen-browser/hm.nix | 10 ++---- stylix/darwin/default.nix | 6 +--- stylix/droid/default.nix | 4 +-- stylix/hm/default.nix | 6 +--- stylix/hm/icons.nix | 7 +--- stylix/meta.nix | 5 +-- stylix/nixos/default.nix | 6 +--- stylix/target.nix | 10 ++---- stylix/testbed/graphical-environments/kde.nix | 6 +--- stylix/testbed/images.nix | 5 +-- stylix/testbed/is-enabled.nix | 5 +-- 82 files changed, 110 insertions(+), 378 deletions(-) diff --git a/flake/default.nix b/flake/default.nix index 4932617d..18d4cafc 100644 --- a/flake/default.nix +++ b/flake/default.nix @@ -15,10 +15,7 @@ extraInputsFlake = ./dev; }; - partitionedAttrs = lib.genAttrs [ - "checks" - "ci" - "devShells" - "formatter" - ] (_: "dev"); + partitionedAttrs = lib.genAttrs [ "checks" "ci" "devShells" "formatter" ] ( + _: "dev" + ); } diff --git a/flake/deprecation/default.nix b/flake/deprecation/default.nix index da7cb8e6..7fe73e3b 100644 --- a/flake/deprecation/default.nix +++ b/flake/deprecation/default.nix @@ -1,12 +1,6 @@ +{ lib, self, ... }: { - lib, - self, - ... -}: -{ - imports = [ - ./per-system-option.nix - ]; + imports = [ ./per-system-option.nix ]; # NOTE: the `flake` submodule has a `lazyAttrsOf` freeform type. # diff --git a/flake/dev/packages.nix b/flake/dev/packages.nix index dc6ed95f..20217c89 100644 --- a/flake/dev/packages.nix +++ b/flake/dev/packages.nix @@ -12,9 +12,7 @@ # Testbeds are virtual machines based on NixOS, therefore they are # only available for Linux systems. testbeds = lib.mkIf pkgs.stdenv.hostPlatform.isLinux ( - import ../../stylix/testbed { - inherit pkgs inputs lib; - } + import ../../stylix/testbed { inherit pkgs inputs lib; } ); ci.buildbot = { diff --git a/flake/dev/pre-commit.nix b/flake/dev/pre-commit.nix index 360f12c6..a2d21568 100644 --- a/flake/dev/pre-commit.nix +++ b/flake/dev/pre-commit.nix @@ -1,8 +1,6 @@ { inputs, ... }: { - imports = [ - inputs.git-hooks.flakeModule - ]; + imports = [ inputs.git-hooks.flakeModule ]; perSystem = { config, ... }: diff --git a/flake/dev/treefmt.nix b/flake/dev/treefmt.nix index c899074d..47afc03c 100644 --- a/flake/dev/treefmt.nix +++ b/flake/dev/treefmt.nix @@ -28,6 +28,7 @@ nixfmt = { enable = true; width = 80; + strict = true; }; ruff-format = { enable = true; diff --git a/flake/packages.nix b/flake/packages.nix index 88648577..4e11148c 100644 --- a/flake/packages.nix +++ b/flake/packages.nix @@ -7,9 +7,7 @@ apps.doc.program = config.packages.serve-docs; packages = { - doc = pkgs.callPackage ../doc { - inherit (inputs) self; - }; + doc = pkgs.callPackage ../doc { inherit (inputs) self; }; serve-docs = pkgs.callPackage ../doc/server.nix { inherit (config.packages) doc; }; diff --git a/flake/propagated-packages.nix b/flake/propagated-packages.nix index ebc2a75b..020258e5 100644 --- a/flake/propagated-packages.nix +++ b/flake/propagated-packages.nix @@ -16,9 +16,7 @@ { pkgs, system, ... }: lib.optionalAttrs (partitionStack == [ ]) { apps = { - inherit (config.partitions.dev.module.flake.apps.${system}) - all-maintainers - ; + inherit (config.partitions.dev.module.flake.apps.${system}) all-maintainers; }; packages = lib.mkMerge [ { diff --git a/generated/all-maintainers.nix b/generated/all-maintainers.nix index eedf152d..af748fb1 100644 --- a/generated/all-maintainers.nix +++ b/generated/all-maintainers.nix @@ -52,9 +52,7 @@ github = "TheColorman"; githubId = 18369995; keys = [ - { - fingerprint = "3D8C A43C FBA2 5D28 0196 19F0 AB11 0475 B417 291D"; - } + { fingerprint = "3D8C A43C FBA2 5D28 0196 19F0 AB11 0475 B417 291D"; } ]; name = "colorman"; }; @@ -81,9 +79,7 @@ github = "brckd"; githubId = 92804487; keys = [ - { - fingerprint = "58A2 81E6 2FBD 6E4E 664C B603 7B4D 2A02 BB0E C28C"; - } + { fingerprint = "58A2 81E6 2FBD 6E4E 664C B603 7B4D 2A02 BB0E C28C"; } ]; name = "bricked"; }; @@ -104,9 +100,7 @@ github = "danth"; githubId = 28959268; keys = [ - { - fingerprint = "4779 D1D5 3C97 2EAE 34A5 ED3D D8AF C4BF 0567 0F9D"; - } + { fingerprint = "4779 D1D5 3C97 2EAE 34A5 ED3D D8AF C4BF 0567 0F9D"; } ]; matrix = "@danth:danth.me"; name = "Daniel Thwaites"; @@ -146,9 +140,7 @@ github = "make-42"; githubId = 17462236; keys = [ - { - fingerprint = "36BC 916D DD4E B1EE EE82 4BBF DC95 900F 6DA7 9992"; - } + { fingerprint = "36BC 916D DD4E B1EE EE82 4BBF DC95 900F 6DA7 9992"; } ]; matrix = "@ontake:matrix.ontake.dev"; name = "Louis Dalibard"; @@ -158,9 +150,7 @@ github = "mateusauler"; githubId = 24767687; keys = [ - { - fingerprint = "A09D C093 3C37 4BFC 2B5A 269F 80A5 D62F 6EB7 D9F0"; - } + { fingerprint = "A09D C093 3C37 4BFC 2B5A 269F 80A5 D62F 6EB7 D9F0"; } ]; name = "Mateus Auler"; }; @@ -181,9 +171,7 @@ github = "nukdokplex"; githubId = 25458915; keys = [ - { - fingerprint = "7CE2 4C42 942D 58EA 99F6 F00A A47E 7374 3EF6 FCC4"; - } + { fingerprint = "7CE2 4C42 942D 58EA 99F6 F00A A47E 7374 3EF6 FCC4"; } ]; name = "Viktor Titov"; }; @@ -204,9 +192,7 @@ github = "panchoh"; githubId = 471059; keys = [ - { - fingerprint = "4430 F502 8B19 FAF4 A40E C4E8 11E0 447D 4ABB A7D0"; - } + { fingerprint = "4430 F502 8B19 FAF4 A40E C4E8 11E0 447D 4ABB A7D0"; } ]; matrix = "@panchoh:matrix.org"; name = "pancho horrillo"; @@ -233,9 +219,7 @@ github = "trueNAHO"; githubId = 90870942; keys = [ - { - fingerprint = "5FC6 088A FB1A 609D 4532 F919 0C1C 177B 3B64 68E0"; - } + { fingerprint = "5FC6 088A FB1A 609D 4532 F919 0C1C 177B 3B64 68E0"; } ]; name = "Noah Pierre Biewesch"; }; diff --git a/modules/anki/testbeds/anki.nix b/modules/anki/testbeds/anki.nix index 66ca7c77..ccf35b01 100644 --- a/modules/anki/testbeds/anki.nix +++ b/modules/anki/testbeds/anki.nix @@ -2,7 +2,5 @@ { stylix.testbed.ui.command.text = "anki"; - home-manager.sharedModules = lib.singleton { - programs.anki.enable = true; - }; + home-manager.sharedModules = lib.singleton { programs.anki.enable = true; }; } diff --git a/modules/ashell/testbeds/ashell.nix b/modules/ashell/testbeds/ashell.nix index 474e51ea..f0c62ed1 100644 --- a/modules/ashell/testbeds/ashell.nix +++ b/modules/ashell/testbeds/ashell.nix @@ -5,7 +5,5 @@ command.text = "ashell"; }; - home-manager.sharedModules = lib.singleton { - programs.ashell.enable = true; - }; + home-manager.sharedModules = lib.singleton { programs.ashell.enable = true; }; } diff --git a/modules/blender/hm.nix b/modules/blender/hm.nix index 34e5b292..e4484063 100644 --- a/modules/blender/hm.nix +++ b/modules/blender/hm.nix @@ -1,8 +1,4 @@ -{ - mkTarget, - lib, - ... -}: +{ mkTarget, lib, ... }: mkTarget { name = "blender"; humanName = "Blender"; diff --git a/modules/btop/hm.nix b/modules/btop/hm.nix index 7e804c0d..c7de0798 100644 --- a/modules/btop/hm.nix +++ b/modules/btop/hm.nix @@ -1,8 +1,4 @@ -{ - mkTarget, - lib, - ... -}: +{ mkTarget, lib, ... }: mkTarget { name = "btop"; humanName = "btop"; diff --git a/modules/btop/testbeds/btop.nix b/modules/btop/testbeds/btop.nix index 4072523f..20b180a1 100644 --- a/modules/btop/testbeds/btop.nix +++ b/modules/btop/testbeds/btop.nix @@ -5,7 +5,5 @@ useTerminal = true; }; - home-manager.sharedModules = lib.singleton { - programs.btop.enable = true; - }; + home-manager.sharedModules = lib.singleton { programs.btop.enable = true; }; } diff --git a/modules/cava/testbeds/cava.nix b/modules/cava/testbeds/cava.nix index a8d5d1b8..1719ea29 100644 --- a/modules/cava/testbeds/cava.nix +++ b/modules/cava/testbeds/cava.nix @@ -8,7 +8,5 @@ useTerminal = true; }; - home-manager.sharedModules = lib.singleton { - programs.cava.enable = true; - }; + home-manager.sharedModules = lib.singleton { programs.cava.enable = true; }; } diff --git a/modules/discord/common/theme-elements.nix b/modules/discord/common/theme-elements.nix index 19366d29..964a72b5 100644 --- a/modules/discord/common/theme-elements.nix +++ b/modules/discord/common/theme-elements.nix @@ -1,7 +1,5 @@ name: [ - { - stylix.targets.${name}.themeBody = import ./theme-header.nix; - } + { stylix.targets.${name}.themeBody = import ./theme-header.nix; } ( { fonts }: { diff --git a/modules/discord/hm.nix b/modules/discord/hm.nix index 82ed017e..6a98ce57 100644 --- a/modules/discord/hm.nix +++ b/modules/discord/hm.nix @@ -1,8 +1,4 @@ -{ - mkTarget, - lib, - ... -}: +{ mkTarget, lib, ... }: { imports = map (module: lib.modules.importApply module mkTarget) [ ./nixcord.nix diff --git a/modules/discord/nixcord.nix b/modules/discord/nixcord.nix index 08fb1180..d974f9b7 100644 --- a/modules/discord/nixcord.nix +++ b/modules/discord/nixcord.nix @@ -53,9 +53,7 @@ mkTarget { writePath "Equicord" )) (lib.mkIf nixcord.equibop.enable (writePath "equibop")) - { - programs.nixcord.config.enabledThemes = [ "stylix.theme.css" ]; - } + { programs.nixcord.config.enabledThemes = [ "stylix.theme.css" ]; } ] ) ) diff --git a/modules/discord/testbeds/vencord.nix b/modules/discord/testbeds/vencord.nix index 15177749..fda8dcd7 100644 --- a/modules/discord/testbeds/vencord.nix +++ b/modules/discord/testbeds/vencord.nix @@ -1,8 +1,6 @@ { lib, pkgs, ... }: let - package = pkgs.discord.override { - withVencord = true; - }; + package = pkgs.discord.override { withVencord = true; }; in { stylix.testbed = { @@ -17,8 +15,5 @@ in environment.systemPackages = [ package ]; nixpkgs.config.allowUnfreePredicate = - pkg: - builtins.elem (lib.getName pkg) [ - "discord" - ]; + pkg: builtins.elem (lib.getName pkg) [ "discord" ]; } diff --git a/modules/dunst/testbeds/dunst.nix b/modules/dunst/testbeds/dunst.nix index 83971065..0bb36d95 100644 --- a/modules/dunst/testbeds/dunst.nix +++ b/modules/dunst/testbeds/dunst.nix @@ -5,7 +5,5 @@ sendNotifications = true; }; - home-manager.sharedModules = lib.singleton { - services.dunst.enable = true; - }; + home-manager.sharedModules = lib.singleton { services.dunst.enable = true; }; } diff --git a/modules/fcitx5/hm.nix b/modules/fcitx5/hm.nix index a31096fd..7fbffb7d 100644 --- a/modules/fcitx5/hm.nix +++ b/modules/fcitx5/hm.nix @@ -34,9 +34,7 @@ mkTarget { template = ./panel.svg.mustache; extension = ".svg"; }; - theme = import ./template.nix { - colors = colors.withHashtag; - }; + theme = import ./template.nix { colors = colors.withHashtag; }; }; }; } diff --git a/modules/fcitx5/template.nix b/modules/fcitx5/template.nix index fe108652..c13de7fd 100644 --- a/modules/fcitx5/template.nix +++ b/modules/fcitx5/template.nix @@ -83,16 +83,14 @@ with colors; Top = 6; Bottom = 7; }; - "InputPanel/PrevPage" = { - }; + "InputPanel/PrevPage" = { }; "InputPanel/PrevPage/ClickMargin" = { Left = 5; Right = 5; Top = 4; Bottom = 4; }; - "InputPanel/NextPage" = { - }; + "InputPanel/NextPage" = { }; "InputPanel/NextPage/ClickMargin" = { Left = 5; Right = 5; diff --git a/modules/fcitx5/testbeds/fcitx5.nix b/modules/fcitx5/testbeds/fcitx5.nix index bb816119..330488ba 100644 --- a/modules/fcitx5/testbeds/fcitx5.nix +++ b/modules/fcitx5/testbeds/fcitx5.nix @@ -1,8 +1,4 @@ -{ - pkgs, - lib, - ... -}: +{ pkgs, lib, ... }: { stylix.testbed.ui.command.text = "fcitx5-config-qt"; home-manager.sharedModules = lib.singleton { diff --git a/modules/firefox/each-config.nix b/modules/firefox/each-config.nix index 79c1e0ef..eaaed89d 100644 --- a/modules/firefox/each-config.nix +++ b/modules/firefox/each-config.nix @@ -102,9 +102,7 @@ mkTarget { b = colors."${color}-rgb-b"; }; inherit (pkgs.stdenv.hostPlatform) system; - inherit (inputs.nur.legacyPackages.${system}.repos.rycee) - firefox-addons - ; + inherit (inputs.nur.legacyPackages.${system}.repos.rycee) firefox-addons; in { programs.${name}.profiles = lib.mkIf cfg.colorTheme.enable ( diff --git a/modules/firefox/hm.nix b/modules/firefox/hm.nix index 74faf8ec..8e8e12d4 100644 --- a/modules/firefox/hm.nix +++ b/modules/firefox/hm.nix @@ -1,16 +1,10 @@ -{ - lib, - mkTarget, - ... -}: +{ lib, mkTarget, ... }: { imports = lib.mapAttrsToList ( name: humanName: - lib.modules.importApply ./each-config.nix { - inherit mkTarget name humanName; - } + lib.modules.importApply ./each-config.nix { inherit mkTarget name humanName; } ) { "firefox" = "Firefox"; diff --git a/modules/fish/testbeds/fish-hm.nix b/modules/fish/testbeds/fish-hm.nix index 692a0bd9..b6bd4e50 100644 --- a/modules/fish/testbeds/fish-hm.nix +++ b/modules/fish/testbeds/fish-hm.nix @@ -5,7 +5,5 @@ useTerminal = true; }; - home-manager.sharedModules = lib.singleton { - programs.fish.enable = true; - }; + home-manager.sharedModules = lib.singleton { programs.fish.enable = true; }; } diff --git a/modules/fnott/testbeds/fnott.nix b/modules/fnott/testbeds/fnott.nix index 668b6ce7..de39d2eb 100644 --- a/modules/fnott/testbeds/fnott.nix +++ b/modules/fnott/testbeds/fnott.nix @@ -5,7 +5,5 @@ sendNotifications = true; }; - home-manager.sharedModules = lib.singleton { - services.fnott.enable = true; - }; + home-manager.sharedModules = lib.singleton { services.fnott.enable = true; }; } diff --git a/modules/font-packages/darwin.nix b/modules/font-packages/darwin.nix index 0a73d502..eac7fa35 100644 --- a/modules/font-packages/darwin.nix +++ b/modules/font-packages/darwin.nix @@ -6,8 +6,6 @@ mkTarget { configElements = { fonts }: { - fonts = { - inherit (fonts) packages; - }; + fonts = { inherit (fonts) packages; }; }; } diff --git a/modules/font-packages/hm.nix b/modules/font-packages/hm.nix index 81a37dff..3e730bd6 100644 --- a/modules/font-packages/hm.nix +++ b/modules/font-packages/hm.nix @@ -6,8 +6,6 @@ mkTarget { configElements = { fonts }: { - home = { - inherit (fonts) packages; - }; + home = { inherit (fonts) packages; }; }; } diff --git a/modules/font-packages/nixos.nix b/modules/font-packages/nixos.nix index 0a73d502..eac7fa35 100644 --- a/modules/font-packages/nixos.nix +++ b/modules/font-packages/nixos.nix @@ -6,8 +6,6 @@ mkTarget { configElements = { fonts }: { - fonts = { - inherit (fonts) packages; - }; + fonts = { inherit (fonts) packages; }; }; } diff --git a/modules/fontconfig/hm.nix b/modules/fontconfig/hm.nix index 9e14cdbc..0fd01d7a 100644 --- a/modules/fontconfig/hm.nix +++ b/modules/fontconfig/hm.nix @@ -1,6 +1,4 @@ { lib, mkTarget, ... }: { - imports = [ - (lib.modules.importApply ./fontconfig.nix { inherit mkTarget; }) - ]; + imports = [ (lib.modules.importApply ./fontconfig.nix { inherit mkTarget; }) ]; } diff --git a/modules/fontconfig/nixos.nix b/modules/fontconfig/nixos.nix index 9e14cdbc..0fd01d7a 100644 --- a/modules/fontconfig/nixos.nix +++ b/modules/fontconfig/nixos.nix @@ -1,6 +1,4 @@ { lib, mkTarget, ... }: { - imports = [ - (lib.modules.importApply ./fontconfig.nix { inherit mkTarget; }) - ]; + imports = [ (lib.modules.importApply ./fontconfig.nix { inherit mkTarget; }) ]; } diff --git a/modules/fuzzel/testbeds/fuzzel.nix b/modules/fuzzel/testbeds/fuzzel.nix index c371e791..9e9f73b7 100644 --- a/modules/fuzzel/testbeds/fuzzel.nix +++ b/modules/fuzzel/testbeds/fuzzel.nix @@ -5,7 +5,5 @@ command.text = "fuzzel"; }; - home-manager.sharedModules = lib.singleton { - programs.fuzzel.enable = true; - }; + home-manager.sharedModules = lib.singleton { programs.fuzzel.enable = true; }; } diff --git a/modules/fzf/testbeds/fzf.nix b/modules/fzf/testbeds/fzf.nix index d17f32b2..b79f742f 100644 --- a/modules/fzf/testbeds/fzf.nix +++ b/modules/fzf/testbeds/fzf.nix @@ -5,7 +5,5 @@ useTerminal = true; }; - home-manager.sharedModules = lib.singleton { - programs.fzf.enable = true; - }; + home-manager.sharedModules = lib.singleton { programs.fzf.enable = true; }; } diff --git a/modules/gdu/hm.nix b/modules/gdu/hm.nix index dc6a637c..6c2f57a7 100644 --- a/modules/gdu/hm.nix +++ b/modules/gdu/hm.nix @@ -1,7 +1,4 @@ -{ - mkTarget, - ... -}: +{ mkTarget, ... }: mkTarget { name = "gdu"; humanName = "go DiskUsage()"; diff --git a/modules/gdu/testbeds/gdu.nix b/modules/gdu/testbeds/gdu.nix index e1db9e66..15ce7a22 100644 --- a/modules/gdu/testbeds/gdu.nix +++ b/modules/gdu/testbeds/gdu.nix @@ -5,7 +5,5 @@ useTerminal = true; }; - home-manager.sharedModules = lib.singleton { - home.packages = [ pkgs.gdu ]; - }; + home-manager.sharedModules = lib.singleton { home.packages = [ pkgs.gdu ]; }; } diff --git a/modules/gnome/hm.nix b/modules/gnome/hm.nix index 4807fe3a..f94add89 100644 --- a/modules/gnome/hm.nix +++ b/modules/gnome/hm.nix @@ -114,9 +114,7 @@ mkTarget { dataFile."themes/Stylix/gnome-shell/gnome-shell.css" = { source = let - theme = pkgs.callPackage ./theme.nix { - inherit inputs colors; - }; + theme = pkgs.callPackage ./theme.nix { inherit inputs colors; }; in "${theme}/share/gnome-shell/gnome-shell.css"; diff --git a/modules/gnome/nixos.nix b/modules/gnome/nixos.nix index e2d15e02..0e2cbe82 100644 --- a/modules/gnome/nixos.nix +++ b/modules/gnome/nixos.nix @@ -46,9 +46,7 @@ in 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 - ]; + patches = (oldAttrs.patches or [ ]) ++ [ ./shell_remove_dark_mode.patch ]; }); }) ]; @@ -56,14 +54,9 @@ in # Cursor and icon settings are usually applied via Home Manager, # but the login screen uses a separate database. services.displayManager.environment.XDG_DATA_DIRS = lib.mkIf (iconCfg != null) ( - (lib.makeSearchPath "share" [ - iconCfg.package - ]) - + ":" + (lib.makeSearchPath "share" [ iconCfg.package ]) + ":" ); - environment.systemPackages = lib.mkIf (cursorCfg != null) [ - cursorCfg.package - ]; + environment.systemPackages = lib.mkIf (cursorCfg != null) [ cursorCfg.package ]; programs.dconf.profiles.gdm.databases = lib.mkMerge [ (lib.mkIf (cursorCfg != null) [ { @@ -80,12 +73,7 @@ in settings."org/gnome/desktop/interface" = { icon-theme = builtins.head ( lib.filter (x: null != x) [ - ( - { - inherit (iconCfg) dark light; - } - ."${polarity}" or null - ) + ({ inherit (iconCfg) dark light; }."${polarity}" or null) iconCfg.dark iconCfg.light ] diff --git a/modules/gnome/testbeds/gnome.nix b/modules/gnome/testbeds/gnome.nix index ba4edd89..b25848ab 100644 --- a/modules/gnome/testbeds/gnome.nix +++ b/modules/gnome/testbeds/gnome.nix @@ -1,3 +1 @@ -{ - stylix.testbed.ui.graphicalEnvironment = "gnome"; -} +{ stylix.testbed.ui.graphicalEnvironment = "gnome"; } diff --git a/modules/helix/hm.nix b/modules/helix/hm.nix index 7d583b6d..28bbddaf 100644 --- a/modules/helix/hm.nix +++ b/modules/helix/hm.nix @@ -32,9 +32,7 @@ mkTarget { themes.stylix = let - theme = colors { - templateRepo = inputs.base16-helix; - }; + theme = colors { templateRepo = inputs.base16-helix; }; # Removing the background exposes transparency from the terminal. The # background might be helpful if the terminal isn't themed, so we only diff --git a/modules/helix/testbeds/helix.nix b/modules/helix/testbeds/helix.nix index ddbe26f0..a61563f4 100644 --- a/modules/helix/testbeds/helix.nix +++ b/modules/helix/testbeds/helix.nix @@ -5,7 +5,5 @@ useTerminal = true; }; - home-manager.sharedModules = lib.singleton { - programs.helix.enable = true; - }; + home-manager.sharedModules = lib.singleton { programs.helix.enable = true; }; } diff --git a/modules/hyprpanel/testbeds/hyprpanel.nix b/modules/hyprpanel/testbeds/hyprpanel.nix index 5d01739e..a92958a6 100644 --- a/modules/hyprpanel/testbeds/hyprpanel.nix +++ b/modules/hyprpanel/testbeds/hyprpanel.nix @@ -1,8 +1,4 @@ -{ - lib, - pkgs, - ... -}: +{ lib, pkgs, ... }: { stylix.testbed.ui.graphicalEnvironment = "hyprland"; diff --git a/modules/i3/hm.nix b/modules/i3/hm.nix index 1bf4298d..6fccc166 100644 --- a/modules/i3/hm.nix +++ b/modules/i3/hm.nix @@ -104,9 +104,7 @@ mkTarget { inherit border background; text = focused; }; - inactiveWorkspace = { - inherit text border background; - }; + inactiveWorkspace = { inherit text border background; }; urgentWorkspace = { inherit text background; border = urgent; diff --git a/modules/i3bar-river/hm.nix b/modules/i3bar-river/hm.nix index 2b194987..cd48c10d 100644 --- a/modules/i3bar-river/hm.nix +++ b/modules/i3bar-river/hm.nix @@ -1,8 +1,4 @@ -{ - mkTarget, - lib, - ... -}: +{ mkTarget, lib, ... }: mkTarget { name = "i3bar-river"; humanName = "i3bar-river"; diff --git a/modules/kde/hm.nix b/modules/kde/hm.nix index 98e70a8e..7bf93fee 100644 --- a/modules/kde/hm.nix +++ b/modules/kde/hm.nix @@ -7,14 +7,8 @@ let cfg = config.stylix.targets.kde; - inherit (config.lib.stylix) - colors - mkEnableTarget - mkEnableWallpaper - ; - inherit (config.stylix) - image - ; + inherit (config.lib.stylix) colors mkEnableTarget mkEnableWallpaper; + inherit (config.stylix) image; mergeWithImage = default: withImage: @@ -165,9 +159,7 @@ let Name = "Stylix"; wallpaperMetadata = { - KPlugin = { - inherit Id Name; - }; + KPlugin = { inherit Id Name; }; }; lookAndFeelMetadata = { @@ -257,9 +249,7 @@ let # The gtkconfig module copies settings from KDE to the GTK configuration. # This blocks Home Manager activation because the same files are already # managed by Stylix. - Module-gtkconfig = makeImmutable { - autoload = false; - }; + Module-gtkconfig = makeImmutable { autoload = false; }; }; kdeglobals = rec { diff --git a/modules/kde/testbeds/kde.nix b/modules/kde/testbeds/kde.nix index c9b8493b..e367b71a 100644 --- a/modules/kde/testbeds/kde.nix +++ b/modules/kde/testbeds/kde.nix @@ -1,7 +1,4 @@ -{ - lib, - ... -}: +{ lib, ... }: { config = { stylix.testbed.ui.graphicalEnvironment = "kde"; diff --git a/modules/limine/nixos.nix b/modules/limine/nixos.nix index d352fd85..6a7294de 100644 --- a/modules/limine/nixos.nix +++ b/modules/limine/nixos.nix @@ -30,9 +30,7 @@ mkTarget { ( { cfg, image }: { - boot.loader.limine.style.wallpapers = lib.mkIf cfg.useWallpaper [ - image - ]; + boot.loader.limine.style.wallpapers = lib.mkIf cfg.useWallpaper [ image ]; } ) ( diff --git a/modules/mako/testbeds/mako.nix b/modules/mako/testbeds/mako.nix index b020b1b0..af2e0930 100644 --- a/modules/mako/testbeds/mako.nix +++ b/modules/mako/testbeds/mako.nix @@ -5,7 +5,5 @@ sendNotifications = true; }; - home-manager.sharedModules = lib.singleton { - services.mako.enable = true; - }; + home-manager.sharedModules = lib.singleton { services.mako.enable = true; }; } diff --git a/modules/micro/testbeds/micro.nix b/modules/micro/testbeds/micro.nix index 5a722290..29fbd88d 100644 --- a/modules/micro/testbeds/micro.nix +++ b/modules/micro/testbeds/micro.nix @@ -5,7 +5,5 @@ useTerminal = true; }; - home-manager.sharedModules = lib.singleton { - programs.micro.enable = true; - }; + home-manager.sharedModules = lib.singleton { programs.micro.enable = true; }; } diff --git a/modules/ncspot/testbeds/ncspot.nix b/modules/ncspot/testbeds/ncspot.nix index 157abb61..133cc362 100644 --- a/modules/ncspot/testbeds/ncspot.nix +++ b/modules/ncspot/testbeds/ncspot.nix @@ -4,7 +4,5 @@ text = lib.getExe pkgs.ncspot; useTerminal = true; }; - home-manager.sharedModules = lib.singleton { - programs.ncspot.enable = true; - }; + home-manager.sharedModules = lib.singleton { programs.ncspot.enable = true; }; } diff --git a/modules/neovim/neovim.nix b/modules/neovim/neovim.nix index e1b7d39c..62161ebd 100644 --- a/modules/neovim/neovim.nix +++ b/modules/neovim/neovim.nix @@ -1,9 +1,5 @@ mkTarget: -{ - lib, - pkgs, - ... -}: +{ lib, pkgs, ... }: mkTarget { name = "neovim"; humanName = "Neovim"; diff --git a/modules/neovim/nixvim.nix b/modules/neovim/nixvim.nix index 6f53d471..2dc091c2 100644 --- a/modules/neovim/nixvim.nix +++ b/modules/neovim/nixvim.nix @@ -1,9 +1,5 @@ mkTarget: -{ - lib, - options, - ... -}: +{ lib, options, ... }: mkTarget { name = "nixvim"; humanName = "NixVim"; diff --git a/modules/neovim/nvf.nix b/modules/neovim/nvf.nix index b3e74c71..88ed74ff 100644 --- a/modules/neovim/nvf.nix +++ b/modules/neovim/nvf.nix @@ -1,9 +1,5 @@ mkTarget: -{ - lib, - options, - ... -}: +{ lib, options, ... }: mkTarget { name = "nvf"; humanName = "nvf"; @@ -48,9 +44,7 @@ mkTarget { ; }; }; - statusline = lib.mkIf (cfg.plugin == "base16") { - lualine.theme = "base16"; - }; + statusline = lib.mkIf (cfg.plugin == "base16") { lualine.theme = "base16"; }; }; } ) diff --git a/modules/neovim/testbeds/neovim.nix b/modules/neovim/testbeds/neovim.nix index 823f1db7..6e7540cc 100644 --- a/modules/neovim/testbeds/neovim.nix +++ b/modules/neovim/testbeds/neovim.nix @@ -5,7 +5,5 @@ useTerminal = true; }; - home-manager.sharedModules = lib.singleton { - programs.neovim.enable = true; - }; + home-manager.sharedModules = lib.singleton { programs.neovim.enable = true; }; } diff --git a/modules/neovim/testbeds/vim.nix b/modules/neovim/testbeds/vim.nix index 3bc44930..424cd082 100644 --- a/modules/neovim/testbeds/vim.nix +++ b/modules/neovim/testbeds/vim.nix @@ -5,7 +5,5 @@ useTerminal = true; }; - home-manager.sharedModules = lib.singleton { - programs.vim.enable = true; - }; + home-manager.sharedModules = lib.singleton { programs.vim.enable = true; }; } diff --git a/modules/neovim/vim.nix b/modules/neovim/vim.nix index 11b3bac5..20bc48b3 100644 --- a/modules/neovim/vim.nix +++ b/modules/neovim/vim.nix @@ -1,9 +1,5 @@ mkTarget: -{ - lib, - pkgs, - ... -}: +{ lib, pkgs, ... }: mkTarget { name = "vim"; humanName = "Vim"; diff --git a/modules/nushell/testbeds/nushell.nix b/modules/nushell/testbeds/nushell.nix index b045f270..22f0180d 100644 --- a/modules/nushell/testbeds/nushell.nix +++ b/modules/nushell/testbeds/nushell.nix @@ -5,7 +5,5 @@ useTerminal = true; }; - home-manager.sharedModules = lib.singleton { - programs.nushell.enable = true; - }; + home-manager.sharedModules = lib.singleton { programs.nushell.enable = true; }; } diff --git a/modules/obsidian/hm.nix b/modules/obsidian/hm.nix index 91f2dc75..ecaa66e5 100644 --- a/modules/obsidian/hm.nix +++ b/modules/obsidian/hm.nix @@ -1,8 +1,4 @@ -{ - mkTarget, - lib, - ... -}: +{ mkTarget, lib, ... }: mkTarget { name = "obsidian"; humanName = "Obsidian"; diff --git a/modules/obsidian/testbeds/obsidian.nix b/modules/obsidian/testbeds/obsidian.nix index 4607f91e..12067ba3 100644 --- a/modules/obsidian/testbeds/obsidian.nix +++ b/modules/obsidian/testbeds/obsidian.nix @@ -4,10 +4,7 @@ let in { nixpkgs.config.allowUnfreePredicate = - pkg: - builtins.elem (lib.getName pkg) [ - "obsidian" - ]; + pkg: builtins.elem (lib.getName pkg) [ "obsidian" ]; stylix.testbed.ui.application = { name = "obsidian"; diff --git a/modules/opencode/testbeds/opencode.nix b/modules/opencode/testbeds/opencode.nix index d2f350ab..fe1eda0e 100644 --- a/modules/opencode/testbeds/opencode.nix +++ b/modules/opencode/testbeds/opencode.nix @@ -5,7 +5,5 @@ useTerminal = true; }; - home-manager.sharedModules = lib.singleton { - programs.opencode.enable = true; - }; + home-manager.sharedModules = lib.singleton { programs.opencode.enable = true; }; } diff --git a/modules/qt/hm.nix b/modules/qt/hm.nix index aee2206d..25ecdbaf 100644 --- a/modules/qt/hm.nix +++ b/modules/qt/hm.nix @@ -103,9 +103,7 @@ (lib.mkIf (config.qt.style.name == "kvantum") { "Kvantum/kvantum.kvconfig".source = (pkgs.formats.ini { }).generate "kvantum.kvconfig" - { - General.theme = "Base16Kvantum"; - }; + { General.theme = "Base16Kvantum"; }; "Kvantum/Base16Kvantum".source = "${kvantumPackage}/share/Kvantum/Base16Kvantum"; diff --git a/modules/regreet/nixos.nix b/modules/regreet/nixos.nix index 54ba913a..ce77a5eb 100644 --- a/modules/regreet/nixos.nix +++ b/modules/regreet/nixos.nix @@ -94,17 +94,13 @@ mkTarget { ( { fonts }: { - programs.regreet.font = { - inherit (fonts.sansSerif) name package; - }; + programs.regreet.font = { inherit (fonts.sansSerif) name package; }; } ) ( { cursor }: { - programs.regreet.cursorTheme = { - inherit (cursor) name package; - }; + programs.regreet.cursorTheme = { inherit (cursor) name package; }; } ) ( diff --git a/modules/spicetify/testbeds/spicetify.nix b/modules/spicetify/testbeds/spicetify.nix index d5673f99..72cf9226 100644 --- a/modules/spicetify/testbeds/spicetify.nix +++ b/modules/spicetify/testbeds/spicetify.nix @@ -17,8 +17,5 @@ programs.spicetify.enable = true; nixpkgs.config.allowUnfreePredicate = - pkg: - builtins.elem (lib.getName pkg) [ - "spotify" - ]; + pkg: builtins.elem (lib.getName pkg) [ "spotify" ]; } diff --git a/modules/sxiv/testbeds/sxiv.nix b/modules/sxiv/testbeds/sxiv.nix index 28d54508..dc0efe0b 100644 --- a/modules/sxiv/testbeds/sxiv.nix +++ b/modules/sxiv/testbeds/sxiv.nix @@ -11,7 +11,5 @@ in "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; ''; - home-manager.sharedModules = lib.singleton { - home.packages = [ package ]; - }; + home-manager.sharedModules = lib.singleton { home.packages = [ package ]; }; } diff --git a/modules/tmux/testbeds/tmux.nix b/modules/tmux/testbeds/tmux.nix index fe9581ae..1b1dfc54 100644 --- a/modules/tmux/testbeds/tmux.nix +++ b/modules/tmux/testbeds/tmux.nix @@ -4,7 +4,5 @@ text = lib.getExe pkgs.tmux; useTerminal = true; }; - home-manager.sharedModules = lib.singleton { - programs.tmux.enable = true; - }; + home-manager.sharedModules = lib.singleton { programs.tmux.enable = true; }; } diff --git a/modules/vicinae/testbeds/vicinae.nix b/modules/vicinae/testbeds/vicinae.nix index 87d921ad..bb1698d5 100644 --- a/modules/vicinae/testbeds/vicinae.nix +++ b/modules/vicinae/testbeds/vicinae.nix @@ -5,7 +5,5 @@ command.text = "sleep 5 && vicinae open"; }; - home-manager.sharedModules = lib.singleton { - services.vicinae.enable = true; - }; + home-manager.sharedModules = lib.singleton { services.vicinae.enable = true; }; } diff --git a/modules/vscode/templates/theme.nix b/modules/vscode/templates/theme.nix index a3cc3563..f1957317 100644 --- a/modules/vscode/templates/theme.nix +++ b/modules/vscode/templates/theme.nix @@ -999,9 +999,7 @@ colors: with colors.withHashtag; { } { name = "Block Level Variables"; - scope = [ - "meta.block variable.other" - ]; + scope = [ "meta.block variable.other" ]; settings.foreground = base08; } { @@ -1096,9 +1094,7 @@ colors: with colors.withHashtag; { } { name = "Language methods"; - scope = [ - "variable.language" - ]; + scope = [ "variable.language" ]; settings = { fontStyle = "italic"; foreground = base08; @@ -1106,9 +1102,7 @@ colors: with colors.withHashtag; { } { name = "entity.name.method.js"; - scope = [ - "entity.name.method.js" - ]; + scope = [ "entity.name.method.js" ]; settings = { fontStyle = "italic"; foreground = base0D; @@ -1195,9 +1189,7 @@ colors: with colors.withHashtag; { } { name = "ES7 Bind Operator"; - scope = [ - "source.js constant.other.object.key.js string.unquoted.label.js" - ]; + scope = [ "source.js constant.other.object.key.js string.unquoted.label.js" ]; settings = { fontStyle = "italic"; foreground = base0E; @@ -1302,9 +1294,7 @@ colors: with colors.withHashtag; { } { name = "Markup - Italic"; - scope = [ - "markup.italic" - ]; + scope = [ "markup.italic" ]; settings = { fontStyle = "italic"; foreground = base08; @@ -1381,9 +1371,7 @@ colors: with colors.withHashtag; { } { name = "Markdown - Fenced Bode Block"; - scope = [ - "punctuation.definition.fenced.markdown" - ]; + scope = [ "punctuation.definition.fenced.markdown" ]; settings.foreground = "#00000050"; } { diff --git a/modules/waybar/hm.nix b/modules/waybar/hm.nix index 273bf2bf..9c5c166a 100644 --- a/modules/waybar/hm.nix +++ b/modules/waybar/hm.nix @@ -72,10 +72,7 @@ mkTarget { } ) ( - { - cfg, - colors, - }: + { cfg, colors }: let colorlessModules = place: '' .modules-${place} #workspaces button { diff --git a/modules/waybar/testbeds/waybar.nix b/modules/waybar/testbeds/waybar.nix index 454c9c56..a4c0f68a 100644 --- a/modules/waybar/testbeds/waybar.nix +++ b/modules/waybar/testbeds/waybar.nix @@ -14,9 +14,7 @@ "hyprland/submap" "custom/media" ]; - modules-center = [ - "hyprland/window" - ]; + modules-center = [ "hyprland/window" ]; modules-right = [ "mpd" "idle_inhibitor" diff --git a/modules/yazi/testbeds/yazi.nix b/modules/yazi/testbeds/yazi.nix index b0eafb91..a3af3808 100644 --- a/modules/yazi/testbeds/yazi.nix +++ b/modules/yazi/testbeds/yazi.nix @@ -14,8 +14,6 @@ in inherit package; }; - home.packages = [ - pkgs.nerd-fonts.fira-mono - ]; + home.packages = [ pkgs.nerd-fonts.fira-mono ]; }; } diff --git a/modules/zed/hm.nix b/modules/zed/hm.nix index 2b864190..29155344 100644 --- a/modules/zed/hm.nix +++ b/modules/zed/hm.nix @@ -22,9 +22,7 @@ mkTarget { { programs.zed-editor = { userSettings.theme = "Base16 ${colors.scheme-name}"; - themes.stylix = colors { - templateRepo = inputs.tinted-zed; - }; + themes.stylix = colors { templateRepo = inputs.tinted-zed; }; }; } ) diff --git a/modules/zellij/testbeds/zellij.nix b/modules/zellij/testbeds/zellij.nix index 40ff609c..521d9924 100644 --- a/modules/zellij/testbeds/zellij.nix +++ b/modules/zellij/testbeds/zellij.nix @@ -5,7 +5,5 @@ useTerminal = true; }; - home-manager.sharedModules = lib.singleton { - programs.zellij.enable = true; - }; + home-manager.sharedModules = lib.singleton { programs.zellij.enable = true; }; } diff --git a/modules/zen-browser/hm.nix b/modules/zen-browser/hm.nix index 09573dee..04495db1 100644 --- a/modules/zen-browser/hm.nix +++ b/modules/zen-browser/hm.nix @@ -35,10 +35,7 @@ mkTarget { } ) ( - { - cfg, - fonts, - }: + { cfg, fonts }: { programs.zen-browser.profiles = lib.genAttrs cfg.profileNames (_: { settings = { @@ -50,10 +47,7 @@ mkTarget { } ) ( - { - cfg, - colors, - }: + { cfg, colors }: { programs.zen-browser.profiles = lib.mkIf cfg.enableCss ( lib.genAttrs cfg.profileNames (_: { diff --git a/stylix/darwin/default.nix b/stylix/darwin/default.nix index 1f0bbb68..bafe2bda 100644 --- a/stylix/darwin/default.nix +++ b/stylix/darwin/default.nix @@ -1,8 +1,4 @@ -{ - lib, - config, - ... -}: +{ lib, config, ... }: let autoload = import ../autoload.nix { inherit lib; } "darwin"; in diff --git a/stylix/droid/default.nix b/stylix/droid/default.nix index 91ca5196..e23d7cfe 100644 --- a/stylix/droid/default.nix +++ b/stylix/droid/default.nix @@ -19,7 +19,5 @@ in ++ autoload; # See https://github.com/nix-community/nix-on-droid/issues/436 - options.lib = lib.mkOption { - type = with lib.types; attrsOf attrs; - }; + options.lib = lib.mkOption { type = with lib.types; attrsOf attrs; }; } diff --git a/stylix/hm/default.nix b/stylix/hm/default.nix index 5dcd1ce5..8c533047 100644 --- a/stylix/hm/default.nix +++ b/stylix/hm/default.nix @@ -1,8 +1,4 @@ -{ - lib, - config, - ... -}: +{ lib, config, ... }: let autoload = import ../autoload.nix { inherit lib; } "hm"; in diff --git a/stylix/hm/icons.nix b/stylix/hm/icons.nix index 76b4b560..b23c8742 100644 --- a/stylix/hm/icons.nix +++ b/stylix/hm/icons.nix @@ -10,12 +10,7 @@ in inherit (cfg) package; name = builtins.head ( lib.filter (x: null != x) [ - ( - { - inherit (cfg) dark light; - } - ."${polarity}" or null - ) + ({ inherit (cfg) dark light; }."${polarity}" or null) cfg.dark cfg.light ] diff --git a/stylix/meta.nix b/stylix/meta.nix index 5557bf0b..05379671 100644 --- a/stylix/meta.nix +++ b/stylix/meta.nix @@ -1,7 +1,4 @@ -{ - pkgs, - lib, -}: +{ pkgs, lib }: builtins.mapAttrs ( _: value: diff --git a/stylix/nixos/default.nix b/stylix/nixos/default.nix index ebf2d807..431383f8 100644 --- a/stylix/nixos/default.nix +++ b/stylix/nixos/default.nix @@ -1,8 +1,4 @@ -{ - lib, - config, - ... -}: +{ lib, config, ... }: let autoload = import ../autoload.nix { inherit lib; } "nixos"; in diff --git a/stylix/target.nix b/stylix/target.nix index 0f6da2ed..7846e8e9 100644 --- a/stylix/target.nix +++ b/stylix/target.nix @@ -85,9 +85,7 @@ example ? if args ? autoEnableExpr then true else !autoEnable, }@args: let - wrapExpr = wrapExprWith { - inherit autoWrapExpr; - }; + wrapExpr = wrapExprWith { inherit autoWrapExpr; }; in self.mkEnableIf { description = "Whether to enable theming for ${name}."; @@ -129,11 +127,7 @@ lib.mkOption { type = lib.types.bool; defaultText = if args ? defaultText then defaultText else default; - inherit - default - description - example - ; + inherit default description example; }; }; } diff --git a/stylix/testbed/graphical-environments/kde.nix b/stylix/testbed/graphical-environments/kde.nix index b9aaf0b4..0a1cf31a 100644 --- a/stylix/testbed/graphical-environments/kde.nix +++ b/stylix/testbed/graphical-environments/kde.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: +{ config, lib, ... }: { config = lib.mkIf (config.stylix.testbed.ui.graphicalEnvironment or null == "kde") diff --git a/stylix/testbed/images.nix b/stylix/testbed/images.nix index 1b5bde79..f03b0be2 100644 --- a/stylix/testbed/images.nix +++ b/stylix/testbed/images.nix @@ -1,7 +1,4 @@ -{ - fetchurl, - runCommandLocal, -}: +{ fetchurl, runCommandLocal }: { dark = fetchurl { name = "mountains.jpg"; diff --git a/stylix/testbed/is-enabled.nix b/stylix/testbed/is-enabled.nix index 4fd02ace..72029045 100644 --- a/stylix/testbed/is-enabled.nix +++ b/stylix/testbed/is-enabled.nix @@ -1,7 +1,4 @@ -{ - lib, - pkgs, -}: +{ lib, pkgs }: /** Creates a minimal configuration to extract the `stylix.testbed.enable` option value. From ec6f4a973c43cb60b051c46458f405712b4e7125 Mon Sep 17 00:00:00 2001 From: Mikilio Date: Tue, 25 Nov 2025 20:14:03 +0100 Subject: [PATCH 11/40] qt: update template in accordance with reference (cherry picked from commit a8bb9ee2fa6e9fe49254259eca30c5150e830ba0) --- modules/qt/kvconfig.mustache | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/qt/kvconfig.mustache b/modules/qt/kvconfig.mustache index 99714d65..9388d11b 100644 --- a/modules/qt/kvconfig.mustache +++ b/modules/qt/kvconfig.mustache @@ -1,6 +1,7 @@ [%General] author=Bluskript based on Catppuccin Frappe Mauve theme comment=base16-qt +combo_focus_rect=true spread_menuitems=true left_tabs=true mirror_doc_tabs=true @@ -81,6 +82,7 @@ dark.color=#{{base00-hex}} mid.color=#{{base00-hex}} highlight.color=#{{base03-hex}} inactive.highlight.color=#{{base03-hex}} +tooltip.base.color=#{{base00-hex}} text.color=#{{base05-hex}} window.text.color=#{{base05-hex}} button.text.color=#{{base05-hex}} @@ -98,6 +100,7 @@ interior.element=itemview frame=true interior=true text.iconspacing=3 +text.press.color=#{{base05-hex}} text.toggle.color=#{{base05-hex}} [RadioButton] @@ -317,6 +320,10 @@ text.press.color=#{{base05-hex}} text.toggle.color=#{{base05-hex}} text.bold=false +[ToolbarLineEdit] +frame.element=lineedit +interior.element=lineedit + [Scrollbar] inherits=PanelButtonCommand indicator.size=0 @@ -382,6 +389,10 @@ frame.right=3 inherits=PanelButtonCommand interior.element=menuitem indicator.size=8 +frame=true +frame.element=menuitem +frame.right=10 +frame.left=10 text.focus.color=#{{base05-hex}} text.press.color=#{{base05-hex}} @@ -423,6 +434,7 @@ text.margin.top=1 text.margin.bottom=1 text.margin.left=3 text.margin.right=3 +text.press.color=#{{base05-hex}} text.toggle.color=#{{base05-hex}} [ToolboxTab] @@ -452,7 +464,7 @@ blur_translucent=true centered_forms=false kinetic_scrolling=false middle_click_scroll=false -no_selection_tint=false +no_selection_tint=true noninteger_translucency=false style_vertical_toolbars=false blur_only_active_window=false From d9b3c18cb3de4d275b42af88baab939e6a0a65f7 Mon Sep 17 00:00:00 2001 From: Mikilio Date: Tue, 25 Nov 2025 21:17:08 +0100 Subject: [PATCH 12/40] qt: fix colorscheme not applying sometimes (cherry picked from commit d5bbace3ff3685086d6d96e30134c5205df82b89) --- modules/qt/hm.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/qt/hm.nix b/modules/qt/hm.nix index 25ecdbaf..44098703 100644 --- a/modules/qt/hm.nix +++ b/modules/qt/hm.nix @@ -85,6 +85,7 @@ let qtctConf = '' [Appearance] + custom_palette=true '' + lib.optionalString (config.qt.style ? name) '' style=${config.qt.style.name} From 5e392c36d23ee55f3e16c5b7e204d5c952b0f594 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Fri, 28 Nov 2025 17:50:18 +0100 Subject: [PATCH 13/40] ci: update-flake: use one atomic commit Use one atomic commit to simplify the commit history and prevent the previous commits from individually breaking CI. (cherry picked from commit b01dbcdc0865f733b327d82d73fcc36f71cedecc) --- .github/workflows/update-flake.yml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/update-flake.yml b/.github/workflows/update-flake.yml index f84a3871..dd03bd1a 100644 --- a/.github/workflows/update-flake.yml +++ b/.github/workflows/update-flake.yml @@ -57,30 +57,21 @@ jobs: - name: update lock files run: | - nix flake update \ - --commit-lock-file \ - --option commit-lock-file-summary "flake: update public inputs" + nix flake update + nix flake update --flake ./flake/dev - nix flake update \ - --commit-lock-file \ - --flake ./flake/dev \ - --option commit-lock-file-summary "flake: update dev inputs" + git add {,flake/dev/}flake.lock # The nixpkgs maintainers may have changed, so keep all-maintainers # in sync if nix run .#all-maintainers; then git add generated/all-maintainers.nix - - if - ! git commit --message "stylix: update all-maintainers list" - then - echo "::debug::generated/all-maintainers.nix has no changes" - fi - else echo "::error::failed to update generated/all-maintainers.nix" fi + git commit --message "flake: update all inputs" + - name: create pull request env: GH_TOKEN: ${{ steps.generate-token.outputs.token }} From 95b692c87429a18982f140dc75f2cfca0645dacb Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Fri, 28 Nov 2025 17:51:48 +0100 Subject: [PATCH 14/40] ci: update-flake: parallelize updates to minimize version drift (cherry picked from commit a87d4cb37683ec346eddc91c1cbcf2fc67179921) --- .github/workflows/update-flake.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-flake.yml b/.github/workflows/update-flake.yml index dd03bd1a..aebf29a6 100644 --- a/.github/workflows/update-flake.yml +++ b/.github/workflows/update-flake.yml @@ -57,8 +57,10 @@ jobs: - name: update lock files run: | - nix flake update - nix flake update --flake ./flake/dev + nix flake update & + nix flake update --flake ./flake/dev & + + wait git add {,flake/dev/}flake.lock From b014261858f14382457a757c3b6d648a7cf28f4a Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Sat, 29 Nov 2025 22:31:05 +0100 Subject: [PATCH 15/40] ci: update-flake: fix invalid 'gh pr edit' label flag (#2038) Closes: https://github.com/nix-community/stylix/issues/2037 (cherry picked from commit 8a096ccec828c68bfb870295d186ad994ea0ae2c) --- .github/workflows/update-flake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-flake.yml b/.github/workflows/update-flake.yml index aebf29a6..5e19ecf2 100644 --- a/.github/workflows/update-flake.yml +++ b/.github/workflows/update-flake.yml @@ -97,8 +97,8 @@ jobs: if ((pr_count)); then gh pr edit \ + --add-label "$label" \ --body "$body" \ - --label "$label" \ --title "$title" else From be22e21cee5ab59dd777d2a998beebcedf3fcb1e Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Mon, 1 Dec 2025 01:54:03 +0100 Subject: [PATCH 16/40] ci: update-flake: match PR title to commit title (#2043) Link: https://github.com/nix-community/stylix/pull/2043 Fixes: b01dbcdc0865 ("ci: update-flake: use one atomic commit") Reviewed-by: 0xda157 (cherry picked from commit 794b6e1fa75177ebfeb32967f135858a1ab1ba15) --- .github/workflows/update-flake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-flake.yml b/.github/workflows/update-flake.yml index 5e19ecf2..d6d2969d 100644 --- a/.github/workflows/update-flake.yml +++ b/.github/workflows/update-flake.yml @@ -81,7 +81,7 @@ jobs: body: "This is an automated update triggered by the [workflow run #${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})." # yamllint disable-line rule:line-length label: "topic: dependencies" pr_branch: update_flake_lock_action_${{ matrix.branch }} - title: "${{ startsWith(matrix.branch, 'release') && format('[{0}] ', matrix.branch) || '' }}flake: update public and dev inputs" # yamllint disable-line rule:line-length + title: "${{ startsWith(matrix.branch, 'release') && format('[{0}] ', matrix.branch) || '' }}flake: update all inputs" # yamllint disable-line rule:line-length run: | git switch --create "$pr_branch" git push origin "$pr_branch" --force --set-upstream From b1c99fd9525bae86f20018e96d68176002ad18b0 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Wed, 3 Dec 2025 16:01:54 +0100 Subject: [PATCH 17/40] ci: deprecate 25.05 branch (#2051) Link: https://github.com/nix-community/stylix/pull/2051 (cherry picked from commit c9e89d447877d15f0af2ce69dbde7e66c9fb16ff) --- .github/dependabot.yml | 5 +---- .github/workflows/update-flake.yml | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index aa7c1742..914b0c82 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,9 +7,6 @@ updates: target-branch: "master" schedule: interval: daily - labels: - - "topic: dependencies" - - "backport: release-25.05" - - "backport: release-25.11" + labels: ["topic: dependencies", "backport: release-25.11"] commit-message: prefix: "ci" diff --git a/.github/workflows/update-flake.yml b/.github/workflows/update-flake.yml index d6d2969d..31283bf8 100644 --- a/.github/workflows/update-flake.yml +++ b/.github/workflows/update-flake.yml @@ -16,7 +16,7 @@ jobs: if: vars.APP_ID strategy: matrix: - branch: [master, release-25.11, release-25.05] + branch: [master, release-25.11] steps: - id: generate-token uses: actions/create-github-app-token@v2 From 84d9d55885d463d461234f3aac07b2389a2577d8 Mon Sep 17 00:00:00 2001 From: 0xda157 Date: Sat, 6 Dec 2025 08:57:29 -1000 Subject: [PATCH 18/40] fcitx5: add da157 as maintainer (#2066) Link: https://github.com/nix-community/stylix/pull/2066 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> (cherry picked from commit bd00e01aab676aee88e6cc5c9238b4a5a7d6639a) --- modules/fcitx5/meta.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/fcitx5/meta.nix b/modules/fcitx5/meta.nix index c43ae716..5928c941 100644 --- a/modules/fcitx5/meta.nix +++ b/modules/fcitx5/meta.nix @@ -2,5 +2,8 @@ { name = "Fcitx 5"; homepage = "https://fcitx-im.org/wiki/Fcitx_5"; - maintainers = [ lib.maintainers.make-42 ]; + maintainers = with lib.maintainers; [ + da157 + make-42 + ]; } From 2f1565508a23b398b416d3095535cd718076c9a0 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Fri, 21 Nov 2025 19:05:21 +0100 Subject: [PATCH 19/40] modules: flatten single-attribute set declarations (cherry picked from commit a4ffbc20eabd1dd14ae43298ec58dd1c4bf1e874) --- modules/cava/hm.nix | 4 +--- modules/hyprlock/hm.nix | 4 +--- modules/lightdm/nixos.nix | 4 +--- modules/yazi/hm.nix | 10 ++++------ 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/modules/cava/hm.nix b/modules/cava/hm.nix index 1ba12135..a0b1bc21 100644 --- a/modules/cava/hm.nix +++ b/modules/cava/hm.nix @@ -3,9 +3,7 @@ mkTarget { name = "cava"; humanName = "CAVA"; - extraOptions = { - rainbow.enable = lib.mkEnableOption "rainbow gradient theming"; - }; + extraOptions.rainbow.enable = lib.mkEnableOption "rainbow gradient theming"; configElements = { cfg, colors }: diff --git a/modules/hyprlock/hm.nix b/modules/hyprlock/hm.nix index bf2d8ee2..6e644633 100644 --- a/modules/hyprlock/hm.nix +++ b/modules/hyprlock/hm.nix @@ -8,9 +8,7 @@ mkTarget { name = "hyprlock"; humanName = "Hyprlock"; - extraOptions = { - useWallpaper = config.lib.stylix.mkEnableWallpaper "Hyprlock" true; - }; + extraOptions.useWallpaper = config.lib.stylix.mkEnableWallpaper "Hyprlock" true; configElements = [ ( diff --git a/modules/lightdm/nixos.nix b/modules/lightdm/nixos.nix index 405cfbac..c7fa38ed 100644 --- a/modules/lightdm/nixos.nix +++ b/modules/lightdm/nixos.nix @@ -8,9 +8,7 @@ mkTarget { name = "lightdm"; humanName = "LightDM"; - extraOptions = { - useWallpaper = config.lib.stylix.mkEnableWallpaper "LightDM" true; - }; + extraOptions.useWallpaper = config.lib.stylix.mkEnableWallpaper "LightDM" true; configElements = { cfg, image }: diff --git a/modules/yazi/hm.nix b/modules/yazi/hm.nix index bf01e02e..397f8874 100644 --- a/modules/yazi/hm.nix +++ b/modules/yazi/hm.nix @@ -4,12 +4,10 @@ mkTarget { name = "yazi"; humanName = "Yazi"; - extraOptions = { - boldDirectory = lib.mkOption { - description = "Whether to use bold font for directories."; - type = lib.types.bool; - default = true; - }; + extraOptions.boldDirectory = lib.mkOption { + description = "Whether to use bold font for directories."; + type = lib.types.bool; + default = true; }; configElements = From e34f85f1f1600073b6066c738ccab70567f1e240 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Sat, 19 Jul 2025 11:28:32 +0200 Subject: [PATCH 20/40] stylix/mk-target: sort optional arguments (cherry picked from commit 25354cc88b67bede74dbf314949821889ae15e48) --- stylix/mk-target.nix | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/stylix/mk-target.nix b/stylix/mk-target.nix index 49f95ca4..32a13df6 100644 --- a/stylix/mk-target.nix +++ b/stylix/mk-target.nix @@ -82,21 +82,6 @@ The default (`true`) is inherited from `mkEnableTargetWith`. - `enableExample` (Boolean or literal expression) - : An example to include on the enable option. The default is calculated - automatically by `mkEnableTargetWith` and depends on `autoEnable` and - whether an `autoEnableExpr` is used. - - `extraOptions` (Attribute set) - : Additional options to be added in the `stylix.targets.${name}` namespace - along the `stylix.targets.${name}.enable` option. - - For example, an extension guard used in the configuration can be declared - as follows: - ```nix - { extension.enable = lib.mkEnableOption "the bloated dependency"; } - ``` - `configElements` (List or attribute set or function or path) : Configuration functions that are automatically safeguarded when any of their arguments is disabled. The provided `cfg` argument conveniently @@ -125,6 +110,21 @@ ) ``` + `enableExample` (Boolean or literal expression) + : An example to include on the enable option. The default is calculated + automatically by `mkEnableTargetWith` and depends on `autoEnable` and + whether an `autoEnableExpr` is used. + + `extraOptions` (Attribute set) + : Additional options to be added in the `stylix.targets.${name}` namespace + along the `stylix.targets.${name}.enable` option. + + For example, an extension guard used in the configuration can be declared + as follows: + ```nix + { extension.enable = lib.mkEnableOption "the bloated dependency"; } + ``` + `generalConfig` (Attribute set or function or path) : This argument mirrors the `configElements` argument but intentionally lacks automatic safeguarding and should only be used for complex @@ -176,9 +176,9 @@ autoEnable ? null, autoEnableExpr ? null, autoWrapEnableExpr ? null, + configElements ? [ ], enableExample ? null, extraOptions ? { }, - configElements ? [ ], generalConfig ? null, imports ? [ ], }@args: From 4ec8181cd89a6bdbacb79e951ea64111d17a5743 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Sat, 19 Jul 2025 11:28:33 +0200 Subject: [PATCH 21/40] stylix/mk-target: document imports argument Fixes: 093087e969e2 ("stylix: add imports to mkTarget (#1363)") (cherry picked from commit 9afd8230cd8c92c0450f9f9ece65c05062160fc1) --- stylix/mk-target.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stylix/mk-target.nix b/stylix/mk-target.nix index 32a13df6..94658d8c 100644 --- a/stylix/mk-target.nix +++ b/stylix/mk-target.nix @@ -130,6 +130,9 @@ lacks automatic safeguarding and should only be used for complex configurations where `configElements` is unsuitable. +   `imports` (List) +   : The `imports` option forwarded to the Nixpkgs module system. + # Environment The function is provided alongside module arguments in any modules imported From 66576c1e094bf92092f0b068ca074461a06732e4 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Fri, 21 Nov 2025 20:12:08 +0100 Subject: [PATCH 22/40] stylix/mk-target: rename mkConfig function to callModule Rename the mkConfig function to callModule to generalize the name beyond the specific config and options module arguments. Fixes: dea0337e0bff ("stylix: restrict access to config while using mkTarget (#1368)") (cherry picked from commit 1272e6858e29205b8b03e696f121e6eedcb8b3b5) --- stylix/mk-target.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stylix/mk-target.nix b/stylix/mk-target.nix index 94658d8c..1a032298 100644 --- a/stylix/mk-target.nix +++ b/stylix/mk-target.nix @@ -217,7 +217,7 @@ let ); # Call the configuration function with its required Stylix arguments. - mkConfig = fn: fn (getStylixAttrs fn); + callModule = fn: fn (getStylixAttrs fn); # Safeguard configuration functions when any of their arguments is # disabled. @@ -232,13 +232,13 @@ let (builtins.all (attr: attr.enable or (attr != null))) ]; in - lib.mkIf allAttrsEnabled (mkConfig c) + lib.mkIf allAttrsEnabled (callModule c) else c; in { imports = imports ++ [ - { options.stylix.targets.${name} = mkConfig (lib.toFunction extraOptions); } + { options.stylix.targets.${name} = callModule (lib.toFunction extraOptions); } ]; options.stylix.targets.${name}.enable = @@ -258,7 +258,7 @@ let config = lib.mkIf (config.stylix.enable && cfg.enable) ( lib.mkMerge ( lib.optional (generalConfig != null) ( - mkConfig ( + callModule ( if builtins.isPath generalConfig then import generalConfig else generalConfig ) ) From cf17ca6259ebf8e6c5923808597fac09cf588558 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Sat, 19 Jul 2025 11:28:34 +0200 Subject: [PATCH 23/40] stylix/mk-target: polish implementation and improve error reporting Polish the mkTarget implementation to improve error reporting and simplify future enhancements. Configuration elements can now recursively resolve to paths. (cherry picked from commit f7b554dea904393e483df9c13f0b6d6286d53ba7) --- stylix/mk-target.nix | 106 +++++++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 50 deletions(-) diff --git a/stylix/mk-target.nix b/stylix/mk-target.nix index 1a032298..21cf51ce 100644 --- a/stylix/mk-target.nix +++ b/stylix/mk-target.nix @@ -182,63 +182,75 @@ configElements ? [ ], enableExample ? null, extraOptions ? { }, - generalConfig ? null, + generalConfig ? { }, imports ? [ ], }@args: let module = { config, lib, ... }: let - cfg = config.stylix.targets.${name}; + callModule = + let + areArgumentsEnabled = lib.flip lib.pipe [ + builtins.attrValues + (builtins.all (argument: argument.enable or (argument != null))) + ]; - # Get the list of function de-structured argument names. - functionArgNames = - fn: - lib.pipe fn [ - lib.functionArgs - builtins.attrNames - ]; + getArguments = + function: + lib.genAttrs + (lib.pipe function [ + lib.functionArgs + builtins.attrNames + ]) + ( + argument: + if argument == "cfg" then + cfg - getStylixAttrs = - fn: - lib.genAttrs (functionArgNames fn) ( - arg: - if arg == "cfg" then - cfg - else if arg == "colors" then - config.lib.stylix.colors + else if argument == "colors" then + config.lib.stylix.colors + + else + config.stylix.${argument} or (throw "stylix: mkTarget expected one of ${ + lib.concatMapStringsSep ", " (expected: "`${expected}`") ( + lib.naturalSort ( + [ + "cfg" + "colors" + ] + ++ builtins.attrNames config.stylix + ) + ) + }, but got: ${argument}") + ); + in + safeguard: config': + let + arguments = getArguments config'; + in + if builtins.isFunction config' then + if safeguard then + lib.mkIf (areArgumentsEnabled arguments) (config' arguments) else - config.stylix.${arg} - or (throw "stylix: mkTarget expected one of `cfg`, `colors`, ${ - lib.concatMapStringsSep ", " (name: "`${name}`") ( - builtins.attrNames config.stylix - ) - }, but got: ${arg}") - ); + config' arguments - # Call the configuration function with its required Stylix arguments. - callModule = fn: fn (getStylixAttrs fn); + else if builtins.isAttrs config' then + config' + + else if builtins.isPath config' then + callModule safeguard (import config') - # Safeguard configuration functions when any of their arguments is - # disabled. - mkConditionalConfig = - c: - if builtins.isFunction c then - let - allAttrsEnabled = lib.pipe c [ - getStylixAttrs - builtins.attrValues - # If the attr has no enable option, it is instead disabled when null - (builtins.all (attr: attr.enable or (attr != null))) - ]; - in - lib.mkIf allAttrsEnabled (callModule c) else - c; + throw "stylix: mkTarget expected a configuration to be a function, an attribute set, or a path, but got ${builtins.typeOf config'}: ${ + lib.generators.toPretty { } config' + }"; + + cfg = config.stylix.targets.${name}; in { imports = imports ++ [ - { options.stylix.targets.${name} = callModule (lib.toFunction extraOptions); } + { options.stylix.targets.${name} = callModule false extraOptions; } ]; options.stylix.targets.${name}.enable = @@ -257,14 +269,8 @@ let config = lib.mkIf (config.stylix.enable && cfg.enable) ( lib.mkMerge ( - lib.optional (generalConfig != null) ( - callModule ( - if builtins.isPath generalConfig then import generalConfig else generalConfig - ) - ) - ++ map (c: mkConditionalConfig (if builtins.isPath c then import c else c)) ( - lib.toList configElements - ) + lib.singleton (callModule false generalConfig) + ++ map (callModule true) (lib.toList configElements) ) ); }; From e87a003de179a3eae9f4fd7c0ea00200f9b56965 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Sat, 19 Jul 2025 11:28:34 +0200 Subject: [PATCH 24/40] stylix/mk-target: rename generalConfig argument to unconditionalConfig Rename the generalConfig argument to unconditionalConfig to better imply the intentional lack of safeguarding. (cherry picked from commit 76d05fd9c068d63f0dd747d40bcb8a4a57720daa) --- stylix/mk-target.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/stylix/mk-target.nix b/stylix/mk-target.nix index 21cf51ce..aa3a1b68 100644 --- a/stylix/mk-target.nix +++ b/stylix/mk-target.nix @@ -22,7 +22,7 @@ name = "«name»"; humanName = "«human readable name»"; - generalConfig = + unconditionalConfig = lib.mkIf complexCondition { home.packages = [ pkgs.hello ]; }; @@ -125,14 +125,14 @@ { extension.enable = lib.mkEnableOption "the bloated dependency"; } ``` - `generalConfig` (Attribute set or function or path) +   `imports` (List) +   : The `imports` option forwarded to the Nixpkgs module system. + + `unconditionalConfig` (Attribute set or function or path) : This argument mirrors the `configElements` argument but intentionally lacks automatic safeguarding and should only be used for complex configurations where `configElements` is unsuitable. -   `imports` (List) -   : The `imports` option forwarded to the Nixpkgs module system. - # Environment The function is provided alongside module arguments in any modules imported @@ -149,7 +149,7 @@ # name = "example"; # humanName = "Example Target"; # -# generalConfig = +# unconditionalConfig = # { lib, pkgs }: # lib.mkIf complexCondition { # home.packages = [ pkgs.hello ]; @@ -182,8 +182,8 @@ configElements ? [ ], enableExample ? null, extraOptions ? { }, - generalConfig ? { }, imports ? [ ], + unconditionalConfig ? { }, }@args: let module = @@ -269,7 +269,7 @@ let config = lib.mkIf (config.stylix.enable && cfg.enable) ( lib.mkMerge ( - lib.singleton (callModule false generalConfig) + lib.singleton (callModule false unconditionalConfig) ++ map (callModule true) (lib.toList configElements) ) ); From 3fb65013f77e5d8dc08ff74e4c8e565cc0b26675 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Sat, 19 Jul 2025 11:28:35 +0200 Subject: [PATCH 25/40] treewide: rename mkTarget's configElements and extraOptions options Rename mkTarget's 'configElements' argument to 'config' and 'extraOptions' to 'options' to provide a more transparent interface with the underlying Nixpkgs module system. (cherry picked from commit 16df6b8448a856532b66ef8f7e012d29390d070b) --- doc/src/modules.md | 2 +- modules/alacritty/hm.nix | 2 +- modules/anki/hm.nix | 2 +- modules/ashell/hm.nix | 2 +- modules/avizo/hm.nix | 2 +- modules/bat/hm.nix | 2 +- modules/bemenu/hm.nix | 4 ++-- modules/blender/hm.nix | 4 ++-- modules/bspwm/hm.nix | 2 +- modules/btop/hm.nix | 2 +- modules/cava/hm.nix | 4 ++-- modules/cavalier/hm.nix | 2 +- modules/chromium/nixos.nix | 2 +- modules/console/droid.nix | 2 +- modules/console/nixos.nix | 2 +- modules/discord/nixcord.nix | 4 ++-- modules/discord/vencord.nix | 4 ++-- modules/discord/vesktop.nix | 4 ++-- modules/dunst/hm.nix | 2 +- modules/emacs/hm.nix | 2 +- modules/eog/hm.nix | 2 +- modules/fcitx5/hm.nix | 2 +- modules/feh/hm.nix | 2 +- modules/feh/nixos.nix | 2 +- modules/firefox/each-config.nix | 4 ++-- modules/fish/hm.nix | 2 +- modules/fish/nixos.nix | 2 +- modules/fnott/hm.nix | 2 +- modules/foliate/hm.nix | 2 +- modules/font-packages/darwin.nix | 2 +- modules/font-packages/hm.nix | 2 +- modules/font-packages/nixos.nix | 2 +- modules/fontconfig/fontconfig.nix | 2 +- modules/foot/hm.nix | 2 +- modules/forge/hm.nix | 2 +- modules/fuzzel/hm.nix | 2 +- modules/fzf/hm.nix | 2 +- modules/gdu/hm.nix | 2 +- modules/gedit/hm.nix | 2 +- modules/ghostty/hm.nix | 2 +- modules/gitui/hm.nix | 2 +- modules/glance/hm.nix | 2 +- modules/glance/nixos.nix | 2 +- modules/gnome-text-editor/hm.nix | 2 +- modules/gnome/hm.nix | 4 ++-- modules/gtk/hm.nix | 4 ++-- modules/gtk/nixos.nix | 2 +- modules/gtksourceview/hm.nix | 2 +- modules/halloy/hm.nix | 2 +- modules/helix/hm.nix | 4 ++-- modules/hyprland/hm.nix | 4 ++-- modules/hyprlock/hm.nix | 4 ++-- modules/hyprpanel/hm.nix | 2 +- modules/hyprpaper/hm.nix | 2 +- modules/i3/hm.nix | 4 ++-- modules/i3bar-river/hm.nix | 2 +- modules/jankyborders/darwin.nix | 2 +- modules/k9s/hm.nix | 2 +- modules/kitty/hm.nix | 4 ++-- modules/kmscon/nixos.nix | 2 +- modules/kubecolor/hm.nix | 2 +- modules/lazygit/hm.nix | 2 +- modules/lightdm/nixos.nix | 4 ++-- modules/limine/nixos.nix | 4 ++-- modules/mako/hm.nix | 2 +- modules/mangohud/hm.nix | 2 +- modules/micro/hm.nix | 2 +- modules/mpv/hm.nix | 2 +- modules/ncspot/hm.nix | 4 ++-- modules/neovim/neovide.nix | 2 +- modules/neovim/neovim.nix | 4 ++-- modules/neovim/nixvim.nix | 4 ++-- modules/neovim/nvf.nix | 4 ++-- modules/neovim/vim.nix | 2 +- modules/nushell/hm.nix | 2 +- modules/obsidian/hm.nix | 4 ++-- modules/opencode/hm.nix | 2 +- modules/plymouth/nixos.nix | 4 ++-- modules/qutebrowser/hm.nix | 2 +- modules/regreet/nixos.nix | 4 ++-- modules/rio/hm.nix | 2 +- modules/rofi/hm.nix | 2 +- modules/spicetify/spicetify.nix | 2 +- modules/spotify-player/hm.nix | 2 +- modules/starship/hm.nix | 2 +- modules/swaylock/hm.nix | 4 ++-- modules/swaync/hm.nix | 2 +- modules/sxiv/hm.nix | 2 +- modules/tmux/hm.nix | 2 +- modules/tofi/hm.nix | 2 +- modules/vicinae/hm.nix | 2 +- modules/vscode/hm.nix | 4 ++-- modules/waybar/hm.nix | 4 ++-- modules/wayfire/hm.nix | 4 ++-- modules/wayprompt/hm.nix | 2 +- modules/wezterm/hm.nix | 4 ++-- modules/wob/hm.nix | 2 +- modules/wofi/hm.nix | 2 +- modules/wpaperd/hm.nix | 2 +- modules/xfce/hm.nix | 2 +- modules/xresources/hm.nix | 2 +- modules/yazi/hm.nix | 4 ++-- modules/zathura/hm.nix | 2 +- modules/zed/hm.nix | 2 +- modules/zellij/hm.nix | 2 +- modules/zen-browser/hm.nix | 4 ++-- stylix/mk-target.nix | 30 ++++++++++++++++-------------- 107 files changed, 152 insertions(+), 150 deletions(-) diff --git a/doc/src/modules.md b/doc/src/modules.md index 615f268e..75e91cdb 100644 --- a/doc/src/modules.md +++ b/doc/src/modules.md @@ -52,7 +52,7 @@ mkTarget { name = "«name»"; humanName = "«human readable name»"; - configElements = + config = { colors }: { programs.«name».theme.background = colors.base00; diff --git a/modules/alacritty/hm.nix b/modules/alacritty/hm.nix index ed54e3bb..f2fba176 100644 --- a/modules/alacritty/hm.nix +++ b/modules/alacritty/hm.nix @@ -5,7 +5,7 @@ mkTarget { name = "alacritty"; humanName = "Alacritty"; - configElements = [ + config = [ ( { colors }: { diff --git a/modules/anki/hm.nix b/modules/anki/hm.nix index 9f3c3808..6c70413d 100644 --- a/modules/anki/hm.nix +++ b/modules/anki/hm.nix @@ -8,7 +8,7 @@ mkTarget { name = "anki"; humanName = "Anki"; - configElements = + config = { colors }: { programs.anki.addons = lib.singleton ( diff --git a/modules/ashell/hm.nix b/modules/ashell/hm.nix index 41616ac8..76830f91 100644 --- a/modules/ashell/hm.nix +++ b/modules/ashell/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "ashell"; humanName = "Ashell"; - configElements = [ + config = [ ( { colors }: { diff --git a/modules/avizo/hm.nix b/modules/avizo/hm.nix index 25900638..21de0fa2 100644 --- a/modules/avizo/hm.nix +++ b/modules/avizo/hm.nix @@ -4,7 +4,7 @@ mkTarget { humanName = "Avizo"; # Referenced https://github.com/stacyharper/base16-mako - configElements = + config = { colors, opacity }: { services.avizo = { diff --git a/modules/bat/hm.nix b/modules/bat/hm.nix index ff424fca..48ab60c7 100644 --- a/modules/bat/hm.nix +++ b/modules/bat/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "bat"; humanName = "Bat"; - configElements = + config = { colors }: { programs.bat = { diff --git a/modules/bemenu/hm.nix b/modules/bemenu/hm.nix index ca0d5a6a..0438ea75 100644 --- a/modules/bemenu/hm.nix +++ b/modules/bemenu/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "bemenu"; humanName = "bemenu"; - extraOptions = + options = { fonts }: { fontSize = lib.mkOption { @@ -24,7 +24,7 @@ mkTarget { }; }; - configElements = [ + config = [ ( { cfg, fonts }: { diff --git a/modules/blender/hm.nix b/modules/blender/hm.nix index e4484063..b042fe38 100644 --- a/modules/blender/hm.nix +++ b/modules/blender/hm.nix @@ -3,13 +3,13 @@ mkTarget { name = "blender"; humanName = "Blender"; - extraOptions.themeBody = lib.mkOption { + options.themeBody = lib.mkOption { type = lib.types.lines; default = ""; internal = true; }; - configElements = [ + config = [ ./color-theme.nix ./font-theme.nix ( diff --git a/modules/bspwm/hm.nix b/modules/bspwm/hm.nix index fb51e970..b30bcd86 100644 --- a/modules/bspwm/hm.nix +++ b/modules/bspwm/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "bspwm"; humanName = "bspwm"; - configElements = + config = { colors }: { xsession.windowManager.bspwm.settings = with colors.withHashtag; { diff --git a/modules/btop/hm.nix b/modules/btop/hm.nix index c7de0798..eb46381b 100644 --- a/modules/btop/hm.nix +++ b/modules/btop/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "btop"; humanName = "btop"; - configElements = [ + config = [ ( { opacity }: { diff --git a/modules/cava/hm.nix b/modules/cava/hm.nix index a0b1bc21..5fbfb08a 100644 --- a/modules/cava/hm.nix +++ b/modules/cava/hm.nix @@ -3,9 +3,9 @@ mkTarget { name = "cava"; humanName = "CAVA"; - extraOptions.rainbow.enable = lib.mkEnableOption "rainbow gradient theming"; + options.rainbow.enable = lib.mkEnableOption "rainbow gradient theming"; - configElements = + config = { cfg, colors }: let mkGradient = diff --git a/modules/cavalier/hm.nix b/modules/cavalier/hm.nix index e5979cc7..b922e71a 100644 --- a/modules/cavalier/hm.nix +++ b/modules/cavalier/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "cavalier"; humanName = "Cavalier"; - configElements = + config = { colors }: { programs.cavalier.settings.general = { diff --git a/modules/chromium/nixos.nix b/modules/chromium/nixos.nix index d0d2201b..4154809c 100644 --- a/modules/chromium/nixos.nix +++ b/modules/chromium/nixos.nix @@ -3,7 +3,7 @@ mkTarget { name = "chromium"; humanName = "Chromium, Google Chrome and Brave"; - configElements = + config = { colors }: { programs.chromium = { diff --git a/modules/console/droid.nix b/modules/console/droid.nix index caf1f42d..bb7fc37a 100644 --- a/modules/console/droid.nix +++ b/modules/console/droid.nix @@ -3,7 +3,7 @@ mkTarget { name = "console"; humanName = "the Nix-on-Droid console"; - configElements = + config = { colors }: { terminal.colors = with colors.withHashtag; rec { diff --git a/modules/console/nixos.nix b/modules/console/nixos.nix index e63ab5f8..9c1230e0 100644 --- a/modules/console/nixos.nix +++ b/modules/console/nixos.nix @@ -3,7 +3,7 @@ mkTarget { name = "console"; humanName = "the Linux kernel console"; - configElements = + config = { colors }: { console.colors = with colors; [ diff --git a/modules/discord/nixcord.nix b/modules/discord/nixcord.nix index d974f9b7..af86da35 100644 --- a/modules/discord/nixcord.nix +++ b/modules/discord/nixcord.nix @@ -10,7 +10,7 @@ mkTarget { name = "nixcord"; humanName = "Nixcord"; - extraOptions = { + options = { themeBody = lib.mkOption { type = lib.types.lines; default = ""; @@ -23,7 +23,7 @@ mkTarget { }; }; - configElements = (import ./common/theme-elements.nix "nixcord") ++ [ + config = (import ./common/theme-elements.nix "nixcord") ++ [ ( { cfg }: let diff --git a/modules/discord/vencord.nix b/modules/discord/vencord.nix index 623006f0..f7647412 100644 --- a/modules/discord/vencord.nix +++ b/modules/discord/vencord.nix @@ -4,7 +4,7 @@ mkTarget { name = "vencord"; humanName = "Vencord"; - extraOptions = { + options = { themeBody = lib.mkOption { type = lib.types.lines; default = ""; @@ -17,7 +17,7 @@ mkTarget { }; }; - configElements = (import ./common/theme-elements.nix "vencord") ++ [ + config = (import ./common/theme-elements.nix "vencord") ++ [ ( { cfg }: lib.mkIf diff --git a/modules/discord/vesktop.nix b/modules/discord/vesktop.nix index afd98c8d..24103a48 100644 --- a/modules/discord/vesktop.nix +++ b/modules/discord/vesktop.nix @@ -4,13 +4,13 @@ mkTarget { name = "vesktop"; humanName = "Vesktop"; - extraOptions.themeBody = lib.mkOption { + options.themeBody = lib.mkOption { type = lib.types.lines; default = ""; internal = true; }; - configElements = (import ./common/theme-elements.nix "vesktop") ++ [ + config = (import ./common/theme-elements.nix "vesktop") ++ [ ( { cfg }: lib.mkIf (cfg.themeBody != (import ./common/theme-header.nix)) { diff --git a/modules/dunst/hm.nix b/modules/dunst/hm.nix index 9614aca2..61911221 100644 --- a/modules/dunst/hm.nix +++ b/modules/dunst/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "dunst"; humanName = "Dunst"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/emacs/hm.nix b/modules/emacs/hm.nix index 70a2d776..0bb705fd 100644 --- a/modules/emacs/hm.nix +++ b/modules/emacs/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "emacs"; humanName = "Emacs"; - configElements = [ + config = [ ( { opacity }: { diff --git a/modules/eog/hm.nix b/modules/eog/hm.nix index 7f1cd9f9..ff5d3c32 100644 --- a/modules/eog/hm.nix +++ b/modules/eog/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "eog"; humanName = "Eye of GNOME Image Viewer"; - configElements = + config = { colors }: { dconf.settings."org/gnome/eog/view" = { diff --git a/modules/fcitx5/hm.nix b/modules/fcitx5/hm.nix index 7fbffb7d..91b03610 100644 --- a/modules/fcitx5/hm.nix +++ b/modules/fcitx5/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "fcitx5"; humanName = "fcitx5"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/feh/hm.nix b/modules/feh/hm.nix index d0187ebf..4b5c4d70 100644 --- a/modules/feh/hm.nix +++ b/modules/feh/hm.nix @@ -24,7 +24,7 @@ mkTarget { || xmonad.enable ''; - configElements = + config = { imageScalingMode, image }: { xsession.initExtra = diff --git a/modules/feh/nixos.nix b/modules/feh/nixos.nix index cc0ee85e..6049cc2c 100644 --- a/modules/feh/nixos.nix +++ b/modules/feh/nixos.nix @@ -16,7 +16,7 @@ mkTarget { xmonad.enable || i3.enable ''; - configElements = + config = { image, imageScalingMode }: { services.xserver.displayManager.sessionCommands = diff --git a/modules/firefox/each-config.nix b/modules/firefox/each-config.nix index eaaed89d..def60076 100644 --- a/modules/firefox/each-config.nix +++ b/modules/firefox/each-config.nix @@ -14,7 +14,7 @@ mkTarget { inherit name humanName; - extraOptions = { + options = { profileNames = lib.mkOption { description = "The ${humanName} profile names to apply styling on."; type = lib.types.listOf lib.types.str; @@ -26,7 +26,7 @@ mkTarget { firefoxGnomeTheme.enable = lib.mkEnableOption "[Firefox GNOME theme](https://github.com/rafaelmardojai/firefox-gnome-theme) on ${humanName}"; }; - configElements = [ + config = [ ( { cfg }: { diff --git a/modules/fish/hm.nix b/modules/fish/hm.nix index 9763c50b..f8e2f727 100644 --- a/modules/fish/hm.nix +++ b/modules/fish/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "fish"; humanName = "Fish"; - configElements = + config = { colors, inputs }: { programs.fish.interactiveShellInit = import ./prompt.nix { diff --git a/modules/fish/nixos.nix b/modules/fish/nixos.nix index 02affea0..f53e7f47 100644 --- a/modules/fish/nixos.nix +++ b/modules/fish/nixos.nix @@ -3,7 +3,7 @@ mkTarget { name = "fish"; humanName = "Fish"; - configElements = + config = { colors, inputs }: { programs.fish.promptInit = import ./prompt.nix { inherit colors inputs; }; diff --git a/modules/fnott/hm.nix b/modules/fnott/hm.nix index 984459b4..ff37d15c 100644 --- a/modules/fnott/hm.nix +++ b/modules/fnott/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "fnott"; humanName = "Fnott"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/foliate/hm.nix b/modules/foliate/hm.nix index 43ce4f3d..2d9b7a40 100644 --- a/modules/foliate/hm.nix +++ b/modules/foliate/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "foliate"; humanName = "Foliate"; - configElements = + config = { colors }: { programs.foliate = { diff --git a/modules/font-packages/darwin.nix b/modules/font-packages/darwin.nix index eac7fa35..6a067eb9 100644 --- a/modules/font-packages/darwin.nix +++ b/modules/font-packages/darwin.nix @@ -3,7 +3,7 @@ mkTarget { name = "font-packages"; humanName = "Font packages"; - configElements = + config = { fonts }: { fonts = { inherit (fonts) packages; }; diff --git a/modules/font-packages/hm.nix b/modules/font-packages/hm.nix index 3e730bd6..a45926b3 100644 --- a/modules/font-packages/hm.nix +++ b/modules/font-packages/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "font-packages"; humanName = "Font packages"; - configElements = + config = { fonts }: { home = { inherit (fonts) packages; }; diff --git a/modules/font-packages/nixos.nix b/modules/font-packages/nixos.nix index eac7fa35..6a067eb9 100644 --- a/modules/font-packages/nixos.nix +++ b/modules/font-packages/nixos.nix @@ -3,7 +3,7 @@ mkTarget { name = "font-packages"; humanName = "Font packages"; - configElements = + config = { fonts }: { fonts = { inherit (fonts) packages; }; diff --git a/modules/fontconfig/fontconfig.nix b/modules/fontconfig/fontconfig.nix index b2fadd2c..dc4cd3e6 100644 --- a/modules/fontconfig/fontconfig.nix +++ b/modules/fontconfig/fontconfig.nix @@ -4,7 +4,7 @@ mkTarget { name = "fontconfig"; humanName = "Fontconfig"; - configElements = + config = { listTargetIndex, fonts }: { fonts.fontconfig.defaultFonts = lib.genAttrs [ diff --git a/modules/foot/hm.nix b/modules/foot/hm.nix index b1afc764..9b3dde9a 100644 --- a/modules/foot/hm.nix +++ b/modules/foot/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "foot"; humanName = "Foot"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/forge/hm.nix b/modules/forge/hm.nix index 04000a72..c67d2ad0 100644 --- a/modules/forge/hm.nix +++ b/modules/forge/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "forge"; humanName = "Forge"; - configElements = + config = { colors }: { xdg.configFile."forge/stylesheet/forge/stylesheet.css".source = colors { diff --git a/modules/fuzzel/hm.nix b/modules/fuzzel/hm.nix index 29b4836f..0a3ab52d 100644 --- a/modules/fuzzel/hm.nix +++ b/modules/fuzzel/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "fuzzel"; humanName = "Fuzzel"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/fzf/hm.nix b/modules/fzf/hm.nix index 08df42e2..f748c515 100644 --- a/modules/fzf/hm.nix +++ b/modules/fzf/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "fzf"; humanName = "Fzf"; - configElements = + config = { colors }: { programs.fzf.colors = with colors.withHashtag; { diff --git a/modules/gdu/hm.nix b/modules/gdu/hm.nix index 6c2f57a7..a36b1635 100644 --- a/modules/gdu/hm.nix +++ b/modules/gdu/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "gdu"; humanName = "go DiskUsage()"; - configElements = + config = { colors }: { xdg.configFile."gdu/gdu.yaml" = { diff --git a/modules/gedit/hm.nix b/modules/gedit/hm.nix index b31c47ec..fa8f78ca 100644 --- a/modules/gedit/hm.nix +++ b/modules/gedit/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "gedit"; humanName = "GEdit"; - configElements = + config = { colors }: { xdg.dataFile = { diff --git a/modules/ghostty/hm.nix b/modules/ghostty/hm.nix index 5ebb8ef6..a2191935 100644 --- a/modules/ghostty/hm.nix +++ b/modules/ghostty/hm.nix @@ -6,7 +6,7 @@ mkTarget { name = "ghostty"; humanName = "Ghostty"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/gitui/hm.nix b/modules/gitui/hm.nix index 7246cd04..90b6e4df 100644 --- a/modules/gitui/hm.nix +++ b/modules/gitui/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "gitui"; humanName = "GitUI"; - configElements = + config = { colors }: { programs.gitui.theme = with colors.withHashtag; '' diff --git a/modules/glance/hm.nix b/modules/glance/hm.nix index 6448d12b..5ba9162f 100644 --- a/modules/glance/hm.nix +++ b/modules/glance/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "glance"; humanName = "Glance"; - configElements = [ + config = [ ( { polarity }: { diff --git a/modules/glance/nixos.nix b/modules/glance/nixos.nix index 6448d12b..5ba9162f 100644 --- a/modules/glance/nixos.nix +++ b/modules/glance/nixos.nix @@ -3,7 +3,7 @@ mkTarget { name = "glance"; humanName = "Glance"; - configElements = [ + config = [ ( { polarity }: { diff --git a/modules/gnome-text-editor/hm.nix b/modules/gnome-text-editor/hm.nix index 8caea6ba..c72ba084 100644 --- a/modules/gnome-text-editor/hm.nix +++ b/modules/gnome-text-editor/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "gnome-text-editor"; humanName = "GNOME Text Editor"; - configElements = { + config = { dconf.settings."org/gnome/TextEditor".style-scheme = "stylix"; }; } diff --git a/modules/gnome/hm.nix b/modules/gnome/hm.nix index f94add89..fe3cdf32 100644 --- a/modules/gnome/hm.nix +++ b/modules/gnome/hm.nix @@ -12,9 +12,9 @@ mkTarget { autoEnable = pkgs.stdenv.hostPlatform.isLinux; autoEnableExpr = "pkgs.stdenv.hostPlatform.isLinux"; - extraOptions.useWallpaper = config.lib.stylix.mkEnableWallpaper "GNOME" true; + options.useWallpaper = config.lib.stylix.mkEnableWallpaper "GNOME" true; - configElements = [ + config = [ ( { cfg, image }: { diff --git a/modules/gtk/hm.nix b/modules/gtk/hm.nix index 1a1d8aec..88ebf8b6 100644 --- a/modules/gtk/hm.nix +++ b/modules/gtk/hm.nix @@ -10,7 +10,7 @@ mkTarget { name = "gtk"; humanName = "all GTK3, GTK4 and Libadwaita apps"; - extraOptions = { + options = { extraCss = lib.mkOption { description = '' Extra code added to `gtk-3.0/gtk.css` and `gtk-4.0/gtk.css`. @@ -26,7 +26,7 @@ mkTarget { flatpakSupport.enable = config.lib.stylix.mkEnableTarget "support for theming Flatpak apps" true; }; - configElements = [ + config = [ { warnings = lib.optional (config.gtk.gtk3.extraCss != "" || config.gtk.gtk4.extraCss != "") diff --git a/modules/gtk/nixos.nix b/modules/gtk/nixos.nix index 90ff4712..2300f90b 100644 --- a/modules/gtk/nixos.nix +++ b/modules/gtk/nixos.nix @@ -3,7 +3,7 @@ mkTarget { name = "gtk"; humanName = "all GTK3, GTK4 and Libadwaita apps"; - configElements = { + 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 5aa58b62..00bd9e76 100644 --- a/modules/gtksourceview/hm.nix +++ b/modules/gtksourceview/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "gtksourceview"; humanName = "GTKSourceView"; - configElements = + config = { colors, ... }: { xdg.dataFile = builtins.listToAttrs ( diff --git a/modules/halloy/hm.nix b/modules/halloy/hm.nix index b91f02c5..b10f0727 100644 --- a/modules/halloy/hm.nix +++ b/modules/halloy/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "halloy"; humanName = "Halloy"; - configElements = + config = { colors }: { programs.halloy = { diff --git a/modules/helix/hm.nix b/modules/helix/hm.nix index 28bbddaf..1b4403bb 100644 --- a/modules/helix/hm.nix +++ b/modules/helix/hm.nix @@ -8,12 +8,12 @@ mkTarget { name = "helix"; humanName = "Helix"; - extraOptions.transparent = lib.mkEnableOption "transparent theming" // { + options.transparent = lib.mkEnableOption "transparent theming" // { internal = true; default = false; }; - configElements = [ + config = [ ( { opacity }: { diff --git a/modules/hyprland/hm.nix b/modules/hyprland/hm.nix index 119ba797..e15b7b29 100644 --- a/modules/hyprland/hm.nix +++ b/modules/hyprland/hm.nix @@ -7,7 +7,7 @@ mkTarget { name = "hyprland"; humanName = "Hyprland"; - extraOptions = + options = { image }: { hyprpaper.enable = config.lib.stylix.mkEnableTargetWith { @@ -17,7 +17,7 @@ mkTarget { }; }; - configElements = [ + config = [ ( { colors }: { diff --git a/modules/hyprlock/hm.nix b/modules/hyprlock/hm.nix index 6e644633..abd03139 100644 --- a/modules/hyprlock/hm.nix +++ b/modules/hyprlock/hm.nix @@ -8,9 +8,9 @@ mkTarget { name = "hyprlock"; humanName = "Hyprlock"; - extraOptions.useWallpaper = config.lib.stylix.mkEnableWallpaper "Hyprlock" true; + options.useWallpaper = config.lib.stylix.mkEnableWallpaper "Hyprlock" true; - configElements = [ + config = [ ( { cfg, image }: { diff --git a/modules/hyprpanel/hm.nix b/modules/hyprpanel/hm.nix index 32e38df8..fb44e9a5 100644 --- a/modules/hyprpanel/hm.nix +++ b/modules/hyprpanel/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "hyprpanel"; humanName = "HyprPanel"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/hyprpaper/hm.nix b/modules/hyprpaper/hm.nix index f088a3ed..e230f0c5 100644 --- a/modules/hyprpaper/hm.nix +++ b/modules/hyprpaper/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "hyprpaper"; humanName = "Hyprpaper"; - configElements = + config = { image }: { services.hyprpaper.settings = { diff --git a/modules/i3/hm.nix b/modules/i3/hm.nix index 6fccc166..019b4177 100644 --- a/modules/i3/hm.nix +++ b/modules/i3/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "i3"; humanName = "i3"; - extraOptions.exportedBarConfig = lib.mkOption { + options.exportedBarConfig = lib.mkOption { type = lib.types.attrs; default = { }; description = '' @@ -29,7 +29,7 @@ mkTarget { } ); - configElements = [ + config = [ ( { fonts }: let diff --git a/modules/i3bar-river/hm.nix b/modules/i3bar-river/hm.nix index cd48c10d..2bd22a0f 100644 --- a/modules/i3bar-river/hm.nix +++ b/modules/i3bar-river/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "i3bar-river"; humanName = "i3bar-river"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/jankyborders/darwin.nix b/modules/jankyborders/darwin.nix index 21a08fcc..e4948769 100644 --- a/modules/jankyborders/darwin.nix +++ b/modules/jankyborders/darwin.nix @@ -8,7 +8,7 @@ mkTarget { name = "jankyborders"; humanName = "JankyBorders"; - configElements = + config = { colors, opacity }: { services.jankyborders = diff --git a/modules/k9s/hm.nix b/modules/k9s/hm.nix index e172b99b..f0a0bc26 100644 --- a/modules/k9s/hm.nix +++ b/modules/k9s/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "k9s"; humanName = "k9s"; - configElements = + config = { colors }: { programs.k9s = { diff --git a/modules/kitty/hm.nix b/modules/kitty/hm.nix index 573d1985..d17b5262 100644 --- a/modules/kitty/hm.nix +++ b/modules/kitty/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "kitty"; humanName = "Kitty"; - extraOptions = { + options = { variant256Colors = lib.mkOption { description = '' Whether to use the [256-color variant](https://github.com/kdrag0n/base16-kitty#256-color-variants) @@ -14,7 +14,7 @@ mkTarget { }; }; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/kmscon/nixos.nix b/modules/kmscon/nixos.nix index 83c6f6b2..830e3828 100644 --- a/modules/kmscon/nixos.nix +++ b/modules/kmscon/nixos.nix @@ -3,7 +3,7 @@ mkTarget { name = "kmscon"; humanName = "the kmscon virtual console"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/kubecolor/hm.nix b/modules/kubecolor/hm.nix index 0670526c..4b461f84 100644 --- a/modules/kubecolor/hm.nix +++ b/modules/kubecolor/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "kubecolor"; humanName = "kubecolor"; - configElements = [ + config = [ ( { polarity }: { diff --git a/modules/lazygit/hm.nix b/modules/lazygit/hm.nix index d13c4601..50850ea4 100644 --- a/modules/lazygit/hm.nix +++ b/modules/lazygit/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "lazygit"; humanName = "lazygit"; - configElements = + config = { colors }: { programs.lazygit.settings.gui.theme = with colors.withHashtag; { diff --git a/modules/lightdm/nixos.nix b/modules/lightdm/nixos.nix index c7fa38ed..b0720711 100644 --- a/modules/lightdm/nixos.nix +++ b/modules/lightdm/nixos.nix @@ -8,9 +8,9 @@ mkTarget { name = "lightdm"; humanName = "LightDM"; - extraOptions.useWallpaper = config.lib.stylix.mkEnableWallpaper "LightDM" true; + options.useWallpaper = config.lib.stylix.mkEnableWallpaper "LightDM" true; - configElements = + config = { cfg, image }: { services.xserver.displayManager.lightdm.background = diff --git a/modules/limine/nixos.nix b/modules/limine/nixos.nix index 6a7294de..74b79071 100644 --- a/modules/limine/nixos.nix +++ b/modules/limine/nixos.nix @@ -8,9 +8,9 @@ mkTarget { name = "limine"; humanName = "Limine"; - extraOptions.useWallpaper = config.lib.stylix.mkEnableWallpaper "Limine" true; + options.useWallpaper = config.lib.stylix.mkEnableWallpaper "Limine" true; - configElements = [ + config = [ ( { colors }: { diff --git a/modules/mako/hm.nix b/modules/mako/hm.nix index 3314f0e5..312fab72 100644 --- a/modules/mako/hm.nix +++ b/modules/mako/hm.nix @@ -4,7 +4,7 @@ mkTarget { humanName = "Mako"; # Referenced https://github.com/stacyharper/base16-mako - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/mangohud/hm.nix b/modules/mangohud/hm.nix index cad9acc3..f513f9e0 100644 --- a/modules/mangohud/hm.nix +++ b/modules/mangohud/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "mangohud"; humanName = "mangohud"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/micro/hm.nix b/modules/micro/hm.nix index 36f26d11..a1a76db8 100644 --- a/modules/micro/hm.nix +++ b/modules/micro/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "micro"; humanName = "micro"; - configElements = { + config = { # TODO: Provide a real colorscheme once [1] is resolved. # # [1]: https://github.com/nix-community/stylix/issues/249 diff --git a/modules/mpv/hm.nix b/modules/mpv/hm.nix index 7cc67582..1c0db2fe 100644 --- a/modules/mpv/hm.nix +++ b/modules/mpv/hm.nix @@ -2,7 +2,7 @@ mkTarget { name = "mpv"; humanName = "mpv"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/ncspot/hm.nix b/modules/ncspot/hm.nix index e5192474..d03a9ec3 100644 --- a/modules/ncspot/hm.nix +++ b/modules/ncspot/hm.nix @@ -3,14 +3,14 @@ mkTarget { name = "ncspot"; humanName = "Ncspot"; - extraOptions.background = lib.mkOption { + options.background = lib.mkOption { type = lib.types.nullOr lib.types.str; description = "Used to set bg even if `opacity` or `colors` is null."; internal = true; default = null; }; - configElements = [ + config = [ ( { cfg }: lib.mkIf (cfg.background != null) { diff --git a/modules/neovim/neovide.nix b/modules/neovim/neovide.nix index 519949b7..5dc67924 100644 --- a/modules/neovim/neovide.nix +++ b/modules/neovim/neovide.nix @@ -3,7 +3,7 @@ mkTarget: mkTarget { name = "neovide"; humanName = "Neovide"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/neovim/neovim.nix b/modules/neovim/neovim.nix index 62161ebd..fef4c98e 100644 --- a/modules/neovim/neovim.nix +++ b/modules/neovim/neovim.nix @@ -3,7 +3,7 @@ mkTarget: mkTarget { name = "neovim"; humanName = "Neovim"; - extraOptions = { + options = { plugin = lib.mkOption { type = lib.types.enum [ "base16-nvim" @@ -25,7 +25,7 @@ mkTarget { }; }; - configElements = [ + config = [ ( { colors, cfg }: { diff --git a/modules/neovim/nixvim.nix b/modules/neovim/nixvim.nix index 2dc091c2..b9a7e49b 100644 --- a/modules/neovim/nixvim.nix +++ b/modules/neovim/nixvim.nix @@ -3,7 +3,7 @@ mkTarget: mkTarget { name = "nixvim"; humanName = "NixVim"; - extraOptions = { + options = { plugin = lib.mkOption { type = lib.types.enum [ "base16-nvim" @@ -37,7 +37,7 @@ mkTarget { }; }; - configElements = [ + config = [ ( { colors }: { diff --git a/modules/neovim/nvf.nix b/modules/neovim/nvf.nix index 88ed74ff..8aa22438 100644 --- a/modules/neovim/nvf.nix +++ b/modules/neovim/nvf.nix @@ -3,7 +3,7 @@ mkTarget: mkTarget { name = "nvf"; humanName = "nvf"; - extraOptions = { + options = { plugin = lib.mkOption { type = lib.types.enum [ "base16" @@ -15,7 +15,7 @@ mkTarget { transparentBackground = lib.mkEnableOption "background transparency for the main Neovim window"; }; - configElements = lib.optionals (options.programs ? nvf) [ + config = lib.optionals (options.programs ? nvf) [ ( { colors, cfg }: { diff --git a/modules/neovim/vim.nix b/modules/neovim/vim.nix index 20bc48b3..84effd99 100644 --- a/modules/neovim/vim.nix +++ b/modules/neovim/vim.nix @@ -4,7 +4,7 @@ mkTarget { name = "vim"; humanName = "Vim"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/nushell/hm.nix b/modules/nushell/hm.nix index 05d6f0a6..61a4b164 100644 --- a/modules/nushell/hm.nix +++ b/modules/nushell/hm.nix @@ -4,7 +4,7 @@ mkTarget { humanName = "Nushell"; # Adapted from https://www.nushell.sh/book/coloring_and_theming.html#theming - configElements = + config = { colors }: { programs.nushell.extraConfig = with colors.withHashtag; '' diff --git a/modules/obsidian/hm.nix b/modules/obsidian/hm.nix index ecaa66e5..017b5a8f 100644 --- a/modules/obsidian/hm.nix +++ b/modules/obsidian/hm.nix @@ -3,13 +3,13 @@ mkTarget { name = "obsidian"; humanName = "Obsidian"; - extraOptions.vaultNames = lib.mkOption { + options.vaultNames = lib.mkOption { description = "The obsidian vault names to apply styling on."; type = lib.types.listOf lib.types.str; default = [ ]; }; - configElements = [ + config = [ ( { cfg, fonts }: { diff --git a/modules/opencode/hm.nix b/modules/opencode/hm.nix index bb603458..edbd04d0 100644 --- a/modules/opencode/hm.nix +++ b/modules/opencode/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "opencode"; humanName = "OpenCode"; - configElements = + config = { colors }: { programs.opencode = diff --git a/modules/plymouth/nixos.nix b/modules/plymouth/nixos.nix index acb1c48d..06cffbef 100644 --- a/modules/plymouth/nixos.nix +++ b/modules/plymouth/nixos.nix @@ -8,7 +8,7 @@ mkTarget { name = "plymouth"; humanName = "the Plymouth boot screen"; - extraOptions = { + options = { logo = lib.mkOption { description = "Logo to be used on the boot screen."; type = with lib.types; either path package; @@ -35,7 +35,7 @@ mkTarget { ) ]; - configElements = + config = { cfg, colors }: let themeScript = import ./theme-script.nix { inherit lib cfg colors; }; diff --git a/modules/qutebrowser/hm.nix b/modules/qutebrowser/hm.nix index 1f2e0158..4996a1f5 100644 --- a/modules/qutebrowser/hm.nix +++ b/modules/qutebrowser/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "qutebrowser"; humanName = "Qutebrowser"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/regreet/nixos.nix b/modules/regreet/nixos.nix index ce77a5eb..81f66933 100644 --- a/modules/regreet/nixos.nix +++ b/modules/regreet/nixos.nix @@ -12,7 +12,7 @@ mkTarget { autoEnable = pkgs.stdenv.hostPlatform.isLinux; autoEnableExpr = "pkgs.stdenv.hostPlatform.isLinux"; - extraOptions = { + options = { useWallpaper = config.lib.stylix.mkEnableWallpaper "ReGreet" true; extraCss = lib.mkOption { description = '' @@ -24,7 +24,7 @@ mkTarget { }; }; - configElements = [ + config = [ { warnings = let diff --git a/modules/rio/hm.nix b/modules/rio/hm.nix index ac6bdb5e..e518670c 100644 --- a/modules/rio/hm.nix +++ b/modules/rio/hm.nix @@ -5,7 +5,7 @@ mkTarget { name = "rio"; humanName = "Rio"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/rofi/hm.nix b/modules/rofi/hm.nix index a0b03942..fbb8ce0c 100644 --- a/modules/rofi/hm.nix +++ b/modules/rofi/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "rofi"; humanName = "Rofi"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/spicetify/spicetify.nix b/modules/spicetify/spicetify.nix index 045230c6..c1af818c 100644 --- a/modules/spicetify/spicetify.nix +++ b/modules/spicetify/spicetify.nix @@ -9,7 +9,7 @@ mkTarget { name = "spicetify"; humanName = "Spicetify"; - configElements = + config = { colors }: lib.optionalAttrs (options.programs ? spicetify) { programs.spicetify = { diff --git a/modules/spotify-player/hm.nix b/modules/spotify-player/hm.nix index 6df7c5d8..a3745fe2 100644 --- a/modules/spotify-player/hm.nix +++ b/modules/spotify-player/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "spotify-player"; humanName = "spotify-player"; - configElements = + config = { colors }: { programs.spotify-player = { diff --git a/modules/starship/hm.nix b/modules/starship/hm.nix index bdcc4a1f..44aa23b9 100644 --- a/modules/starship/hm.nix +++ b/modules/starship/hm.nix @@ -4,7 +4,7 @@ mkTarget { name = "starship"; humanName = "Starship"; - configElements = + config = { colors }: { programs.starship.settings = { diff --git a/modules/swaylock/hm.nix b/modules/swaylock/hm.nix index 910ef72f..0e2219e2 100644 --- a/modules/swaylock/hm.nix +++ b/modules/swaylock/hm.nix @@ -26,9 +26,9 @@ mkTarget { lib.versionAtLeast config.home.stateVersion "23.05" && pkgs.stdenv.hostPlatform.isLinux ''; - extraOptions.useWallpaper = config.lib.stylix.mkEnableWallpaper "Swaylock" true; + options.useWallpaper = config.lib.stylix.mkEnableWallpaper "Swaylock" true; - configElements = [ + config = [ ( { colors }: { diff --git a/modules/swaync/hm.nix b/modules/swaync/hm.nix index 271a437d..1670e287 100644 --- a/modules/swaync/hm.nix +++ b/modules/swaync/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "swaync"; humanName = "SwayNC"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/sxiv/hm.nix b/modules/sxiv/hm.nix index 6fce9add..ddd40e9f 100644 --- a/modules/sxiv/hm.nix +++ b/modules/sxiv/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "sxiv"; humanName = "Sxiv"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/tmux/hm.nix b/modules/tmux/hm.nix index 44310c10..6d3c8538 100644 --- a/modules/tmux/hm.nix +++ b/modules/tmux/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "tmux"; humanName = "Tmux"; - configElements = + config = { colors, inputs }: { programs.tmux.extraConfig = '' diff --git a/modules/tofi/hm.nix b/modules/tofi/hm.nix index 5e68f946..a9b43ab0 100644 --- a/modules/tofi/hm.nix +++ b/modules/tofi/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "tofi"; humanName = "Tofi"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/vicinae/hm.nix b/modules/vicinae/hm.nix index fc17baa3..53dab221 100644 --- a/modules/vicinae/hm.nix +++ b/modules/vicinae/hm.nix @@ -8,7 +8,7 @@ mkTarget { name = "vicinae"; humanName = "Vicinae"; - configElements = lib.optionals (options.services ? vicinae) [ + config = lib.optionals (options.services ? vicinae) [ ( { colors, polarity }: { diff --git a/modules/vscode/hm.nix b/modules/vscode/hm.nix index 42b3fcc9..c4d7d72f 100644 --- a/modules/vscode/hm.nix +++ b/modules/vscode/hm.nix @@ -9,13 +9,13 @@ mkTarget { name = "vscode"; humanName = "VSCode"; - extraOptions.profileNames = lib.mkOption { + options.profileNames = lib.mkOption { description = "The VSCode profile names to apply styling on."; type = lib.types.listOf lib.types.str; default = [ "default" ]; }; - configElements = [ + config = [ ( { cfg }: { diff --git a/modules/waybar/hm.nix b/modules/waybar/hm.nix index 9c5c166a..e0be29d2 100644 --- a/modules/waybar/hm.nix +++ b/modules/waybar/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "waybar"; humanName = "Waybar"; - extraOptions = { + options = { background = lib.mkOption { type = lib.types.nullOr lib.types.str; description = "Used to set bg even if `opacity` or `colors` is null"; @@ -43,7 +43,7 @@ mkTarget { }; }; - configElements = [ + config = [ ( { cfg }: { diff --git a/modules/wayfire/hm.nix b/modules/wayfire/hm.nix index 437cc6bb..b3723ea3 100644 --- a/modules/wayfire/hm.nix +++ b/modules/wayfire/hm.nix @@ -9,9 +9,9 @@ mkTarget { name = "wayfire"; humanName = "Wayfire"; - extraOptions.useWallpaper = config.lib.stylix.mkEnableWallpaper "wayfire" true; + options.useWallpaper = config.lib.stylix.mkEnableWallpaper "wayfire" true; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/wayprompt/hm.nix b/modules/wayprompt/hm.nix index 8f5486a5..b88bc3f8 100644 --- a/modules/wayprompt/hm.nix +++ b/modules/wayprompt/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "wayprompt"; humanName = "Wayprompt"; - configElements = + config = { colors, opacity }: let opacity' = lib.toHexString (builtins.ceil (opacity.popups * 255)); diff --git a/modules/wezterm/hm.nix b/modules/wezterm/hm.nix index cd26a74e..92d08410 100644 --- a/modules/wezterm/hm.nix +++ b/modules/wezterm/hm.nix @@ -7,12 +7,12 @@ mkTarget { name = "wezterm"; humanName = "WezTerm"; - extraOptions.luaBody = lib.mkOption { + options.luaBody = lib.mkOption { type = lib.types.lines; default = ""; internal = true; }; - configElements = [ + config = [ ( { colors }: with colors; diff --git a/modules/wob/hm.nix b/modules/wob/hm.nix index 6e2b7cef..d7b5f29d 100644 --- a/modules/wob/hm.nix +++ b/modules/wob/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "wob"; humanName = "wob"; - configElements = + config = { colors }: { services.wob.settings = { diff --git a/modules/wofi/hm.nix b/modules/wofi/hm.nix index 7a4684e3..eb816d59 100644 --- a/modules/wofi/hm.nix +++ b/modules/wofi/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "wofi"; humanName = "wofi"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/wpaperd/hm.nix b/modules/wpaperd/hm.nix index 2ee840e4..23fbefb9 100644 --- a/modules/wpaperd/hm.nix +++ b/modules/wpaperd/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "wpaperd"; humanName = "wpaperd"; - configElements = + config = { imageScalingMode, image }: ( let diff --git a/modules/xfce/hm.nix b/modules/xfce/hm.nix index 0eeae1b7..f258d7ea 100644 --- a/modules/xfce/hm.nix +++ b/modules/xfce/hm.nix @@ -5,7 +5,7 @@ mkTarget { # Disabled by default due to https://github.com/nix-community/stylix/issues/180 autoEnable = false; - configElements = + config = { fonts }: { xfconf.settings = with fonts; { diff --git a/modules/xresources/hm.nix b/modules/xresources/hm.nix index 3a9fafb8..826e1ce0 100644 --- a/modules/xresources/hm.nix +++ b/modules/xresources/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "xresources"; humanName = "Xresources"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/yazi/hm.nix b/modules/yazi/hm.nix index 397f8874..c028b45f 100644 --- a/modules/yazi/hm.nix +++ b/modules/yazi/hm.nix @@ -4,13 +4,13 @@ mkTarget { name = "yazi"; humanName = "Yazi"; - extraOptions.boldDirectory = lib.mkOption { + options.boldDirectory = lib.mkOption { description = "Whether to use bold font for directories."; type = lib.types.bool; default = true; }; - configElements = + config = { cfg, colors }: { programs.yazi.theme = diff --git a/modules/zathura/hm.nix b/modules/zathura/hm.nix index cfaec37e..08c30af8 100644 --- a/modules/zathura/hm.nix +++ b/modules/zathura/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "zathura"; humanName = "Zathura"; - configElements = + config = { colors, opacity }: { programs.zathura.options = diff --git a/modules/zed/hm.nix b/modules/zed/hm.nix index 29155344..6e030866 100644 --- a/modules/zed/hm.nix +++ b/modules/zed/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "zed"; humanName = "zed"; - configElements = [ + config = [ ( { fonts }: { diff --git a/modules/zellij/hm.nix b/modules/zellij/hm.nix index 2580aa6a..bca443d9 100644 --- a/modules/zellij/hm.nix +++ b/modules/zellij/hm.nix @@ -3,7 +3,7 @@ mkTarget { name = "zellij"; humanName = "zellij"; - configElements = + config = { colors }: { programs.zellij.themes.stylix = { diff --git a/modules/zen-browser/hm.nix b/modules/zen-browser/hm.nix index 04495db1..44d97cce 100644 --- a/modules/zen-browser/hm.nix +++ b/modules/zen-browser/hm.nix @@ -9,7 +9,7 @@ mkTarget { name = "zen-browser"; humanName = "Zen Browser"; - extraOptions = { + options = { profileNames = lib.mkOption { description = "The Zen Browser profile names to apply styling on."; type = lib.types.listOf lib.types.str; @@ -25,7 +25,7 @@ mkTarget { }; }; - configElements = lib.optionals (options.programs ? zen-browser) [ + config = lib.optionals (options.programs ? zen-browser) [ ( { cfg }: { diff --git a/stylix/mk-target.nix b/stylix/mk-target.nix index aa3a1b68..f987c3d9 100644 --- a/stylix/mk-target.nix +++ b/stylix/mk-target.nix @@ -27,7 +27,7 @@ home.packages = [ pkgs.hello ]; }; - configElements = [ + config = [ { programs.«name».theme.name = "stylix"; } ( @@ -82,7 +82,7 @@ The default (`true`) is inherited from `mkEnableTargetWith`. - `configElements` (List or attribute set or function or path) + `config` (List or attribute set or function or path) : Configuration functions that are automatically safeguarded when any of their arguments is disabled. The provided `cfg` argument conveniently aliases to `config.stylix.targets.${name}`. @@ -115,7 +115,10 @@ automatically by `mkEnableTargetWith` and depends on `autoEnable` and whether an `autoEnableExpr` is used. - `extraOptions` (Attribute set) +   `imports` (List) +   : The `imports` option forwarded to the Nixpkgs module system. + + `options` (Attribute set) : Additional options to be added in the `stylix.targets.${name}` namespace along the `stylix.targets.${name}.enable` option. @@ -125,13 +128,10 @@ { extension.enable = lib.mkEnableOption "the bloated dependency"; } ``` -   `imports` (List) -   : The `imports` option forwarded to the Nixpkgs module system. - `unconditionalConfig` (Attribute set or function or path) - : This argument mirrors the `configElements` argument but intentionally - lacks automatic safeguarding and should only be used for complex - configurations where `configElements` is unsuitable. + : This argument mirrors the `config` argument but intentionally lacks + automatic safeguarding and should only be used for complex configurations + where `config` is unsuitable. # Environment @@ -155,7 +155,7 @@ # home.packages = [ pkgs.hello ]; # }; # -# configElements = [ +# config = [ # { programs.example.theme.name = "stylix"; } # # ( @@ -179,13 +179,15 @@ autoEnable ? null, autoEnableExpr ? null, autoWrapEnableExpr ? null, - configElements ? [ ], + config ? [ ], enableExample ? null, - extraOptions ? { }, imports ? [ ], + options ? { }, unconditionalConfig ? { }, }@args: let + mkTargetConfig = config; + module = { config, lib, ... }: let @@ -250,7 +252,7 @@ let in { imports = imports ++ [ - { options.stylix.targets.${name} = callModule false extraOptions; } + { options.stylix.targets.${name} = callModule false options; } ]; options.stylix.targets.${name}.enable = @@ -270,7 +272,7 @@ let config = lib.mkIf (config.stylix.enable && cfg.enable) ( lib.mkMerge ( lib.singleton (callModule false unconditionalConfig) - ++ map (callModule true) (lib.toList configElements) + ++ map (callModule true) (lib.toList mkTargetConfig) ) ); }; From 707059378b88946489d3d475f4610989618f28c2 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 26/40] 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 (cherry picked from commit dfc859f54d937a31b954901ed01f3d6961cd2ead) --- 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/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 +- 107 files changed, 52 insertions(+), 324 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/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"); } From eaeb3d6b597bf448256bbbcce6c8340e897708b3 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Sat, 19 Jul 2025 11:28:37 +0200 Subject: [PATCH 27/40] stylix/mk-target: generate options for configuring safeguarded arguments Generate targets.${target}.${argument}.enable and targets.${target}.${argument}.override options for disabling and configuring safeguarded arguments on a target level. (cherry picked from commit 953c3fb01e2a2cbfef092309852ba19d5ae6ee34) --- stylix/mk-target.nix | 141 ++++++++++++++++++++++++++++++++----------- 1 file changed, 105 insertions(+), 36 deletions(-) diff --git a/stylix/mk-target.nix b/stylix/mk-target.nix index e5cf805f..aec99ba9 100644 --- a/stylix/mk-target.nix +++ b/stylix/mk-target.nix @@ -193,38 +193,11 @@ let callModule = let areArgumentsEnabled = lib.flip lib.pipe [ - builtins.attrValues - (builtins.all (argument: argument.enable or (argument != null))) + lib.attrsToList + (builtins.all ( + { name, value }: value.enable or (value != null) && cfg.${name}.enable or true + )) ]; - - getArguments = - function: - lib.genAttrs - (lib.pipe function [ - lib.functionArgs - builtins.attrNames - ]) - ( - argument: - if argument == "cfg" then - cfg - - else if argument == "colors" then - config.lib.stylix.colors - - else - config.stylix.${argument} or (throw "stylix: mkTarget expected one of ${ - lib.concatMapStringsSep ", " (expected: "`${expected}`") ( - lib.naturalSort ( - [ - "cfg" - "colors" - ] - ++ builtins.attrNames config.stylix - ) - ) - }, but got: ${argument}") - ); in safeguard: config': let @@ -240,7 +213,7 @@ let config' else if builtins.isPath config' then - callModule safeguard (import config') + throw "stylix: unexpected unresolved path: ${toString config'}" else throw "stylix: mkTarget expected a configuration to be a function, an attribute set, or a path, but got ${builtins.typeOf config'}: ${ @@ -248,11 +221,107 @@ let }"; cfg = config.stylix.targets.${name}; + + getArguments = + function: + lib.genAttrs + (lib.pipe function [ + lib.functionArgs + builtins.attrNames + ]) + ( + argument: + if argument == "cfg" then + cfg + + else + ( + config': + let + inherit (cfg.${argument}) override; + in + if override == null then + config' + else if builtins.typeOf override != builtins.typeOf config' then + throw "stylix: expected `config.stylix.targets.${name}.${argument}.override` to be a ${builtins.typeOf config'}, but got: ${builtins.typeOf override}" + else if builtins.isAttrs override then + lib.recursiveUpdate config' override + else + override + ) + ( + if argument == "colors" then + config.lib.stylix.colors + + else + config.stylix.${argument} or (throw "stylix: mkTarget expected one of ${ + lib.concatMapStringsSep ", " (expected: "`${expected}`") ( + lib.naturalSort ( + [ + "cfg" + "colors" + ] + ++ builtins.attrNames config.stylix + ) + ) + }, but got: ${argument}") + ) + ); + + normalizeConfig = + config: + map (lib.fix ( + self: config': + if builtins.isPath config' then self (import config') else config' + )) (lib.toList config); + + normalizedConfig = normalizeConfig mkTargetConfig; in { - imports = imports ++ [ - { options.stylix.targets.${name} = callModule false options; } - ]; + imports = + lib.singleton { + options.stylix.targets.${name} = + lib.genAttrs + (lib.concatLists ( + map (lib.flip lib.pipe [ + ( + config': lib.optionalAttrs (builtins.isFunction config') (getArguments config') + ) + builtins.attrNames + (lib.remove "cfg") + ]) (normalizedConfig ++ normalizeConfig options) + )) + ( + argument: + let + config = "`${ + if argument == "colors" then + "config.lib.stylix.colors" + else + "config.stylix.${argument}" + }`"; + in + { + enable = lib.mkEnableOption "${config} for ${humanName}" // { + default = true; + example = false; + }; + + override = lib.mkOption { + default = null; + + description = '' + Attribute sets are recursively merged with ${config}, + while all other non-`null` types override ${config}. + ''; + + type = lib.types.anything; + }; + } + ); + } + ++ imports + ++ lib.singleton { options.stylix.targets.${name} = callModule false options; }; options.stylix.targets.${name}.enable = let @@ -271,7 +340,7 @@ let config = lib.mkIf (config.stylix.enable && cfg.enable) ( lib.mkMerge ( lib.singleton (callModule false unconditionalConfig) - ++ map (callModule true) (lib.toList mkTargetConfig) + ++ map (callModule true) normalizedConfig ) ); }; From 93f0ee1c34afbfb301116685644c26f46cca9db1 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Sat, 19 Jul 2025 18:40:26 +0200 Subject: [PATCH 28/40] stylix/mk-target: normalize options argument identically to config Normalize the options argument identically to config to provide a coherent and extensible options interface. (cherry picked from commit 6153df31ce4f68f5709755994cc49c48d737e98c) --- stylix/mk-target.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/stylix/mk-target.nix b/stylix/mk-target.nix index aec99ba9..bf1e02e3 100644 --- a/stylix/mk-target.nix +++ b/stylix/mk-target.nix @@ -111,9 +111,9 @@   `imports` (List)   : The `imports` option forwarded to the Nixpkgs module system. - `options` (Attribute set) - : Additional options to be added in the `stylix.targets.${name}` namespace - along the `stylix.targets.${name}.enable` option. + `options` (List or attribute set or function or path) + : Additional options to be added in the `stylix.targets.${name}` namespace, + normalized identically to `config`. For example, an extension guard used in the configuration can be declared as follows: @@ -181,7 +181,7 @@ in humanName ? humanName', imports ? [ ], name ? name', - options ? { }, + options ? [ ], unconditionalConfig ? { }, }@args: let @@ -276,6 +276,7 @@ let )) (lib.toList config); normalizedConfig = normalizeConfig mkTargetConfig; + normalizedOptions = normalizeConfig options; in { imports = @@ -289,7 +290,7 @@ let ) builtins.attrNames (lib.remove "cfg") - ]) (normalizedConfig ++ normalizeConfig options) + ]) (normalizedConfig ++ normalizedOptions) )) ( argument: @@ -321,7 +322,9 @@ let ); } ++ imports - ++ lib.singleton { options.stylix.targets.${name} = callModule false options; }; + ++ map (option: { + options.stylix.targets.${name} = callModule false option; + }) normalizedOptions; options.stylix.targets.${name}.enable = let From 93c8a26eeed48e08433b8ba4701a9aee87e349a3 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Wed, 10 Dec 2025 18:15:11 +0100 Subject: [PATCH 29/40] stylix/mk-target: rename normalizeConfig function to normalize (#2081) Rename the normalizeConfig function to normalize to generalize the name beyond the specific config and options module arguments, following commit 1272e6858e29 ("stylix/mk-target: rename mkConfig function to callModule"). Fixes: 6153df31ce4f ("stylix/mk-target: normalize options argument identically to config") Link: https://github.com/nix-community/stylix/pull/2081 (cherry picked from commit cb6bbed75eaca21deb8950c2ec0036ae5cde18ca) --- stylix/mk-target.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stylix/mk-target.nix b/stylix/mk-target.nix index bf1e02e3..9b29f5b4 100644 --- a/stylix/mk-target.nix +++ b/stylix/mk-target.nix @@ -268,15 +268,15 @@ let ) ); - normalizeConfig = + normalize = config: map (lib.fix ( self: config': if builtins.isPath config' then self (import config') else config' )) (lib.toList config); - normalizedConfig = normalizeConfig mkTargetConfig; - normalizedOptions = normalizeConfig options; + normalizedConfig = normalize mkTargetConfig; + normalizedOptions = normalize options; in { imports = From a7fb3944d1fb4daa073ba82e1a9d34b5f05adb9f Mon Sep 17 00:00:00 2001 From: rwxae <63157919+rwxae@users.noreply.github.com> Date: Thu, 11 Dec 2025 20:34:04 +0300 Subject: [PATCH 30/40] noctalia-shell: init (#2077) Link: https://github.com/nix-community/stylix/pull/2077 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> (cherry picked from commit dd14de4432a94e93e10d0159f1d411487e435e1e) --- flake/dev/flake.lock | 21 ++++++ flake/dev/flake.nix | 5 ++ generated/all-maintainers.nix | 6 ++ modules/noctalia-shell/hm.nix | 69 +++++++++++++++++++ modules/noctalia-shell/meta.nix | 6 ++ .../testbeds/noctalia-shell.nix | 11 +++ stylix/maintainers.nix | 6 ++ stylix/testbed/default.nix | 4 ++ 8 files changed, 128 insertions(+) create mode 100644 modules/noctalia-shell/hm.nix create mode 100644 modules/noctalia-shell/meta.nix create mode 100644 modules/noctalia-shell/testbeds/noctalia-shell.nix diff --git a/flake/dev/flake.lock b/flake/dev/flake.lock index 3149844f..22043fee 100644 --- a/flake/dev/flake.lock +++ b/flake/dev/flake.lock @@ -154,6 +154,26 @@ "type": "github" } }, + "noctalia-shell": { + "inputs": { + "nixpkgs": [ + "dev-nixpkgs" + ] + }, + "locked": { + "lastModified": 1765201259, + "narHash": "sha256-6btxUos1OY0LSk9hBVnLRcklLGBKCA2SCq9WkoLa91E=", + "owner": "noctalia-dev", + "repo": "noctalia-shell", + "rev": "c2b245703021e65a761a7de06b3b6b91d609a6c5", + "type": "github" + }, + "original": { + "owner": "noctalia-dev", + "repo": "noctalia-shell", + "type": "github" + } + }, "nvf": { "inputs": { "flake-compat": [], @@ -191,6 +211,7 @@ "git-hooks": "git-hooks", "home-manager": "home-manager", "nixvim": "nixvim", + "noctalia-shell": "noctalia-shell", "nvf": "nvf", "spicetify-nix": "spicetify-nix", "treefmt-nix": "treefmt-nix", diff --git a/flake/dev/flake.nix b/flake/dev/flake.nix index 555182df..c85db98a 100644 --- a/flake/dev/flake.nix +++ b/flake/dev/flake.nix @@ -156,6 +156,11 @@ }; }; + noctalia-shell = { + url = "github:noctalia-dev/noctalia-shell"; + inputs.nixpkgs.follows = "dev-nixpkgs"; + }; + nvf = { url = "github:NotAShelf/nvf"; inputs = { diff --git a/generated/all-maintainers.nix b/generated/all-maintainers.nix index af748fb1..50a83380 100644 --- a/generated/all-maintainers.nix +++ b/generated/all-maintainers.nix @@ -203,6 +203,12 @@ githubId = 45952970; name = "repparw"; }; + rwxae = { + email = "wardxela@gmail.com"; + github = "rwxae"; + githubId = 63157919; + name = "Alexander"; + }; skiletro = { email = "git@skilet.ro"; github = "skiletro"; diff --git a/modules/noctalia-shell/hm.nix b/modules/noctalia-shell/hm.nix new file mode 100644 index 00000000..006cfe6c --- /dev/null +++ b/modules/noctalia-shell/hm.nix @@ -0,0 +1,69 @@ +{ + mkTarget, + lib, + options, + ... +}: +mkTarget { + config = lib.optionals (options.programs ? noctalia-shell) [ + ( + { colors }: + { + programs.noctalia-shell = { + colors = with colors.withHashtag; { + mPrimary = base05; + mOnPrimary = base00; + mSecondary = base05; + mOnSecondary = base00; + mTertiary = base04; + mOnTertiary = base00; + mError = base08; + mOnError = base00; + mSurface = base00; + mOnSurface = base05; + mHover = base04; + mOnHover = base00; + mSurfaceVariant = base01; + mOnSurfaceVariant = base04; + mOutline = base02; + mShadow = base00; + }; + }; + } + ) + ( + { opacity }: + { + programs.noctalia-shell = { + settings = { + bar.backgroundOpacity = opacity.desktop; + bar.capsuleOpacity = opacity.desktop; + ui.panelBackgroundOpacity = opacity.desktop; + dock.backgroundOpacity = opacity.desktop; + osd.backgroundOpacity = opacity.popups; + notifications.backgroundOpacity = opacity.popups; + }; + }; + } + ) + ( + { fonts }: + { + programs.noctalia-shell = { + settings = { + ui.fontDefault = fonts.sansSerif.name; + ui.fontFixed = fonts.monospace.name; + }; + }; + } + ) + ( + { image }: + { + home.file.".cache/noctalia/wallpapers.json" = { + text = builtins.toJSON { defaultWallpaper = image; }; + }; + } + ) + ]; +} diff --git a/modules/noctalia-shell/meta.nix b/modules/noctalia-shell/meta.nix new file mode 100644 index 00000000..bf44ed74 --- /dev/null +++ b/modules/noctalia-shell/meta.nix @@ -0,0 +1,6 @@ +{ lib, ... }: +{ + name = "Noctalia shell"; + homepage = "https://docs.noctalia.dev"; + maintainers = [ lib.maintainers.rwxae ]; +} diff --git a/modules/noctalia-shell/testbeds/noctalia-shell.nix b/modules/noctalia-shell/testbeds/noctalia-shell.nix new file mode 100644 index 00000000..970c47bc --- /dev/null +++ b/modules/noctalia-shell/testbeds/noctalia-shell.nix @@ -0,0 +1,11 @@ +{ lib, ... }: +{ + stylix.testbed.ui = { + graphicalEnvironment = "hyprland"; + command.text = "noctalia-shell --no-duplicate"; + }; + + home-manager.sharedModules = lib.singleton { + programs.noctalia-shell.enable = true; + }; +} diff --git a/stylix/maintainers.nix b/stylix/maintainers.nix index aa4fa235..c9c12d46 100644 --- a/stylix/maintainers.nix +++ b/stylix/maintainers.nix @@ -65,6 +65,12 @@ github = "osipog"; githubId = 87434959; }; + rwxae = { + email = "wardxela@gmail.com"; + name = "Alexander"; + github = "rwxae"; + githubId = 63157919; + }; skiletro = { email = "git@skilet.ro"; name = "jamie"; diff --git a/stylix/testbed/default.nix b/stylix/testbed/default.nix index 2ea28306..510f0109 100644 --- a/stylix/testbed/default.nix +++ b/stylix/testbed/default.nix @@ -43,6 +43,10 @@ let ; }; + noctalia-shell.home-manager.sharedModules = [ + inputs.noctalia-shell.homeModules.default + ]; + nvf = inputs.nvf.nixosModules.default; vicinae.home-manager.sharedModules = [ From 4e63fa32d8beefd2f222181e8ca8d41eb9a7e153 Mon Sep 17 00:00:00 2001 From: theunpleasantowl <46432153+theunpleasantowl@users.noreply.github.com> Date: Mon, 15 Dec 2025 02:53:00 -0500 Subject: [PATCH 31/40] gnome: only exclude GNOME backgrounds when setting wallpaper (#2088) Link: https://github.com/nix-community/stylix/pull/2088 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> (cherry picked from commit f6e9fbaeb3f810cca30ed2056d35a7d0fbccb4ef) --- modules/gnome/nixos.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/gnome/nixos.nix b/modules/gnome/nixos.nix index 0e2cbe82..5d80941e 100644 --- a/modules/gnome/nixos.nix +++ b/modules/gnome/nixos.nix @@ -29,12 +29,14 @@ in ) ) { - # As Stylix is controlling the wallpaper, there is no need for this + # If Stylix is controlling the wallpaper, there is no need for this # pack of default wallpapers to be installed. # If you want to use one, you can set stylix.image to something like # "${pkgs.gnome-backgrounds}/path/to/your/preferred/background" # which will then download the pack regardless of its exclusion below. - environment.gnome.excludePackages = [ pkgs.gnome-backgrounds ]; + environment.gnome.excludePackages = lib.mkIf (config.stylix.image != null) [ + pkgs.gnome-backgrounds + ]; nixpkgs.overlays = [ (_: super: { From b019ddbaf48f93aeef3bd4301bd97c767f1016a5 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Mon, 15 Dec 2025 16:34:36 +0100 Subject: [PATCH 32/40] flake: lock base16-fish input to custom patchset (#2092) Closes: https://github.com/nix-community/stylix/issues/526 Link: https://github.com/nix-community/stylix/pull/2092 Link: https://github.com/tomyun/base16-fish/pull/16 Tested-by: Rafael Alexander Muijsert Approved-by: Rafael Alexander Muijsert (cherry picked from commit 9ba353558a288eb9d6fc3057bb418509dd8b4c01) --- flake.lock | 8 ++++---- flake.nix | 11 ++++------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index 7a8aaf94..c958f4d5 100644 --- a/flake.lock +++ b/flake.lock @@ -21,17 +21,17 @@ "base16-fish": { "flake": false, "locked": { - "lastModified": 1754405784, - "narHash": "sha256-l9xHIy+85FN+bEo6yquq2IjD1rSg9fjfjpyGP1W8YXo=", + "lastModified": 1765809053, + "narHash": "sha256-XCUQLoLfBJ8saWms2HCIj4NEN+xNsWBlU1NrEPcQG4s=", "owner": "tomyun", "repo": "base16-fish", - "rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561", + "rev": "86cbea4dca62e08fb7fd83a70e96472f92574782", "type": "github" }, "original": { "owner": "tomyun", "repo": "base16-fish", - "rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561", + "rev": "86cbea4dca62e08fb7fd83a70e96472f92574782", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 0cb6d797..50668fd8 100644 --- a/flake.nix +++ b/flake.nix @@ -13,16 +13,13 @@ # keep-sorted start block=yes newline_separated=yes base16-fish = { - # Lock the base16-fish input to a custom patch [2] ("Make autosuggestion - # and comment base03"), since it is currently impossible to apply patches + # Lock the base16-fish input to a custom patchset that cherry-picks + # pending patches [2], since it is currently impossible to apply patches # to flake inputs [1] ("Support flake references to patches"). # - # Once this single-patch approach no longer scales, the repository should - # be properly forked, if [2] has still not been merged. - # # [1]: https://github.com/NixOS/nix/issues/3920 - # [2]: https://github.com/tomyun/base16-fish/pull/12 - url = "github:tomyun/base16-fish/23ae20a0093dca0d7b39d76ba2401af0ccf9c561"; + # [2]: https://github.com/tomyun/base16-fish/pull/16 + url = "github:tomyun/base16-fish/86cbea4dca62e08fb7fd83a70e96472f92574782"; flake = false; }; From 259af48fe5dc004c11aa2b1339814138517616bf Mon Sep 17 00:00:00 2001 From: Viktor Titov Date: Tue, 16 Dec 2025 20:48:22 +0500 Subject: [PATCH 33/40] qt: use qt.qt{5,6}ctSettings options (#2095) Link: https://github.com/nix-community/stylix/pull/2095 Reviewed-by: NAHO --- flake/dev/flake.lock | 6 ++--- modules/qt/hm.nix | 61 +++++++++++++++++++------------------------- 2 files changed, 29 insertions(+), 38 deletions(-) diff --git a/flake/dev/flake.lock b/flake/dev/flake.lock index 22043fee..bf7de24a 100644 --- a/flake/dev/flake.lock +++ b/flake/dev/flake.lock @@ -97,11 +97,11 @@ ] }, "locked": { - "lastModified": 1764736872, - "narHash": "sha256-4mqLegNQeD54X7enm6EI9aNWl6CaIfyhl5PaYoGYwqk=", + "lastModified": 1765859973, + "narHash": "sha256-LN5O0h9GSgcDE/sz4+sLS3CbQALru1x4lh9hrxpeHwI=", "owner": "nix-community", "repo": "home-manager", - "rev": "3366918730bb6b699395a9d237397f1d710a94b3", + "rev": "7df150f0d3857cf68dae443813b27acfb201b2d8", "type": "github" }, "original": { diff --git a/modules/qt/hm.nix b/modules/qt/hm.nix index 44098703..b1869f3b 100644 --- a/modules/qt/hm.nix +++ b/modules/qt/hm.nix @@ -75,46 +75,37 @@ home.packages = lib.optional (config.qt.style.name == "kvantum") kvantumPackage; - qt = { - enable = true; - style.name = recommendedStyle; - platformTheme.name = config.stylix.targets.qt.platform; - }; - - xdg.configFile = + qt = let - qtctConf = '' - [Appearance] - custom_palette=true - '' - + lib.optionalString (config.qt.style ? name) '' - style=${config.qt.style.name} - '' - + lib.optionalString (icons != null) '' - icon_theme=${icons} - '' - + '' - [Fonts] - fixed="${config.stylix.fonts.monospace.name},${toString config.stylix.fonts.sizes.applications}" - general="${config.stylix.fonts.sansSerif.name},${toString config.stylix.fonts.sizes.applications}" - ''; + qtctSettings = { + Appearance = { + custom_palette = true; + style = lib.mkIf (config.qt.style ? name) config.qt.style.name; + icon_theme = lib.mkIf (icons != null) icons; + }; + Fonts = { + fixed = ''"${config.stylix.fonts.monospace.name},${toString config.stylix.fonts.sizes.applications}"''; + general = ''"${config.stylix.fonts.sansSerif.name},${toString config.stylix.fonts.sizes.applications}"''; + }; + }; in - lib.mkMerge [ - (lib.mkIf (config.qt.style.name == "kvantum") { - "Kvantum/kvantum.kvconfig".source = - (pkgs.formats.ini { }).generate "kvantum.kvconfig" - { General.theme = "Base16Kvantum"; }; + { + enable = true; + style.name = recommendedStyle; + platformTheme.name = config.stylix.targets.qt.platform; - "Kvantum/Base16Kvantum".source = - "${kvantumPackage}/share/Kvantum/Base16Kvantum"; - }) + qt5ctSettings = lib.mkIf (config.qt.platformTheme.name == "qtct") qtctSettings; + qt6ctSettings = lib.mkIf (config.qt.platformTheme.name == "qtct") qtctSettings; + }; - (lib.mkIf (config.qt.platformTheme.name == "qtct") { - "qt5ct/qt5ct.conf".text = qtctConf; - "qt6ct/qt6ct.conf".text = qtctConf; - }) - ]; + xdg.configFile = lib.mkIf (config.qt.style.name == "kvantum") { + "Kvantum/kvantum.kvconfig".source = + (pkgs.formats.ini { }).generate "kvantum.kvconfig" + { General.theme = "Base16Kvantum"; }; + "Kvantum/Base16Kvantum".source = + "${kvantumPackage}/share/Kvantum/Base16Kvantum"; + }; } ); } From 87d4fd11278625692dc46ba2961b02c2204d3370 Mon Sep 17 00:00:00 2001 From: ulli-lassance Date: Sun, 21 Dec 2025 20:25:13 -0300 Subject: [PATCH 34/40] qt: add standardDialogs option (#2090) Link: https://github.com/nix-community/stylix/pull/2090 Co-authored-by: NAHO Reviewed-by: NAHO Reviewed-by: Mikilio (cherry picked from commit 626dab1b562310feca0fa84e2a166c7327440f83) --- modules/qt/hm.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/modules/qt/hm.nix b/modules/qt/hm.nix index b1869f3b..732a9623 100644 --- a/modules/qt/hm.nix +++ b/modules/qt/hm.nix @@ -28,6 +28,28 @@ type = lib.types.str; default = "qtct"; }; + + standardDialogs = lib.mkOption { + description = '' + Selects the standard dialogs theme to be used by Qt. + + Using `xdgdesktopportal` integrates with the native desktop portal. + ''; + + # The enum variants are derived from the qt6ct platform theme integration + # [1]. + # + # [1]: https://www.opencode.net/trialuser/qt6ct/-/blob/00823e41aa60e8fe266d5aee328e82ad1ad94348/src/qt6ct/appearancepage.cpp#L83-L92 + type = lib.types.enum [ + "default" + "gtk2" + "gtk3" + "kde" + "xdgdesktopportal" + ]; + + default = "default"; + }; }; config = lib.mkIf (config.stylix.enable && config.stylix.targets.qt.enable) ( @@ -80,6 +102,7 @@ qtctSettings = { Appearance = { custom_palette = true; + standard_dialogs = config.stylix.targets.qt.standardDialogs; style = lib.mkIf (config.qt.style ? name) config.qt.style.name; icon_theme = lib.mkIf (icons != null) icons; }; From 76c65d08c1ae9ffe8b0fb16445933016d46f4585 Mon Sep 17 00:00:00 2001 From: Jon Erling Hustadnes Date: Mon, 22 Dec 2025 00:46:02 +0100 Subject: [PATCH 35/40] qt: improve highlight and text contrast (#2097) Closes: https://github.com/nix-community/stylix/issues/2079 Link: https://github.com/nix-community/stylix/pull/2097 Reviewed-by: NAHO (cherry picked from commit c53b4a548a75895c69811a719bb4ed750ea41a17) --- modules/qt/kvconfig.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/qt/kvconfig.mustache b/modules/qt/kvconfig.mustache index 9388d11b..a5575c43 100644 --- a/modules/qt/kvconfig.mustache +++ b/modules/qt/kvconfig.mustache @@ -80,7 +80,7 @@ light.color=#{{base03-hex}} mid.light.color=#{{base03-hex}} dark.color=#{{base00-hex}} mid.color=#{{base00-hex}} -highlight.color=#{{base03-hex}} +highlight.color=#{{base0E-hex}} inactive.highlight.color=#{{base03-hex}} tooltip.base.color=#{{base00-hex}} text.color=#{{base05-hex}} @@ -88,7 +88,7 @@ window.text.color=#{{base05-hex}} button.text.color=#{{base05-hex}} disabled.text.color=#{{base04-hex}} tooltip.text.color=#{{base05-hex}} -highlight.text.color=#{{base05-hex}} +highlight.text.color=#{{base00-hex}} link.color=#{{base0D-hex}} link.visited.color=#{{base0E-hex}} From c51431509b7c8dec0cd0369ea3cc20a772c3dba1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 16:06:35 +0100 Subject: [PATCH 36/40] ci: bump korthout/backport-action from 3.4.1 to 4.0.1 (#2094) Link: https://github.com/nix-community/stylix/pull/2094 Reviewed-by: NAHO (cherry picked from commit e6829552d4bb659ebab00f08c61d8c62754763f3) --- .github/workflows/backport.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 482e5b6f..aa31ee03 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -45,7 +45,7 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} token: ${{ steps.app-token.outputs.token }} - - uses: korthout/backport-action@v3.4.1 + - uses: korthout/backport-action@v4.0.1 id: backport with: github_token: ${{ steps.app-token.outputs.token }} From 15f6ffc5e59105ee8956df18df93ad6924397dd3 Mon Sep 17 00:00:00 2001 From: 0xda157 Date: Mon, 22 Dec 2025 13:49:46 -0800 Subject: [PATCH 37/40] flake: add nix-community cachix as substituters (#1796) Link: https://github.com/nix-community/stylix/pull/1796 Reviewed-by: Matt Sturgeon Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> (cherry picked from commit 844294a58ef0badb3067c4f2fe063030537eb624) --- flake.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/flake.nix b/flake.nix index 50668fd8..bd5791b7 100644 --- a/flake.nix +++ b/flake.nix @@ -96,6 +96,13 @@ # keep-sorted end }; + nixConfig = { + extra-substituters = [ "https://nix-community.cachix.org" ]; + extra-trusted-public-keys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + }; + outputs = { flake-parts, systems, ... }@inputs: flake-parts.lib.mkFlake { inherit inputs; } { From c97b7b37b2d068b98271dce203857325abf58fb6 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Mon, 22 Dec 2025 21:45:57 +0100 Subject: [PATCH 38/40] nvf: add empty line to improve readability (#2086) Link: https://github.com/nix-community/stylix/pull/2086 Reviewed-by: 0xda157 (cherry picked from commit 1297baa75032960ea19154fda6cd34edc14c3e33) --- modules/neovim/nvf.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/neovim/nvf.nix b/modules/neovim/nvf.nix index 8aa22438..4f5bc749 100644 --- a/modules/neovim/nvf.nix +++ b/modules/neovim/nvf.nix @@ -3,6 +3,7 @@ mkTarget: mkTarget { name = "nvf"; humanName = "nvf"; + options = { plugin = lib.mkOption { type = lib.types.enum [ From 21da33cdd44db5c2937bf7ebdc8ab3e68370d554 Mon Sep 17 00:00:00 2001 From: 0xda157 Date: Wed, 3 Dec 2025 13:46:54 -0800 Subject: [PATCH 39/40] flake: add remaining drvs to ci.buildbot Closes: https://github.com/nix-community/stylix/issues/2056 (cherry picked from commit 7420f203cac43514d6c9611b13c61fc169e7e37a) --- flake/dev/dev-shell.nix | 2 + flake/dev/pre-commit.nix | 2 + .../public-and-dev-version-consistency.nix | 67 ++++++++++--------- 3 files changed, 39 insertions(+), 32 deletions(-) diff --git a/flake/dev/dev-shell.nix b/flake/dev/dev-shell.nix index 53ff15f1..df6c4244 100644 --- a/flake/dev/dev-shell.nix +++ b/flake/dev/dev-shell.nix @@ -39,6 +39,8 @@ ''; in { + ci.buildbot = { inherit (config) devShells; }; + devShells = { default = pkgs.mkShell { # Install git-hooks when activating the shell diff --git a/flake/dev/pre-commit.nix b/flake/dev/pre-commit.nix index a2d21568..8717ef4c 100644 --- a/flake/dev/pre-commit.nix +++ b/flake/dev/pre-commit.nix @@ -5,6 +5,8 @@ perSystem = { config, ... }: { + ci.buildbot = { inherit (config.checks) pre-commit; }; + pre-commit = { check.enable = true; diff --git a/flake/dev/public-and-dev-version-consistency.nix b/flake/dev/public-and-dev-version-consistency.nix index 6cad4644..8ae2d1fe 100644 --- a/flake/dev/public-and-dev-version-consistency.nix +++ b/flake/dev/public-and-dev-version-consistency.nix @@ -1,41 +1,44 @@ { inputs, ... }: { perSystem = - { lib, pkgs, ... }: { - checks = lib.mkMerge ( - map - ( - input: - let - name = "${input}-and-dev-${input}-version-consistency"; - in - { - ${name} = - let - dev = inputs."dev-${input}".narHash; - public = inputs.${input}.narHash; - in - pkgs.runCommand name { } '' - if [ "${public}" != "${dev}" ]; then - printf \ - 'inconsistent ${input} (%s) and dev-${input} (%s) versions\n' \ - "${public}" \ - "${dev}" \ - >&2 + lib, + pkgs, + system, + ... + }: + let + checks = lib.genAttrs' [ "flake-parts" "nixpkgs" "systems" ] ( + input: + let + name = "${input}-and-dev-${input}-version-consistency"; + in + lib.nameValuePair name ( + let + dev = inputs."dev-${input}".narHash; + public = inputs.${input}.narHash; + in + pkgs.runCommand name { } '' + if [ "${public}" != "${dev}" ]; then + printf \ + 'inconsistent ${input} (%s) and dev-${input} (%s) versions\n' \ + "${public}" \ + "${dev}" \ + >&2 - exit 1 - fi + exit 1 + fi - mkdir "$out" - ''; - } - ) - [ - "flake-parts" - "nixpkgs" - "systems" - ] + mkdir "$out" + '' + ) ); + in + { + inherit checks; + + ci.buildbot = lib.mkIf (system == "x86_64-linux") { + public-and-dev-version-consistency = pkgs.linkFarm "public-and-dev-version-consistency" checks; + }; }; } From cfe89cabaae6ea1bbf80709bd53181494566a1b0 Mon Sep 17 00:00:00 2001 From: 0xda157 Date: Sat, 6 Dec 2025 16:40:34 -0800 Subject: [PATCH 40/40] ci: don't run checks on github actions (cherry picked from commit 69f1522ca616b04897a54dc53533018a8934d9e1) --- .github/workflows/check.yml | 60 ------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml deleted file mode 100644 index b444280a..00000000 --- a/.github/workflows/check.yml +++ /dev/null @@ -1,60 +0,0 @@ ---- -name: Check - -on: - push: - branches: - - master - - release-** - pull_request: - -permissions: - contents: read - -defaults: - run: - shell: bash - -jobs: - check: - name: ${{ matrix.name }} - runs-on: ${{ matrix.runs-on }} - - # https://docs.github.com/en/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job#choosing-github-hosted-runners - strategy: - matrix: - include: - - name: aarch64-linux - runs-on: ubuntu-24.04-arm - - name: aarch64-darwin - runs-on: macos-15 - - name: x86_64-linux - runs-on: ubuntu-24.04 - - name: x86_64-darwin - runs-on: macos-15-intel - - steps: - - uses: actions/checkout@v6 - with: - persist-credentials: false - - # TODO: Lock this Action to a release tag once commit [1] ("fix: relocate - # TMPDIR to /mnt to improve Nix installer compatibility") is part of a - # release, resolving [2] ("does not work with cachix install nix action"). - # - # [1]: https://github.com/wimpysworld/nothing-but-nix/pull/25 - # [2]: https://github.com/wimpysworld/nothing-but-nix/issues/24 - - uses: wimpysworld/nothing-but-nix@10c936d9e46521bf923f75458e0cbd4fa309300d # yamllint disable-line rule:line-length - if: runner.os == 'Linux' - with: - hatchet-protocol: rampage - - - uses: cachix/install-nix-action@v31 - - - uses: cachix/cachix-action@v16 - with: - name: nix-community - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - continue-on-error: true - - - run: nix develop --command stylix-check --no-nom