Skip to content

Commit

Permalink
[bot]: remove unreferenced code
Browse files Browse the repository at this point in the history
  • Loading branch information
volth committed Jul 20, 2018
1 parent a7e5927 commit 87f5930
Show file tree
Hide file tree
Showing 118 changed files with 16 additions and 449 deletions.
2 changes: 0 additions & 2 deletions doc/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
let
pkgs = import ./.. { };
lib = pkgs.lib;
sources = lib.sourceFilesBySuffices ./. [".xml"];
sources-langs = ./languages-frameworks;
in
pkgs.stdenv.mkDerivation {
name = "nixpkgs-manual";
Expand Down
2 changes: 0 additions & 2 deletions lib/generators.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ let
libStr = lib.strings;
libAttr = lib.attrsets;

flipMapAttrs = flip libAttr.mapAttrs;

inherit (lib) isFunction;
in

Expand Down
1 change: 0 additions & 1 deletion lib/lists.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ rec {
*/
foldl = op: nul: list:
let
len = length list;
foldl' = n:
if n == -1
then nul
Expand Down
1 change: 0 additions & 1 deletion lib/modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,6 @@ rec {
{ config, options, ... }:
let
fromOpt = getAttrFromPath from options;
toOpt = getAttrFromPath to options;
toOf = attrByPath to
(abort "Renaming error: option `${showOption to}' does not exist.");
in
Expand Down
4 changes: 0 additions & 4 deletions lib/tests/misc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,6 @@ runTests {

resRem7 = res6.replace (a: removeAttrs a ["a"]);

resReplace6 = let x = defaultOverridableDelayableArgs id { a = 7; mergeAttrBy = { a = builtins.add; }; };
x2 = x.merge { a = 20; }; # now we have 27
in (x2.replace) { a = 10; }; # and override the value by 10

# fixed tests (delayed args): (when using them add some comments, please)
resFixed1 =
let x = defaultOverridableDelayableArgs id ( x: { a = 7; c = x.fixed.b; });
Expand Down
1 change: 0 additions & 1 deletion lib/types.nix
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ rec {
}
else
def;
listOnly = listOf elemType;
attrOnly = attrsOf elemType;
in mkOptionType rec {
name = "loaOf";
Expand Down
4 changes: 1 addition & 3 deletions nixos/modules/config/fonts/fontconfig-ultimate.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

with lib;

let fcBool = x: if x then "<bool>true</bool>" else "<bool>false</bool>";

cfg = config.fonts.fontconfig.ultimate;
let cfg = config.fonts.fontconfig.ultimate;

latestVersion = pkgs.fontconfig.configVersion;

Expand Down
2 changes: 0 additions & 2 deletions nixos/modules/installer/tools/tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
with lib;

let
cfg = config.installer;

makeProg = args: pkgs.substituteAll (args // {
dir = "bin";
isExecutable = true;
Expand Down
1 change: 0 additions & 1 deletion nixos/modules/profiles/clone-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ let
let
relocateNixOS = path:
"<nixpkgs/nixos" + removePrefix nixosPath (toString path) + ">";
relocateOthers = null;
in
{ nixos = map relocateNixOS partitionedModuleFiles.nixos;
others = []; # TODO: copy the modules to the install-device repository.
Expand Down
1 change: 0 additions & 1 deletion nixos/modules/programs/nylas-mail.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ with lib;

let
cfg = config.services.nylas-mail;
defaultUser = "nylas-mail";
in {
###### interface
options = {
Expand Down
6 changes: 0 additions & 6 deletions nixos/modules/programs/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@

with lib;

let

cfg = config.environment;

in

{

config = {
Expand Down
1 change: 0 additions & 1 deletion nixos/modules/programs/ssh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ with lib;
let

cfg = config.programs.ssh;
cfgd = config.services.openssh;

askPassword = cfg.askPassword;

Expand Down
2 changes: 0 additions & 2 deletions nixos/modules/programs/xonsh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ with lib;

let

cfge = config.environment;

cfg = config.programs.xonsh;

in
Expand Down
1 change: 0 additions & 1 deletion nixos/modules/security/acme.nix
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ in
servicesLists = mapAttrsToList certToServices cfg.certs;
certToServices = cert: data:
let
domain = if data.domain != null then data.domain else cert;
cpath = lpath + optionalString (data.activationDelay != null) ".staging";
lpath = "${cfg.directory}/${cert}";
rights = if data.allowKeysForGroup then "750" else "700";
Expand Down
11 changes: 0 additions & 11 deletions nixos/modules/services/backup/bacula.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,6 @@ let
${dir_cfg.extraConfig}
'';

# TODO: by default use this config
bconsole_conf = pkgs.writeText "bconsole.conf"
''
Director {
Name = ${dir_cfg.name};
Address = "localhost";
DirPort = ${toString dir_cfg.port};
Password = "${dir_cfg.password}";
}
'';

directorOptions = {name, config, ...}:
{
options = {
Expand Down
1 change: 0 additions & 1 deletion nixos/modules/services/backup/crashplan-small-business.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
let
cfg = config.services.crashplansb;
crashplansb = pkgs.crashplansb.override { maxRam = cfg.maxRam; };
varDir = "/var/lib/crashplan";
in

with lib;
Expand Down
1 change: 0 additions & 1 deletion nixos/modules/services/backup/crashplan.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
let
cfg = config.services.crashplan;
crashplan = pkgs.crashplan;
varDir = "/var/lib/crashplan";
in

with lib;
Expand Down
1 change: 0 additions & 1 deletion nixos/modules/services/backup/restic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ with lib;
mapAttrs' (name: backup:
let
extraOptions = concatMapStrings (arg: " -o ${arg}") backup.extraOptions;
connectTo = elemAt (splitString ":" backup.repository) 1;
resticCmd = "${pkgs.restic}/bin/restic${extraOptions}";
in nameValuePair "restic-backups-${name}" ({
environment = {
Expand Down
7 changes: 0 additions & 7 deletions nixos/modules/services/backup/znapzend.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ with types;

let

# Converts a plan like
# { "1d" = "1h"; "1w" = "1d"; }
# into
# "1d=>1h,1w=>1d"
attrToPlan = attrs: concatStringsSep "," (builtins.attrValues (
mapAttrs (n: v: "${n}=>${v}") attrs));

planDescription = ''
The znapzend backup plan to use for the source.
</para>
Expand Down
5 changes: 1 addition & 4 deletions nixos/modules/services/cluster/hadoop/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{ config, lib, pkgs, ...}:
let
cfg = config.services.hadoop;
hadoopConf = import ./conf.nix { hadoop = cfg; pkgs = pkgs; };
in

with lib;
{
imports = [ ./yarn.nix ./hdfs.nix ];
Expand Down
3 changes: 0 additions & 3 deletions nixos/modules/services/cluster/kubernetes/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ let
})}
'';

skipAttrs = attrs: map (filterAttrs (k: v: k != "enable"))
(filter (v: !(hasAttr "enable" v) || v.enable) attrs);

infraContainer = pkgs.dockerTools.buildImage {
name = "pause";
tag = "latest";
Expand Down
2 changes: 0 additions & 2 deletions nixos/modules/services/mail/dovecot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ let
baseDir = "/run/dovecot2";
stateDir = "/var/lib/dovecot";

canCreateMailUserGroup = cfg.mailUser != null && cfg.mailGroup != null;

dovecotConf = concatStrings [
''
base_dir = ${baseDir}
Expand Down
10 changes: 0 additions & 10 deletions nixos/modules/services/misc/disnix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@ let

cfg = config.services.disnix;

dysnomia = pkgs.dysnomia.override (origArgs: {
enableApacheWebApplication = config.services.httpd.enable;
enableAxis2WebService = config.services.tomcat.axis2.enable;
enableEjabberdDump = config.services.ejabberd.enable;
enableMySQLDatabase = config.services.mysql.enable;
enablePostgreSQLDatabase = config.services.postgresql.enable;
enableSubversionRepository = config.services.svnserve.enable;
enableTomcatWebApplication = config.services.tomcat.enable;
enableMongoDatabase = config.services.mongodb.enable;
});
in

{
Expand Down
37 changes: 0 additions & 37 deletions nixos/modules/services/misc/docker-registry.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,6 @@ with lib;
let
cfg = config.services.dockerRegistry;

blobCache = if cfg.enableRedisCache
then "redis"
else "inmemory";

registryConfig = {
version = "0.1";
log.fields.service = "registry";
storage = {
cache.blobdescriptor = blobCache;
filesystem.rootdirectory = cfg.storagePath;
delete.enabled = cfg.enableDelete;
};
http = {
addr = ":${builtins.toString cfg.port}";
headers.X-Content-Type-Options = ["nosniff"];
};
health.storagedriver = {
enabled = true;
interval = "10s";
threshold = 3;
};
};

registryConfig.redis = mkIf cfg.enableRedisCache {
addr = "${cfg.redisUrl}";
password = "${cfg.redisPassword}";
db = 0;
dialtimeout = "10ms";
readtimeout = "10ms";
writetimeout = "10ms";
pool = {
maxidle = 16;
maxactive = 64;
idletimeout = "300s";
};
};

configFile = pkgs.writeText "docker-registry-config.yml" (builtins.toJSON (recursiveUpdate registryConfig cfg.extraConfig));

in {
Expand Down
3 changes: 0 additions & 3 deletions nixos/modules/services/misc/dysnomia.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ let
cd $out
${concatMapStrings (containerName:
let
components = cfg.components."${containerName}";
in
linkMutableComponents { inherit containerName; }
) (builtins.attrNames cfg.components)}
'';
Expand Down
1 change: 0 additions & 1 deletion nixos/modules/services/misc/emby.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ with lib;

let
cfg = config.services.emby;
emby = pkgs.emby;
in
{
options = {
Expand Down
1 change: 0 additions & 1 deletion nixos/modules/services/misc/exhibitor.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ with lib;

let
cfg = config.services.exhibitor;
exhibitor = cfg.package;
exhibitorConfig = ''
zookeeper-install-directory=${cfg.baseDir}/zookeeper
zookeeper-data-directory=${cfg.zkDataDir}
Expand Down
1 change: 0 additions & 1 deletion nixos/modules/services/misc/mediatomb.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ with lib;

let

uid = config.ids.uids.mediatomb;
gid = config.ids.gids.mediatomb;
cfg = config.services.mediatomb;

Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/misc/nzbget.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ with lib;

let
cfg = config.services.nzbget;
nzbget = pkgs.nzbget; in {
in {
options = {
services.nzbget = {
enable = mkEnableOption "NZBGet";
Expand Down
1 change: 0 additions & 1 deletion nixos/modules/services/misc/plex.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ with lib;

let
cfg = config.services.plex;
plex = pkgs.plex;
in
{
options = {
Expand Down
10 changes: 0 additions & 10 deletions nixos/modules/services/misc/taskserver/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@ let

taskd = "${pkgs.taskserver}/bin/taskd";

mkVal = val:
if val == true then "true"
else if val == false then "false"
else if isList val then concatStringsSep ", " val
else toString val;

mkConfLine = key: val: let
result = "${key} = ${mkVal val}";
in optionalString (val != null && val != []) result;

mkManualPkiOption = desc: mkOption {
type = types.nullOr types.path;
default = null;
Expand Down
3 changes: 0 additions & 3 deletions nixos/modules/services/networking/gdomap.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

with lib;

let
cfg = config.services.gdomap;
in
{
#
# interface
Expand Down
4 changes: 2 additions & 2 deletions nixos/modules/services/networking/i2pd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ let
${flip concatMapStrings
(collect (proto: proto ? port && proto ? address && proto ? name) cfg.proto)
(proto: let portStr = toString proto.port; in ''
(proto: ''
[${proto.name}]
enabled = ${boolToString proto.enable}
address = ${proto.address}
Expand All @@ -122,7 +122,7 @@ let
# DO NOT EDIT -- this file has been generated automatically.
${flip concatMapStrings
(collect (tun: tun ? port && tun ? destination) cfg.outTunnels)
(tun: let portStr = toString tun.port; in ''
(tun: ''
[${tun.name}]
type = client
destination = ${tun.destination}
Expand Down
2 changes: 0 additions & 2 deletions nixos/modules/services/networking/morty.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ let

cfg = config.services.morty;

configFile = cfg.configFile;

in

{
Expand Down
1 change: 0 additions & 1 deletion nixos/modules/services/networking/znc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ let
};

# Keep znc.conf in nix store, then symlink or copy into `dataDir`, depending on `mutable`.
notNull = a: ! isNull a;
mkZncConf = confOpts: ''
Version = 1.6.3
${concatMapStrings (n: "LoadModule = ${n}\n") confOpts.modules}
Expand Down
1 change: 0 additions & 1 deletion nixos/modules/services/system/saslauthd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ with lib;

let

nssModulesPath = config.system.nssModules.path;
cfg = config.services.saslauthd;

in
Expand Down

0 comments on commit 87f5930

Please sign in to comment.