Skip to content

Commit

Permalink
treewide: remove unused variables (#63177)
Browse files Browse the repository at this point in the history
* treewide: remove unused variables

* making ofborg happy
  • Loading branch information
volth authored and alyssais committed Jun 16, 2019
1 parent ccee411 commit f3282c8
Show file tree
Hide file tree
Showing 765 changed files with 661 additions and 959 deletions.
2 changes: 1 addition & 1 deletion lib/systems/parse.nix
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ rec {

mkSystemFromString = s: mkSystemFromSkeleton (mkSkeletonFromList (lib.splitString "-" s));

doubleFromSystem = { cpu, vendor, kernel, abi, ... }:
doubleFromSystem = { cpu, kernel, abi, ... }:
/**/ if abi == abis.cygnus then "${cpu.name}-cygwin"
else if kernel.families ? darwin then "${cpu.name}-darwin"
else "${cpu.name}-${kernel.name}";
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/hardware/video/nvidia.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This module provides the proprietary NVIDIA X11 / OpenGL drivers.

{ stdenv, config, lib, pkgs, ... }:
{ config, lib, pkgs, ... }:

with lib;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This module contains the basic configuration for building a graphical NixOS
# installation CD.

{ config, lib, pkgs, ... }:
{ lib, pkgs, ... }:

with lib;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This module defines a NixOS installation CD that contains X11 and
# GNOME 3.

{ config, lib, pkgs, ... }:
{ lib, ... }:

with lib;

Expand Down
1 change: 0 additions & 1 deletion nixos/modules/misc/nixops-autoluks.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{ config, options, lib, ... }:
let
path = [ "deployment" "autoLuks" ];
hasAutoLuksOption = lib.hasAttrByPath path options;
hasAutoLuksConfig = lib.hasAttrByPath path config && (lib.attrByPath path {} config) != {};

inherit (config.nixops) enableDeprecatedAutoLuks;
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/misc/version.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ options, config, lib, pkgs, ... }:
{ config, lib, pkgs, ... }:

with lib;

Expand Down
1 change: 0 additions & 1 deletion nixos/modules/services/audio/snapserver.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ with lib;

let

package = "snapcast";
name = "snapserver";

cfg = config.services.snapserver;
Expand Down
7 changes: 0 additions & 7 deletions nixos/modules/services/cluster/kubernetes/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,6 @@ let
default = null;
};
};

