Merge master into staging-next

This commit is contained in:
Frederik Rietdijk 2018-07-21 19:43:53 +02:00
commit ad47d658d1
2090 changed files with 4329 additions and 3730 deletions

View File

@ -1,8 +1,6 @@
let let
pkgs = import ./.. { }; pkgs = import ./.. { };
lib = pkgs.lib; lib = pkgs.lib;
sources = lib.sourceFilesBySuffices ./. [".xml"];
sources-langs = ./languages-frameworks;
in in
pkgs.stdenv.mkDerivation { pkgs.stdenv.mkDerivation {
name = "nixpkgs-manual"; name = "nixpkgs-manual";

View File

@ -3,9 +3,9 @@
let let
inherit (builtins) head tail length; inherit (builtins) head tail length;
inherit (lib.trivial) and or; inherit (lib.trivial) and;
inherit (lib.strings) concatStringsSep; inherit (lib.strings) concatStringsSep;
inherit (lib.lists) fold concatMap concatLists all deepSeqList; inherit (lib.lists) fold concatMap concatLists;
in in
rec { rec {

View File

@ -1,5 +1,5 @@
{lib, pkgs}: {lib, pkgs}:
let inherit (lib) nv nvs; in let inherit (lib) nvs; in
{ {
# composableDerivation basically mixes these features: # composableDerivation basically mixes these features:

View File

@ -1,9 +1,4 @@
{ lib }: { lib }:
let
inherit (builtins) attrNames;
in
rec { rec {

View File

@ -19,8 +19,6 @@ let
libStr = lib.strings; libStr = lib.strings;
libAttr = lib.attrsets; libAttr = lib.attrsets;
flipMapAttrs = flip libAttr.mapAttrs;
inherit (lib) isFunction; inherit (lib) isFunction;
in in

View File

@ -64,7 +64,6 @@ rec {
*/ */
foldl = op: nul: list: foldl = op: nul: list:
let let
len = length list;
foldl' = n: foldl' = n:
if n == -1 if n == -1
then nul then nul

View File

@ -670,7 +670,6 @@ rec {
{ config, options, ... }: { config, options, ... }:
let let
fromOpt = getAttrFromPath from options; fromOpt = getAttrFromPath from options;
toOpt = getAttrFromPath to options;
toOf = attrByPath to toOf = attrByPath to
(abort "Renaming error: option `${showOption to}' does not exist."); (abort "Renaming error: option `${showOption to}' does not exist.");
in in

View File

@ -380,10 +380,6 @@ runTests {
resRem7 = res6.replace (a: removeAttrs a ["a"]); 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) # fixed tests (delayed args): (when using them add some comments, please)
resFixed1 = resFixed1 =
let x = defaultOverridableDelayableArgs id ( x: { a = 7; c = x.fixed.b; }); let x = defaultOverridableDelayableArgs id ( x: { a = 7; c = x.fixed.b; });

View File

@ -8,7 +8,7 @@ with lib.trivial;
with lib.strings; with lib.strings;
let let
inherit (lib.modules) mergeDefinitions filterOverrides; inherit (lib.modules) mergeDefinitions;
outer_types = outer_types =
rec { rec {
isType = type: x: (x._type or "") == type; isType = type: x: (x._type or "") == type;
@ -309,7 +309,6 @@ rec {
} }
else else
def; def;
listOnly = listOf elemType;
attrOnly = attrsOf elemType; attrOnly = attrsOf elemType;
in mkOptionType rec { in mkOptionType rec {
name = "loaOf"; name = "loaOf";

View File

@ -47,7 +47,7 @@ rec {
machinesNumbered = zipLists machines (range 1 254); machinesNumbered = zipLists machines (range 1 254);
nodes_ = flip map machinesNumbered (m: nameValuePair m.fst nodes_ = flip map machinesNumbered (m: nameValuePair m.fst
[ ( { config, pkgs, nodes, ... }: [ ( { config, nodes, ... }:
let let
interfacesNumbered = zipLists config.virtualisation.vlans (range 1 255); interfacesNumbered = zipLists config.virtualisation.vlans (range 1 255);
interfaces = flip map interfacesNumbered ({ fst, snd }: interfaces = flip map interfacesNumbered ({ fst, snd }:

View File

@ -24,9 +24,6 @@
# most likely fails as GRUB will probably refuse to install. # most likely fails as GRUB will probably refuse to install.
partitionTableType ? "legacy" partitionTableType ? "legacy"
# Whether to invoke switch-to-configuration boot during image creation
, installBootLoader ? true
, # The root file system type. , # The root file system type.
fsType ? "ext4" fsType ? "ext4"

View File

@ -1,4 +1,4 @@
{ stdenv, perl, closureInfo, xorriso, syslinux { stdenv, closureInfo, xorriso, syslinux
, # The file name of the resulting ISO image. , # The file name of the resulting ISO image.
isoName ? "cd.iso" isoName ? "cd.iso"

View File

@ -222,7 +222,7 @@ in rec {
runInMachineWithX = { require ? [], ... } @ args: runInMachineWithX = { require ? [], ... } @ args:
let let
client = client =
{ config, pkgs, ... }: { ... }:
{ {
inherit require; inherit require;
virtualisation.memorySize = 1024; virtualisation.memorySize = 1024;

View File

@ -149,7 +149,7 @@ let
else testOptions; else testOptions;
checkAll = checkList == []; checkAll = checkList == [];
in in
flip filter graph ({option, usedBy}: flip filter graph ({option, ...}:
(checkAll || elem option checkList) (checkAll || elem option checkList)
&& !(elem option excludedTestOptions) && !(elem option excludedTestOptions)
); );
@ -165,7 +165,7 @@ let
''; '';
graphToText = graph: graphToText = graph:
concatMapStrings ({option, usedBy}: concatMapStrings ({usedBy, ...}:
concatMapStrings (user: '' concatMapStrings (user: ''
${user} ${user}
'') usedBy '') usedBy

View File

@ -2,9 +2,7 @@
with lib; with lib;
let fcBool = x: if x then "<bool>true</bool>" else "<bool>false</bool>"; let cfg = config.fonts.fontconfig.ultimate;
cfg = config.fonts.fontconfig.ultimate;
latestVersion = pkgs.fontconfig.configVersion; latestVersion = pkgs.fontconfig.configVersion;

View File

@ -1,7 +1,7 @@
# This module gets rid of all dependencies on X11 client libraries # This module gets rid of all dependencies on X11 client libraries
# (including fontconfig). # (including fontconfig).
{ config, lib, pkgs, ... }: { config, lib, ... }:
with lib; with lib;

View File

@ -1,6 +1,6 @@
# Configuration for the Name Service Switch (/etc/nsswitch.conf). # Configuration for the Name Service Switch (/etc/nsswitch.conf).
{ config, lib, pkgs, ... }: { config, lib, ... }:
with lib; with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
with lib; with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
with lib; with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
with lib; with lib;

View File

@ -282,7 +282,7 @@ let
}; };
groupOpts = { name, config, ... }: { groupOpts = { name, ... }: {
options = { options = {

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
with lib; with lib;

View File

@ -1,4 +1,4 @@
{lib, config, ...}: {lib, ...}:
{ {
hardware = { hardware = {

View File

@ -1,4 +1,4 @@
{pkgs, config, ...}: {pkgs, ...}:
{ {
hardware.firmware = [ pkgs.zd1211fw ]; hardware.firmware = [ pkgs.zd1211fw ];

View File

@ -1,6 +1,6 @@
# This module provides the proprietary ATI X11 / OpenGL drivers. # This module provides the proprietary ATI X11 / OpenGL drivers.
{ config, lib, pkgs, pkgs_i686, ... }: { config, lib, pkgs_i686, ... }:
with lib; with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
with lib; with lib;

View File

@ -1,6 +1,4 @@
{ lib { buildEnv
, stdenv
, buildEnv
, libwebcam , libwebcam
, makeWrapper , makeWrapper
, runCommand , runCommand

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { pkgs, ... }:
{ {
imports = [ ./installation-cd-graphical-kde.nix ]; imports = [ ./installation-cd-graphical-kde.nix ];

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { pkgs, ... }:
{ {
imports = [ ./installation-cd-minimal.nix ]; imports = [ ./installation-cd-minimal.nix ];

View File

@ -1,7 +1,7 @@
# This module defines a small NixOS installation CD. It does not # This module defines a small NixOS installation CD. It does not
# contain any graphical stuff. # contain any graphical stuff.
{ config, lib, pkgs, ... }: { ... }:
{ {
imports = imports =

View File

@ -1,7 +1,7 @@
# This module contains the basic configuration for building netboot # This module contains the basic configuration for building netboot
# images # images
{ config, lib, pkgs, ... }: { lib, ... }:
with lib; with lib;

View File

@ -1,6 +1,6 @@
# This module defines a small netboot environment. # This module defines a small netboot environment.
{ config, lib, ... }: { ... }:
{ {
imports = imports =

View File

@ -1,6 +1,6 @@
# List all devices which are detected by nixos-generate-config. # List all devices which are detected by nixos-generate-config.
# Common devices are enabled by default. # Common devices are enabled by default.
{ config, lib, pkgs, ... }: { lib, ... }:
with lib; with lib;

View File

@ -1,13 +1,11 @@
# This module generates nixos-install, nixos-rebuild, # This module generates nixos-install, nixos-rebuild,
# nixos-generate-config, etc. # nixos-generate-config, etc.
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
let let
cfg = config.installer;
makeProg = args: pkgs.substituteAll (args // { makeProg = args: pkgs.substituteAll (args // {
dir = "bin"; dir = "bin";
isExecutable = true; isExecutable = true;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { lib, ... }:
with lib; with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { lib, ... }:
with lib; with lib;

View File

@ -1,4 +1,4 @@
{ lib, pkgs, config, ... }: { pkgs, ... }:
{ {
_module.args = { _module.args = {

View File

@ -9,7 +9,7 @@
# Systemd can also change ownership of service directories using the # Systemd can also change ownership of service directories using the
# RuntimeDirectory/StateDirectory options. # RuntimeDirectory/StateDirectory options.
{ config, pkgs, lib, ... }: { lib, ... }:
{ {
options = { options = {

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
with lib; with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, ... }: { lib, ... }:
{ {
options = { options = {

View File

@ -1,4 +1,4 @@
{ config, options, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib; with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, ... }: { lib, ... }:
with lib; with lib;

View File

@ -1,7 +1,7 @@
# This module allows you to export something from configuration # This module allows you to export something from configuration
# Use case: export kernel source expression for ease of configuring # Use case: export kernel source expression for ease of configuring
{ config, lib, ... }: { lib, ... }:
{ {
options = { options = {

View File

@ -3,7 +3,7 @@
# enabled in the initrd. Its primary use is in the NixOS installation # enabled in the initrd. Its primary use is in the NixOS installation
# CDs. # CDs.
{ config, pkgs, ... }: { ... }:
{ {

View File

@ -1,7 +1,7 @@
# This module defines the software packages included in the "minimal" # This module defines the software packages included in the "minimal"
# installation CD. It might be useful elsewhere. # installation CD. It might be useful elsewhere.
{ config, lib, pkgs, ... }: { lib, pkgs, ... }:
{ {
# Include some utilities that are useful for installing or repairing # Include some utilities that are useful for installing or repairing

View File

@ -31,7 +31,6 @@ let
let let
relocateNixOS = path: relocateNixOS = path:
"<nixpkgs/nixos" + removePrefix nixosPath (toString path) + ">"; "<nixpkgs/nixos" + removePrefix nixosPath (toString path) + ">";
relocateOthers = null;
in in
{ nixos = map relocateNixOS partitionedModuleFiles.nixos; { nixos = map relocateNixOS partitionedModuleFiles.nixos;
others = []; # TODO: copy the modules to the install-device repository. others = []; # TODO: copy the modules to the install-device repository.

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { ... }:
{ {
imports = [ ./graphical.nix ]; imports = [ ./graphical.nix ];

View File

@ -1,7 +1,7 @@
# This module defines a NixOS configuration with the Plasma 5 desktop. # This module defines a NixOS configuration with the Plasma 5 desktop.
# It's used by the graphical installation CD. # It's used by the graphical installation CD.
{ config, pkgs, ... }: { pkgs, ... }:
{ {
services.xserver = { services.xserver = {

View File

@ -1,7 +1,7 @@
# A profile with most (vanilla) hardening options enabled by default, # A profile with most (vanilla) hardening options enabled by default,
# potentially at the cost of features and performance. # potentially at the cost of features and performance.
{ config, lib, pkgs, ... }: { lib, pkgs, ... }:
with lib; with lib;

View File

@ -1,7 +1,7 @@
# Common configuration for headless machines (e.g., Amazon EC2 # Common configuration for headless machines (e.g., Amazon EC2
# instances). # instances).
{ config, lib, pkgs, ... }: { lib, ... }:
with lib; with lib;

View File

@ -1,7 +1,7 @@
# This module defines a small NixOS configuration. It does not # This module defines a small NixOS configuration. It does not
# contain any graphical stuff. # contain any graphical stuff.
{ config, lib, pkgs, ... }: { config, lib, ... }:
with lib; with lib;

View File

@ -1,7 +1,7 @@
# Common configuration for virtual machines running under QEMU (using # Common configuration for virtual machines running under QEMU (using
# virtio). # virtio).
{ config, pkgs, ... }: { ... }:
{ {
boot.initrd.availableKernelModules = [ "virtio_net" "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_scsi" "9p" "9pnet_virtio" ]; boot.initrd.availableKernelModules = [ "virtio_net" "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_scsi" "9p" "9pnet_virtio" ];

View File

@ -1,6 +1,6 @@
# Global configuration for atop. # Global configuration for atop.
{ config, lib, pkgs, ... }: { config, lib, ... }:
with lib; with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
{ {
options.programs.bcc.enable = lib.mkEnableOption "bcc"; options.programs.bcc.enable = lib.mkEnableOption "bcc";

View File

@ -2,7 +2,7 @@
# Most of the stuff here should probably be moved elsewhere sometime. # Most of the stuff here should probably be moved elsewhere sometime.
{ config, lib, pkgs, ... }: { config, lib, ... }:
with lib; with lib;

View File

@ -4,7 +4,6 @@ with lib;
let let
cfg = config.services.nylas-mail; cfg = config.services.nylas-mail;
defaultUser = "nylas-mail";
in { in {
###### interface ###### interface
options = { options = {

View File

@ -1,15 +1,9 @@
# This module defines a standard configuration for NixOS shells. # This module defines a standard configuration for NixOS shells.
{ config, lib, pkgs, ... }: { config, lib, ... }:
with lib; with lib;
let
cfg = config.environment;
in
{ {
config = { config = {

View File

@ -7,7 +7,6 @@ with lib;
let let
cfg = config.programs.ssh; cfg = config.programs.ssh;
cfgd = config.services.openssh;
askPassword = cfg.askPassword; askPassword = cfg.askPassword;
@ -62,6 +61,29 @@ in
''; '';
}; };
# Allow DSA keys for now. (These were deprecated in OpenSSH 7.0.)
pubkeyAcceptedKeyTypes = mkOption {
type = types.listOf types.str;
default = [
"+ssh-dss"
];
example = [ "ssh-ed25519" "ssh-rsa" ];
description = ''
Specifies the key types that will be used for public key authentication.
'';
};
hostKeyAlgorithms = mkOption {
type = types.listOf types.str;
default = [
"+ssh-dss"
];
example = [ "ssh-ed25519" "ssh-rsa" ];
description = ''
Specifies the host key algorithms that the client wants to use in order of preference.
'';
};
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines; type = types.lines;
default = ""; default = "";
@ -189,9 +211,8 @@ in
ForwardX11 ${if cfg.forwardX11 then "yes" else "no"} ForwardX11 ${if cfg.forwardX11 then "yes" else "no"}
# Allow DSA keys for now. (These were deprecated in OpenSSH 7.0.) ${optionalString (cfg.pubkeyAcceptedKeyTypes != []) "PubkeyAcceptedKeyTypes ${concatStringsSep "," cfg.pubkeyAcceptedKeyTypes}"}
PubkeyAcceptedKeyTypes +ssh-dss ${optionalString (cfg.hostKeyAlgorithms != []) "HostKeyAlgorithms ${concatStringsSep "," cfg.hostKeyAlgorithms}"}
HostKeyAlgorithms +ssh-dss
${cfg.extraConfig} ${cfg.extraConfig}
''; '';

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
with lib; with lib;

View File

@ -1,7 +1,7 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
inherit (lib) mkOption mkEnableOption mkIf mkMerge types; inherit (lib) mkOption mkIf types;
cfg = config.programs.tmux; cfg = config.programs.tmux;

View File

@ -6,8 +6,6 @@ with lib;
let let
cfge = config.environment;
cfg = config.programs.xonsh; cfg = config.programs.xonsh;
in in

View File

@ -209,7 +209,6 @@ in
servicesLists = mapAttrsToList certToServices cfg.certs; servicesLists = mapAttrsToList certToServices cfg.certs;
certToServices = cert: data: certToServices = cert: data:
let let
domain = if data.domain != null then data.domain else cert;
cpath = lpath + optionalString (data.activationDelay != null) ".staging"; cpath = lpath + optionalString (data.activationDelay != null) ".staging";
lpath = "${cfg.directory}/${cert}"; lpath = "${cfg.directory}/${cert}";
rights = if data.allowKeysForGroup then "750" else "700"; rights = if data.allowKeysForGroup then "750" else "700";

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { config, lib, ... }:
with lib; with lib;
{ {

View File

@ -1,6 +1,6 @@
# This module provides configuration for the OATH PAM modules. # This module provides configuration for the OATH PAM modules.
{ config, lib, pkgs, ... }: { lib, ... }:
with lib; with lib;

View File

@ -4,8 +4,6 @@ with lib;
let let
inherit (pkgs) pam_usb;
cfg = config.security.pam.usb; cfg = config.security.pam.usb;
anyUsbAuth = any (attrByPath ["usbAuth"] false) (attrValues config.security.pam.services); anyUsbAuth = any (attrByPath ["usbAuth"] false) (attrValues config.security.pam.services);

View File

@ -97,18 +97,7 @@ let
${dir_cfg.extraConfig} ${dir_cfg.extraConfig}
''; '';
# TODO: by default use this config directorOptions = {...}:
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 = { options = {
password = mkOption { password = mkOption {
@ -128,7 +117,7 @@ let
}; };
}; };
deviceOptions = {name, config, ...}: deviceOptions = {...}:
{ {
options = { options = {
archiveDevice = mkOption { archiveDevice = mkOption {

View File

@ -510,7 +510,7 @@ in {
''; '';
default = { }; default = { };
type = types.attrsOf (types.submodule ( type = types.attrsOf (types.submodule (
{ name, config, ... }: { { ... }: {
options = { options = {
path = mkOption { path = mkOption {

View File

@ -3,7 +3,6 @@
let let
cfg = config.services.crashplansb; cfg = config.services.crashplansb;
crashplansb = pkgs.crashplansb.override { maxRam = cfg.maxRam; }; crashplansb = pkgs.crashplansb.override { maxRam = cfg.maxRam; };
varDir = "/var/lib/crashplan";
in in
with lib; with lib;

View File

@ -3,7 +3,6 @@
let let
cfg = config.services.crashplan; cfg = config.services.crashplan;
crashplan = pkgs.crashplan; crashplan = pkgs.crashplan;
varDir = "/var/lib/crashplan";
in in
with lib; with lib;

View File

@ -6,7 +6,7 @@ with lib;
description = '' description = ''
Periodic backups to create with Restic. Periodic backups to create with Restic.
''; '';
type = types.attrsOf (types.submodule ({ name, config, ... }: { type = types.attrsOf (types.submodule ({ name, ... }: {
options = { options = {
passwordFile = mkOption { passwordFile = mkOption {
type = types.str; type = types.str;
@ -127,7 +127,6 @@ with lib;
mapAttrs' (name: backup: mapAttrs' (name: backup:
let let
extraOptions = concatMapStrings (arg: " -o ${arg}") backup.extraOptions; extraOptions = concatMapStrings (arg: " -o ${arg}") backup.extraOptions;
connectTo = elemAt (splitString ":" backup.repository) 1;
resticCmd = "${pkgs.restic}/bin/restic${extraOptions}"; resticCmd = "${pkgs.restic}/bin/restic${extraOptions}";
in nameValuePair "restic-backups-${name}" ({ in nameValuePair "restic-backups-${name}" ({
environment = { environment = {

View File

@ -5,13 +5,6 @@ with types;
let 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 = '' planDescription = ''
The znapzend backup plan to use for the source. The znapzend backup plan to use for the source.
</para> </para>

View File

@ -1,8 +1,5 @@
{ config, lib, pkgs, ...}: { config, lib, pkgs, ...}:
let
cfg = config.services.hadoop;
hadoopConf = import ./conf.nix { hadoop = cfg; pkgs = pkgs; };
in
with lib; with lib;
{ {
imports = [ ./yarn.nix ./hdfs.nix ]; imports = [ ./yarn.nix ./hdfs.nix ];

View File

@ -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 { infraContainer = pkgs.dockerTools.buildImage {
name = "pause"; name = "pause";
tag = "latest"; tag = "latest";

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
with lib; with lib;
let let
cfg = config.services.jenkinsSlave; cfg = config.services.jenkinsSlave;

View File

@ -15,7 +15,7 @@ let
${cfg.extraConfig} ${cfg.extraConfig}
''; '';
bindingCfg = { config, ... }: { bindingCfg = { ... }: {
options = { options = {
keys = mkOption { keys = mkOption {

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { config, lib, ... }:
let kernel = config.boot.kernelPackages; in let kernel = config.boot.kernelPackages; in

View File

@ -9,7 +9,7 @@ let
etcFiles = pkgs.callPackage ./brscan4_etc_files.nix { netDevices = netDeviceList; }; etcFiles = pkgs.callPackage ./brscan4_etc_files.nix { netDevices = netDeviceList; };
netDeviceOpts = { name, config, ... }: { netDeviceOpts = { name, ... }: {
options = { options = {

View File

@ -28,11 +28,14 @@ let
# temperatures are read from the file. # temperatures are read from the file.
# #
# For example: # For example:
# sensor /proc/acpi/ibm/thermal (0, 0, 10) # tp_thermal /proc/acpi/ibm/thermal (0, 0, 10)
# will add a fixed value of 10 °C the 3rd value read from that file. Check out # will add a fixed value of 10 °C the 3rd value read from that file. Check out
# http://www.thinkwiki.org/wiki/Thermal_Sensors to find out how much you may # http://www.thinkwiki.org/wiki/Thermal_Sensors to find out how much you may
# want to add to certain temperatures. # want to add to certain temperatures.
${cfg.fan}
${cfg.sensors}
# Syntax: # Syntax:
# (LEVEL, LOW, HIGH) # (LEVEL, LOW, HIGH)
# LEVEL is the fan level to use (0-7 with thinkpad_acpi) # LEVEL is the fan level to use (0-7 with thinkpad_acpi)
@ -41,8 +44,6 @@ let
# All numbers are integers. # All numbers are integers.
# #
sensor ${cfg.sensor} (0, 10, 15, 2, 10, 5, 0, 3, 0, 3)
${cfg.levels} ${cfg.levels}
''; '';
@ -53,20 +54,52 @@ in {
services.thinkfan = { services.thinkfan = {
enable = mkOption { enable = mkOption {
type = types.bool;
default = false; default = false;
description = '' description = ''
Whether to enable thinkfan, fan controller for IBM/Lenovo ThinkPads. Whether to enable thinkfan, fan controller for IBM/Lenovo ThinkPads.
''; '';
}; };
sensor = mkOption { sensors = mkOption {
default = "/proc/acpi/ibm/thermal"; type = types.lines;
default = ''
tp_thermal /proc/acpi/ibm/thermal (0,0,10)
'';
description ='' description =''
Sensor used by thinkfan thinkfan can read temperatures from three possible sources:
/proc/acpi/ibm/thermal
Which is provided by the thinkpad_acpi kernel
module (keyword tp_thermal)
/sys/class/hwmon/*/temp*_input
Which may be provided by any hwmon drivers (keyword
hwmon)
S.M.A.R.T. (since 0.9 and requires the USE_ATASMART compilation flag)
Which reads the temperature directly from the hard
disk using libatasmart (keyword atasmart)
Multiple sensors may be added, in which case they will be
numbered in their order of appearance.
'';
};
fan = mkOption {
type = types.str;
default = "tp_fan /proc/acpi/ibm/fan";
description =''
Specifies the fan we want to use.
On anything other than a Thinkpad you'll probably
use some PWM control file in /sys/class/hwmon.
A sysfs fan would be specified like this:
pwm_fan /sys/class/hwmon/hwmon2/device/pwm1
''; '';
}; };
levels = mkOption { levels = mkOption {
type = types.lines;
default = '' default = ''
(0, 0, 55) (0, 0, 55)
(1, 48, 60) (1, 48, 60)
@ -76,8 +109,12 @@ in {
(7, 60, 85) (7, 60, 85)
(127, 80, 32767) (127, 80, 32767)
''; '';
description ='' description = ''
Sensor used by thinkfan (LEVEL, LOW, HIGH)
LEVEL is the fan level to use (0-7 with thinkpad_acpi).
LOW is the temperature at which to step down to the previous level.
HIGH is the temperature at which to step up to the next level.
All numbers are integers.
''; '';
}; };

View File

@ -4,8 +4,6 @@ with lib;
let let
inherit (pkgs) stdenv writeText procps;
udev = config.systemd.package; udev = config.systemd.package;
cfg = config.services.udev; cfg = config.services.udev;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, services, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
let let

View File

@ -9,8 +9,6 @@ let
baseDir = "/run/dovecot2"; baseDir = "/run/dovecot2";
stateDir = "/var/lib/dovecot"; stateDir = "/var/lib/dovecot";
canCreateMailUserGroup = cfg.mailUser != null && cfg.mailGroup != null;
dovecotConf = concatStrings [ dovecotConf = concatStrings [
'' ''
base_dir = ${baseDir} base_dir = ${baseDir}
@ -112,7 +110,7 @@ let
special_use = \${toString mailbox.specialUse} special_use = \${toString mailbox.specialUse}
'' + "}"; '' + "}";
mailboxes = { lib, pkgs, ... }: { mailboxes = { ... }: {
options = { options = {
name = mkOption { name = mkOption {
type = types.strMatching ''[^"]+''; type = types.strMatching ''[^"]+'';

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
with lib; with lib;

View File

@ -7,16 +7,6 @@ let
cfg = config.services.disnix; 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 in
{ {

View File

@ -5,43 +5,6 @@ with lib;
let let
cfg = config.services.dockerRegistry; 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)); configFile = pkgs.writeText "docker-registry-config.yml" (builtins.toJSON (recursiveUpdate registryConfig cfg.extraConfig));
in { in {

View File

@ -62,9 +62,6 @@ let
cd $out cd $out
${concatMapStrings (containerName: ${concatMapStrings (containerName:
let
components = cfg.components."${containerName}";
in
linkMutableComponents { inherit containerName; } linkMutableComponents { inherit containerName; }
) (builtins.attrNames cfg.components)} ) (builtins.attrNames cfg.components)}
''; '';

View File

@ -1,10 +1,9 @@
{ config, pkgs, lib, mono, ... }: { config, pkgs, lib, ... }:
with lib; with lib;
let let
cfg = config.services.emby; cfg = config.services.emby;
emby = pkgs.emby;
in in
{ {
options = { options = {

View File

@ -4,7 +4,6 @@ with lib;
let let
cfg = config.services.exhibitor; cfg = config.services.exhibitor;
exhibitor = cfg.package;
exhibitorConfig = '' exhibitorConfig = ''
zookeeper-install-directory=${cfg.baseDir}/zookeeper zookeeper-install-directory=${cfg.baseDir}/zookeeper
zookeeper-data-directory=${cfg.zkDataDir} zookeeper-data-directory=${cfg.zkDataDir}

View File

@ -37,7 +37,7 @@ let
# List of components used in config # List of components used in config
extraComponents = filter useComponent availableComponents; extraComponents = filter useComponent availableComponents;
package = if cfg.autoExtraComponents package = if (cfg.autoExtraComponents && cfg.config != null)
then (cfg.package.override { inherit extraComponents; }) then (cfg.package.override { inherit extraComponents; })
else cfg.package; else cfg.package;
@ -110,7 +110,9 @@ in {
''; '';
description = '' description = ''
Home Assistant package to use. Home Assistant package to use.
Override <literal>extraPackages</literal> in order to add additional dependencies. Override <literal>extraPackages</literal> or <literal>extraComponents</literal> in order to add additional dependencies.
If you specify <option>config</option> and do not set <option>autoExtraComponents</option>
to <literal>false</literal>, overriding <literal>extraComponents</literal> will have no effect.
''; '';
}; };

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, mono, ... }: { config, pkgs, lib, ... }:
with lib; with lib;

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... } @ args: { config, pkgs, lib, ... }:
with lib; with lib;

View File

@ -4,7 +4,6 @@ with lib;
let let
uid = config.ids.uids.mediatomb;
gid = config.ids.gids.mediatomb; gid = config.ids.gids.mediatomb;
cfg = config.services.mediatomb; cfg = config.services.mediatomb;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
with lib; with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
with lib; with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
with lib; with lib;
let cfg = config.nix.sshServe; let cfg = config.nix.sshServe;

View File

@ -4,7 +4,7 @@ with lib;
let let
cfg = config.services.nzbget; cfg = config.services.nzbget;
nzbget = pkgs.nzbget; in { in {
options = { options = {
services.nzbget = { services.nzbget = {
enable = mkEnableOption "NZBGet"; enable = mkEnableOption "NZBGet";

View File

@ -4,7 +4,6 @@ with lib;
let let
cfg = config.services.plex; cfg = config.services.plex;
plex = pkgs.plex;
in in
{ {
options = { options = {

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, mono, ... }: { config, pkgs, lib, ... }:
with lib; with lib;

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, mono, ... }: { config, pkgs, lib, ... }:
with lib; with lib;

View File

@ -7,16 +7,6 @@ let
taskd = "${pkgs.taskserver}/bin/taskd"; 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 { mkManualPkiOption = desc: mkOption {
type = types.nullOr types.path; type = types.nullOr types.path;
default = null; default = null;
@ -94,7 +84,7 @@ let
in flatten (mapAttrsToList mkSublist attrs); in flatten (mapAttrsToList mkSublist attrs);
in all isNull (findPkiDefinitions [] manualPkiOptions); in all isNull (findPkiDefinitions [] manualPkiOptions);
orgOptions = { name, ... }: { orgOptions = { ... }: {
options.users = mkOption { options.users = mkOption {
type = types.uniq (types.listOf types.str); type = types.uniq (types.listOf types.str);
default = []; default = [];

View File

@ -94,7 +94,7 @@ let
}; };
}); });
mkSubModule = { name, port, extraOpts, serviceOpts }: { mkSubModule = { name, port, extraOpts, ... }: {
${name} = mkOption { ${name} = mkOption {
type = types.submodule { type = types.submodule {
options = (mkExporterOpts { options = (mkExporterOpts {

Some files were not shown because too many files have changed in this diff Show More