diff --git a/docs/default.nix b/docs/default.nix index f15668955..0d8bc8c24 100644 --- a/docs/default.nix +++ b/docs/default.nix @@ -110,8 +110,7 @@ let in pkgs.buildPackages.nixosOptionsDoc ( { - options = - if includeModuleSystemOptions then options else builtins.removeAttrs options [ "_module" ]; + options = if includeModuleSystemOptions then options else removeAttrs options [ "_module" ]; transformOptions = opt: opt @@ -133,7 +132,7 @@ let ) opt.declarations; }; } - // builtins.removeAttrs args [ + // removeAttrs args [ "modules" "includeModuleSystemOptions" ] diff --git a/modules/default.nix b/modules/default.nix index 10e6e7a37..041a5580e 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -31,7 +31,7 @@ let modules = [ configuration ] ++ hmModules; class = "homeManager"; specialArgs = { - modulesPath = builtins.toString ./.; + modulesPath = toString ./.; } // extraSpecialArgs; }; diff --git a/modules/i18n/input-method/fcitx5.nix b/modules/i18n/input-method/fcitx5.nix index b2f53c52c..24ac764d5 100644 --- a/modules/i18n/input-method/fcitx5.nix +++ b/modules/i18n/input-method/fcitx5.nix @@ -192,7 +192,7 @@ in ++ lib.optionals (cfg.quickPhraseFiles != { }) [ (pkgs.linkFarm "quickPhraseFiles" ( lib.mapAttrs' ( - name: value: lib.nameValuePair ("share/fcitx5/data/quickphrase.d/${name}.mb") value + name: value: lib.nameValuePair "share/fcitx5/data/quickphrase.d/${name}.mb" value ) cfg.quickPhraseFiles )) ]; diff --git a/modules/launchd/types.nix b/modules/launchd/types.nix index 84a12b406..c17ec8043 100644 --- a/modules/launchd/types.nix +++ b/modules/launchd/types.nix @@ -13,12 +13,9 @@ let mergeDefinitions ; inherit (builtins) - map filter length deepSeq - throw - toString concatLists ; inherit (lib.options) showDefs; diff --git a/modules/misc/fontconfig.nix b/modules/misc/fontconfig.nix index a2bb39879..929f117ab 100644 --- a/modules/misc/fontconfig.nix +++ b/modules/misc/fontconfig.nix @@ -278,7 +278,7 @@ in else if builtins.isString value then "${value}" else - throw ("expected bool or string but got ${builtins.typeOf value}: ${toString value}"); + throw "expected bool or string but got ${builtins.typeOf value}: ${toString value}"; in '' @@ -338,7 +338,7 @@ in xdg.configFile = lib.mapAttrs' ( name: config: - lib.nameValuePair "fontconfig/conf.d/${builtins.toString config.priority}-hm-${config.label}.conf" { + lib.nameValuePair "fontconfig/conf.d/${toString config.priority}-hm-${config.label}.conf" { inherit (config) enable text; source = lib.mkIf (config.source != null) config.source; } diff --git a/modules/misc/news.nix b/modules/misc/news.nix index 856e9d29e..c44269910 100644 --- a/modules/misc/news.nix +++ b/modules/misc/news.nix @@ -72,7 +72,7 @@ let fileList ++ subdirFiles; newsFiles = collectNixFiles ./news; - newsEntries = builtins.map ( + newsEntries = map ( newsFile: let imported = import newsFile; diff --git a/modules/misc/xdg-terminal-exec.nix b/modules/misc/xdg-terminal-exec.nix index 73dac7363..dc2cb4272 100644 --- a/modules/misc/xdg-terminal-exec.nix +++ b/modules/misc/xdg-terminal-exec.nix @@ -47,9 +47,9 @@ in desktop: terminals: # Map desktop name such as GNOME to `.config/gnome-xdg-terminals.list`, # default to `.config/xdg-terminals.list`. - lib.nameValuePair ( - "${if desktop == "default" then "" else "${lib.toLower desktop}-"}xdg-terminals.list" - ) { text = lib.concatLines terminals; } + lib.nameValuePair "${ + if desktop == "default" then "" else "${lib.toLower desktop}-" + }xdg-terminals.list" { text = lib.concatLines terminals; } ) cfg.settings; }; } diff --git a/modules/programs/aerc/default.nix b/modules/programs/aerc/default.nix index 822d11533..6f95d41ff 100644 --- a/modules/programs/aerc/default.nix +++ b/modules/programs/aerc/default.nix @@ -104,7 +104,7 @@ in }; stylesets = mkOption { - type = with types; attrsOf (sectionsOrLines); + type = with types; attrsOf sectionsOrLines; default = { }; example = literalExpression '' { default = { ui = { "tab.selected.reverse" = "toggle"; }; }; }; diff --git a/modules/programs/anyrun.nix b/modules/programs/anyrun.nix index 2d00cf531..dc43b3686 100644 --- a/modules/programs/anyrun.nix +++ b/modules/programs/anyrun.nix @@ -6,9 +6,7 @@ }: let inherit (builtins) - map toJSON - toString substring stringLength ; diff --git a/modules/programs/chromium.nix b/modules/programs/chromium.nix index 5344b60a0..ba6974deb 100644 --- a/modules/programs/chromium.nix +++ b/modules/programs/chromium.nix @@ -281,7 +281,7 @@ in ) supportedBrowsers; config = lib.mkMerge ( - builtins.map (browser: browserConfig browser config.programs.${browser}) ( + map (browser: browserConfig browser config.programs.${browser}) ( builtins.attrNames supportedBrowsers ) ); diff --git a/modules/programs/distrobox.nix b/modules/programs/distrobox.nix index ea48f0c92..2a6320ca4 100644 --- a/modules/programs/distrobox.nix +++ b/modules/programs/distrobox.nix @@ -16,8 +16,7 @@ let generateConfig = lib.generators.toKeyValue { mkKeyValue = - name: value: - if lib.isString value then ''${name}="${value}"'' else "${name}=${builtins.toString value}"; + name: value: if lib.isString value then ''${name}="${value}"'' else "${name}=${toString value}"; }; iniFormat = pkgs.formats.ini { listsAsDuplicateKeys = true; }; diff --git a/modules/programs/docker-cli.nix b/modules/programs/docker-cli.nix index 937b91013..c4abe7db1 100644 --- a/modules/programs/docker-cli.nix +++ b/modules/programs/docker-cli.nix @@ -103,7 +103,7 @@ in { name = path; value = { - source = jsonFormat.generate "config.json" (ctx); + source = jsonFormat.generate "config.json" ctx; }; } ) cfg.contexts; diff --git a/modules/programs/firefox/profiles/search.nix b/modules/programs/firefox/profiles/search.nix index e13e8336c..84fca1109 100644 --- a/modules/programs/firefox/profiles/search.nix +++ b/modules/programs/firefox/profiles/search.nix @@ -471,7 +471,7 @@ in order = mkOption { type = with types; uniq (listOf str); - apply = builtins.map migrateEngineNameToIdV7; + apply = map migrateEngineNameToIdV7; default = [ ]; example = [ "ddg" diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index 8290f61e5..57ada99c5 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -627,7 +627,7 @@ in package ] ++ lib.filter (p: p != null) ( - builtins.map (outName: package.${outName} or null) config.home.extraOutputsToInstall + map (outName: package.${outName} or null) config.home.extraOutputsToInstall ); nativeBuildInputs = [ pkgs.python3 ]; buildInputs = [ cfg.package ]; diff --git a/modules/programs/gh.nix b/modules/programs/gh.nix index 5c70f1861..816ea9c3e 100644 --- a/modules/programs/gh.nix +++ b/modules/programs/gh.nix @@ -204,7 +204,7 @@ in xdg.dataFile."gh/extensions" = mkIf (cfg.extensions != [ ]) { source = pkgs.linkFarm "gh-extensions" ( - builtins.map (p: { + map (p: { name = p.pname; path = "${p}/bin"; }) cfg.extensions diff --git a/modules/programs/havoc.nix b/modules/programs/havoc.nix index 5cc616989..b808fe1b6 100644 --- a/modules/programs/havoc.nix +++ b/modules/programs/havoc.nix @@ -9,7 +9,7 @@ let iniFormat = pkgs.formats.ini { }; in { - meta.maintainers = with lib.maintainers; [ ]; + meta.maintainers = [ ]; options.programs.havoc = { enable = lib.mkEnableOption "Havoc terminal"; diff --git a/modules/programs/hyprpanel/default.nix b/modules/programs/hyprpanel/default.nix index f44b8f72b..7fc6e9ec8 100644 --- a/modules/programs/hyprpanel/default.nix +++ b/modules/programs/hyprpanel/default.nix @@ -70,7 +70,7 @@ in "mako" ]; in - builtins.map (name: { + map (name: { assertion = !config.services.${name}.enable; message = '' Only one notification daemon can be enabled at once. You have enabled diff --git a/modules/programs/joplin-desktop.nix b/modules/programs/joplin-desktop.nix index 2acdd58de..bae2b60ad 100644 --- a/modules/programs/joplin-desktop.nix +++ b/modules/programs/joplin-desktop.nix @@ -139,7 +139,7 @@ in in lib.hm.dag.entryAfter [ "linkGeneration" ] '' # Ensure that settings.json exists. - mkdir -p ${builtins.dirOf configPath} + mkdir -p ${dirOf configPath} touch ${configPath} # Config has to be written to temporary variable because jq cannot edit files in place. config="$(jq -s '.[0] + .[1]' ${configPath} ${newConfig})" diff --git a/modules/programs/khard.nix b/modules/programs/khard.nix index f5fb35d42..14e446a57 100644 --- a/modules/programs/khard.nix +++ b/modules/programs/khard.nix @@ -14,7 +14,7 @@ let renderSettings = with lib.generators; toINI { - mkKeyValue = mkKeyValueDefault rec { + mkKeyValue = mkKeyValueDefault { mkValueString = v: if lib.isList v then @@ -139,7 +139,7 @@ in let makePath = baseDir: subDir: - builtins.toString ( + toString ( /. + lib.concatStringsSep "/" [ baseDir diff --git a/modules/programs/lapce.nix b/modules/programs/lapce.nix index 665cd550b..18c5b05bf 100644 --- a/modules/programs/lapce.nix +++ b/modules/programs/lapce.nix @@ -201,7 +201,7 @@ let plugins: pkgs.linkFarm "lapce-plugins" ( builtins.listToAttrs ( - builtins.map ( + map ( { author, name, diff --git a/modules/programs/meli.nix b/modules/programs/meli.nix index 6240ef4b9..e001e65bb 100644 --- a/modules/programs/meli.nix +++ b/modules/programs/meli.nix @@ -82,7 +82,7 @@ in package = lib.mkPackageOption pkgs "meli" { }; includes = mkOption { - type = with types; listOf (str); + type = with types; listOf str; description = "Paths of the various meli configuration files to include."; default = [ ]; }; diff --git a/modules/programs/nnn.nix b/modules/programs/nnn.nix index 8a241e673..57434bf00 100644 --- a/modules/programs/nnn.nix +++ b/modules/programs/nnn.nix @@ -13,7 +13,7 @@ let renderSettings = settings: lib.concatStringsSep ";" (lib.mapAttrsToList renderSetting settings); - pluginModule = types.submodule ({ + pluginModule = types.submodule { options = { src = mkOption { type = with types; nullOr path; @@ -46,7 +46,7 @@ let ''; }; }; - }); + }; in { meta.maintainers = with lib.maintainers; [ thiagokokada ]; diff --git a/modules/programs/obsidian.nix b/modules/programs/obsidian.nix index 06c19b524..af0f9fa32 100644 --- a/modules/programs/obsidian.nix +++ b/modules/programs/obsidian.nix @@ -254,7 +254,7 @@ in cssSnippets = let checkCssPath = path: lib.filesystem.pathIsRegularFile path && lib.strings.hasSuffix ".css" path; - toCssName = path: lib.strings.removeSuffix ".css" (builtins.baseNameOf path); + toCssName = path: lib.strings.removeSuffix ".css" (baseNameOf path); cssSnippetsOptions = { config, ... }: { @@ -423,7 +423,7 @@ in source = (pkgs.formats.json { }).generate "appearance.json" ( vault.settings.appearance // { - enabledCssSnippets = builtins.map (snippet: snippet.name) enabledCssSnippets; + enabledCssSnippets = map (snippet: snippet.name) enabledCssSnippets; } // lib.attrsets.optionalAttrs (activeTheme != null) { cssTheme = getManifest activeTheme; @@ -438,14 +438,14 @@ in { name = "${vault.target}/.obsidian/core-plugins.json"; value.source = (pkgs.formats.json { }).generate "core-plugins.json" ( - builtins.map (plugin: plugin.name) vault.settings.corePlugins + map (plugin: plugin.name) vault.settings.corePlugins ); } { name = "${vault.target}/.obsidian/core-plugins-migration.json"; value.source = (pkgs.formats.json { }).generate "core-plugins-migration.json" ( builtins.listToAttrs ( - builtins.map (name: { + map (name: { inherit name; value = builtins.any (plugin: name == plugin.name && plugin.enable) vault.settings.corePlugins; }) corePlugins @@ -453,7 +453,7 @@ in ); } ] - ++ builtins.map (plugin: { + ++ map (plugin: { name = "${vault.target}/.obsidian/${plugin.name}.json"; value.source = (pkgs.formats.json { }).generate "${plugin.name}.json" plugin.settings; }) (builtins.filter (plugin: plugin.settings != { }) vault.settings.corePlugins); @@ -464,25 +464,25 @@ in { name = "${vault.target}/.obsidian/community-plugins.json"; value.source = (pkgs.formats.json { }).generate "community-plugins.json" ( - builtins.map getManifest (builtins.filter (plugin: plugin.enable) vault.settings.communityPlugins) + map getManifest (builtins.filter (plugin: plugin.enable) vault.settings.communityPlugins) ); } ] - ++ builtins.map (plugin: { + ++ map (plugin: { name = "${vault.target}/.obsidian/plugins/${getManifest plugin}"; value = { source = plugin.pkg; recursive = true; }; }) vault.settings.communityPlugins - ++ builtins.map (plugin: { + ++ map (plugin: { name = "${vault.target}/.obsidian/plugins/${getManifest plugin}/data.json"; value.source = (pkgs.formats.json { }).generate "data.json" plugin.settings; }) (builtins.filter (plugin: plugin.settings != { }) vault.settings.communityPlugins); mkCssSnippets = vault: - builtins.map (snippet: { + map (snippet: { name = "${vault.target}/.obsidian/snippets/${snippet.name}.css"; value = if snippet.source != null then @@ -497,7 +497,7 @@ in mkThemes = vault: - builtins.map (theme: { + map (theme: { name = "${vault.target}/.obsidian/themes/${getManifest theme}"; value.source = theme.pkg; }) vault.settings.themes; @@ -509,7 +509,7 @@ in mkExtraFiles = vault: - builtins.map (file: { + map (file: { name = "${vault.target}/.obsidian/${file.target}"; value = if file.source != null then @@ -524,7 +524,7 @@ in in builtins.listToAttrs ( lib.lists.flatten ( - builtins.map (vault: [ + map (vault: [ (mkApp vault) (mkAppearance vault) (mkCorePlugins vault) @@ -540,7 +540,7 @@ in xdg.configFile."obsidian/obsidian.json".source = (pkgs.formats.json { }).generate "obsidian.json" { vaults = builtins.listToAttrs ( - builtins.map (vault: { + map (vault: { name = builtins.hashString "md5" vault.target; value = { path = "${config.home.homeDirectory}/${vault.target}"; diff --git a/modules/programs/powerline-go.nix b/modules/programs/powerline-go.nix index 1fd5268b3..7aeaece48 100644 --- a/modules/programs/powerline-go.nix +++ b/modules/programs/powerline-go.nix @@ -19,11 +19,11 @@ let valueToString = value: if builtins.isList value then - builtins.concatStringsSep "," (builtins.map valueToString value) + builtins.concatStringsSep "," (map valueToString value) else if builtins.isAttrs value then valueToString (lib.mapAttrsToList (key: val: "${valueToString key}=${valueToString val}") value) else - builtins.toString value; + toString value; modulesArgument = optionalString (cfg.modules != null) " -modules ${valueToString cfg.modules}"; diff --git a/modules/programs/qutebrowser.nix b/modules/programs/qutebrowser.nix index 01bdb7279..15e7fc1d9 100644 --- a/modules/programs/qutebrowser.nix +++ b/modules/programs/qutebrowser.nix @@ -27,7 +27,7 @@ let else if builtins.isList v then "[${concatStringsSep ", " (map pythonize v)}]" else - builtins.toString v; + toString v; formatDictLine = o: n: v: diff --git a/modules/programs/radicle.nix b/modules/programs/radicle.nix index 7d8ff98e9..3fd51e35c 100644 --- a/modules/programs/radicle.nix +++ b/modules/programs/radicle.nix @@ -168,7 +168,7 @@ in } { assertion = cfg.uri.web-rad.enable -> cfg.uri.web-rad.browser != null; - message = "Could not detect preferred browser. Please set `${builtins.toString opt.uri.web-rad.browser}`."; + message = "Could not detect preferred browser. Please set `${toString opt.uri.web-rad.browser}`."; } { assertion = diff --git a/modules/programs/rbenv.nix b/modules/programs/rbenv.nix index 45ccbb2a8..fd8b16714 100644 --- a/modules/programs/rbenv.nix +++ b/modules/programs/rbenv.nix @@ -71,7 +71,7 @@ in home.file.".rbenv/plugins" = mkIf (cfg.plugins != [ ]) { source = pkgs.linkFarm "rbenv-plugins" ( - builtins.map (p: { + map (p: { name = p.name; path = p.src; }) cfg.plugins diff --git a/modules/programs/rofi.nix b/modules/programs/rofi.nix index ccb40e01b..7925fac67 100644 --- a/modules/programs/rofi.nix +++ b/modules/programs/rofi.nix @@ -135,7 +135,7 @@ let modes = map (mode: if isString mode then mode else "${mode.name}:${mode.path}") cfg.modes; in { - meta.maintainers = with lib.maintainers; [ ]; + meta.maintainers = [ ]; options.programs.rofi = { enable = lib.mkEnableOption "Rofi: A window switcher, application launcher and dmenu replacement"; diff --git a/modules/programs/smug.nix b/modules/programs/smug.nix index 144c56ff0..2a92b7c02 100644 --- a/modules/programs/smug.nix +++ b/modules/programs/smug.nix @@ -158,7 +158,7 @@ in prjConf = lib.attrsets.mapAttrs' ( name: value: - (lib.attrsets.nameValuePair (if name == "beforeStart" then "before_start" else name) (value)) + (lib.attrsets.nameValuePair (if name == "beforeStart" then "before_start" else name) value) ) v // { session = k; diff --git a/modules/programs/streamlink.nix b/modules/programs/streamlink.nix index 5d7f146b2..6eb365d2b 100644 --- a/modules/programs/streamlink.nix +++ b/modules/programs/streamlink.nix @@ -23,9 +23,9 @@ let if (builtins.isBool value) then if value then name else "" else if (builtins.isList value) then - lib.concatStringsSep "\n" (builtins.map (item: "${name}=${builtins.toString item}") value) + lib.concatStringsSep "\n" (map (item: "${name}=${toString item}") value) else - "${name}=${builtins.toString value}" + "${name}=${toString value}" ) settings ) ); diff --git a/modules/programs/swaylock.nix b/modules/programs/swaylock.nix index 063122ae4..9484648d4 100644 --- a/modules/programs/swaylock.nix +++ b/modules/programs/swaylock.nix @@ -85,8 +85,7 @@ in if v == false then "" else - (if v == true then n else n + "=" + (if builtins.isPath v then "${v}" else builtins.toString v)) - + "\n" + (if v == true then n else n + "=" + (if builtins.isPath v then "${v}" else toString v)) + "\n" ) cfg.settings ); }; diff --git a/modules/programs/thunderbird.nix b/modules/programs/thunderbird.nix index 83b0b2eb6..e77d05545 100644 --- a/modules/programs/thunderbird.nix +++ b/modules/programs/thunderbird.nix @@ -183,14 +183,12 @@ let 3; "mail.smtpserver.smtp_${id}.username" = account.userName; } - // builtins.foldl' (a: b: a // b) { } ( - builtins.map (address: toThunderbirdSMTP account address) addresses - ) + // builtins.foldl' (a: b: a // b) { } (map (address: toThunderbirdSMTP account address) addresses) // optionalAttrs (account.smtp != null && account.primary) { "mail.smtp.defaultserver" = "smtp_${id}"; } // builtins.foldl' (a: b: a // b) { } ( - builtins.map (address: toThunderbirdIdentity account address) addresses + map (address: toThunderbirdIdentity account address) addresses ) // account.thunderbird.settings id; diff --git a/modules/programs/tmate.nix b/modules/programs/tmate.nix index fb1073b70..f26899f98 100644 --- a/modules/programs/tmate.nix +++ b/modules/programs/tmate.nix @@ -69,7 +69,7 @@ in let conf = optional (cfg.host != null) ''set -g tmate-server-host "${cfg.host}"'' - ++ optional (cfg.port != null) "set -g tmate-server-port ${builtins.toString cfg.port}" + ++ optional (cfg.port != null) "set -g tmate-server-port ${toString cfg.port}" ++ optional ( cfg.dsaFingerprint != null ) ''set -g tmate-server-ed25519-fingerprint "${cfg.dsaFingerprint}"'' diff --git a/modules/programs/vicinae.nix b/modules/programs/vicinae.nix index 34a40cfac..4f8e3b1ee 100644 --- a/modules/programs/vicinae.nix +++ b/modules/programs/vicinae.nix @@ -240,7 +240,7 @@ in dataFile = builtins.listToAttrs ( - builtins.map (item: { + map (item: { name = "vicinae/extensions/${item.name}"; value.source = item; }) cfg.extensions @@ -263,7 +263,7 @@ in KillMode = "process"; EnvironmentFile = lib.mkIf (!versionPost0_17) ( pkgs.writeText "vicinae-env" '' - USE_LAYER_SHELL=${if cfg.useLayerShell then builtins.toString 1 else builtins.toString 0} + USE_LAYER_SHELL=${if cfg.useLayerShell then toString 1 else toString 0} '' ); }; diff --git a/modules/programs/vscode/default.nix b/modules/programs/vscode/default.nix index fb3064beb..a0789327d 100644 --- a/modules/programs/vscode/default.nix +++ b/modules/programs/vscode/default.nix @@ -517,7 +517,7 @@ in else { }; # Merge MCP servers: transformed servers + user servers, with user servers taking precedence - mergedServers = transformedMcpServers // ((v.userMcp.servers or { })); + mergedServers = transformedMcpServers // (v.userMcp.servers or { }); # Merge all MCP config mergedMcpConfig = v.userMcp // (lib.optionalAttrs (mergedServers != { }) { servers = mergedServers; }); diff --git a/modules/programs/waybar.nix b/modules/programs/waybar.nix index afc73b450..17c8bfbf0 100644 --- a/modules/programs/waybar.nix +++ b/modules/programs/waybar.nix @@ -301,7 +301,7 @@ in { assertions = [ (lib.hm.assertions.assertPlatform "programs.waybar" pkgs lib.platforms.linux) - ({ + { assertion = if lib.versionAtLeast config.home.stateVersion "22.05" then all (x: !hasAttr "modules" x || x.modules == null) settings @@ -311,7 +311,7 @@ in The `programs.waybar.settings.[].modules` option has been removed. It is now possible to declare modules in the configuration without nesting them under the `modules` option. ''; - }) + } ]; home.packages = [ cfg.package ]; diff --git a/modules/programs/waylogout.nix b/modules/programs/waylogout.nix index 2e4e2e97d..d636819a6 100644 --- a/modules/programs/waylogout.nix +++ b/modules/programs/waylogout.nix @@ -58,7 +58,7 @@ in xdg.configFile."waylogout/config" = lib.mkIf (cfg.settings != { }) { text = lib.concatStrings ( lib.mapAttrsToList ( - n: v: if v == false then "" else (if v == true then n else n + "=" + builtins.toString v) + "\n" + n: v: if v == false then "" else (if v == true then n else n + "=" + toString v) + "\n" ) cfg.settings ); }; diff --git a/modules/programs/xplr.nix b/modules/programs/xplr.nix index 0db932f8e..f23959782 100644 --- a/modules/programs/xplr.nix +++ b/modules/programs/xplr.nix @@ -35,7 +35,7 @@ let ''; } else - builtins.dirOf value; + dirOf value; makePluginSearchPath = p: "${p}/?/init.lua;${p}/?.lua"; @@ -46,9 +46,9 @@ let searchPaths = map makePluginSearchPath wrappedPlugins; pluginSearchPath = lib.concatStringsSep ";" searchPaths; in - ('' + '' package.path = "${pluginSearchPath};" .. package.path - '') + '' else "\n"; diff --git a/modules/services/fusuma.nix b/modules/services/fusuma.nix index c147885c9..e9d5c654f 100644 --- a/modules/services/fusuma.nix +++ b/modules/services/fusuma.nix @@ -127,7 +127,7 @@ in }; Service = { - Environment = with pkgs; "PATH=${makeBinPath cfg.extraPackages}"; + Environment = "PATH=${makeBinPath cfg.extraPackages}"; ExecStart = "${cfg.package}/bin/fusuma"; }; diff --git a/modules/services/mpd.nix b/modules/services/mpd.nix index 31c581560..f1fafd235 100644 --- a/modules/services/mpd.nix +++ b/modules/services/mpd.nix @@ -168,7 +168,7 @@ in packages = [ cfg.package ]; sessionVariables = mkIf cfg.enableSessionVariables ( { - MPD_PORT = builtins.toString cfg.network.port; + MPD_PORT = toString cfg.network.port; } // lib.optionalAttrs (cfg.network.listenAddress != "any") { MPD_HOST = cfg.network.listenAddress; diff --git a/modules/services/podman-linux/podman-lib.nix b/modules/services/podman-linux/podman-lib.nix index e6276f640..19b2a4098 100644 --- a/modules/services/podman-linux/podman-lib.nix +++ b/modules/services/podman-linux/podman-lib.nix @@ -23,9 +23,9 @@ let ${k}='' (mapAttrsToList normalizeKeyValue v)) else - builtins.toString v; + toString v; in - if builtins.isNull v then "" else "${k}=${v'}"; + if isNull v then "" else "${k}=${v'}"; primitiveAttrs = with types; attrsOf (either primitive (listOf primitive)); primitiveList = with types; listOf primitive; diff --git a/modules/services/psd.nix b/modules/services/psd.nix index 9b7202468..7863f7882 100644 --- a/modules/services/psd.nix +++ b/modules/services/psd.nix @@ -15,7 +15,7 @@ let ''} USE_BACKUP="${if cfg.useBackup then "yes" else "no"}" - BACKUP_LIMIT=${builtins.toString cfg.backupLimit} + BACKUP_LIMIT=${toString cfg.backupLimit} ''; in { diff --git a/modules/services/radicle.nix b/modules/services/radicle.nix index ca83a80f1..c8c69b5a2 100644 --- a/modules/services/radicle.nix +++ b/modules/services/radicle.nix @@ -103,7 +103,7 @@ in StopWhenUnneeded = cfg.node.lazy.enable; ConditionPathExists = radicleKeyPair; }; - Service = mkMerge ([ + Service = mkMerge [ { Slice = "session.slice"; ExecStart = "${getExe' cfg.node.package "radicle-node"} ${cfg.node.args}"; @@ -182,7 +182,7 @@ in "~@setuid" ]; } - ]); + ]; }; "radicle-node-proxy" = mkIf cfg.node.lazy.enable { Unit = { diff --git a/modules/services/window-managers/hyprland.nix b/modules/services/window-managers/hyprland.nix index 04f5fc583..f813ae7fa 100644 --- a/modules/services/window-managers/hyprland.nix +++ b/modules/services/window-managers/hyprland.nix @@ -359,7 +359,7 @@ in ) cfg.submaps; submapWarnings = lib.mapAttrsToList (submapName: nonBinds: '' - wayland.windowManager.hyprland.submaps."${submapName}".settings: found non-bind entries: [${builtins.toString nonBinds}], which will have no effect in a submap + wayland.windowManager.hyprland.submaps."${submapName}".settings: found non-bind entries: [${toString nonBinds}], which will have no effect in a submap '') (lib.filterAttrs (n: v: v != [ ]) submapWarningsAttrset); in submapWarnings ++ lib.optional inconsistent warning; diff --git a/modules/services/window-managers/labwc/function.nix b/modules/services/window-managers/labwc/function.nix index dd3fa03f7..0c2020893 100644 --- a/modules/services/window-managers/labwc/function.nix +++ b/modules/services/window-managers/labwc/function.nix @@ -98,7 +98,7 @@ let attrName = builtins.substring 1 999 k; # Remove "@" prefix attrValue = value.${k}; in - " ${attrName}=\"${escape (builtins.toString attrValue)}\"" + " ${attrName}=\"${escape (toString attrValue)}\"" ) attrKeys ); @@ -125,7 +125,7 @@ let # All other primitive values: wrap in start/end tag else - "<${name}>${escape (builtins.toString value)}"; + "<${name}>${escape (toString value)}"; generateXML = name: config: extraConfig: '' @@ -139,7 +139,7 @@ let else if name == "labwc_config" then lib.mapAttrsToList generateRc else - builtins.throw "error ${name} is neither openbox_menu nor labwc_config" + throw "error ${name} is neither openbox_menu nor labwc_config" ) config ) diff --git a/modules/systemd.nix b/modules/systemd.nix index 3c2ea5569..127cb73f3 100644 --- a/modules/systemd.nix +++ b/modules/systemd.nix @@ -75,7 +75,7 @@ let buildServices = style: serviceCfgs: lib.concatLists (lib.mapAttrsToList (buildService style) serviceCfgs); - servicesStartTimeoutMs = builtins.toString cfg.servicesStartTimeoutMs; + servicesStartTimeoutMs = toString cfg.servicesStartTimeoutMs; unitBaseType = unitKind: mod: diff --git a/modules/targets/generic-linux/nixgl.nix b/modules/targets/generic-linux/nixgl.nix index c1882d5a5..65bd0d8ac 100644 --- a/modules/targets/generic-linux/nixgl.nix +++ b/modules/targets/generic-linux/nixgl.nix @@ -211,7 +211,7 @@ in makePackageWrapper = vendor: environment: pkg: - if builtins.isNull cfg.packages then + if isNull cfg.packages then pkg else # Wrap the package's binaries with nixGL, while preserving the rest of diff --git a/nixos/common.nix b/nixos/common.nix index 3edecffbe..ee9a28cc9 100644 --- a/nixos/common.nix +++ b/nixos/common.nix @@ -29,7 +29,7 @@ let lib = extendedLib; osConfig = config; osClass = _class; - modulesPath = builtins.toString ../modules; + modulesPath = toString ../modules; } // cfg.extraSpecialArgs; diff --git a/tests/integration/standalone/rclone/shell.nix b/tests/integration/standalone/rclone/shell.nix index 696d8c308..bea3ed5a4 100644 --- a/tests/integration/standalone/rclone/shell.nix +++ b/tests/integration/standalone/rclone/shell.nix @@ -24,7 +24,7 @@ let ''; - xdgRuntimeDir = "/run/user/${builtins.toString config.nodes.machine.users.users.alice.uid}"; + xdgRuntimeDir = "/run/user/${toString config.nodes.machine.users.users.alice.uid}"; httpHeadersSecret = pkgs.writeText "http-headers" "Cookie,secret_password=aliceiscool"; shellVar = mkHttpModule "\\\${XDG_RUNTIME_DIR}/http-headers"; diff --git a/tests/modules/programs/kubecolor/does-have-openshift.nix b/tests/modules/programs/kubecolor/does-have-openshift.nix index 8866bc4df..88070f71c 100644 --- a/tests/modules/programs/kubecolor/does-have-openshift.nix +++ b/tests/modules/programs/kubecolor/does-have-openshift.nix @@ -17,7 +17,7 @@ }; }; nixpkgs.overlays = [ - (self: super: rec { + (self: super: { openshift = config.lib.test.mkStubPackage { name = "openshift"; version = "4.16.0"; diff --git a/tests/modules/programs/neovim/no-init.nix b/tests/modules/programs/neovim/no-init.nix index 476aa8d41..c94f3cc57 100644 --- a/tests/modules/programs/neovim/no-init.nix +++ b/tests/modules/programs/neovim/no-init.nix @@ -20,7 +20,7 @@ # plugins without associated config should not trigger the creation of init.vim plugins = with pkgs.vimPlugins; [ vim-fugitive - ({ plugin = vim-sensible; }) + { plugin = vim-sensible; } ]; }; nmt.script = ''