flake: inherit explicitly from parts of lib

Instead of doing `inherit (lib) <something>``, all inherits now use
`inherit (lib.<subsystem>) <something>`, which is much nicer.
This commit is contained in:
Bloxx12 2025-04-09 15:31:18 +02:00
commit 53aaa26fa1
29 changed files with 67 additions and 45 deletions

View file

@ -11,9 +11,8 @@
...
}: let
inherit (lib.options) mkOption literalExpression;
inherit (lib.types) str nullOr enum mkOptionType attrsOf coercedTo;
inherit (lib.strings) toLower replaceStrings removePrefix hasPrefix isString;
# inherit (lib) serializeTheme;
inherit (lib.types) str nullOr enum mkOptionType attrsOf coercedTo;
cfg = config.modules.style;

View file

@ -4,9 +4,10 @@
pkgs,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) str package;
inherit (lib.modules) mkIf;
cfg = config.modules.theming.gtk;
in {
options.modules.theming.gtk = {

View file

@ -5,8 +5,9 @@
...
}: let
inherit (lib.modules) mkIf;
inherit (lib) mkEnableOption mkOption;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) str package;
cfg = config.modules.theming.qt;
in {
options.modules.theming.qt = {

View file

@ -4,13 +4,16 @@
pkgs,
...
}: let
inherit (builtins) toString isBool;
inherit (lib.generators) toINI;
inherit (lib.modules) mkMerge mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.modules.theming;
inherit (builtins) toString isBool;
inherit (lib) boolToString escape generators;
inherit (lib.strings) escape;
inherit (lib.trivial) boolToString;
toGtk3Ini = generators.toINI {
cfg = config.modules.theming;
toGtk3Ini = toINI {
mkKeyValue = key: value: let
value' =
if isBool value