kubeConfigDefaults = {
server = mkDefault cfg.kubeconfig.server;
caFile = mkDefault cfg.kubeconfig.caFile;
certFile = mkDefault cfg.kubeconfig.certFile;
keyFile = mkDefault cfg.kubeconfig.keyFile;
};
in {

###### interface
Expand Down
7 changes: 0 additions & 7 deletions nixos/modules/services/cluster/kubernetes/kubelet.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ let

kubeconfig = top.lib.mkKubeConfig "kubelet" cfg.kubeconfig;

manifests = pkgs.buildEnv {
name = "kubernetes-manifests";
paths = mapAttrsToList (name: manifest:
pkgs.writeTextDir "${name}.json" (builtins.toJSON manifest)
) cfg.manifests;
};

manifestPath = "kubernetes/manifests";

taintOptions = with lib.types; { name, ... }: {
Expand Down
1 change: 0 additions & 1 deletion nixos/modules/services/cluster/kubernetes/pki.nix
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ in
cfsslCertPathPrefix = "${config.services.cfssl.dataDir}/cfssl";
cfsslCert = "${cfsslCertPathPrefix}.pem";
cfsslKey = "${cfsslCertPathPrefix}-key.pem";
cfsslPort = toString config.services.cfssl.port;

certmgrPaths = [
top.caFile
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/hardware/triggerhappy.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let
${cfg.extraConfig}
'';

bindingCfg = { config, ... }: {
bindingCfg = { ... }: {
options = {

keys = mkOption {
Expand Down
1 change: 0 additions & 1 deletion nixos/modules/services/mail/rspamd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ with lib;
let

cfg = config.services.rspamd;
opts = options.services.rspamd;
postfixCfg = config.services.postfix;

bindSocketOpts = {options, config, ... }: {
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/monitoring/alerta.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ options, config, lib, pkgs, ... }:
{ config, lib, pkgs, ... }:

with lib;

Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/monitoring/grafana-reporter.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ options, config, lib, pkgs, ... }:
{ config, lib, pkgs, ... }:

with lib;

Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/monitoring/kapacitor.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ options, config, lib, pkgs, ... }:
{ config, lib, pkgs, ... }:

with lib;

Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/networking/bitcoind.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ let
"-datadir=${cfg.dataDir}"
"-pid=${pidFile}"
];
hexStr = types.strMatching "[0-9a-f]+";

rpcUserOpts = { name, ... }: {
options = {
name = mkOption {
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/system/kerberos/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs, config, lib, ...}:
{config, lib, ...}:

let
inherit (lib) mkOption mkIf types length attrNames;
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/system/kerberos/heimdal.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

let
inherit (lib) mkIf concatStringsSep concatMapStrings toList mapAttrs
mapAttrsToList attrValues;
mapAttrsToList;
cfg = config.services.kerberos_server;
kerberos = config.krb5.kerberos;
stateDir = "/var/heimdal";
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/system/kerberos/mit.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

let
inherit (lib) mkIf concatStrings concatStringsSep concatMapStrings toList
mapAttrs mapAttrsToList attrValues;
mapAttrs mapAttrsToList;
cfg = config.services.kerberos_server;
kerberos = config.krb5.kerberos;
stateDir = "/var/lib/krb5kdc";
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/web-apps/limesurvey.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

let

inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption;
inherit (lib) mkDefault mkEnableOption mkForce mkIf mkOption;
inherit (lib) mapAttrs optional optionalString types;

cfg = config.services.limesurvey;
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/web-apps/nextcloud.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }@args:
{ config, lib, pkgs, ... }:

with lib;

Expand Down
1 change: 0 additions & 1 deletion nixos/modules/services/web-apps/tt-rss.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ let
else cfg.database.port;

poolName = "tt-rss";
phpfpmSocketName = "/run/phpfpm/${poolName}.sock";

tt-rss-config = pkgs.writeText "config.php" ''
<?php
Expand Down
11 changes: 0 additions & 11 deletions nixos/modules/services/web-servers/nginx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -269,17 +269,6 @@ let
${optionalString (config.proxyPass != null && cfg.recommendedProxySettings) "include ${recommendedProxyConfig};"}
}
'') (sortProperties (mapAttrsToList (k: v: v // { location = k; }) locations)));
mkBasicAuth = vhostName: authDef: let
htpasswdFile = pkgs.writeText "${vhostName}.htpasswd" (
concatStringsSep "\n" (mapAttrsToList (user: password: ''
${user}:{PLAIN}${password}
'') authDef)
);
in ''
auth_basic secured;
auth_basic_user_file ${htpasswdFile};
'';

mkHtpasswd = vhostName: authDef: pkgs.writeText "${vhostName}.htpasswd" (
concatStringsSep "\n" (mapAttrsToList (user: password: ''
${user}:{PLAIN}${password}
Expand Down
2 changes: 0 additions & 2 deletions nixos/modules/services/x11/xserver.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ with lib;

let

kernelPackages = config.boot.kernelPackages;

# Abbreviations.
cfg = config.services.xserver;
xorg = pkgs.xorg;
Expand Down
1 change: 0 additions & 1 deletion nixos/modules/system/boot/kernel_config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ let
mergeAnswer = winners: locs: defs:
let
values = map (x: x.value) defs;
freeformAnswer = intersectLists values winners;
inter = intersectLists values winners;
winner = head winners;
in
Expand Down
7 changes: 1 addition & 6 deletions nixos/modules/virtualisation/anbox.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,7 @@ in
wantedBy = [ "multi-user.target" ];
after = [ "systemd-udev-settle.service" ];
preStart = let
initsh = let
ip = cfg.ipv4.container.address;
gw = cfg.ipv4.gateway.address;
dns = cfg.ipv4.dns;
in
pkgs.writeText "nixos-init" (''
initsh = pkgs.writeText "nixos-init" (''
#!/system/bin/sh
setprop nixos.version ${config.system.nixos.version}
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/virtualisation/cloudstack-config.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ lib, pkgs, ... }:

with lib;

Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/virtualisation/docker-containers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let
cfg = config.docker-containers;

dockerContainer =
{ name, config, ... }: {
{ ... }: {

options = {

Expand Down
1 change: 0 additions & 1 deletion nixos/modules/virtualisation/google-compute-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
with lib;
let
gce = pkgs.google-compute-engine;
cfg = config.virtualisation.googleComputeImage;
in
{
imports = [
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/altcoins/btc1.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, autoreconfHook, hexdump, openssl, db48
, boost, zlib, miniupnpc, qt4, utillinux, protobuf, qrencode, libevent
, boost, zlib, miniupnpc, qt4, protobuf, qrencode, libevent
, AppKit
, withGui ? !stdenv.isDarwin
}:
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/altcoins/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ callPackage, boost155, boost165, openssl_1_1, haskellPackages, darwin, libsForQt5, libsForQt59, miniupnpc_2, python3, buildGo110Package }:
{ callPackage, boost155, boost165, openssl_1_1, darwin, libsForQt5, libsForQt59, miniupnpc_2, python3, buildGo110Package }:

rec {

Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/altcoins/exodus/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, lib, makeWrapper, fetchurl, unzip, glib, systemd, nss, nspr, gtk3-x11, gnome2,
{ stdenv, lib, fetchurl, unzip, glib, systemd, nss, nspr, gtk3-x11, gnome2,
atk, cairo, gdk_pixbuf, xorg, xorg_sys_opengl, utillinux, alsaLib, dbus, at-spi2-atk,
cups, vivaldi-ffmpeg-codecs, libpulseaudio }:

Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/audio/ams-lv2/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cairo, fftw, gtkmm2, lv2, lvtk, pkgconfig, python3
{ stdenv, fetchFromGitHub, cairo, fftw, gtkmm2, lv2, lvtk, pkgconfig
, wafHook }:

stdenv.mkDerivation rec {
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, fetchurl, bitwig-studio1,
xdg_utils, zenity, ffmpeg, pulseaudio }:
{ fetchurl, bitwig-studio1,
pulseaudio }:

bitwig-studio1.overrideAttrs (oldAttrs: rec {
name = "bitwig-studio-${version}";
Expand Down
2 changes: 0 additions & 2 deletions pkgs/applications/audio/cadence/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
, pkgconfig
, qtbase
, makeWrapper
, jack2Full
, python3Packages
, a2jmidid
}:

stdenv.mkDerivation rec {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/audio/calf/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, cairo, expat, fftwSinglePrec, fluidsynth, glib
{ stdenv, fetchurl, cairo, expat, fftwSinglePrec, fluidsynth, glib
, gtk2, libjack2, ladspaH , libglade, lv2, pkgconfig }:

stdenv.mkDerivation rec {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/audio/cantata/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, fetchpatch, cmake, pkgconfig, vlc
{ stdenv, fetchFromGitHub, cmake, pkgconfig, vlc
, qtbase, qtmultimedia, qtsvg, qttools

# Cantata doesn't build with cdparanoia enabled so we disable that
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/audio/carla/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, alsaLib, file, fluidsynth, ffmpeg, fftw, jack2,
liblo, libpulseaudio, libsndfile, makeWrapper, pkgconfig, python3Packages,
{ stdenv, fetchFromGitHub, alsaLib, file, fluidsynth, ffmpeg, jack2,
liblo, libpulseaudio, libsndfile, pkgconfig, python3Packages,
which, withFrontend ? true,
withQt ? true, qtbase ? null,
withGtk2 ? true, gtk2 ? null,
Expand Down
1 change: 0 additions & 1 deletion pkgs/applications/audio/chuck/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ stdenv, lib, fetchurl, alsaLib, bison, flex, libsndfile, which
, AppKit, Carbon, CoreAudio, CoreMIDI, CoreServices, Kernel
, xcbuild
}:

stdenv.mkDerivation rec {
Expand Down
2 changes: 0 additions & 2 deletions pkgs/applications/audio/cozy-audiobooks/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ stdenv, fetchFromGitHub
, ninja
, boost
, meson
, pkgconfig
, wrapGAppsHook
Expand All @@ -12,7 +11,6 @@
, python3Packages
, file
, cairo
, sqlite
, gettext
, gnome3
}:
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/audio/gnome-podcasts/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, fetchFromGitLab, meson, ninja, gettext, cargo, rustc, python3, rustPlatform, pkgconfig, gnome3
{ stdenv, fetchurl, fetchpatch, meson, ninja, gettext, cargo, rustc, python3, pkgconfig, gnome3
, glib, libhandy, gtk3, dbus, openssl, sqlite, gst_all_1, wrapGAppsHook }:

# TODO: build from git for easier updates
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/audio/mixxx/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, makeWrapper, chromaprint, fetchpatch
{ stdenv, fetchFromGitHub, makeWrapper, chromaprint
, fftw, flac, faad2, glibcLocales, mp4v2
, libid3tag, libmad, libopus, libshout, libsndfile, libusb1, libvorbis
, libGLU, libxcb, lilv, lv2, opusfile
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/audio/parlatype/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, pkgconfig, meson, gtk3, at-spi2-core, dbus, gst_all_1, sphinxbase, pocketsphinx, ninja, gettext, appstream-glib, python3, glib, gobject-introspection, gsettings-desktop-schemas, itstool, wrapGAppsHook, makeWrapper, hicolor-icon-theme }:
{ stdenv, fetchFromGitHub, pkgconfig, meson, gtk3, at-spi2-core, dbus, gst_all_1, sphinxbase, pocketsphinx, ninja, gettext, appstream-glib, python3, glib, gobject-introspection, gsettings-desktop-schemas, itstool, wrapGAppsHook, hicolor-icon-theme }:

stdenv.mkDerivation rec {
pname = "parlatype";
Expand Down
1 change: 0 additions & 1 deletion pkgs/applications/audio/pulseaudio-dlna/zeroconf.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
, fetchPypi
, ifaddr
, typing
, isPy27
, pythonOlder
, netifaces
, six
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/audio/reaper/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ stdenv, fetchurl, autoPatchelfHook, makeWrapper
, alsaLib, xorg
, gnome3, gtk3, pango, gdk_pixbuf, cairo, glib, freetype
, gtk3, pango, gdk_pixbuf, cairo, glib, freetype
, libpulseaudio, xdg_utils
}:

Expand Down
1 change: 0 additions & 1 deletion pkgs/applications/audio/vocal/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
, libnotify
, sqlite
, gst_all_1
, libsoup
, json-glib
, libgee
, wrapGAppsHook
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/editors/android-studio/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, callPackage, makeFontsConf, gnome2 }:
{ callPackage, makeFontsConf, gnome2 }:

let
mkStudio = opts: callPackage (import ./common.nix opts) {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/editors/atom/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, pkgs, fetchurl, makeWrapper, wrapGAppsHook, gvfs, gtk3, atomEnv }:
{ stdenv, pkgs, fetchurl, wrapGAppsHook, gvfs, gtk3, atomEnv }:

let
versions = {
Expand Down
Loading

0 comments on commit f3282c8

Please sign in to comment.