Merge master into staging-next
This commit is contained in:
commit
ad47d658d1
@ -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";
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
let
|
||||
inherit (builtins) head tail length;
|
||||
inherit (lib.trivial) and or;
|
||||
inherit (lib.trivial) and;
|
||||
inherit (lib.strings) concatStringsSep;
|
||||
inherit (lib.lists) fold concatMap concatLists all deepSeqList;
|
||||
inherit (lib.lists) fold concatMap concatLists;
|
||||
in
|
||||
|
||||
rec {
|
||||
|
@ -1,5 +1,5 @@
|
||||
{lib, pkgs}:
|
||||
let inherit (lib) nv nvs; in
|
||||
let inherit (lib) nvs; in
|
||||
{
|
||||
|
||||
# composableDerivation basically mixes these features:
|
||||
|
@ -1,9 +1,4 @@
|
||||
{ lib }:
|
||||
let
|
||||
|
||||
inherit (builtins) attrNames;
|
||||
|
||||
in
|
||||
|
||||
rec {
|
||||
|
||||
|
@ -19,8 +19,6 @@ let
|
||||
libStr = lib.strings;
|
||||
libAttr = lib.attrsets;
|
||||
|
||||
flipMapAttrs = flip libAttr.mapAttrs;
|
||||
|
||||
inherit (lib) isFunction;
|
||||
in
|
||||
|
||||
|
@ -64,7 +64,6 @@ rec {
|
||||
*/
|
||||
foldl = op: nul: list:
|
||||
let
|
||||
len = length list;
|
||||
foldl' = n:
|
||||
if n == -1
|
||||
then nul
|
||||
|
@ -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
|
||||
|
@ -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; });
|
||||
|
@ -8,7 +8,7 @@ with lib.trivial;
|
||||
with lib.strings;
|
||||
let
|
||||
|
||||
inherit (lib.modules) mergeDefinitions filterOverrides;
|
||||
inherit (lib.modules) mergeDefinitions;
|
||||
outer_types =
|
||||
rec {
|
||||
isType = type: x: (x._type or "") == type;
|
||||
@ -309,7 +309,6 @@ rec {
|
||||
}
|
||||
else
|
||||
def;
|
||||
listOnly = listOf elemType;
|
||||
attrOnly = attrsOf elemType;
|
||||
in mkOptionType rec {
|
||||
name = "loaOf";
|
||||
|
@ -47,7 +47,7 @@ rec {
|
||||
machinesNumbered = zipLists machines (range 1 254);
|
||||
|
||||
nodes_ = flip map machinesNumbered (m: nameValuePair m.fst
|
||||
[ ( { config, pkgs, nodes, ... }:
|
||||
[ ( { config, nodes, ... }:
|
||||
let
|
||||
interfacesNumbered = zipLists config.virtualisation.vlans (range 1 255);
|
||||
interfaces = flip map interfacesNumbered ({ fst, snd }:
|
||||
|
@ -24,9 +24,6 @@
|
||||
# most likely fails as GRUB will probably refuse to install.
|
||||
partitionTableType ? "legacy"
|
||||
|
||||
# Whether to invoke switch-to-configuration boot during image creation
|
||||
, installBootLoader ? true
|
||||
|
||||
, # The root file system type.
|
||||
fsType ? "ext4"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, perl, closureInfo, xorriso, syslinux
|
||||
{ stdenv, closureInfo, xorriso, syslinux
|
||||
|
||||
, # The file name of the resulting ISO image.
|
||||
isoName ? "cd.iso"
|
||||
|
@ -222,7 +222,7 @@ in rec {
|
||||
runInMachineWithX = { require ? [], ... } @ args:
|
||||
let
|
||||
client =
|
||||
{ config, pkgs, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
inherit require;
|
||||
virtualisation.memorySize = 1024;
|
||||
|
@ -149,7 +149,7 @@ let
|
||||
else testOptions;
|
||||
checkAll = checkList == [];
|
||||
in
|
||||
flip filter graph ({option, usedBy}:
|
||||
flip filter graph ({option, ...}:
|
||||
(checkAll || elem option checkList)
|
||||
&& !(elem option excludedTestOptions)
|
||||
);
|
||||
@ -165,7 +165,7 @@ let
|
||||
'';
|
||||
|
||||
graphToText = graph:
|
||||
concatMapStrings ({option, usedBy}:
|
||||
concatMapStrings ({usedBy, ...}:
|
||||
concatMapStrings (user: ''
|
||||
${user}
|
||||
'') usedBy
|
||||
|
@ -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;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# This module gets rid of all dependencies on X11 client libraries
|
||||
# (including fontconfig).
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Configuration for the Name Service Switch (/etc/nsswitch.conf).
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -282,7 +282,7 @@ let
|
||||
|
||||
};
|
||||
|
||||
groupOpts = { name, config, ... }: {
|
||||
groupOpts = { name, ... }: {
|
||||
|
||||
options = {
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{lib, config, ...}:
|
||||
{lib, ...}:
|
||||
|
||||
{
|
||||
hardware = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
{pkgs, config, ...}:
|
||||
{pkgs, ...}:
|
||||
|
||||
{
|
||||
hardware.firmware = [ pkgs.zd1211fw ];
|
||||
|
@ -1,6 +1,6 @@
|
||||
# This module provides the proprietary ATI X11 / OpenGL drivers.
|
||||
|
||||
{ config, lib, pkgs, pkgs_i686, ... }:
|
||||
{ config, lib, pkgs_i686, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, buildEnv
|
||||
{ buildEnv
|
||||
, libwebcam
|
||||
, makeWrapper
|
||||
, runCommand
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./installation-cd-graphical-kde.nix ];
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./installation-cd-minimal.nix ];
|
||||
|
@ -1,7 +1,7 @@
|
||||
# This module defines a small NixOS installation CD. It does not
|
||||
# contain any graphical stuff.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
|
@ -1,7 +1,7 @@
|
||||
# This module contains the basic configuration for building netboot
|
||||
# images
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# This module defines a small netboot environment.
|
||||
|
||||
{ config, lib, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
|
@ -1,6 +1,6 @@
|
||||
# List all devices which are detected by nixos-generate-config.
|
||||
# Common devices are enabled by default.
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,13 +1,11 @@
|
||||
# This module generates nixos-install, nixos-rebuild,
|
||||
# nixos-generate-config, etc.
|
||||
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.installer;
|
||||
|
||||
makeProg = args: pkgs.substituteAll (args // {
|
||||
dir = "bin";
|
||||
isExecutable = true;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
_module.args = {
|
||||
|
@ -9,7 +9,7 @@
|
||||
# Systemd can also change ownership of service directories using the
|
||||
# RuntimeDirectory/StateDirectory options.
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, options, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# This module allows you to export something from configuration
|
||||
# Use case: export kernel source expression for ease of configuring
|
||||
|
||||
{ config, lib, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
|
@ -3,7 +3,7 @@
|
||||
# enabled in the initrd. Its primary use is in the NixOS installation
|
||||
# CDs.
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# This module defines the software packages included in the "minimal"
|
||||
# installation CD. It might be useful elsewhere.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Include some utilities that are useful for installing or repairing
|
||||
|
@ -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.
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./graphical.nix ];
|
||||
|
@ -1,7 +1,7 @@
|
||||
# This module defines a NixOS configuration with the Plasma 5 desktop.
|
||||
# It's used by the graphical installation CD.
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services.xserver = {
|
||||
|
@ -1,7 +1,7 @@
|
||||
# A profile with most (vanilla) hardening options enabled by default,
|
||||
# potentially at the cost of features and performance.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Common configuration for headless machines (e.g., Amazon EC2
|
||||
# instances).
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# This module defines a small NixOS configuration. It does not
|
||||
# contain any graphical stuff.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Common configuration for virtual machines running under QEMU (using
|
||||
# virtio).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
boot.initrd.availableKernelModules = [ "virtio_net" "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_scsi" "9p" "9pnet_virtio" ];
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Global configuration for atop.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
options.programs.bcc.enable = lib.mkEnableOption "bcc";
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# Most of the stuff here should probably be moved elsewhere sometime.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -4,7 +4,6 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.nylas-mail;
|
||||
defaultUser = "nylas-mail";
|
||||
in {
|
||||
###### interface
|
||||
options = {
|
||||
|
@ -1,15 +1,9 @@
|
||||
# This module defines a standard configuration for NixOS shells.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.environment;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
config = {
|
||||
|
@ -7,7 +7,6 @@ with lib;
|
||||
let
|
||||
|
||||
cfg = config.programs.ssh;
|
||||
cfgd = config.services.openssh;
|
||||
|
||||
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 {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
@ -189,9 +211,8 @@ in
|
||||
|
||||
ForwardX11 ${if cfg.forwardX11 then "yes" else "no"}
|
||||
|
||||
# Allow DSA keys for now. (These were deprecated in OpenSSH 7.0.)
|
||||
PubkeyAcceptedKeyTypes +ssh-dss
|
||||
HostKeyAlgorithms +ssh-dss
|
||||
${optionalString (cfg.pubkeyAcceptedKeyTypes != []) "PubkeyAcceptedKeyTypes ${concatStringsSep "," cfg.pubkeyAcceptedKeyTypes}"}
|
||||
${optionalString (cfg.hostKeyAlgorithms != []) "HostKeyAlgorithms ${concatStringsSep "," cfg.hostKeyAlgorithms}"}
|
||||
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkOption mkEnableOption mkIf mkMerge types;
|
||||
inherit (lib) mkOption mkIf types;
|
||||
|
||||
cfg = config.programs.tmux;
|
||||
|
||||
|
@ -6,8 +6,6 @@ with lib;
|
||||
|
||||
let
|
||||
|
||||
cfge = config.environment;
|
||||
|
||||
cfg = config.programs.xonsh;
|
||||
|
||||
in
|
||||
|
@ -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";
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
# This module provides configuration for the OATH PAM modules.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -4,8 +4,6 @@ with lib;
|
||||
|
||||
let
|
||||
|
||||
inherit (pkgs) pam_usb;
|
||||
|
||||
cfg = config.security.pam.usb;
|
||||
|
||||
anyUsbAuth = any (attrByPath ["usbAuth"] false) (attrValues config.security.pam.services);
|
||||
|
@ -97,18 +97,7 @@ 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, ...}:
|
||||
directorOptions = {...}:
|
||||
{
|
||||
options = {
|
||||
password = mkOption {
|
||||
@ -128,7 +117,7 @@ let
|
||||
};
|
||||
};
|
||||
|
||||
deviceOptions = {name, config, ...}:
|
||||
deviceOptions = {...}:
|
||||
{
|
||||
options = {
|
||||
archiveDevice = mkOption {
|
||||
|
@ -510,7 +510,7 @@ in {
|
||||
'';
|
||||
default = { };
|
||||
type = types.attrsOf (types.submodule (
|
||||
{ name, config, ... }: {
|
||||
{ ... }: {
|
||||
options = {
|
||||
|
||||
path = mkOption {
|
||||
|
@ -3,7 +3,6 @@
|
||||
let
|
||||
cfg = config.services.crashplansb;
|
||||
crashplansb = pkgs.crashplansb.override { maxRam = cfg.maxRam; };
|
||||
varDir = "/var/lib/crashplan";
|
||||
in
|
||||
|
||||
with lib;
|
||||
|
@ -3,7 +3,6 @@
|
||||
let
|
||||
cfg = config.services.crashplan;
|
||||
crashplan = pkgs.crashplan;
|
||||
varDir = "/var/lib/crashplan";
|
||||
in
|
||||
|
||||
with lib;
|
||||
|
@ -6,7 +6,7 @@ with lib;
|
||||
description = ''
|
||||
Periodic backups to create with Restic.
|
||||
'';
|
||||
type = types.attrsOf (types.submodule ({ name, config, ... }: {
|
||||
type = types.attrsOf (types.submodule ({ name, ... }: {
|
||||
options = {
|
||||
passwordFile = mkOption {
|
||||
type = types.str;
|
||||
@ -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 = {
|
||||
|
@ -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>
|
||||
|
@ -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 ];
|
||||
|
@ -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";
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.jenkinsSlave;
|
||||
|
@ -15,7 +15,7 @@ let
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
|
||||
bindingCfg = { config, ... }: {
|
||||
bindingCfg = { ... }: {
|
||||
options = {
|
||||
|
||||
keys = mkOption {
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
let kernel = config.boot.kernelPackages; in
|
||||
|
||||
|
@ -9,7 +9,7 @@ let
|
||||
|
||||
etcFiles = pkgs.callPackage ./brscan4_etc_files.nix { netDevices = netDeviceList; };
|
||||
|
||||
netDeviceOpts = { name, config, ... }: {
|
||||
netDeviceOpts = { name, ... }: {
|
||||
|
||||
options = {
|
||||
|
||||
|
@ -28,11 +28,14 @@ let
|
||||
# temperatures are read from the file.
|
||||
#
|
||||
# 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
|
||||
# http://www.thinkwiki.org/wiki/Thermal_Sensors to find out how much you may
|
||||
# want to add to certain temperatures.
|
||||
|
||||
|
||||
${cfg.fan}
|
||||
${cfg.sensors}
|
||||
|
||||
# Syntax:
|
||||
# (LEVEL, LOW, HIGH)
|
||||
# LEVEL is the fan level to use (0-7 with thinkpad_acpi)
|
||||
@ -41,8 +44,6 @@ let
|
||||
# All numbers are integers.
|
||||
#
|
||||
|
||||
sensor ${cfg.sensor} (0, 10, 15, 2, 10, 5, 0, 3, 0, 3)
|
||||
|
||||
${cfg.levels}
|
||||
'';
|
||||
|
||||
@ -53,20 +54,52 @@ in {
|
||||
services.thinkfan = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable thinkfan, fan controller for IBM/Lenovo ThinkPads.
|
||||
'';
|
||||
};
|
||||
|
||||
sensor = mkOption {
|
||||
default = "/proc/acpi/ibm/thermal";
|
||||
sensors = mkOption {
|
||||
type = types.lines;
|
||||
default = ''
|
||||
tp_thermal /proc/acpi/ibm/thermal (0,0,10)
|
||||
'';
|
||||
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 {
|
||||
type = types.lines;
|
||||
default = ''
|
||||
(0, 0, 55)
|
||||
(1, 48, 60)
|
||||
@ -76,8 +109,12 @@ in {
|
||||
(7, 60, 85)
|
||||
(127, 80, 32767)
|
||||
'';
|
||||
description =''
|
||||
Sensor used by thinkfan
|
||||
description = ''
|
||||
(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.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -4,8 +4,6 @@ with lib;
|
||||
|
||||
let
|
||||
|
||||
inherit (pkgs) stdenv writeText procps;
|
||||
|
||||
udev = config.systemd.package;
|
||||
|
||||
cfg = config.services.udev;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, services, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
@ -9,8 +9,6 @@ let
|
||||
baseDir = "/run/dovecot2";
|
||||
stateDir = "/var/lib/dovecot";
|
||||
|
||||
canCreateMailUserGroup = cfg.mailUser != null && cfg.mailGroup != null;
|
||||
|
||||
dovecotConf = concatStrings [
|
||||
''
|
||||
base_dir = ${baseDir}
|
||||
@ -112,7 +110,7 @@ let
|
||||
special_use = \${toString mailbox.specialUse}
|
||||
'' + "}";
|
||||
|
||||
mailboxes = { lib, pkgs, ... }: {
|
||||
mailboxes = { ... }: {
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = types.strMatching ''[^"]+'';
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -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
|
||||
|
||||
{
|
||||
|
@ -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 {
|
||||
|
@ -62,9 +62,6 @@ let
|
||||
cd $out
|
||||
|
||||
${concatMapStrings (containerName:
|
||||
let
|
||||
components = cfg.components."${containerName}";
|
||||
in
|
||||
linkMutableComponents { inherit containerName; }
|
||||
) (builtins.attrNames cfg.components)}
|
||||
'';
|
||||
|
@ -1,10 +1,9 @@
|
||||
{ config, pkgs, lib, mono, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.emby;
|
||||
emby = pkgs.emby;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
|
@ -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}
|
||||
|
@ -37,7 +37,7 @@ let
|
||||
# List of components used in config
|
||||
extraComponents = filter useComponent availableComponents;
|
||||
|
||||
package = if cfg.autoExtraComponents
|
||||
package = if (cfg.autoExtraComponents && cfg.config != null)
|
||||
then (cfg.package.override { inherit extraComponents; })
|
||||
else cfg.package;
|
||||
|
||||
@ -110,7 +110,9 @@ in {
|
||||
'';
|
||||
description = ''
|
||||
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.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, pkgs, lib, mono, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, pkgs, lib, ... } @ args:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -4,7 +4,6 @@ with lib;
|
||||
|
||||
let
|
||||
|
||||
uid = config.ids.uids.mediatomb;
|
||||
gid = config.ids.gids.mediatomb;
|
||||
cfg = config.services.mediatomb;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let cfg = config.nix.sshServe;
|
||||
|
@ -4,7 +4,7 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.nzbget;
|
||||
nzbget = pkgs.nzbget; in {
|
||||
in {
|
||||
options = {
|
||||
services.nzbget = {
|
||||
enable = mkEnableOption "NZBGet";
|
||||
|
@ -4,7 +4,6 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.plex;
|
||||
plex = pkgs.plex;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, pkgs, lib, mono, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, pkgs, lib, mono, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -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;
|
||||
@ -94,7 +84,7 @@ let
|
||||
in flatten (mapAttrsToList mkSublist attrs);
|
||||
in all isNull (findPkiDefinitions [] manualPkiOptions);
|
||||
|
||||
orgOptions = { name, ... }: {
|
||||
orgOptions = { ... }: {
|
||||
options.users = mkOption {
|
||||
type = types.uniq (types.listOf types.str);
|
||||
default = [];
|
||||
|
@ -94,7 +94,7 @@ let
|
||||
};
|
||||
});
|
||||
|
||||
mkSubModule = { name, port, extraOpts, serviceOpts }: {
|
||||
mkSubModule = { name, port, extraOpts, ... }: {
|
||||
${name} = mkOption {
|
||||
type = types.submodule {
|
||||
options = (mkExporterOpts {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user