nixos/*: remove unused let bindings (#515686)

This commit is contained in:
Robert Hensing
2026-05-04 13:12:07 +00:00
committed by GitHub
66 changed files with 17 additions and 103 deletions

View File

@@ -5,7 +5,7 @@
...
}:
let
inherit (lib) mkOption types;
inherit (lib) mkOption;
unsafeGetAttrPosStringOr =
default: name: value:

View File

@@ -6,7 +6,7 @@
...
}:
let
inherit (lib) mkOption types;
inherit (lib) mkOption;
in
{
options = {

View File

@@ -9,7 +9,6 @@
{ config, lib, ... }:
let
inherit (lib)
mkDefault
mkIf
mkOption
stringAfter

View File

@@ -15,7 +15,6 @@ let
filter
getVersion
mkIf
mkMerge
mkOption
optional
optionalString

View File

@@ -7,7 +7,6 @@
let
inherit (lib)
optionalString
mkOption
types
mkIf

View File

@@ -11,10 +11,8 @@ let
any
attrNames
attrValues
boolToString
concatMap
concatMapStringsSep
concatStrings
elem
filter
filterAttrs
@@ -39,12 +37,10 @@ let
mkRenamedOptionModule
optional
optionals
sort
stringAfter
stringLength
trace
types
versionOlder
xor
;

View File

@@ -17,7 +17,6 @@ let
cleanSourceFilter
concatMapStringsSep
evalModules
filter
functionArgs
hasSuffix
isAttrs

View File

@@ -16,7 +16,6 @@ let
mkOption
mkPackageOption
nameValuePair
optionalString
types
isBool
boolToString

View File

@@ -5,7 +5,7 @@
...
}:
let
inherit (builtins) attrNames hasAttr isAttrs;
inherit (builtins) hasAttr isAttrs;
inherit (lib) getLib;
inherit (config.environment) etc;
# Utility to generate an AppArmor rule

View File

@@ -7,8 +7,6 @@
let
cfg = config.services.rabbitmq;
inherit (builtins) concatStringsSep;
config_file_content = lib.generators.toKeyValue { } cfg.configItems;
config_file = pkgs.writeText "rabbitmq.conf" config_file_content;

View File

@@ -99,7 +99,6 @@ in
mapAttrs'
nameValuePair
optionalString
concatMapStringsSep
escapeShellArgs
;
in

View File

@@ -11,7 +11,6 @@ let
concatMapStringsSep
concatStringsSep
filterAttrs
flatten
getAttr
isAttrs
literalExpression

View File

@@ -13,8 +13,6 @@
}:
let
inherit (lib)
filterAttrs
literalExpression
mkIf
mkOption
mkRemovedOptionModule

View File

@@ -11,7 +11,7 @@
...
}:
let
inherit (lib) mkIf mkDefault;
inherit (lib) mkIf;
cfg = config.services.hercules-ci-agent;

View File

@@ -9,7 +9,6 @@ let
inherit (lib)
concatStringsSep
flip
literalMD
literalExpression
optionalAttrs
optionals
@@ -19,7 +18,6 @@ let
mkIf
mkOption
types
versionAtLeast
;
cfg = config.services.cassandra;

View File

@@ -9,7 +9,6 @@ let
inherit (lib)
mkEnableOption
mkIf
mkRenamedOptionModule
teams
;
in

View File

@@ -16,7 +16,6 @@ let
mapAttrsToList
filterAttrs
unique
recursiveUpdate
types
;

View File

@@ -7,10 +7,8 @@
let
inherit (lib)
literalExpression
mkIf
mkOption
singleton
types
mkPackageOption
;

View File

@@ -13,7 +13,6 @@ let
mkOption
mkIf
mkRemovedOptionModule
types
listToAttrs
recursiveUpdate
;

View File

@@ -8,7 +8,6 @@
let
inherit (lib)
attrValues
literalExpression
mkEnableOption
mkPackageOption
mkIf

View File

@@ -33,7 +33,6 @@ let
isAttrs
isString
isInt
isList
typeOf
hashString
;

View File

@@ -12,7 +12,6 @@ let
mkOption
types
concatStringsSep
singleton
;
in
{

View File

@@ -7,7 +7,7 @@
let
cfg = config.services.prometheus.exporters.deluge;
inherit (lib) mkOption types concatStringsSep;
inherit (lib) mkOption types;
in
{
port = 9354;

View File

@@ -12,7 +12,6 @@ let
mkOption
mkMerge
types
concatStringsSep
;
in
{

View File

@@ -13,7 +13,6 @@ let
mkIf
types
concatStringsSep
any
optionalString
;
moonraker = config.services.moonraker;

View File

@@ -12,7 +12,6 @@ let
mkOption
mkIf
mkForce
cli
concatStringsSep
optionalString
escapeShellArgs

View File

@@ -8,7 +8,6 @@
let
cfg = config.services.prometheus.exporters.nvidia-gpu;
inherit (lib)
types
concatStringsSep
;
in

View File

@@ -10,7 +10,6 @@ let
cfg = config.services.prometheus.exporters.script;
inherit (lib)
mkOption
types
literalExpression
concatStringsSep
;

View File

@@ -9,7 +9,6 @@ let
cfg = config.services.zabbixAgent;
inherit (lib)
mkDefault
mkEnableOption
mkPackageOption
mkIf
@@ -18,9 +17,7 @@ let
;
inherit (lib)
attrValues
concatMapStringsSep
literalExpression
optionalString
types
;
inherit (lib.generators) toKeyValue;

View File

@@ -22,7 +22,6 @@ let
;
inherit (lib)
attrValues
concatMapStringsSep
getName
literalExpression
optional

View File

@@ -22,7 +22,6 @@ let
;
inherit (lib)
attrValues
concatMapStringsSep
getName
literalExpression
optional

View File

@@ -8,7 +8,6 @@
let
inherit (lib.attrsets) optionalAttrs;
inherit (lib.generators) toINIWithGlobalSection;
inherit (lib.lists) optional;
inherit (lib.modules) mkIf mkRemovedOptionModule;
inherit (lib.options) literalExpression mkEnableOption mkOption;
inherit (lib.strings) escape;
@@ -16,7 +15,6 @@ let
attrsOf
bool
int
lines
oneOf
str
submodule

View File

@@ -9,7 +9,6 @@ let
boolToString = b: if b then "true" else "false";
formatList = l: lib.concatStringsSep "," l;
formatDuration = d: d.String;
in
{
options.services.cloudflare-ddns = {
@@ -266,7 +265,6 @@ in
let
toEnv = name: value: "${name}=\"${toString value}\"";
toEnvList = name: value: "${name}=\"${formatList value}\"";
toEnvDuration = name: value: "${name}=\"${formatDuration value}\"";
toEnvBool = name: value: "${name}=\"${boolToString value}\"";
toEnvMaybe =
pred: name: value:

View File

@@ -7,17 +7,13 @@
let
inherit (lib)
attrValues
concatMap
concatStringsSep
escapeShellArg
literalExpression
mapAttrs'
mkDefault
mkEnableOption
mkPackageOption
mkIf
mkOption
nameValuePair
optional
types
;

View File

@@ -11,7 +11,6 @@ let
mkOption
mkEnableOption
mkIf
mkMerge
types
optionalString
;

View File

@@ -9,7 +9,6 @@ let
inherit (lib)
concatStringsSep
mkEnableOption
mkIf
mkOption
types
;

View File

@@ -11,7 +11,6 @@ let
mkPackageOption
mkIf
mkOption
types
recursiveUpdate
optionalAttrs
;

View File

@@ -9,7 +9,6 @@ let
inherit (lib)
maintainers
types
literalExpression
escapeShellArg
escapeShellArgs
mkEnableOption
@@ -17,7 +16,6 @@ let
mkRemovedOptionModule
mkIf
mkPackageOption
optionalString
concatMapStrings
concatStringsSep
;

View File

@@ -9,7 +9,6 @@ let
inherit (lib) types;
inherit (lib.attrsets)
filterAttrs
mapAttrs
mapAttrs'
mapAttrsToList
nameValuePair

View File

@@ -12,7 +12,6 @@ let
mkIf
mkOption
mkPackageOption
optionalString
types
;

View File

@@ -6,7 +6,7 @@
}:
let
inherit (lib) mkOption types;
inherit (lib) mkOption;
inherit (lib.types) listOf str;
cfg = config.services.kerberos_server;
inherit (config.security.krb5) package;

View File

@@ -15,7 +15,6 @@ let
;
inherit (lib.types)
bool
int
port
str
submodule

View File

@@ -8,7 +8,6 @@
let
inherit (lib)
getExe
mkDefault
mkEnableOption
mkIf
mkOption

View File

@@ -9,11 +9,7 @@ let
cfg = config.services.cook-cli;
inherit (lib)
mkIf
mkEnableOption
mkPackageOption
mkOption
getExe
types
;
in
{

View File

@@ -8,7 +8,7 @@
with lib;
let
inherit (lib.options) showOption showFiles;
inherit (lib.options) showFiles;
cfg = config.services.dokuwiki;
eachSite = cfg.sites;

View File

@@ -33,7 +33,6 @@ let
inherit (pkgs)
mariadb
stdenv
writeShellScript
;
cfg = config.services.drupal;
eachSite = cfg.sites;

View File

@@ -20,7 +20,6 @@ let
concatMapStringsSep
getExe
mkMerge
mkDefault
;
in
{

View File

@@ -12,7 +12,6 @@ let
mkIf
mkOption
types
literalExpression
;
cfg = config.services.meme-bingo-web;

View File

@@ -13,7 +13,6 @@ let
types
literalExpression
mkIf
mkDefault
;
cfg = config.services.miniflux;

View File

@@ -17,9 +17,7 @@ let
types
;
inherit (lib)
concatStringsSep
literalExpression
mapAttrsToList
optional
optionalString
;

View File

@@ -13,8 +13,6 @@ let
mkPackageOption
mkDefault
types
concatMapStringsSep
generators
;
cfg = config.services.open-web-calendar;

View File

@@ -7,7 +7,6 @@
let
inherit (lib)
literalExpression
mkEnableOption
mkIf
mkOption

View File

@@ -11,12 +11,8 @@ let
defaultConfig = import ./default-config.nix;
inherit (lib)
mkIf
mkEnableOption
mkPackageOption
mkOption
getExe
literalExpression
types
;
in
{

View File

@@ -10,7 +10,6 @@ let
mkOption
mkEnableOption
mkPackageOption
mkDefault
mkIf
types
literalExpression

View File

@@ -15,7 +15,6 @@ let
;
inherit (lib)
optional
optionals
optionalAttrs
optionalString
;

View File

@@ -3,7 +3,6 @@
let
inherit (lib)
genAttrs
maintainers
mkAliasOptionModule
mkEnableOption
mkIf

View File

@@ -1,7 +1,7 @@
{ config, lib, ... }:
let
inherit (lib) mkOption types;
inherit (lib) mkOption;
cfg = config.services.xserver.windowManager;
in

View File

@@ -6,7 +6,6 @@
testers,
}:
let
inherit (lib) fileset;
runTests = stdenv.mkDerivation {
name = "tests-activation-lib";

View File

@@ -15,7 +15,6 @@ let
systemd = config.systemd.package;
inherit (systemdUtils.lib)
makeUnit
generateUnits
targetToUnit
serviceToUnit

View File

@@ -1,21 +1,13 @@
{ lib, pkgs, ... }:
let
lib = pkgs.lib;
in
{
name = "chromadb";
meta.maintainers = [ ];
nodes = {
machine =
{ pkgs, ... }:
{
services.chromadb = {
enable = true;
};
machine = {
services.chromadb = {
enable = true;
};
};
};
testScript = ''

View File

@@ -2,7 +2,7 @@ import ../make-test-python.nix (
{ lib, pkgs, ... }:
let
inherit (lib) mkMerge nameValuePair maintainers;
inherit (lib) mkMerge;
baseGrafanaConf = {
services.grafana = {

View File

@@ -2,7 +2,7 @@ import ../../make-test-python.nix (
{ lib, pkgs, ... }:
let
inherit (lib) mkMerge maintainers;
inherit (lib) mkMerge;
baseGrafanaConf = {
services.grafana = {

View File

@@ -1,6 +1,3 @@
let
name = "pam";
in
{ pkgs, ... }:
{
name = "pam-file-contents";

View File

@@ -1,5 +1,5 @@
import ./make-test-python.nix (
{ lib, pkgs, ... }@args:
{ lib, pkgs, ... }:
let
inherit (import ./ssh-keys.nix pkgs) snakeOilPrivateKey snakeOilPublicKey;

View File

@@ -1,9 +1,8 @@
{ pkgs, lib, ... }:
{
name = "immich-public-proxy";
nodes.machine =
{ pkgs, ... }@args:
{ pkgs, ... }:
{
virtualisation.memorySize = 2048; # test hits OOM with default 1024
environment.systemPackages = [

View File

@@ -1,4 +1,4 @@
{ runTest, ... }@testArgs:
{ runTest, ... }:
{
apiIntegration = runTest ./api-integration.nix;
}