Merge branch 'master' into staging

This commit is contained in:
Vladimír Čunát 2019-09-02 23:25:24 +02:00
commit f21211ebfe
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
277 changed files with 4766 additions and 1895 deletions

View file

@ -47,7 +47,7 @@ rec {
/* `makeOverridable` takes a function from attribute set to attribute set and /* `makeOverridable` takes a function from attribute set to attribute set and
injects `override` attibute which can be used to override arguments of injects `override` attribute which can be used to override arguments of
the function. the function.
nix-repl> x = {a, b}: { result = a + b; } nix-repl> x = {a, b}: { result = a + b; }

View file

@ -236,4 +236,9 @@ rec {
useLLVM = true; useLLVM = true;
}; };
# Ghcjs
ghcjs = {
config = "js-unknown-ghcjs";
platform = {};
};
} }

View file

@ -12,7 +12,7 @@ rec {
isx86_32 = { cpu = { family = "x86"; bits = 32; }; }; isx86_32 = { cpu = { family = "x86"; bits = 32; }; };
isx86_64 = { cpu = { family = "x86"; bits = 64; }; }; isx86_64 = { cpu = { family = "x86"; bits = 64; }; };
isPowerPC = { cpu = cpuTypes.powerpc; }; isPowerPC = { cpu = cpuTypes.powerpc; };
isPower = { cpu = { family = "power"; }; }; isPower = { cpu = { family = "power"; }; };
isx86 = { cpu = { family = "x86"; }; }; isx86 = { cpu = { family = "x86"; }; };
isAarch32 = { cpu = { family = "arm"; bits = 32; }; }; isAarch32 = { cpu = { family = "arm"; bits = 32; }; };
isAarch64 = { cpu = { family = "arm"; bits = 64; }; }; isAarch64 = { cpu = { family = "arm"; bits = 64; }; };
@ -23,6 +23,7 @@ rec {
isMsp430 = { cpu = { family = "msp430"; }; }; isMsp430 = { cpu = { family = "msp430"; }; };
isAvr = { cpu = { family = "avr"; }; }; isAvr = { cpu = { family = "avr"; }; };
isAlpha = { cpu = { family = "alpha"; }; }; isAlpha = { cpu = { family = "alpha"; }; };
isJavaScript = { cpu = cpuTypes.js; };
is32bit = { cpu = { bits = 32; }; }; is32bit = { cpu = { bits = 32; }; };
is64bit = { cpu = { bits = 64; }; }; is64bit = { cpu = { bits = 64; }; };
@ -44,6 +45,7 @@ rec {
isCygwin = { kernel = kernels.windows; abi = abis.cygnus; }; isCygwin = { kernel = kernels.windows; abi = abis.cygnus; };
isMinGW = { kernel = kernels.windows; abi = abis.gnu; }; isMinGW = { kernel = kernels.windows; abi = abis.gnu; };
isWasi = { kernel = kernels.wasi; }; isWasi = { kernel = kernels.wasi; };
isGhcjs = { kernel = kernels.ghcjs; };
isNone = { kernel = kernels.none; }; isNone = { kernel = kernels.none; };
isAndroid = [ { abi = abis.android; } { abi = abis.androideabi; } ]; isAndroid = [ { abi = abis.android; } { abi = abis.androideabi; } ];

View file

@ -106,11 +106,13 @@ rec {
wasm32 = { bits = 32; significantByte = littleEndian; family = "wasm"; }; wasm32 = { bits = 32; significantByte = littleEndian; family = "wasm"; };
wasm64 = { bits = 64; significantByte = littleEndian; family = "wasm"; }; wasm64 = { bits = 64; significantByte = littleEndian; family = "wasm"; };
alpha = { bits = 64; significantByte = littleEndian; family = "alpha"; }; alpha = { bits = 64; significantByte = littleEndian; family = "alpha"; };
msp430 = { bits = 16; significantByte = littleEndian; family = "msp430"; }; msp430 = { bits = 16; significantByte = littleEndian; family = "msp430"; };
avr = { bits = 8; family = "avr"; }; avr = { bits = 8; family = "avr"; };
js = { bits = 32; significantByte = littleEndian; family = "js"; };
}; };
# Determine where two CPUs are compatible with each other. That is, # Determine where two CPUs are compatible with each other. That is,
@ -271,6 +273,7 @@ rec {
solaris = { execFormat = elf; families = { }; }; solaris = { execFormat = elf; families = { }; };
wasi = { execFormat = wasm; families = { }; }; wasi = { execFormat = wasm; families = { }; };
windows = { execFormat = pe; families = { }; }; windows = { execFormat = pe; families = { }; };
ghcjs = { execFormat = unknown; families = { }; };
} // { # aliases } // { # aliases
# 'darwin' is the kernel for all of them. We choose macOS by default. # 'darwin' is the kernel for all of them. We choose macOS by default.
darwin = kernels.macos; darwin = kernels.macos;
@ -384,6 +387,8 @@ rec {
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; } then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; }
else if (elem (elemAt l 2) ["eabi" "eabihf" "elf"]) else if (elem (elemAt l 2) ["eabi" "eabihf" "elf"])
then { cpu = elemAt l 0; vendor = "unknown"; kernel = elemAt l 1; abi = elemAt l 2; } then { cpu = elemAt l 0; vendor = "unknown"; kernel = elemAt l 1; abi = elemAt l 2; }
else if (elemAt l 2 == "ghcjs")
then { cpu = elemAt l 0; vendor = "unknown"; kernel = elemAt l 2; }
else throw "Target specification with 3 components is ambiguous"; else throw "Target specification with 3 components is ambiguous";
"4" = { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; abi = elemAt l 3; }; "4" = { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; abi = elemAt l 3; };
}.${toString (length l)} }.${toString (length l)}

View file

@ -217,7 +217,8 @@ rec {
# Deprecated; should not be used because it quietly concatenates # Deprecated; should not be used because it quietly concatenates
# strings, which is usually not what you want. # strings, which is usually not what you want.
string = separatedString ""; string = warn "types.string is deprecated because it quietly concatenates strings"
(separatedString "");
attrs = mkOptionType { attrs = mkOptionType {
name = "attrs"; name = "attrs";

View file

@ -5095,6 +5095,12 @@
githubId = 9568176; githubId = 9568176;
name = "Piotr Halama"; name = "Piotr Halama";
}; };
puckipedia = {
email = "puck@puckipedia.com";
github = "puckipedia";
githubId = 488734;
name = "Puck Meerburg";
};
puffnfresh = { puffnfresh = {
email = "brian@brianmckenna.org"; email = "brian@brianmckenna.org";
github = "puffnfresh"; github = "puffnfresh";

View file

@ -16,6 +16,6 @@
On images where the installation media also becomes an installation target, On images where the installation media also becomes an installation target,
copying over <literal>configuration.nix</literal> should be disabled by copying over <literal>configuration.nix</literal> should be disabled by
setting <literal>installer.cloneConfig</literal> to <literal>false</literal>. setting <literal>installer.cloneConfig</literal> to <literal>false</literal>.
This is already done in <literal>sd-image.nix</literal>. For example, this is done in <literal>sd-image-aarch64.nix</literal>.
</para> </para>
</section> </section>

View file

@ -57,6 +57,64 @@
and <option>services.xserver.desktopManager.xfce4-14</option> simultaneously or to downgrade from Xfce 4.14 after upgrading. and <option>services.xserver.desktopManager.xfce4-14</option> simultaneously or to downgrade from Xfce 4.14 after upgrading.
</para> </para>
</listitem> </listitem>
<listitem>
<para>
The GNOME 3 desktop manager module sports an interface to enable/disable core services, applications, and optional GNOME packages
like games.
<itemizedlist>
<para>This can be achieved with the following options which the desktop manager default enables, excluding <literal>games</literal>.</para>
<listitem><para><link linkend="opt-services.gnome3.core-os-services.enable"><literal>services.gnome3.core-os-services.enable</literal></link></para></listitem>
<listitem><para><link linkend="opt-services.gnome3.core-shell.enable"><literal>services.gnome3.core-shell.enable</literal></link></para></listitem>
<listitem><para><link linkend="opt-services.gnome3.core-utilities.enable"><literal>services.gnome3.core-utilities.enable</literal></link></para></listitem>
<listitem><para><link linkend="opt-services.gnome3.games.enable"><literal>services.gnome3.games.enable</literal></link></para></listitem>
</itemizedlist>
With these options we hope to give users finer grained control over their systems. Prior to this change you'd either have to manually
disable options or use <option>environment.gnome3.excludePackages</option> which only excluded the optional applications.
<option>environment.gnome3.excludePackages</option> is now unguarded, it can exclude any package installed with <option>environment.systemPackages</option>
in the GNOME 3 module.
</para>
</listitem>
<listitem>
<para>
Orthogonal to the previous changes to the GNOME 3 desktop manager module, we've updated all default services and applications
to match as close as possible to a default reference GNOME 3 experience.
</para>
<bridgehead>The following changes were enacted in <option>services.gnome3.core-utilities.enable</option></bridgehead>
<itemizedlist>
<title>Applications removed from defaults:</title>
<listitem><para><literal>accerciser</literal></para></listitem>
<listitem><para><literal>dconf-editor</literal></para></listitem>
<listitem><para><literal>evolution</literal></para></listitem>
<listitem><para><literal>gnome-documents</literal></para></listitem>
<listitem><para><literal>gnome-nettool</literal></para></listitem>
<listitem><para><literal>gnome-power-manager</literal></para></listitem>
<listitem><para><literal>gnome-todo</literal></para></listitem>
<listitem><para><literal>gnome-tweaks</literal></para></listitem>
<listitem><para><literal>gnome-usage</literal></para></listitem>
<listitem><para><literal>gucharmap</literal></para></listitem>
<listitem><para><literal>nautilus-sendto</literal></para></listitem>
<listitem><para><literal>vinagre</literal></para></listitem>
</itemizedlist>
<itemizedlist>
<title>Applications added to defaults:</title>
<listitem><para><literal>cheese</literal></para></listitem>
<listitem><para><literal>geary</literal></para></listitem>
</itemizedlist>
<bridgehead>The following changes were enacted in <option>services.gnome3.core-shell.enable</option></bridgehead>
<itemizedlist>
<title>Applications added to defaults:</title>
<listitem><para><literal>gnome-color-manager</literal></para></listitem>
<listitem><para><literal>orca</literal></para></listitem>
</itemizedlist>
<itemizedlist>
<title>Services enabled:</title>
<listitem><para><option>services.avahi.enable</option></para></listitem>
</itemizedlist>
</listitem>
</itemizedlist> </itemizedlist>
</section> </section>
@ -348,6 +406,12 @@
What used to be called <literal>emacsPackagesNg</literal> is now simply called <literal>emacsPackages</literal>. What used to be called <literal>emacsPackagesNg</literal> is now simply called <literal>emacsPackages</literal>.
</para> </para>
</listitem> </listitem>
<listitem>
<para>
<option>services.xserver.desktopManager.xterm</option> is now disabled by default.
It was not useful except for debugging purposes and was confusingly set as default in some circumstances.
</para>
</listitem>
</itemizedlist> </itemizedlist>
</section> </section>
@ -547,8 +611,8 @@
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
This also configures the kernel to pass coredumps to <literal>systemd-coredump</literal>,
This also configures the kernel to pass coredumps to <literal>systemd-coredump</literal>. and restricts the SysRq key combinations to the sync command only.
These sysctl snippets can be found in <literal>/etc/sysctl.d/50-*.conf</literal>, These sysctl snippets can be found in <literal>/etc/sysctl.d/50-*.conf</literal>,
and overridden via <link linkend="opt-boot.kernel.sysctl">boot.kernel.sysctl</link> and overridden via <link linkend="opt-boot.kernel.sysctl">boot.kernel.sysctl</link>
(which will place the parameters in <literal>/etc/sysctl.d/60-nixos.conf</literal>). (which will place the parameters in <literal>/etc/sysctl.d/60-nixos.conf</literal>).
@ -591,6 +655,51 @@
The defaults from fontconfig are sufficient. The defaults from fontconfig are sufficient.
</para> </para>
</listitem> </listitem>
<listitem>
<para>
The <literal>crashplan</literal> package and the
<literal>crashplan</literal> service have been removed from nixpkgs due to
crashplan shutting down the service, while the <literal>crashplansb</literal>
package and <literal>crashplan-small-business</literal> service have been
removed from nixpkgs due to lack of maintainer.
</para>
<para>
The <link linkend="opt-services.redis.enable">redis module</link> was hardcoded to use the <literal>redis</literal> user,
<filename class="directory">/run/redis</filename> as runtime directory and
<filename class="directory">/var/lib/redis</filename> as state directory.
Note that the NixOS module for Redis now disables kernel support for Transparent Huge Pages (THP),
because this features causes major performance problems for Redis,
e.g. (https://redis.io/topics/latency).
</para>
</listitem>
<listitem>
<para>
Using <option>fonts.enableDefaultFonts</option> adds a default emoji font <literal>noto-fonts-emoji</literal>.
<itemizedlist>
<para>Users of the following options will have this enabled by default:</para>
<listitem>
<para><option>services.xserver.enable</option></para>
</listitem>
<listitem>
<para><option>programs.sway.enable</option></para>
</listitem>
<listitem>
<para><option>programs.way-cooler.enable</option></para>
</listitem>
<listitem>
<para><option>services.xrdp.enable</option></para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
The <literal>altcoins</literal> categorization of packages has
been removed. You now access these packages at the top level,
ie. <literal>nix-shell -p dogecoin</literal> instead of
<literal>nix-shell -p altcoins.dogecoin</literal>, etc.
</para>
</listitem>
</itemizedlist> </itemizedlist>
</section> </section>
</section> </section>

View file

@ -116,7 +116,7 @@ let
defaultFontsConf = defaultFontsConf =
let genDefault = fonts: name: let genDefault = fonts: name:
optionalString (fonts != []) '' optionalString (fonts != []) ''
<alias> <alias binding="same">
<family>${name}</family> <family>${name}</family>
<prefer> <prefer>
${concatStringsSep "" ${concatStringsSep ""
@ -139,6 +139,8 @@ let
${genDefault cfg.defaultFonts.monospace "monospace"} ${genDefault cfg.defaultFonts.monospace "monospace"}
${genDefault cfg.defaultFonts.emoji "emoji"}
</fontconfig> </fontconfig>
''; '';
@ -344,6 +346,21 @@ in
in case multiple languages must be supported. in case multiple languages must be supported.
''; '';
}; };
emoji = mkOption {
type = types.listOf types.str;
default = ["Noto Color Emoji"];
description = ''
System-wide default emoji font(s). Multiple fonts may be listed
in case a font does not support all emoji.
Note that fontconfig matches color emoji fonts preferentially,
so if you want to use a black and white font while having
a color font installed (eg. Noto Color Emoji installed alongside
Noto Emoji), fontconfig will still choose the color font even
when it is later in the list.
'';
};
}; };
hinting = { hinting = {

View file

@ -43,6 +43,7 @@ with lib;
pkgs.xorg.fontmiscmisc pkgs.xorg.fontmiscmisc
pkgs.xorg.fontcursormisc pkgs.xorg.fontcursormisc
pkgs.unifont pkgs.unifont
pkgs.noto-fonts-emoji
]; ];
}; };

View file

@ -181,7 +181,7 @@ let
}; };
hashedPassword = mkOption { hashedPassword = mkOption {
type = with types; uniq (nullOr str); type = with types; nullOr str;
default = null; default = null;
description = '' description = ''
Specifies the hashed password for the user. Specifies the hashed password for the user.
@ -191,7 +191,7 @@ let
}; };
password = mkOption { password = mkOption {
type = with types; uniq (nullOr str); type = with types; nullOr str;
default = null; default = null;
description = '' description = ''
Specifies the (clear text) password for the user. Specifies the (clear text) password for the user.
@ -203,7 +203,7 @@ let
}; };
passwordFile = mkOption { passwordFile = mkOption {
type = with types; uniq (nullOr string); type = with types; nullOr str;
default = null; default = null;
description = '' description = ''
The full path to a file that contains the user's password. The password The full path to a file that contains the user's password. The password
@ -215,7 +215,7 @@ let
}; };
initialHashedPassword = mkOption { initialHashedPassword = mkOption {
type = with types; uniq (nullOr str); type = with types; nullOr str;
default = null; default = null;
description = '' description = ''
Specifies the initial hashed password for the user, i.e. the Specifies the initial hashed password for the user, i.e. the
@ -230,7 +230,7 @@ let
}; };
initialPassword = mkOption { initialPassword = mkOption {
type = with types; uniq (nullOr str); type = with types; nullOr str;
default = null; default = null;
description = '' description = ''
Specifies the initial password for the user, i.e. the Specifies the initial password for the user, i.e. the
@ -304,7 +304,7 @@ let
}; };
members = mkOption { members = mkOption {
type = with types; listOf string; type = with types; listOf str;
default = []; default = [];
description = '' description = ''
The user names of the group members, added to the The user names of the group members, added to the

View file

@ -88,7 +88,7 @@ in
}; };
hardware.nvidia.optimus_prime.nvidiaBusId = lib.mkOption { hardware.nvidia.optimus_prime.nvidiaBusId = lib.mkOption {
type = lib.types.string; type = lib.types.str;
default = ""; default = "";
example = "PCI:1:0:0"; example = "PCI:1:0:0";
description = '' description = ''
@ -98,7 +98,7 @@ in
}; };
hardware.nvidia.optimus_prime.intelBusId = lib.mkOption { hardware.nvidia.optimus_prime.intelBusId = lib.mkOption {
type = lib.types.string; type = lib.types.str;
default = ""; default = "";
example = "PCI:0:2:0"; example = "PCI:0:2:0";
description = '' description = ''

View file

@ -59,4 +59,8 @@ in
${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./files/boot ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./files/boot
''; '';
}; };
# the installation media is also the installation target,
# so we don't want to provide the installation configuration.nix.
installer.cloneConfig = false;
} }

View file

@ -56,4 +56,8 @@ in
${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./files/boot ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./files/boot
''; '';
}; };
# the installation media is also the installation target,
# so we don't want to provide the installation configuration.nix.
installer.cloneConfig = false;
} }

View file

@ -45,4 +45,8 @@ in
${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./files/boot ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./files/boot
''; '';
}; };
# the installation media is also the installation target,
# so we don't want to provide the installation configuration.nix.
installer.cloneConfig = false;
} }

View file

@ -54,7 +54,7 @@ in
}; };
firmwarePartitionID = mkOption { firmwarePartitionID = mkOption {
type = types.string; type = types.str;
default = "0x2178694e"; default = "0x2178694e";
description = '' description = ''
Volume ID for the /boot/firmware partition on the SD card. This value Volume ID for the /boot/firmware partition on the SD card. This value
@ -63,7 +63,7 @@ in
}; };
rootPartitionUUID = mkOption { rootPartitionUUID = mkOption {
type = types.nullOr types.string; type = types.nullOr types.str;
default = null; default = null;
example = "14e19a7b-0ae0-484d-9d54-43bd6fdc20c7"; example = "14e19a7b-0ae0-484d-9d54-43bd6fdc20c7";
description = '' description = ''
@ -194,9 +194,5 @@ in
rm -f /nix-path-registration rm -f /nix-path-registration
fi fi
''; '';
# the installation media is also the installation target,
# so we don't want to provide the installation configuration.nix.
installer.cloneConfig = false;
}; };
} }

View file

@ -138,6 +138,7 @@
./programs/qt5ct.nix ./programs/qt5ct.nix
./programs/screen.nix ./programs/screen.nix
./programs/sedutil.nix ./programs/sedutil.nix
./programs/seahorse.nix
./programs/slock.nix ./programs/slock.nix
./programs/shadow.nix ./programs/shadow.nix
./programs/shell.nix ./programs/shell.nix
@ -216,8 +217,6 @@
./services/backup/bacula.nix ./services/backup/bacula.nix
./services/backup/borgbackup.nix ./services/backup/borgbackup.nix
./services/backup/duplicati.nix ./services/backup/duplicati.nix
./services/backup/crashplan.nix
./services/backup/crashplan-small-business.nix
./services/backup/duplicity.nix ./services/backup/duplicity.nix
./services/backup/mysql-backup.nix ./services/backup/mysql-backup.nix
./services/backup/postgresql-backup.nix ./services/backup/postgresql-backup.nix
@ -303,7 +302,6 @@
./services/desktops/gnome3/gnome-settings-daemon.nix ./services/desktops/gnome3/gnome-settings-daemon.nix
./services/desktops/gnome3/gnome-user-share.nix ./services/desktops/gnome3/gnome-user-share.nix
./services/desktops/gnome3/rygel.nix ./services/desktops/gnome3/rygel.nix
./services/desktops/gnome3/seahorse.nix
./services/desktops/gnome3/sushi.nix ./services/desktops/gnome3/sushi.nix
./services/desktops/gnome3/tracker.nix ./services/desktops/gnome3/tracker.nix
./services/desktops/gnome3/tracker-miners.nix ./services/desktops/gnome3/tracker-miners.nix

View file

@ -0,0 +1,44 @@
# Seahorse.
{ config, pkgs, lib, ... }:
with lib;
{
# Added 2019-08-27
imports = [
(mkRenamedOptionModule
[ "services" "gnome3" "seahorse" "enable" ]
[ "programs" "seahorse" "enable" ])
];
###### interface
options = {
programs.seahorse = {
enable = mkEnableOption "Seahorse, a GNOME application for managing encryption keys and passwords in the GNOME Keyring";
};
};
###### implementation
config = mkIf config.programs.seahorse.enable {
environment.systemPackages = [
pkgs.gnome3.seahorse
];
services.dbus.packages = [
pkgs.gnome3.seahorse
];
};
}

View file

@ -17,7 +17,7 @@ in
alias = mkOption { alias = mkOption {
default = "fuck"; default = "fuck";
type = types.string; type = types.str;
description = '' description = ''
`thefuck` needs an alias to be configured. `thefuck` needs an alias to be configured.

View file

@ -12,7 +12,7 @@ in
lockerCommand = mkOption { lockerCommand = mkOption {
default = "${pkgs.i3lock}/bin/i3lock"; default = "${pkgs.i3lock}/bin/i3lock";
example = literalExample ''''${pkgs.i3lock-fancy}/bin/i3lock-fancy''; example = literalExample ''''${pkgs.i3lock-fancy}/bin/i3lock-fancy'';
type = types.string; type = types.separatedString " ";
description = "Locker to be used with xsslock"; description = "Locker to be used with xsslock";
}; };

View file

@ -76,7 +76,7 @@ in
font = mkOption { font = mkOption {
default = "sans bold 9"; default = "sans bold 9";
example = "Droid Sans, FontAwesome Bold 9"; example = "Droid Sans, FontAwesome Bold 9";
type = types.string; type = types.str;
description = '' description = ''
The font that will be used to draw the status bar. The font that will be used to draw the status bar.
@ -95,7 +95,7 @@ in
extra = mkOption { extra = mkOption {
default = {}; default = {};
type = types.attrsOf types.string; type = types.attrsOf types.str;
description = '' description = ''
An attribute set which contains further attributes of a bar. An attribute set which contains further attributes of a bar.
@ -107,7 +107,7 @@ in
type = types.attrsOf(types.submodule { type = types.attrsOf(types.submodule {
options.exec = mkOption { options.exec = mkOption {
example = "YABAR_DATE"; example = "YABAR_DATE";
type = types.string; type = types.str;
description = '' description = ''
The type of the indicator to be executed. The type of the indicator to be executed.
''; '';
@ -125,7 +125,7 @@ in
options.extra = mkOption { options.extra = mkOption {
default = {}; default = {};
type = types.attrsOf (types.either types.string types.int); type = types.attrsOf (types.either types.str types.int);
description = '' description = ''
An attribute set which contains further attributes of a indicator. An attribute set which contains further attributes of a indicator.

View file

@ -33,7 +33,7 @@ in
patterns = mkOption { patterns = mkOption {
default = {}; default = {};
type = types.attrsOf types.string; type = types.attrsOf types.str;
example = literalExample '' example = literalExample ''
{ {
@ -50,7 +50,7 @@ in
}; };
styles = mkOption { styles = mkOption {
default = {}; default = {};
type = types.attrsOf types.string; type = types.attrsOf types.str;
example = literalExample '' example = literalExample ''
{ {

View file

@ -256,7 +256,7 @@ with lib;
# binfmt # binfmt
(mkRenamedOptionModule [ "boot" "binfmtMiscRegistrations" ] [ "boot" "binfmt" "registrations" ]) (mkRenamedOptionModule [ "boot" "binfmtMiscRegistrations" ] [ "boot" "binfmt" "registrations" ])
# ACME # ACME
(mkRemovedOptionModule [ "security" "acme" "directory"] "ACME Directory is now hardcoded to /var/lib/acme and its permisisons are managed by systemd. See https://github.com/NixOS/nixpkgs/issues/53852 for more info.") (mkRemovedOptionModule [ "security" "acme" "directory"] "ACME Directory is now hardcoded to /var/lib/acme and its permisisons are managed by systemd. See https://github.com/NixOS/nixpkgs/issues/53852 for more info.")
(mkRemovedOptionModule [ "security" "acme" "preDelay"] "This option has been removed. If you want to make sure that something executes before certificates are provisioned, add a RequiredBy=acme-\${cert}.service to the service you want to execute before the cert renewal") (mkRemovedOptionModule [ "security" "acme" "preDelay"] "This option has been removed. If you want to make sure that something executes before certificates are provisioned, add a RequiredBy=acme-\${cert}.service to the service you want to execute before the cert renewal")
@ -285,6 +285,13 @@ with lib;
throw "services.redshift.longitude is set to null, you can remove this" throw "services.redshift.longitude is set to null, you can remove this"
else builtins.fromJSON value)) else builtins.fromJSON value))
# Redis
(mkRemovedOptionModule [ "services" "redis" "user" ] "The redis module now is hardcoded to the redis user.")
(mkRemovedOptionModule [ "services" "redis" "dbpath" ] "The redis module now uses /var/lib/redis as data directory.")
(mkRemovedOptionModule [ "services" "redis" "dbFilename" ] "The redis module now uses /var/lib/redis/dump.rdb as database dump location.")
(mkRemovedOptionModule [ "services" "redis" "appendOnlyFilename" ] "This option was never used.")
(mkRemovedOptionModule [ "services" "redis" "pidFile" ] "This option was removed.")
] ++ (forEach [ "blackboxExporter" "collectdExporter" "fritzboxExporter" ] ++ (forEach [ "blackboxExporter" "collectdExporter" "fritzboxExporter"
"jsonExporter" "minioExporter" "nginxExporter" "nodeExporter" "jsonExporter" "minioExporter" "nginxExporter" "nodeExporter"
"snmpExporter" "unifiExporter" "varnishExporter" ] "snmpExporter" "unifiExporter" "varnishExporter" ]

View file

@ -6,6 +6,10 @@ with lib;
options.security.auditd.enable = mkEnableOption "the Linux Audit daemon"; options.security.auditd.enable = mkEnableOption "the Linux Audit daemon";
config = mkIf config.security.auditd.enable { config = mkIf config.security.auditd.enable {
boot.kernelParams = [ "audit=1" ];
environment.systemPackages = [ pkgs.audit ];
systemd.services.auditd = { systemd.services.auditd = {
description = "Linux Audit daemon"; description = "Linux Audit daemon";
wantedBy = [ "basic.target" ]; wantedBy = [ "basic.target" ];

View file

@ -685,7 +685,7 @@ in
}; };
id = mkOption { id = mkOption {
example = "42"; example = "42";
type = types.string; type = types.str;
description = "client id"; description = "client id";
}; };

View file

@ -91,7 +91,7 @@ in
type = with types; listOf (submodule { type = with types; listOf (submodule {
options = { options = {
users = mkOption { users = mkOption {
type = with types; listOf (either string int); type = with types; listOf (either str int);
description = '' description = ''
The usernames / UIDs this rule should apply for. The usernames / UIDs this rule should apply for.
''; '';
@ -99,7 +99,7 @@ in
}; };
groups = mkOption { groups = mkOption {
type = with types; listOf (either string int); type = with types; listOf (either str int);
description = '' description = ''
The groups / GIDs this rule should apply for. The groups / GIDs this rule should apply for.
''; '';
@ -107,7 +107,7 @@ in
}; };
host = mkOption { host = mkOption {
type = types.string; type = types.str;
default = "ALL"; default = "ALL";
description = '' description = ''
For what host this rule should apply. For what host this rule should apply.
@ -115,7 +115,7 @@ in
}; };
runAs = mkOption { runAs = mkOption {
type = with types; string; type = with types; str;
default = "ALL:ALL"; default = "ALL:ALL";
description = '' description = ''
Under which user/group the specified command is allowed to run. Under which user/group the specified command is allowed to run.
@ -130,11 +130,11 @@ in
description = '' description = ''
The commands for which the rule should apply. The commands for which the rule should apply.
''; '';
type = with types; listOf (either string (submodule { type = with types; listOf (either str (submodule {
options = { options = {
command = mkOption { command = mkOption {
type = with types; string; type = with types; str;
description = '' description = ''
A command being either just a path to a binary to allow any arguments, A command being either just a path to a binary to allow any arguments,
the full command with arguments pre-set or with <code>""</code> used as the argument, the full command with arguments pre-set or with <code>""</code> used as the argument,

View file

@ -40,7 +40,7 @@ in {
''; '';
}; };
configurationURI = mkOption { configurationURI = mkOption {
type = types.string; type = types.str;
default = "xbean:activemq.xml"; default = "xbean:activemq.xml";
description = '' description = ''
The URI that is passed along to the BrokerFactory to The URI that is passed along to the BrokerFactory to
@ -51,7 +51,7 @@ in {
''; '';
}; };
baseDir = mkOption { baseDir = mkOption {
type = types.string; type = types.str;
default = "/var/activemq"; default = "/var/activemq";
description = '' description = ''
The base directory where ActiveMQ stores its persistent data and logs. The base directory where ActiveMQ stores its persistent data and logs.
@ -81,7 +81,7 @@ in {
''; '';
}; };
extraJavaOptions = mkOption { extraJavaOptions = mkOption {
type = types.string; type = types.separatedString " ";
default = ""; default = "";
example = "-Xmx2G -Xms2G -XX:MaxPermSize=512M"; example = "-Xmx2G -Xms2G -XX:MaxPermSize=512M";
description = '' description = ''

View file

@ -64,7 +64,7 @@ in
}; };
volumeStep = mkOption { volumeStep = mkOption {
type = types.string; type = types.str;
default = "1"; default = "1";
example = "1%"; example = "1%";
description = '' description = ''

View file

@ -23,7 +23,7 @@ in {
mpd = { mpd = {
host = mkOption { host = mkOption {
type = types.string; type = types.str;
default = "localhost"; default = "localhost";
description = "The host where MPD is listening."; description = "The host where MPD is listening.";
example = "localhost"; example = "localhost";

View file

@ -1,73 +0,0 @@
{ config, pkgs, lib, ... }:
let
cfg = config.services.crashplansb;
crashplansb = pkgs.crashplansb.override { maxRam = cfg.maxRam; };
in
with lib;
{
options = {
services.crashplansb = {
enable = mkOption {
default = false;
type = types.bool;
description = ''
Starts crashplan for small business background service.
'';
};
maxRam = mkOption {
default = "1024m";
example = "2G";
type = types.str;
description = ''
Maximum amount of ram that the crashplan engine should use.
'';
};
openPorts = mkOption {
description = "Open ports in the firewall for crashplan.";
default = true;
type = types.bool;
};
ports = mkOption {
# https://support.code42.com/Administrator/6/Planning_and_installing/TCP_and_UDP_ports_used_by_the_Code42_platform
# used ports can also be checked in the desktop app console using the command connection.info
description = "which ports to open.";
default = [ 4242 4243 4244 4247 ];
type = types.listOf types.int;
};
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ crashplansb ];
networking.firewall.allowedTCPPorts = mkIf cfg.openPorts cfg.ports;
systemd.services.crashplansb = {
description = "CrashPlan Backup Engine";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" "local-fs.target" ];
preStart = ''
install -d -m 755 ${crashplansb.vardir}
install -d -m 700 ${crashplansb.vardir}/conf
install -d -m 700 ${crashplansb.manifestdir}
install -d -m 700 ${crashplansb.vardir}/cache
install -d -m 700 ${crashplansb.vardir}/backupArchives
install -d -m 777 ${crashplansb.vardir}/log
cp -avn ${crashplansb}/conf.template/* ${crashplansb.vardir}/conf
'';
serviceConfig = {
Type = "forking";
EnvironmentFile = "${crashplansb}/bin/run.conf";
ExecStart = "${crashplansb}/bin/CrashPlanEngine start";
ExecStop = "${crashplansb}/bin/CrashPlanEngine stop";
PIDFile = "${crashplansb.vardir}/CrashPlanEngine.pid";
WorkingDirectory = crashplansb;
};
};
};
}

View file

@ -1,67 +0,0 @@
{ config, pkgs, lib, ... }:
let
cfg = config.services.crashplan;
crashplan = pkgs.crashplan;
in
with lib;
{
options = {
services.crashplan = {
enable = mkOption {
default = false;
type = types.bool;
description = ''
Starts crashplan background service.
'';
};
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ crashplan ];
systemd.services.crashplan = {
description = "CrashPlan Backup Engine";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" "local-fs.target" ];
preStart = ''
ensureDir() {
dir=$1
mode=$2
if ! test -e $dir; then
${pkgs.coreutils}/bin/mkdir -m $mode -p $dir
elif [ "$(${pkgs.coreutils}/bin/stat -c %a $dir)" != "$mode" ]; then
${pkgs.coreutils}/bin/chmod $mode $dir
fi
}
ensureDir ${crashplan.vardir} 755
ensureDir ${crashplan.vardir}/conf 700
ensureDir ${crashplan.manifestdir} 700
ensureDir ${crashplan.vardir}/cache 700
ensureDir ${crashplan.vardir}/backupArchives 700
ensureDir ${crashplan.vardir}/log 777
cp -avn ${crashplan}/conf.template/* ${crashplan.vardir}/conf
for x in app.asar bin install.vars lang lib libc42archive64.so libc52archive.so libjniwrap64.so libjniwrap.so libjtux64.so libjtux.so libleveldb64.so libleveldb.so libmd564.so libmd5.so share skin upgrade; do
rm -f ${crashplan.vardir}/$x;
ln -sf ${crashplan}/$x ${crashplan.vardir}/$x;
done
'';
serviceConfig = {
Type = "forking";
EnvironmentFile = "${crashplan}/bin/run.conf";
ExecStart = "${crashplan}/bin/CrashPlanEngine start";
ExecStop = "${crashplan}/bin/CrashPlanEngine stop";
PIDFile = "${crashplan.vardir}/CrashPlanEngine.pid";
WorkingDirectory = crashplan;
};
};
};
}

View file

@ -81,7 +81,7 @@ in {
}; };
pgdumpOptions = mkOption { pgdumpOptions = mkOption {
type = types.string; type = types.separatedString " ";
default = "-Cbo"; default = "-Cbo";
description = '' description = ''
Command line options for pg_dump. This options is not used Command line options for pg_dump. This options is not used

View file

@ -2,7 +2,7 @@
with lib; with lib;
let let
cfg = config.services.rsnapshot; cfg = config.services.rsnapshot;
cfgfile = pkgs.writeText "rsnapshot.conf" '' cfgfile = pkgs.writeText "rsnapshot.conf" ''
config_version 1.2 config_version 1.2
@ -52,7 +52,7 @@ in
cronIntervals = mkOption { cronIntervals = mkOption {
default = {}; default = {};
example = { hourly = "0 * * * *"; daily = "50 21 * * *"; }; example = { hourly = "0 * * * *"; daily = "50 21 * * *"; };
type = types.attrsOf types.string; type = types.attrsOf types.str;
description = '' description = ''
Periodicity at which intervals should be run by cron. Periodicity at which intervals should be run by cron.
Note that the intervals also have to exist in configuration Note that the intervals also have to exist in configuration

View file

@ -111,7 +111,7 @@ in
systemd.services.boinc = { systemd.services.boinc = {
description = "BOINC Client"; description = "BOINC Client";
after = ["network.target" "local-fs.target"]; after = ["network.target"];
wantedBy = ["multi-user.target"]; wantedBy = ["multi-user.target"];
script = '' script = ''
${fhsEnvExecutable} --dir ${cfg.dataDir} --redirectio ${allowRemoteGuiRpcFlag} ${fhsEnvExecutable} --dir ${cfg.dataDir} --redirectio ${allowRemoteGuiRpcFlag}

View file

@ -259,7 +259,7 @@ in {
''; '';
}; };
incrementalRepairOptions = mkOption { incrementalRepairOptions = mkOption {
type = types.listOf types.string; type = types.listOf types.str;
default = []; default = [];
example = [ "--partitioner-range" ]; example = [ "--partitioner-range" ];
description = '' description = ''
@ -267,7 +267,7 @@ in {
''; '';
}; };
maxHeapSize = mkOption { maxHeapSize = mkOption {
type = types.nullOr types.string; type = types.nullOr types.str;
default = null; default = null;
example = "4G"; example = "4G";
description = '' description = ''
@ -287,7 +287,7 @@ in {
''; '';
}; };
heapNewSize = mkOption { heapNewSize = mkOption {
type = types.nullOr types.string; type = types.nullOr types.str;
default = null; default = null;
example = "800M"; example = "800M";
description = '' description = ''
@ -352,11 +352,11 @@ in {
type = types.listOf (types.submodule { type = types.listOf (types.submodule {
options = { options = {
username = mkOption { username = mkOption {
type = types.string; type = types.str;
description = "Username for JMX"; description = "Username for JMX";
}; };
password = mkOption { password = mkOption {
type = types.string; type = types.str;
description = "Password for JMX"; description = "Password for JMX";
}; };
}; };

View file

@ -56,7 +56,7 @@ in {
user = mkOption { user = mkOption {
type = types.string; type = types.str;
default = "couchdb"; default = "couchdb";
description = '' description = ''
User account under which couchdb runs. User account under which couchdb runs.
@ -64,7 +64,7 @@ in {
}; };
group = mkOption { group = mkOption {
type = types.string; type = types.str;
default = "couchdb"; default = "couchdb";
description = '' description = ''
Group account under which couchdb runs. Group account under which couchdb runs.
@ -106,7 +106,7 @@ in {
}; };
bindAddress = mkOption { bindAddress = mkOption {
type = types.string; type = types.str;
default = "127.0.0.1"; default = "127.0.0.1";
description = '' description = ''
Defines the IP address by which CouchDB will be accessible. Defines the IP address by which CouchDB will be accessible.
@ -138,7 +138,7 @@ in {
}; };
configFile = mkOption { configFile = mkOption {
type = types.string; type = types.path;
description = '' description = ''
Configuration file for persisting runtime changes. File Configuration file for persisting runtime changes. File
needs to be readable and writable from couchdb user/group. needs to be readable and writable from couchdb user/group.

View file

@ -140,7 +140,7 @@ in
}; };
logSize = mkOption { logSize = mkOption {
type = types.string; type = types.str;
default = "10MiB"; default = "10MiB";
description = '' description = ''
Roll over to a new log file after the current log file Roll over to a new log file after the current log file
@ -149,7 +149,7 @@ in
}; };
maxLogSize = mkOption { maxLogSize = mkOption {
type = types.string; type = types.str;
default = "100MiB"; default = "100MiB";
description = '' description = ''
Delete the oldest log file when the total size of all log Delete the oldest log file when the total size of all log
@ -171,7 +171,7 @@ in
}; };
memory = mkOption { memory = mkOption {
type = types.string; type = types.str;
default = "8GiB"; default = "8GiB";
description = '' description = ''
Maximum memory used by the process. The default value is Maximum memory used by the process. The default value is
@ -193,7 +193,7 @@ in
}; };
storageMemory = mkOption { storageMemory = mkOption {
type = types.string; type = types.str;
default = "1GiB"; default = "1GiB";
description = '' description = ''
Maximum memory used for data storage. The default value is Maximum memory used for data storage. The default value is

View file

@ -53,7 +53,7 @@ in {
user = mkOption { user = mkOption {
type = types.string; type = types.str;
default = "hbase"; default = "hbase";
description = '' description = ''
User account under which HBase runs. User account under which HBase runs.
@ -61,7 +61,7 @@ in {
}; };
group = mkOption { group = mkOption {
type = types.string; type = types.str;
default = "hbase"; default = "hbase";
description = '' description = ''
Group account under which HBase runs. Group account under which HBase runs.

View file

@ -129,13 +129,13 @@ in
user = mkOption { user = mkOption {
default = "influxdb"; default = "influxdb";
description = "User account under which influxdb runs"; description = "User account under which influxdb runs";
type = types.string; type = types.str;
}; };
group = mkOption { group = mkOption {
default = "influxdb"; default = "influxdb";
description = "Group under which influxdb runs"; description = "Group under which influxdb runs";
type = types.string; type = types.str;
}; };
dataDir = mkOption { dataDir = mkOption {

View file

@ -65,9 +65,9 @@ in
default = false; default = false;
description = "Enable client authentication. Creates a default superuser with username root!"; description = "Enable client authentication. Creates a default superuser with username root!";
}; };
initialRootPassword = mkOption { initialRootPassword = mkOption {
type = types.nullOr types.string; type = types.nullOr types.str;
default = null; default = null;
description = "Password for the root user if auth is enabled."; description = "Password for the root user if auth is enabled.";
}; };

View file

@ -47,26 +47,26 @@ in
}; };
user = mkOption { user = mkOption {
type = types.string; type = types.str;
default = "openldap"; default = "openldap";
description = "User account under which slapd runs."; description = "User account under which slapd runs.";
}; };
group = mkOption { group = mkOption {
type = types.string; type = types.str;
default = "openldap"; default = "openldap";
description = "Group account under which slapd runs."; description = "Group account under which slapd runs.";
}; };
urlList = mkOption { urlList = mkOption {
type = types.listOf types.string; type = types.listOf types.str;
default = [ "ldap:///" ]; default = [ "ldap:///" ];
description = "URL list slapd should listen on."; description = "URL list slapd should listen on.";
example = [ "ldaps:///" ]; example = [ "ldaps:///" ];
}; };
dataDir = mkOption { dataDir = mkOption {
type = types.string; type = types.path;
default = "/var/db/openldap"; default = "/var/db/openldap";
description = "The database directory."; description = "The database directory.";
}; };

View file

@ -34,7 +34,7 @@ in {
}; };
user = mkOption { user = mkOption {
type = types.string; type = types.str;
default = "opentsdb"; default = "opentsdb";
description = '' description = ''
User account under which OpenTSDB runs. User account under which OpenTSDB runs.
@ -42,7 +42,7 @@ in {
}; };
group = mkOption { group = mkOption {
type = types.string; type = types.str;
default = "opentsdb"; default = "opentsdb";
description = '' description = ''
Group account under which OpenTSDB runs. Group account under which OpenTSDB runs.

View file

@ -8,17 +8,19 @@ let
condOption = name: value: if value != null then "${name} ${toString value}" else ""; condOption = name: value: if value != null then "${name} ${toString value}" else "";
redisConfig = pkgs.writeText "redis.conf" '' redisConfig = pkgs.writeText "redis.conf" ''
pidfile ${cfg.pidFile}
port ${toString cfg.port} port ${toString cfg.port}
${condOption "bind" cfg.bind} ${condOption "bind" cfg.bind}
${condOption "unixsocket" cfg.unixSocket} ${condOption "unixsocket" cfg.unixSocket}
daemonize yes
supervised systemd
loglevel ${cfg.logLevel} loglevel ${cfg.logLevel}
logfile ${cfg.logfile} logfile ${cfg.logfile}
syslog-enabled ${redisBool cfg.syslog} syslog-enabled ${redisBool cfg.syslog}
pidfile /run/redis/redis.pid
databases ${toString cfg.databases} databases ${toString cfg.databases}
${concatMapStrings (d: "save ${toString (builtins.elemAt d 0)} ${toString (builtins.elemAt d 1)}\n") cfg.save} ${concatMapStrings (d: "save ${toString (builtins.elemAt d 0)} ${toString (builtins.elemAt d 1)}\n") cfg.save}
dbfilename ${cfg.dbFilename} dbfilename dump.rdb
dir ${toString cfg.dbpath} dir /var/lib/redis
${if cfg.slaveOf != null then "slaveof ${cfg.slaveOf.ip} ${toString cfg.slaveOf.port}" else ""} ${if cfg.slaveOf != null then "slaveof ${cfg.slaveOf.ip} ${toString cfg.slaveOf.port}" else ""}
${condOption "masterauth" cfg.masterAuth} ${condOption "masterauth" cfg.masterAuth}
${condOption "requirepass" cfg.requirePass} ${condOption "requirepass" cfg.requirePass}
@ -40,7 +42,12 @@ in
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = "Whether to enable the Redis server."; description = ''
Whether to enable the Redis server. Note that the NixOS module for
Redis disables kernel support for Transparent Huge Pages (THP),
because this features causes major performance problems for Redis,
e.g. (https://redis.io/topics/latency).
'';
}; };
package = mkOption { package = mkOption {
@ -50,18 +57,6 @@ in
description = "Which Redis derivation to use."; description = "Which Redis derivation to use.";
}; };
user = mkOption {
type = types.str;
default = "redis";
description = "User account under which Redis runs.";
};
pidFile = mkOption {
type = types.path;
default = "/var/lib/redis/redis.pid";
description = "";
};
port = mkOption { port = mkOption {
type = types.int; type = types.int;
default = 6379; default = 6379;
@ -95,7 +90,7 @@ in
type = with types; nullOr path; type = with types; nullOr path;
default = null; default = null;
description = "The path to the socket to bind to."; description = "The path to the socket to bind to.";
example = "/run/redis.sock"; example = "/run/redis/redis.sock";
}; };
logLevel = mkOption { logLevel = mkOption {
@ -131,18 +126,6 @@ in
example = [ [900 1] [300 10] [60 10000] ]; example = [ [900 1] [300 10] [60 10000] ];
}; };
dbFilename = mkOption {
type = types.str;
default = "dump.rdb";
description = "The filename where to dump the DB.";
};
dbpath = mkOption {
type = types.path;
default = "/var/lib/redis";
description = "The DB will be written inside this directory, with the filename specified using the 'dbFilename' configuration.";
};
slaveOf = mkOption { slaveOf = mkOption {
default = null; # { ip, port } default = null; # { ip, port }
description = "An attribute set with two attributes: ip and port to which this redis instance acts as a slave."; description = "An attribute set with two attributes: ip and port to which this redis instance acts as a slave.";
@ -170,12 +153,6 @@ in
description = "By default data is only periodically persisted to disk, enable this option to use an append-only file for improved persistence."; description = "By default data is only periodically persisted to disk, enable this option to use an append-only file for improved persistence.";
}; };
appendOnlyFilename = mkOption {
type = types.str;
default = "appendonly.aof";
description = "Filename for the append-only file (stored inside of dbpath)";
};
appendFsync = mkOption { appendFsync = mkOption {
type = types.str; type = types.str;
default = "everysec"; # no, always, everysec default = "everysec"; # no, always, everysec
@ -217,27 +194,30 @@ in
allowedTCPPorts = [ cfg.port ]; allowedTCPPorts = [ cfg.port ];
}; };
users.users.redis = users.users.redis.description = "Redis database user";
{ name = cfg.user;
description = "Redis database user";
};
environment.systemPackages = [ cfg.package ]; environment.systemPackages = [ cfg.package ];
systemd.services.disable-transparent-huge-pages = {
description = "Disable Transparent Huge Pages (required by Redis)";
before = [ "redis.service" ];
wantedBy = [ "redis.service" ];
script = "echo never > /sys/kernel/mm/transparent_hugepage/enabled";
serviceConfig.Type = "oneshot";
};
systemd.services.redis = systemd.services.redis =
{ description = "Redis Server"; { description = "Redis Server";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network.target" ]; after = [ "network.target" ];
preStart = ''
install -d -m0700 -o ${cfg.user} ${cfg.dbpath}
chown -R ${cfg.user} ${cfg.dbpath}
'';
serviceConfig = { serviceConfig = {
ExecStart = "${cfg.package}/bin/redis-server ${redisConfig}"; ExecStart = "${cfg.package}/bin/redis-server ${redisConfig}";
User = cfg.user; RuntimeDirectory = "redis";
StateDirectory = "redis";
Type = "notify";
User = "redis";
}; };
}; };

View file

@ -29,7 +29,7 @@ in
}; };
nodeName = mkOption { nodeName = mkOption {
type = types.string; type = types.str;
default = "riak@127.0.0.1"; default = "riak@127.0.0.1";
description = '' description = ''
Name of the Erlang node. Name of the Erlang node.
@ -37,7 +37,7 @@ in
}; };
distributedCookie = mkOption { distributedCookie = mkOption {
type = types.string; type = types.str;
default = "riak"; default = "riak";
description = '' description = ''
Cookie for distributed node communication. All nodes in the Cookie for distributed node communication. All nodes in the

View file

@ -1,38 +0,0 @@
# Seahorse daemon.
{ config, pkgs, lib, ... }:
with lib;
{
###### interface
options = {
services.gnome3.seahorse = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable Seahorse search provider for the GNOME Shell activity search.
'';
};
};
};
###### implementation
config = mkIf config.services.gnome3.seahorse.enable {
environment.systemPackages = [ pkgs.gnome3.seahorse pkgs.gnome3.dconf ];
services.dbus.packages = [ pkgs.gnome3.seahorse ];
};
}

View file

@ -34,7 +34,7 @@ in {
psd = { psd = {
enable = true; enable = true;
description = "Profile Sync daemon"; description = "Profile Sync daemon";
wants = [ "psd-resync.service" "local-fs.target" ]; wants = [ "psd-resync.service" ];
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
path = with pkgs; [ rsync kmod gawk nettools utillinux profile-sync-daemon ]; path = with pkgs; [ rsync kmod gawk nettools utillinux profile-sync-daemon ];
unitConfig = { unitConfig = {

View file

@ -55,7 +55,7 @@ in
''; '';
}; };
saveName = mkOption { saveName = mkOption {
type = types.string; type = types.str;
default = "default"; default = "default";
description = '' description = ''
The name of the savegame that will be used by the server. The name of the savegame that will be used by the server.
@ -81,7 +81,7 @@ in
''; '';
}; };
stateDirName = mkOption { stateDirName = mkOption {
type = types.string; type = types.str;
default = "factorio"; default = "factorio";
description = '' description = ''
Name of the directory under /var/lib holding the server's data. Name of the directory under /var/lib holding the server's data.
@ -102,14 +102,14 @@ in
''; '';
}; };
game-name = mkOption { game-name = mkOption {
type = types.nullOr types.string; type = types.nullOr types.str;
default = "Factorio Game"; default = "Factorio Game";
description = '' description = ''
Name of the game as it will appear in the game listing. Name of the game as it will appear in the game listing.
''; '';
}; };
description = mkOption { description = mkOption {
type = types.nullOr types.string; type = types.nullOr types.str;
default = ""; default = "";
description = '' description = ''
Description of the game that will appear in the listing. Description of the game that will appear in the listing.
@ -130,28 +130,28 @@ in
''; '';
}; };
username = mkOption { username = mkOption {
type = types.nullOr types.string; type = types.nullOr types.str;
default = null; default = null;
description = '' description = ''
Your factorio.com login credentials. Required for games with visibility public. Your factorio.com login credentials. Required for games with visibility public.
''; '';
}; };
password = mkOption { password = mkOption {
type = types.nullOr types.string; type = types.nullOr types.str;
default = null; default = null;
description = '' description = ''
Your factorio.com login credentials. Required for games with visibility public. Your factorio.com login credentials. Required for games with visibility public.
''; '';
}; };
token = mkOption { token = mkOption {
type = types.nullOr types.string; type = types.nullOr types.str;
default = null; default = null;
description = '' description = ''
Authentication token. May be used instead of 'password' above. Authentication token. May be used instead of 'password' above.
''; '';
}; };
game-password = mkOption { game-password = mkOption {
type = types.nullOr types.string; type = types.nullOr types.str;
default = null; default = null;
description = '' description = ''
Game password. Game password.

View file

@ -28,7 +28,7 @@ in {
}; };
devices = mkOption { devices = mkOption {
type = types.listOf types.string; type = types.listOf types.str;
default = [ "/dev/sda" ]; default = [ "/dev/sda" ];
description = '' description = ''
Device paths to all internal spinning hard drives. Device paths to all internal spinning hard drives.

View file

@ -43,7 +43,7 @@ in {
}; };
blacklistDevices = mkOption { blacklistDevices = mkOption {
type = types.listOf types.string; type = types.listOf types.str;
default = []; default = [];
example = [ "2082b5e0-7a64-478a-b1b2-e3404fab6dad" ]; example = [ "2082b5e0-7a64-478a-b1b2-e3404fab6dad" ];
description = '' description = ''
@ -52,7 +52,7 @@ in {
}; };
blacklistPlugins = mkOption { blacklistPlugins = mkOption {
type = types.listOf types.string; type = types.listOf types.str;
default = [ "test" ]; default = [ "test" ];
example = [ "udev" ]; example = [ "udev" ];
description = '' description = ''

View file

@ -76,7 +76,7 @@ in
}; };
hardware.sane.configDir = mkOption { hardware.sane.configDir = mkOption {
type = types.string; type = types.str;
internal = true; internal = true;
description = "The value of SANE_CONFIG_DIR."; description = "The value of SANE_CONFIG_DIR.";
}; };

View file

@ -49,13 +49,13 @@ in
user = mkOption { user = mkOption {
default = "tss"; default = "tss";
type = types.string; type = types.str;
description = "User account under which tcsd runs."; description = "User account under which tcsd runs.";
}; };
group = mkOption { group = mkOption {
default = "tss"; default = "tss";
type = types.string; type = types.str;
description = "Group account under which tcsd runs."; description = "Group account under which tcsd runs.";
}; };
@ -65,19 +65,19 @@ in
description = '' description = ''
The location of the system persistent storage file. The location of the system persistent storage file.
The system persistent storage file holds keys and data across The system persistent storage file holds keys and data across
restarts of the TCSD and system reboots. restarts of the TCSD and system reboots.
''; '';
}; };
firmwarePCRs = mkOption { firmwarePCRs = mkOption {
default = "0,1,2,3,4,5,6,7"; default = "0,1,2,3,4,5,6,7";
type = types.string; type = types.str;
description = "PCR indices used in the TPM for firmware measurements."; description = "PCR indices used in the TPM for firmware measurements.";
}; };
kernelPCRs = mkOption { kernelPCRs = mkOption {
default = "8,9,10,11,12"; default = "8,9,10,11,12";
type = types.string; type = types.str;
description = "PCR indices used in the TPM for kernel measurements."; description = "PCR indices used in the TPM for kernel measurements.";
}; };

View file

@ -102,7 +102,6 @@ in
systemd.services.triggerhappy = { systemd.services.triggerhappy = {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "local-fs.target" ];
description = "Global hotkey daemon"; description = "Global hotkey daemon";
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.triggerhappy}/bin/thd ${optionalString (cfg.user != "root") "--user ${cfg.user}"} --socket ${socket} --triggers ${configFile} --deviceglob /dev/input/event*"; ExecStart = "${pkgs.triggerhappy}/bin/thd ${optionalString (cfg.user != "root") "--user ${cfg.user}"} --socket ${socket} --triggers ${configFile} --deviceglob /dev/input/event*";

View file

@ -16,7 +16,7 @@ in
}; };
graylogServer = mkOption { graylogServer = mkOption {
type = types.string; type = types.str;
example = "graylog2.example.com:11201"; example = "graylog2.example.com:11201";
description = '' description = ''
Host and port of your graylog2 input. This should be a GELF Host and port of your graylog2 input. This should be a GELF
@ -25,7 +25,7 @@ in
}; };
extraOptions = mkOption { extraOptions = mkOption {
type = types.string; type = types.separatedString " ";
default = ""; default = "";
description = '' description = ''
Any extra flags to pass to SystemdJournal2Gelf. Note that Any extra flags to pass to SystemdJournal2Gelf. Note that
@ -56,4 +56,4 @@ in
}; };
}; };
}; };
} }

View file

@ -32,7 +32,7 @@ in
}; };
updateAt = mkOption { updateAt = mkOption {
type = types.nullOr types.string; type = types.nullOr types.str;
default = null; default = null;
example = "hourly"; example = "hourly";
description = '' description = ''
@ -50,7 +50,7 @@ in
description = ''Enable the awstats web service. This switches on httpd.''; description = ''Enable the awstats web service. This switches on httpd.'';
}; };
urlPrefix = mkOption { urlPrefix = mkOption {
type = types.string; type = types.str;
default = "/awstats"; default = "/awstats";
description = "The URL prefix under which the awstats service appears."; description = "The URL prefix under which the awstats service appears.";
}; };

View file

@ -155,7 +155,7 @@ in
config = mkOption { config = mkOption {
default = "FQDN=1"; default = "FQDN=1";
type = types.string; type = types.lines;
description = '' description = ''
Config options that you would like in logcheck.conf. Config options that you would like in logcheck.conf.
''; '';

View file

@ -46,7 +46,7 @@ in
}; };
defaultConfig = mkOption { defaultConfig = mkOption {
type = types.string; type = types.lines;
default = defaultConf; default = defaultConf;
description = '' description = ''
The default <filename>syslog.conf</filename> file configures a The default <filename>syslog.conf</filename> file configures a
@ -56,7 +56,7 @@ in
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.string; type = types.lines;
default = ""; default = "";
example = "news.* -/var/log/news"; example = "news.* -/var/log/news";
description = '' description = ''

View file

@ -21,7 +21,7 @@ in
}; };
config = mkOption { config = mkOption {
type = types.string; type = types.lines;
default = ""; default = "";
description = '' description = ''
Verbatim Exim configuration. This should not contain exim_user, Verbatim Exim configuration. This should not contain exim_user,
@ -30,7 +30,7 @@ in
}; };
user = mkOption { user = mkOption {
type = types.string; type = types.str;
default = "exim"; default = "exim";
description = '' description = ''
User to use when no root privileges are required. User to use when no root privileges are required.
@ -42,7 +42,7 @@ in
}; };
group = mkOption { group = mkOption {
type = types.string; type = types.str;
default = "exim"; default = "exim";
description = '' description = ''
Group to use when no root privileges are required. Group to use when no root privileges are required.
@ -50,7 +50,7 @@ in
}; };
spoolDir = mkOption { spoolDir = mkOption {
type = types.string; type = types.path;
default = "/var/spool/exim"; default = "/var/spool/exim";
description = '' description = ''
Location of the spool directory of exim. Location of the spool directory of exim.

View file

@ -14,7 +14,7 @@ with lib;
}; };
user = mkOption { user = mkOption {
type = types.string; type = types.str;
default = "nullmailer"; default = "nullmailer";
description = '' description = ''
User to use to run nullmailer-send. User to use to run nullmailer-send.
@ -22,7 +22,7 @@ with lib;
}; };
group = mkOption { group = mkOption {
type = types.string; type = types.str;
default = "nullmailer"; default = "nullmailer";
description = '' description = ''
Group to use to run nullmailer-send. Group to use to run nullmailer-send.

View file

@ -509,7 +509,7 @@ in
}; };
localRecipients = mkOption { localRecipients = mkOption {
type = with types; nullOr (listOf string); type = with types; nullOr (listOf str);
default = null; default = null;
description = '' description = ''
List of accepted local users. Specify a bare username, an List of accepted local users. Specify a bare username, an
@ -530,7 +530,7 @@ in
dnsBlacklists = mkOption { dnsBlacklists = mkOption {
default = []; default = [];
type = with types; listOf string; type = with types; listOf str;
description = "dns blacklist servers to use with smtpd_client_restrictions"; description = "dns blacklist servers to use with smtpd_client_restrictions";
}; };

View file

@ -12,7 +12,7 @@ with lib; let
inetSocket = with types; { inetSocket = with types; {
options = { options = {
addr = mkOption { addr = mkOption {
type = nullOr string; type = nullOr str;
default = null; default = null;
example = "127.0.0.1"; example = "127.0.0.1";
description = "The address to bind to. Localhost if null"; description = "The address to bind to. Localhost if null";
@ -34,7 +34,7 @@ with lib; let
}; };
mode = mkOption { mode = mkOption {
type = string; type = str;
default = "0777"; default = "0777";
description = "Mode of the unix socket"; description = "Mode of the unix socket";
}; };
@ -63,17 +63,17 @@ in {
description = "Socket to bind to"; description = "Socket to bind to";
}; };
greylistText = mkOption { greylistText = mkOption {
type = string; type = str;
default = "Greylisted for %%s seconds"; default = "Greylisted for %%s seconds";
description = "Response status text for greylisted messages; use %%s for seconds left until greylisting is over and %%r for mail domain of recipient"; description = "Response status text for greylisted messages; use %%s for seconds left until greylisting is over and %%r for mail domain of recipient";
}; };
greylistAction = mkOption { greylistAction = mkOption {
type = string; type = str;
default = "DEFER_IF_PERMIT"; default = "DEFER_IF_PERMIT";
description = "Response status for greylisted messages (see access(5))"; description = "Response status for greylisted messages (see access(5))";
}; };
greylistHeader = mkOption { greylistHeader = mkOption {
type = string; type = str;
default = "X-Greylist: delayed %%t seconds by postgrey-%%v at %%h; %%d"; default = "X-Greylist: delayed %%t seconds by postgrey-%%v at %%h; %%d";
description = "Prepend header to greylisted mails; use %%t for seconds delayed due to greylisting, %%v for the version of postgrey, %%d for the date, and %%h for the host"; description = "Prepend header to greylisted mails; use %%t for seconds delayed due to greylisting, %%v for the version of postgrey, %%d for the date, and %%h for the host";
}; };
@ -88,7 +88,7 @@ in {
description = "Delete entries from whitelist if they haven't been seen for N days"; description = "Delete entries from whitelist if they haven't been seen for N days";
}; };
retryWindow = mkOption { retryWindow = mkOption {
type = either string natural; type = either str natural;
default = 2; default = 2;
example = "12h"; example = "12h";
description = "Allow N days for the first retry. Use string with appended 'h' to specify time in hours"; description = "Allow N days for the first retry. Use string with appended 'h' to specify time in hours";

View file

@ -308,7 +308,7 @@ in
}; };
user = mkOption { user = mkOption {
type = types.string; type = types.str;
default = "rspamd"; default = "rspamd";
description = '' description = ''
User to use when no root privileges are required. User to use when no root privileges are required.
@ -316,7 +316,7 @@ in
}; };
group = mkOption { group = mkOption {
type = types.string; type = types.str;
default = "rspamd"; default = "rspamd";
description = '' description = ''
Group to use when no root privileges are required. Group to use when no root privileges are required.

View file

@ -34,7 +34,7 @@ in {
}; };
listenAddress = mkOption { listenAddress = mkOption {
type = types.string; type = types.str;
default = "127.0.0.1"; default = "127.0.0.1";
description = '' description = ''
The host name or IP address on which to bind Airsonic. The host name or IP address on which to bind Airsonic.
@ -105,7 +105,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd.services.airsonic = { systemd.services.airsonic = {
description = "Airsonic Media Server"; description = "Airsonic Media Server";
after = [ "local-fs.target" "network.target" ]; after = [ "network.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
preStart = '' preStart = ''

View file

@ -46,7 +46,7 @@ in {
hostname = mkOption { hostname = mkOption {
description = "Hostname the broker should bind to."; description = "Hostname the broker should bind to.";
default = "localhost"; default = "localhost";
type = types.string; type = types.str;
}; };
logDirs = mkOption { logDirs = mkOption {
@ -54,13 +54,13 @@ in {
default = [ "/tmp/kafka-logs" ]; default = [ "/tmp/kafka-logs" ];
type = types.listOf types.path; type = types.listOf types.path;
}; };
zookeeper = mkOption { zookeeper = mkOption {
description = "Zookeeper connection string"; description = "Zookeeper connection string";
default = "localhost:2181"; default = "localhost:2181";
type = types.string; type = types.str;
}; };
extraProperties = mkOption { extraProperties = mkOption {
description = "Extra properties for server.properties."; description = "Extra properties for server.properties.";
type = types.nullOr types.lines; type = types.nullOr types.lines;
@ -79,8 +79,8 @@ in {
log4jProperties = mkOption { log4jProperties = mkOption {
description = "Kafka log4j property configuration."; description = "Kafka log4j property configuration.";
default = '' default = ''
log4j.rootLogger=INFO, stdout log4j.rootLogger=INFO, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c)%n log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c)%n

View file

@ -28,15 +28,15 @@ in
''; '';
}; };
url = mkOption { url = mkOption {
type = types.string; type = types.str;
description = "URL of mining server"; description = "URL of mining server";
}; };
user = mkOption { user = mkOption {
type = types.string; type = types.str;
description = "Username for mining server"; description = "Username for mining server";
}; };
pass = mkOption { pass = mkOption {
type = types.string; type = types.str;
default = "x"; default = "x";
description = "Password for mining server"; description = "Password for mining server";
}; };
@ -63,4 +63,4 @@ in
}; };
} }

View file

@ -252,7 +252,7 @@ in
example = ["host1:2181" "host2:2181"]; example = ["host1:2181" "host2:2181"];
}; };
zkConfigExhibitorPath = mkOption { zkConfigExhibitorPath = mkOption {
type = types.string; type = types.str;
description = '' description = ''
If the ZooKeeper shared config is also running Exhibitor, the URI path for the REST call If the ZooKeeper shared config is also running Exhibitor, the URI path for the REST call
''; '';

View file

@ -14,7 +14,7 @@ in {
enable = mkEnableOption "periodic SSD TRIM of mounted partitions in background"; enable = mkEnableOption "periodic SSD TRIM of mounted partitions in background";
interval = mkOption { interval = mkOption {
type = types.string; type = types.str;
default = "weekly"; default = "weekly";
description = '' description = ''
How often we run fstrim. For most desktop and server systems How often we run fstrim. For most desktop and server systems

View file

@ -11,7 +11,7 @@ in {
device = mkOption { device = mkOption {
description = "Use the given device as keyboard input event device instead of /dev/input/eventX default."; description = "Use the given device as keyboard input event device instead of /dev/input/eventX default.";
default = null; default = null;
type = types.nullOr types.string; type = types.nullOr types.str;
example = "/dev/input/event15"; example = "/dev/input/event15";
}; };
}; };

View file

@ -163,7 +163,7 @@ in {
}; };
serverName = mkOption { serverName = mkOption {
type = types.string; type = types.str;
default = "mediatomb"; default = "mediatomb";
description = '' description = ''
How to identify the server on the network. How to identify the server on the network.
@ -259,7 +259,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd.services.mediatomb = { systemd.services.mediatomb = {
description = "MediaTomb media Server"; description = "MediaTomb media Server";
after = [ "local-fs.target" "network.target" ]; after = [ "network.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
path = [ pkgs.mediatomb ]; path = [ pkgs.mediatomb ];
serviceConfig.ExecStart = "${pkgs.mediatomb}/bin/mediatomb -p ${toString cfg.port} ${if cfg.interface!="" then "-e ${cfg.interface}" else ""} ${if cfg.customCfg then "" else "-c ${mtConf}"} -m ${cfg.dataDir}"; serviceConfig.ExecStart = "${pkgs.mediatomb}/bin/mediatomb -p ${toString cfg.port} ${if cfg.interface!="" then "-e ${cfg.interface}" else ""} ${if cfg.customCfg then "" else "-c ${mtConf}"} -m ${cfg.dataDir}";

View file

@ -165,7 +165,7 @@ in
}; # options.services }; # options.services
config = { config = {
systemd.services.mwlib-nserve = mkIf cfg.nserve.enable systemd.services.mwlib-nserve = mkIf cfg.nserve.enable
{ {
@ -191,7 +191,6 @@ in
description = "mwlib job queue server"; description = "mwlib job queue server";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network.target" "local-fs.target" ];
preStart = '' preStart = ''
mkdir -pv '${cfg.qserve.datadir}' mkdir -pv '${cfg.qserve.datadir}'
@ -218,7 +217,7 @@ in
description = "mwlib worker"; description = "mwlib worker";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network.target" "local-fs.target" ]; after = [ "network.target" ];
preStart = '' preStart = ''
mkdir -pv '${cfg.nslave.cachedir}' mkdir -pv '${cfg.nslave.cachedir}'

View file

@ -50,7 +50,7 @@ in
}; };
ocrLanguages = mkOption { ocrLanguages = mkOption {
type = with types; nullOr (listOf string); type = with types; nullOr (listOf str);
default = null; default = null;
description = '' description = ''
Languages available for OCR via Tesseract, specified as Languages available for OCR via Tesseract, specified as

View file

@ -10,7 +10,7 @@ let
#!${pkgs.bash}/bin/sh #!${pkgs.bash}/bin/sh
SERVIIO_HOME=${pkgs.serviio} SERVIIO_HOME=${pkgs.serviio}
# Setup the classpath # Setup the classpath
SERVIIO_CLASS_PATH="$SERVIIO_HOME/lib/*:$SERVIIO_HOME/config" SERVIIO_CLASS_PATH="$SERVIIO_HOME/lib/*:$SERVIIO_HOME/config"
@ -21,13 +21,13 @@ let
# Execute the JVM in the foreground # Execute the JVM in the foreground
exec ${pkgs.jre}/bin/java -Xmx512M -Xms20M -XX:+UseG1GC -XX:GCTimeRatio=1 -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 $JAVA_OPTS -classpath "$SERVIIO_CLASS_PATH" org.serviio.MediaServer "$@" exec ${pkgs.jre}/bin/java -Xmx512M -Xms20M -XX:+UseG1GC -XX:GCTimeRatio=1 -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 $JAVA_OPTS -classpath "$SERVIIO_CLASS_PATH" org.serviio.MediaServer "$@"
''; '';
in { in {
###### interface ###### interface
options = { options = {
services.serviio = { services.serviio = {
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
@ -52,7 +52,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd.services.serviio = { systemd.services.serviio = {
description = "Serviio Media Server"; description = "Serviio Media Server";
after = [ "local-fs.target" "network.target" ]; after = [ "network.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
path = [ pkgs.serviio ]; path = [ pkgs.serviio ];
serviceConfig = { serviceConfig = {
@ -64,7 +64,7 @@ in {
}; };
users.users = [ users.users = [
{ {
name = "serviio"; name = "serviio";
group = "serviio"; group = "serviio";
home = cfg.dataDir; home = cfg.dataDir;
@ -75,16 +75,16 @@ in {
]; ];
users.groups = [ users.groups = [
{ name = "serviio";} { name = "serviio";}
]; ];
networking.firewall = { networking.firewall = {
allowedTCPPorts = [ allowedTCPPorts = [
8895 # serve UPnP responses 8895 # serve UPnP responses
23423 # console 23423 # console
23424 # mediabrowser 23424 # mediabrowser
]; ];
allowedUDPPorts = [ allowedUDPPorts = [
1900 # UPnP service discovey 1900 # UPnP service discovey
]; ];
}; };

View file

@ -17,7 +17,7 @@ let cfg = config.services.subsonic; in {
}; };
listenAddress = mkOption { listenAddress = mkOption {
type = types.string; type = types.str;
default = "0.0.0.0"; default = "0.0.0.0";
description = '' description = ''
The host name or IP address on which to bind Subsonic. The host name or IP address on which to bind Subsonic.
@ -105,7 +105,7 @@ let cfg = config.services.subsonic; in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd.services.subsonic = { systemd.services.subsonic = {
description = "Personal media streamer"; description = "Personal media streamer";
after = [ "local-fs.target" "network.target" ]; after = [ "network.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
script = '' script = ''
${pkgs.jre}/bin/java -Xmx${toString cfg.maxMemory}m \ ${pkgs.jre}/bin/java -Xmx${toString cfg.maxMemory}m \

View file

@ -51,7 +51,7 @@ in
}; };
address = mkOption { address = mkOption {
type = types.string; type = types.str;
default = "any"; default = "any";
description = "Address to bind the hub to."; description = "Address to bind the hub to.";
}; };
@ -83,7 +83,7 @@ in
description = "Whether to enable the Sqlite authentication database plugin"; description = "Whether to enable the Sqlite authentication database plugin";
}; };
file = mkOption { file = mkOption {
type = types.string; type = types.path;
example = "/var/db/uhub-users"; example = "/var/db/uhub-users";
description = "Path to user database. Use the uhub-passwd utility to create the database and add/remove users."; description = "Path to user database. Use the uhub-passwd utility to create the database and add/remove users.";
}; };
@ -96,7 +96,7 @@ in
description = "Whether to enable the logging plugin."; description = "Whether to enable the logging plugin.";
}; };
file = mkOption { file = mkOption {
type = types.string; type = types.str;
default = ""; default = "";
description = "Path of log file."; description = "Path of log file.";
}; };
@ -117,7 +117,7 @@ in
default = ""; default = "";
type = types.lines; type = types.lines;
description = '' description = ''
Welcome message displayed to clients after connecting Welcome message displayed to clients after connecting
and with the <literal>!motd</literal> command. and with the <literal>!motd</literal> command.
''; '';
}; };
@ -183,4 +183,4 @@ in
}; };
}; };
} }

View file

@ -91,7 +91,7 @@ in
BATTERYLEVEL 50 BATTERYLEVEL 50
MINUTES 5 MINUTES 5
''; '';
type = types.string; type = types.lines;
description = '' description = ''
Contents of the runtime configuration file, apcupsd.conf. The default Contents of the runtime configuration file, apcupsd.conf. The default
settings makes apcupsd autodetect USB UPSes, limit network access to settings makes apcupsd autodetect USB UPSes, limit network access to
@ -106,7 +106,7 @@ in
example = { example = {
doshutdown = ''# shell commands to notify that the computer is shutting down''; doshutdown = ''# shell commands to notify that the computer is shutting down'';
}; };
type = types.attrsOf types.string; type = types.attrsOf types.lines;
description = '' description = ''
Each attribute in this option names an apcupsd event and the string Each attribute in this option names an apcupsd event and the string
value it contains will be executed in a shell, in response to that value it contains will be executed in a shell, in response to that

View file

@ -41,7 +41,7 @@ in {
}; };
user = mkOption { user = mkOption {
type = types.string; type = types.str;
default = "bosun"; default = "bosun";
description = '' description = ''
User account under which bosun runs. User account under which bosun runs.
@ -49,7 +49,7 @@ in {
}; };
group = mkOption { group = mkOption {
type = types.string; type = types.str;
default = "bosun"; default = "bosun";
description = '' description = ''
Group account under which bosun runs. Group account under which bosun runs.
@ -57,7 +57,7 @@ in {
}; };
opentsdbHost = mkOption { opentsdbHost = mkOption {
type = types.nullOr types.string; type = types.nullOr types.str;
default = "localhost:4242"; default = "localhost:4242";
description = '' description = ''
Host and port of the OpenTSDB database that stores bosun data. Host and port of the OpenTSDB database that stores bosun data.
@ -66,7 +66,7 @@ in {
}; };
influxHost = mkOption { influxHost = mkOption {
type = types.nullOr types.string; type = types.nullOr types.str;
default = null; default = null;
example = "localhost:8086"; example = "localhost:8086";
description = '' description = ''
@ -75,7 +75,7 @@ in {
}; };
listenAddress = mkOption { listenAddress = mkOption {
type = types.string; type = types.str;
default = ":8070"; default = ":8070";
description = '' description = ''
The host address and port that bosun's web interface will listen on. The host address and port that bosun's web interface will listen on.

View file

@ -87,7 +87,7 @@ in {
description = "The hostname to show in the Datadog dashboard (optional)"; description = "The hostname to show in the Datadog dashboard (optional)";
default = null; default = null;
example = "mymachine.mydomain"; example = "mymachine.mydomain";
type = types.uniq (types.nullOr types.string); type = types.nullOr types.str;
}; };
logLevel = mkOption { logLevel = mkOption {

View file

@ -145,41 +145,40 @@ in {
description = "The hostname to show in the Datadog dashboard (optional)"; description = "The hostname to show in the Datadog dashboard (optional)";
default = null; default = null;
example = "mymachine.mydomain"; example = "mymachine.mydomain";
type = types.uniq (types.nullOr types.string); type = types.nullOr types.str;
}; };
postgresqlConfig = mkOption { postgresqlConfig = mkOption {
description = "Datadog PostgreSQL integration configuration"; description = "Datadog PostgreSQL integration configuration";
default = null; default = null;
type = types.uniq (types.nullOr types.string); type = types.nullOr types.lines;
}; };
nginxConfig = mkOption { nginxConfig = mkOption {
description = "Datadog nginx integration configuration"; description = "Datadog nginx integration configuration";
default = null; default = null;
type = types.uniq (types.nullOr types.string); type = types.nullOr types.lines;
}; };
mongoConfig = mkOption { mongoConfig = mkOption {
description = "MongoDB integration configuration"; description = "MongoDB integration configuration";
default = null; default = null;
type = types.uniq (types.nullOr types.string); type = types.nullOr types.lines;
}; };
jmxConfig = mkOption { jmxConfig = mkOption {
description = "JMX integration configuration"; description = "JMX integration configuration";
default = null; default = null;
type = types.uniq (types.nullOr types.string); type = types.nullOr types.lines;
}; };
processConfig = mkOption { processConfig = mkOption {
description = '' description = ''
Process integration configuration Process integration configuration
See <link xlink:href="https://docs.datadoghq.com/integrations/process/"/>
See http://docs.datadoghq.com/integrations/process/
''; '';
default = null; default = null;
type = types.uniq (types.nullOr types.string); type = types.nullOr types.lines;
}; };
}; };

View file

@ -11,7 +11,7 @@ let
graphiteLocalSettingsDir = pkgs.runCommand "graphite_local_settings" { graphiteLocalSettingsDir = pkgs.runCommand "graphite_local_settings" {
inherit graphiteLocalSettings; inherit graphiteLocalSettings;
preferLocalBuild = true; preferLocalBuild = true;
} '' } ''
mkdir -p $out mkdir -p $out
ln -s $graphiteLocalSettings $out/graphite_local_settings.py ln -s $graphiteLocalSettings $out/graphite_local_settings.py
@ -215,7 +215,7 @@ in {
storageAggregation = mkOption { storageAggregation = mkOption {
description = "Defines how to aggregate data to lower-precision retentions."; description = "Defines how to aggregate data to lower-precision retentions.";
default = null; default = null;
type = types.uniq (types.nullOr types.string); type = types.nullOr types.str;
example = '' example = ''
[all_min] [all_min]
pattern = \.min$ pattern = \.min$
@ -227,7 +227,7 @@ in {
storageSchemas = mkOption { storageSchemas = mkOption {
description = "Defines retention rates for storing metrics."; description = "Defines retention rates for storing metrics.";
default = ""; default = "";
type = types.uniq (types.nullOr types.string); type = types.nullOr types.str;
example = '' example = ''
[apache_busyWorkers] [apache_busyWorkers]
pattern = ^servers\.www.*\.workers\.busyWorkers$ pattern = ^servers\.www.*\.workers\.busyWorkers$
@ -238,14 +238,14 @@ in {
blacklist = mkOption { blacklist = mkOption {
description = "Any metrics received which match one of the experssions will be dropped."; description = "Any metrics received which match one of the experssions will be dropped.";
default = null; default = null;
type = types.uniq (types.nullOr types.string); type = types.nullOr types.str;
example = "^some\.noisy\.metric\.prefix\..*"; example = "^some\.noisy\.metric\.prefix\..*";
}; };
whitelist = mkOption { whitelist = mkOption {
description = "Only metrics received which match one of the experssions will be persisted."; description = "Only metrics received which match one of the experssions will be persisted.";
default = null; default = null;
type = types.uniq (types.nullOr types.string); type = types.nullOr types.str;
example = ".*"; example = ".*";
}; };
@ -255,7 +255,7 @@ in {
in a search and replace fashion. in a search and replace fashion.
''; '';
default = null; default = null;
type = types.uniq (types.nullOr types.string); type = types.nullOr types.str;
example = '' example = ''
[post] [post]
_sum$ = _sum$ =
@ -272,7 +272,7 @@ in {
relayRules = mkOption { relayRules = mkOption {
description = "Relay rules are used to send certain metrics to a certain backend."; description = "Relay rules are used to send certain metrics to a certain backend.";
default = null; default = null;
type = types.uniq (types.nullOr types.string); type = types.nullOr types.str;
example = '' example = ''
[example] [example]
pattern = ^mydata\.foo\..+ pattern = ^mydata\.foo\..+
@ -289,7 +289,7 @@ in {
aggregationRules = mkOption { aggregationRules = mkOption {
description = "Defines if and how received metrics will be aggregated."; description = "Defines if and how received metrics will be aggregated.";
default = null; default = null;
type = types.uniq (types.nullOr types.string); type = types.nullOr types.str;
example = '' example = ''
<env>.applications.<app>.all.requests (60) = sum <env>.applications.<app>.*.requests <env>.applications.<app>.all.requests (60) = sum <env>.applications.<app>.*.requests
<env>.applications.<app>.all.latency (60) = avg <env>.applications.<app>.*.latency <env>.applications.<app>.all.latency (60) = avg <env>.applications.<app>.*.latency

View file

@ -15,19 +15,19 @@ in {
source = mkOption { source = mkOption {
description = "Heapster metric source"; description = "Heapster metric source";
example = "kubernetes:https://kubernetes.default"; example = "kubernetes:https://kubernetes.default";
type = types.string; type = types.str;
}; };
sink = mkOption { sink = mkOption {
description = "Heapster metic sink"; description = "Heapster metic sink";
example = "influxdb:http://localhost:8086"; example = "influxdb:http://localhost:8086";
type = types.string; type = types.str;
}; };
extraOpts = mkOption { extraOpts = mkOption {
description = "Heapster extra options"; description = "Heapster extra options";
default = ""; default = "";
type = types.string; type = types.separatedString " ";
}; };
package = mkOption { package = mkOption {

View file

@ -116,17 +116,17 @@ in
url = mkOption { url = mkOption {
description = "The URL to an InfluxDB server that serves as the default database"; description = "The URL to an InfluxDB server that serves as the default database";
example = "http://localhost:8086"; example = "http://localhost:8086";
type = types.string; type = types.str;
}; };
username = mkOption { username = mkOption {
description = "The username to connect to the remote InfluxDB server"; description = "The username to connect to the remote InfluxDB server";
type = types.string; type = types.str;
}; };
password = mkOption { password = mkOption {
description = "The password to connect to the remote InfluxDB server"; description = "The password to connect to the remote InfluxDB server";
type = types.string; type = types.str;
}; };
}; };
@ -137,7 +137,7 @@ in
description = "The URL to the Alerta REST API"; description = "The URL to the Alerta REST API";
default = "http://localhost:5000"; default = "http://localhost:5000";
example = "http://localhost:5000"; example = "http://localhost:5000";
type = types.string; type = types.str;
}; };
token = mkOption { token = mkOption {

View file

@ -233,7 +233,7 @@ in
# In the meantime this at least suppresses a useless graph full of # In the meantime this at least suppresses a useless graph full of
# NaNs in the output. # NaNs in the output.
default = [ "munin_stats" ]; default = [ "munin_stats" ];
type = with types; listOf string; type = with types; listOf str;
description = '' description = ''
Munin plugins to disable, even if Munin plugins to disable, even if
<literal>munin-node-configure --suggest</literal> tries to enable <literal>munin-node-configure --suggest</literal> tries to enable

View file

@ -132,14 +132,10 @@ let
in in
mkIf conf.enable { mkIf conf.enable {
warnings = conf.warnings or []; warnings = conf.warnings or [];
users.users = (mkIf (conf.user == "${name}-exporter" && !enableDynamicUser) { users.users."${name}-exporter" = (mkIf (conf.user == "${name}-exporter" && !enableDynamicUser) {
"${name}-exporter" = { description = "Prometheus ${name} exporter service user";
description = '' isSystemUser = true;
Prometheus ${name} exporter service user inherit (conf) group;
'';
isSystemUser = true;
inherit (conf) group;
};
}); });
users.groups = (mkIf (conf.group == "${name}-exporter" && !enableDynamicUser) { users.groups = (mkIf (conf.group == "${name}-exporter" && !enableDynamicUser) {
"${name}-exporter" = {}; "${name}-exporter" = {};

View file

@ -9,7 +9,7 @@ in
port = 9100; port = 9100;
extraOpts = { extraOpts = {
enabledCollectors = mkOption { enabledCollectors = mkOption {
type = types.listOf types.string; type = types.listOf types.str;
default = []; default = [];
example = ''[ "systemd" ]''; example = ''[ "systemd" ]'';
description = '' description = ''

View file

@ -35,7 +35,7 @@ in {
''; '';
}; };
extraArgs = mkOption { extraArgs = mkOption {
type = types.listOf types.string; type = types.listOf types.str;
default = []; default = [];
description = '' description = ''
A list of commandline-switches forwarded to a riemann-tool. A list of commandline-switches forwarded to a riemann-tool.

View file

@ -51,7 +51,7 @@ in {
}; };
user = mkOption { user = mkOption {
type = types.string; type = types.str;
default = "scollector"; default = "scollector";
description = '' description = ''
User account under which scollector runs. User account under which scollector runs.
@ -59,7 +59,7 @@ in {
}; };
group = mkOption { group = mkOption {
type = types.string; type = types.str;
default = "scollector"; default = "scollector";
description = '' description = ''
Group account under which scollector runs. Group account under which scollector runs.
@ -67,7 +67,7 @@ in {
}; };
bosunHost = mkOption { bosunHost = mkOption {
type = types.string; type = types.str;
default = "localhost:8070"; default = "localhost:8070";
description = '' description = ''
Host and port of the bosun server that will store the collected Host and port of the bosun server that will store the collected

View file

@ -55,7 +55,7 @@ let
description = mkOption { description = mkOption {
default = ""; default = "";
type = types.string; type = types.str;
description = '' description = ''
Description of the UPS. Description of the UPS.
''; '';
@ -71,7 +71,7 @@ let
summary = mkOption { summary = mkOption {
default = ""; default = "";
type = types.string; type = types.lines;
description = '' description = ''
Lines which would be added inside ups.conf for handling this UPS. Lines which would be added inside ups.conf for handling this UPS.
''; '';

View file

@ -57,7 +57,7 @@ in {
nodeEnv = mkOption { nodeEnv = mkOption {
description = "The node environment to run in (development, production, etc.)"; description = "The node environment to run in (development, production, etc.)";
type = types.string; type = types.str;
default = "production"; default = "production";
}; };

View file

@ -9,7 +9,7 @@ let
translateOption = replaceStrings upperChars (map (s: " ${s}") lowerChars); translateOption = replaceStrings upperChars (map (s: " ${s}") lowerChars);
generateDaemonList = (daemonType: daemons: extraServiceConfig: generateDaemonList = (daemonType: daemons: extraServiceConfig:
mkMerge ( mkMerge (
map (daemon: map (daemon:
{ "ceph-${daemonType}-${daemon}" = generateServiceFile daemonType daemon cfg.global.clusterName ceph extraServiceConfig; } { "ceph-${daemonType}-${daemon}" = generateServiceFile daemonType daemon cfg.global.clusterName ceph extraServiceConfig; }
) daemons ) daemons
) )
@ -17,8 +17,8 @@ let
generateServiceFile = (daemonType: daemonId: clusterName: ceph: extraServiceConfig: { generateServiceFile = (daemonType: daemonId: clusterName: ceph: extraServiceConfig: {
enable = true; enable = true;
description = "Ceph ${builtins.replaceStrings lowerChars upperChars daemonType} daemon ${daemonId}"; description = "Ceph ${builtins.replaceStrings lowerChars upperChars daemonType} daemon ${daemonId}";
after = [ "network-online.target" "local-fs.target" "time-sync.target" ] ++ optional (daemonType == "osd") "ceph-mon.target"; after = [ "network-online.target" "time-sync.target" ] ++ optional (daemonType == "osd") "ceph-mon.target";
wants = [ "network-online.target" "local-fs.target" "time-sync.target" ]; wants = [ "network-online.target" "time-sync.target" ];
partOf = [ "ceph-${daemonType}.target" ]; partOf = [ "ceph-${daemonType}.target" ];
wantedBy = [ "ceph-${daemonType}.target" ]; wantedBy = [ "ceph-${daemonType}.target" ];
@ -41,7 +41,7 @@ let
daemonPath="/var/lib/ceph/${if daemonType == "rgw" then "radosgw" else daemonType}/${clusterName}-${daemonId}" daemonPath="/var/lib/ceph/${if daemonType == "rgw" then "radosgw" else daemonType}/${clusterName}-${daemonId}"
if [ ! -d ''$daemonPath ]; then if [ ! -d ''$daemonPath ]; then
mkdir -m 755 -p ''$daemonPath mkdir -m 755 -p ''$daemonPath
chown -R ceph:ceph ''$daemonPath chown -R ceph:ceph ''$daemonPath
fi fi
''; '';
} // optionalAttrs (daemonType == "osd") { path = [ pkgs.getopt ]; } } // optionalAttrs (daemonType == "osd") { path = [ pkgs.getopt ]; }
@ -55,7 +55,7 @@ let
}; };
} }
); );
in in
{ {
options.services.ceph = { options.services.ceph = {
# Ceph has a monolithic configuration file but different sections for # Ceph has a monolithic configuration file but different sections for
@ -86,7 +86,7 @@ in
type = with types; nullOr commas; type = with types; nullOr commas;
default = null; default = null;
example = '' example = ''
node0, node1, node2 node0, node1, node2
''; '';
description = '' description = ''
List of hosts that will be used as monitors at startup. List of hosts that will be used as monitors at startup.
@ -313,9 +313,9 @@ in
} }
]; ];
warnings = optional (cfg.global.monInitialMembers == null) warnings = optional (cfg.global.monInitialMembers == null)
''Not setting up a list of members in monInitialMembers requires that you set the host variable for each mon daemon or else the cluster won't function''; ''Not setting up a list of members in monInitialMembers requires that you set the host variable for each mon daemon or else the cluster won't function'';
environment.etc."ceph/ceph.conf".text = let environment.etc."ceph/ceph.conf".text = let
# Translate camelCaseOptions to the expected camel case option for ceph.conf # Translate camelCaseOptions to the expected camel case option for ceph.conf
translatedGlobalConfig = mapAttrs' (name: value: nameValuePair (translateOption name) value) cfg.global; translatedGlobalConfig = mapAttrs' (name: value: nameValuePair (translateOption name) value) cfg.global;
@ -344,13 +344,13 @@ in
}; };
systemd.services = let systemd.services = let
services = [] services = []
++ optional cfg.mon.enable (generateDaemonList "mon" cfg.mon.daemons { RestartSec = "10"; }) ++ optional cfg.mon.enable (generateDaemonList "mon" cfg.mon.daemons { RestartSec = "10"; })
++ optional cfg.mds.enable (generateDaemonList "mds" cfg.mds.daemons { StartLimitBurst = "3"; }) ++ optional cfg.mds.enable (generateDaemonList "mds" cfg.mds.daemons { StartLimitBurst = "3"; })
++ optional cfg.osd.enable (generateDaemonList "osd" cfg.osd.daemons { StartLimitBurst = "30"; RestartSec = "20s"; }) ++ optional cfg.osd.enable (generateDaemonList "osd" cfg.osd.daemons { StartLimitBurst = "30"; RestartSec = "20s"; })
++ optional cfg.rgw.enable (generateDaemonList "rgw" cfg.rgw.daemons { }) ++ optional cfg.rgw.enable (generateDaemonList "rgw" cfg.rgw.daemons { })
++ optional cfg.mgr.enable (generateDaemonList "mgr" cfg.mgr.daemons { StartLimitBurst = "3"; }); ++ optional cfg.mgr.enable (generateDaemonList "mgr" cfg.mgr.daemons { StartLimitBurst = "3"; });
in in
mkMerge services; mkMerge services;
systemd.targets = let systemd.targets = let

View file

@ -21,7 +21,7 @@ in
}; };
davUser = mkOption { davUser = mkOption {
type = types.string; type = types.str;
default = "davfs2"; default = "davfs2";
description = '' description = ''
When invoked by root the mount.davfs daemon will run as this user. When invoked by root the mount.davfs daemon will run as this user.
@ -30,7 +30,7 @@ in
}; };
davGroup = mkOption { davGroup = mkOption {
type = types.string; type = types.str;
default = "davfs2"; default = "davfs2";
description = '' description = ''
The group of the running mount.davfs daemon. Ordinary users must be The group of the running mount.davfs daemon. Ordinary users must be

View file

@ -23,7 +23,7 @@ let cfg = config.services.drbd; in
services.drbd.config = mkOption { services.drbd.config = mkOption {
default = ""; default = "";
type = types.string; type = types.lines;
description = '' description = ''
Contents of the <filename>drbd.conf</filename> configuration file. Contents of the <filename>drbd.conf</filename> configuration file.
''; '';

View file

@ -156,7 +156,7 @@ in
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
requires = lib.optional cfg.useRpcbind "rpcbind.service"; requires = lib.optional cfg.useRpcbind "rpcbind.service";
after = [ "network.target" "local-fs.target" ] ++ lib.optional cfg.useRpcbind "rpcbind.service"; after = [ "network.target" ] ++ lib.optional cfg.useRpcbind "rpcbind.service";
preStart = '' preStart = ''
install -m 0755 -d /var/log/glusterfs install -m 0755 -d /var/log/glusterfs

View file

@ -236,7 +236,6 @@ in {
systemd.services.ipfs-init = recursiveUpdate commonEnv { systemd.services.ipfs-init = recursiveUpdate commonEnv {
description = "IPFS Initializer"; description = "IPFS Initializer";
after = [ "local-fs.target" ];
before = [ "ipfs.service" "ipfs-offline.service" "ipfs-norouting.service" ]; before = [ "ipfs.service" "ipfs-offline.service" "ipfs-norouting.service" ];
script = '' script = ''
@ -263,21 +262,21 @@ in {
systemd.services.ipfs = recursiveUpdate baseService { systemd.services.ipfs = recursiveUpdate baseService {
description = "IPFS Daemon"; description = "IPFS Daemon";
wantedBy = mkIf (cfg.defaultMode == "online") [ "multi-user.target" ]; wantedBy = mkIf (cfg.defaultMode == "online") [ "multi-user.target" ];
after = [ "network.target" "local-fs.target" "ipfs-init.service" ]; after = [ "network.target" "ipfs-init.service" ];
conflicts = [ "ipfs-offline.service" "ipfs-norouting.service"]; conflicts = [ "ipfs-offline.service" "ipfs-norouting.service"];
}; };
systemd.services.ipfs-offline = recursiveUpdate baseService { systemd.services.ipfs-offline = recursiveUpdate baseService {
description = "IPFS Daemon (offline mode)"; description = "IPFS Daemon (offline mode)";
wantedBy = mkIf (cfg.defaultMode == "offline") [ "multi-user.target" ]; wantedBy = mkIf (cfg.defaultMode == "offline") [ "multi-user.target" ];
after = [ "local-fs.target" "ipfs-init.service" ]; after = [ "ipfs-init.service" ];
conflicts = [ "ipfs.service" "ipfs-norouting.service"]; conflicts = [ "ipfs.service" "ipfs-norouting.service"];
}; };
systemd.services.ipfs-norouting = recursiveUpdate baseService { systemd.services.ipfs-norouting = recursiveUpdate baseService {
description = "IPFS Daemon (no routing mode)"; description = "IPFS Daemon (no routing mode)";
wantedBy = mkIf (cfg.defaultMode == "norouting") [ "multi-user.target" ]; wantedBy = mkIf (cfg.defaultMode == "norouting") [ "multi-user.target" ];
after = [ "local-fs.target" "ipfs-init.service" ]; after = [ "ipfs-init.service" ];
conflicts = [ "ipfs.service" "ipfs-offline.service"]; conflicts = [ "ipfs.service" "ipfs-offline.service"];
}; };

View file

@ -35,7 +35,7 @@ in
}; };
motd = mkOption { motd = mkOption {
type = types.string; type = types.str;
default = ""; default = "";
description = '' description = ''
Message of the day to display to clients on each connect. Message of the day to display to clients on each connect.

View file

@ -29,7 +29,7 @@ in
username = mkOption { username = mkOption {
default = ""; default = "";
type = types.string; type = types.str;
description = '' description = ''
Your yandex.com login name. Your yandex.com login name.
''; '';
@ -37,7 +37,7 @@ in
password = mkOption { password = mkOption {
default = ""; default = "";
type = types.string; type = types.str;
description = '' description = ''
Your yandex.com password. Warning: it will be world-readable in /nix/store. Your yandex.com password. Warning: it will be world-readable in /nix/store.
''; '';
@ -57,7 +57,7 @@ in
excludes = mkOption { excludes = mkOption {
default = ""; default = "";
type = types.string; type = types.commas;
example = "data,backup"; example = "data,backup";
description = '' description = ''
Comma-separated list of directories which are excluded from synchronization. Comma-separated list of directories which are excluded from synchronization.

View file

@ -47,8 +47,8 @@ in
''; '';
}; };
downloadDir = mkOption { downloadDir = mkOption {
type = types.string; type = types.path;
default = "${downloadDir}"; default = downloadDir;
description = '' description = ''
Directory to store downloaded files. Directory to store downloaded files.
''; '';
@ -66,7 +66,7 @@ in
description = "Specify a port number for JSON-RPC/XML-RPC server to listen to. Possible Values: 1024-65535"; description = "Specify a port number for JSON-RPC/XML-RPC server to listen to. Possible Values: 1024-65535";
}; };
rpcSecret = mkOption { rpcSecret = mkOption {
type = types.string; type = types.str;
default = "aria2rpc"; default = "aria2rpc";
description = '' description = ''
Set RPC secret authorization token. Set RPC secret authorization token.
@ -74,7 +74,7 @@ in
''; '';
}; };
extraArguments = mkOption { extraArguments = mkOption {
type = types.string; type = types.separatedString " ";
example = "--rpc-listen-all --remote-time=true"; example = "--rpc-listen-all --remote-time=true";
default = ""; default = "";
description = '' description = ''
@ -109,7 +109,7 @@ in
systemd.services.aria2 = { systemd.services.aria2 = {
description = "aria2 Service"; description = "aria2 Service";
after = [ "local-fs.target" "network.target" ]; after = [ "network.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
preStart = '' preStart = ''
if [[ ! -e "${sessionFile}" ]] if [[ ! -e "${sessionFile}" ]]

View file

@ -20,12 +20,12 @@ in
type = types.listOf (types.submodule { type = types.listOf (types.submodule {
options = { options = {
name = mkOption { name = mkOption {
type = types.string; type = types.str;
example = "socks-peer"; example = "socks-peer";
description = "Name of the local AutoSSH session"; description = "Name of the local AutoSSH session";
}; };
user = mkOption { user = mkOption {
type = types.string; type = types.str;
example = "bill"; example = "bill";
description = "Name of the user the AutoSSH session should run as"; description = "Name of the user the AutoSSH session should run as";
}; };
@ -40,7 +40,7 @@ in
''; '';
}; };
extraArguments = mkOption { extraArguments = mkOption {
type = types.string; type = types.separatedString " ";
example = "-N -D4343 bill@socks.example.net"; example = "-N -D4343 bill@socks.example.net";
description = '' description = ''
Arguments to be passed to AutoSSH and retransmitted to SSH Arguments to be passed to AutoSSH and retransmitted to SSH

View file

@ -21,14 +21,14 @@ in
enable = mkEnableOption "Charybdis IRC daemon"; enable = mkEnableOption "Charybdis IRC daemon";
config = mkOption { config = mkOption {
type = types.string; type = types.str;
description = '' description = ''
Charybdis IRC daemon configuration file. Charybdis IRC daemon configuration file.
''; '';
}; };
statedir = mkOption { statedir = mkOption {
type = types.string; type = types.path;
default = "/var/lib/charybdis"; default = "/var/lib/charybdis";
description = '' description = ''
Location of the state directory of charybdis. Location of the state directory of charybdis.
@ -36,7 +36,7 @@ in
}; };
user = mkOption { user = mkOption {
type = types.string; type = types.str;
default = "ircd"; default = "ircd";
description = '' description = ''
Charybdis IRC daemon user. Charybdis IRC daemon user.
@ -44,7 +44,7 @@ in
}; };
group = mkOption { group = mkOption {
type = types.string; type = types.str;
default = "ircd"; default = "ircd";
description = '' description = ''
Charybdis IRC daemon group. Charybdis IRC daemon group.
@ -101,7 +101,7 @@ in
}; };
} }
(mkIf (cfg.motd != null) { (mkIf (cfg.motd != null) {
environment.etc."charybdis/ircd.motd".text = cfg.motd; environment.etc."charybdis/ircd.motd".text = cfg.motd;
}) })

View file

@ -45,7 +45,7 @@ in {
}; };
networkInterfaceBlacklist = mkOption { networkInterfaceBlacklist = mkOption {
type = with types; listOf string; type = with types; listOf str;
default = [ "vmnet" "vboxnet" "virbr" "ifb" "ve" ]; default = [ "vmnet" "vboxnet" "virbr" "ifb" "ve" ];
description = '' description = ''
Default blacklisted interfaces, this includes NixOS containers interfaces (ve). Default blacklisted interfaces, this includes NixOS containers interfaces (ve).
@ -53,7 +53,7 @@ in {
}; };
extraFlags = mkOption { extraFlags = mkOption {
type = with types; listOf string; type = with types; listOf str;
default = [ ]; default = [ ];
example = [ "--nodnsproxy" ]; example = [ "--nodnsproxy" ];
description = '' description = ''

View file

@ -34,7 +34,7 @@ in
password = mkOption { password = mkOption {
default = ""; default = "";
type = types.string; type = types.str;
description = '' description = ''
Path to a file (as a string), containing your gogoNET password, if any. Path to a file (as a string), containing your gogoNET password, if any.
''; '';

View file

@ -81,7 +81,7 @@ in
driver = mkOption { driver = mkOption {
default = "nl80211"; default = "nl80211";
example = "hostapd"; example = "hostapd";
type = types.string; type = types.str;
description = '' description = ''
Which driver <command>hostapd</command> will use. Which driver <command>hostapd</command> will use.
Most applications will probably use the default. Most applications will probably use the default.
@ -91,7 +91,7 @@ in
ssid = mkOption { ssid = mkOption {
default = "nixos"; default = "nixos";
example = "mySpecialSSID"; example = "mySpecialSSID";
type = types.string; type = types.str;
description = "SSID to be used in IEEE 802.11 management frames."; description = "SSID to be used in IEEE 802.11 management frames.";
}; };
@ -119,7 +119,7 @@ in
group = mkOption { group = mkOption {
default = "wheel"; default = "wheel";
example = "network"; example = "network";
type = types.string; type = types.str;
description = '' description = ''
Members of this group can control <command>hostapd</command>. Members of this group can control <command>hostapd</command>.
''; '';
@ -135,7 +135,7 @@ in
wpaPassphrase = mkOption { wpaPassphrase = mkOption {
default = "my_sekret"; default = "my_sekret";
example = "any_64_char_string"; example = "any_64_char_string";
type = types.string; type = types.str;
description = '' description = ''
WPA-PSK (pre-shared-key) passphrase. Clients will need this WPA-PSK (pre-shared-key) passphrase. Clients will need this
passphrase to associate with this access point. passphrase to associate with this access point.

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