Merge pull request #68203 from NixOS/staging-next

Staging next
This commit is contained in:
Frederik Rietdijk 2019-09-06 22:47:23 +02:00 committed by GitHub
commit 076860e034
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2346 changed files with 4791 additions and 4815 deletions

View File

@ -14,10 +14,10 @@ let
builtins.map
(subsetname: {
subsetname = subsetname;
functions = libDefPos toplib."${subsetname}";
functions = libDefPos toplib.${subsetname};
})
(builtins.filter
(name: builtins.isAttrs toplib."${name}")
(name: builtins.isAttrs toplib.${name})
(builtins.attrNames toplib));
nixpkgsLib = pkgs.lib;

View File

@ -24,7 +24,7 @@ rec {
let arg = (merger init (defaultMergeArg init x));
# now add the function with composed args already applied to the final attrs
base = (setAttrMerge "passthru" {} (f arg)
( z: z // rec {
( z: z // {
function = foldArgs merger f arg;
args = (lib.attrByPath ["passthru" "args"] {} z) // x;
} ));

View File

@ -1,7 +1,7 @@
{ lib, version }:
with lib;
rec {
{
# Common patterns/legacy
whenAtLeast = ver: mkIf (versionAtLeast version ver);
whenOlder = ver: mkIf (versionOlder version ver);

View File

@ -7,7 +7,7 @@ let
in
lib.mapAttrs (n: v: v // { shortName = n; }) rec {
lib.mapAttrs (n: v: v // { shortName = n; }) {
/* License identifiers from spdx.org where possible.
* If you cannot find your license here, then look for a similar license or
* add it to this list. The URL mentioned above is a good source for inspiration.

View File

@ -459,11 +459,11 @@ rec {
if length list < 2
then # finish
{ result = list; }
else if dfsthis ? "cycle"
else if dfsthis ? cycle
then # there's a cycle, starting from the current vertex, return it
{ cycle = reverseList ([ dfsthis.cycle ] ++ dfsthis.visited);
inherit (dfsthis) loops; }
else if toporest ? "cycle"
else if toporest ? cycle
then # there's a cycle somewhere else in the graph, return it
toporest
# Slow, but short. Can be made a bit faster with an explicit stack.

View File

@ -58,13 +58,13 @@ rec {
uname = {
# uname -s
system = {
"linux" = "Linux";
"windows" = "Windows";
"darwin" = "Darwin";
"netbsd" = "NetBSD";
"freebsd" = "FreeBSD";
"openbsd" = "OpenBSD";
"wasi" = "Wasi";
linux = "Linux";
windows = "Windows";
darwin = "Darwin";
netbsd = "NetBSD";
freebsd = "FreeBSD";
openbsd = "OpenBSD";
wasi = "Wasi";
}.${final.parsed.kernel.name} or null;
# uname -p
@ -86,10 +86,10 @@ rec {
else if final.isx86_64 then "x86_64"
else if final.isx86 then "i386"
else {
"powerpc" = "ppc";
"powerpcle" = "ppc";
"powerpc64" = "ppc64";
"powerpc64le" = "ppc64le";
powerpc = "ppc";
powerpcle = "ppc";
powerpc64 = "ppc64";
powerpc64le = "ppc64le";
}.${final.parsed.cpu.name} or final.parsed.cpu.name;
emulator = pkgs: let

View File

@ -33,7 +33,7 @@ let
filterDoubles = f: map parse.doubleFromSystem (lists.filter f allParsed);
in rec {
in {
inherit all;
none = [];

View File

@ -24,27 +24,27 @@ rec {
platform = platforms.powernv;
};
sheevaplug = rec {
sheevaplug = {
config = "armv5tel-unknown-linux-gnueabi";
platform = platforms.sheevaplug;
};
raspberryPi = rec {
raspberryPi = {
config = "armv6l-unknown-linux-gnueabihf";
platform = platforms.raspberrypi;
};
armv7l-hf-multiplatform = rec {
armv7l-hf-multiplatform = {
config = "armv7l-unknown-linux-gnueabihf";
platform = platforms.armv7l-hf-multiplatform;
};
aarch64-multiplatform = rec {
aarch64-multiplatform = {
config = "aarch64-unknown-linux-gnu";
platform = platforms.aarch64-multiplatform;
};
armv7a-android-prebuilt = rec {
armv7a-android-prebuilt = {
config = "armv7a-unknown-linux-androideabi";
sdkVer = "24";
ndkVer = "18b";
@ -52,7 +52,7 @@ rec {
useAndroidPrebuilt = true;
};
aarch64-android-prebuilt = rec {
aarch64-android-prebuilt = {
config = "aarch64-unknown-linux-android";
sdkVer = "24";
ndkVer = "18b";
@ -65,17 +65,17 @@ rec {
inherit (platform.gcc) fpu;
};
pogoplug4 = rec {
pogoplug4 = {
config = "armv5tel-unknown-linux-gnueabi";
platform = platforms.pogoplug4;
};
ben-nanonote = rec {
ben-nanonote = {
config = "mipsel-unknown-linux-uclibc";
platform = platforms.ben_nanonote;
};
fuloongminipc = rec {
fuloongminipc = {
config = "mipsel-unknown-linux-gnu";
platform = platforms.fuloong2f_n32;
};

View File

@ -408,7 +408,7 @@ rec {
getKernel = name: kernels.${name} or (throw "Unknown kernel: ${name}");
getAbi = name: abis.${name} or (throw "Unknown ABI: ${name}");
parsed = rec {
parsed = {
cpu = getCpu args.cpu;
vendor =
/**/ if args ? vendor then getVendor args.vendor

View File

@ -456,16 +456,16 @@ rec {
};
selectBySystem = system: {
"i486-linux" = pc32;
"i586-linux" = pc32;
"i686-linux" = pc32;
"x86_64-linux" = pc64;
"armv5tel-linux" = sheevaplug;
"armv6l-linux" = raspberrypi;
"armv7a-linux" = armv7l-hf-multiplatform;
"armv7l-linux" = armv7l-hf-multiplatform;
"aarch64-linux" = aarch64-multiplatform;
"mipsel-linux" = fuloong2f_n32;
"powerpc64le-linux" = powernv;
i486-linux = pc32;
i586-linux = pc32;
i686-linux = pc32;
x86_64-linux = pc64;
armv5tel-linux = sheevaplug;
armv6l-linux = raspberrypi;
armv7a-linux = armv7l-hf-multiplatform;
armv7l-linux = armv7l-hf-multiplatform;
aarch64-linux = aarch64-multiplatform;
mipsel-linux = fuloong2f_n32;
powerpc64le-linux = powernv;
}.${system} or pcBase;
}

View File

@ -42,7 +42,7 @@ rec {
# Default type functor
defaultFunctor = name: {
inherit name;
type = types."${name}" or null;
type = types.${name} or null;
wrapped = null;
payload = null;
binOp = a: b: null;
@ -107,7 +107,7 @@ rec {
merge = mergeEqualOption;
};
int = mkOptionType rec {
int = mkOptionType {
name = "int";
description = "signed integer";
check = isInt;
@ -136,7 +136,7 @@ rec {
sign = bit: range: ign (0 - (range / 2)) (range / 2 - 1)
"signedInt${toString bit}" "${toString bit} bit signed integer";
in rec {
in {
/* An int with a fixed range.
*
* Example:
@ -172,7 +172,7 @@ rec {
# Alias of u16 for a port number
port = ints.u16;
float = mkOptionType rec {
float = mkOptionType {
name = "float";
description = "floating point number";
check = isFloat;

View File

@ -7,7 +7,7 @@ let
in
rec {
{
/* Get the major version string from a string.

View File

@ -2101,7 +2101,7 @@
githubId = 2817965;
name = "f--t";
};
f-breidenstein = {
fleaz = {
email = "mail@felixbreidenstein.de";
github = "fleaz";
githubId = 2489598;

View File

@ -126,7 +126,7 @@ let
}
'';
in rec {
in {
inherit optionsNix;
optionsAsciiDoc = lib.concatStringsSep "\n" (lib.mapAttrsToList singleAsciiDoc optionsNix);

View File

@ -17,9 +17,9 @@ in
else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'";
qemuBinary = qemuPkg: {
"x86_64-linux" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64";
"armv7l-linux" = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host";
"aarch64-linux" = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host";
"x86_64-darwin" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64";
x86_64-linux = "${qemuPkg}/bin/qemu-kvm -cpu kvm64";
armv7l-linux = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host";
aarch64-linux = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host";
x86_64-darwin = "${qemuPkg}/bin/qemu-kvm -cpu kvm64";
}.${pkgs.stdenv.hostPlatform.system} or "${qemuPkg}/bin/qemu-kvm";
}

View File

@ -1,6 +1,6 @@
pkgs: with pkgs.lib;
rec {
{
# Check whenever fileSystem is needed for boot
fsNeededForBoot = fs: fs.neededForBoot

View File

@ -35,8 +35,8 @@ let
then "fontconfig"
else "fontconfig_${version}";
makeCache = fontconfig: pkgs.makeFontsCache { inherit fontconfig; fontDirectories = config.fonts.fonts; };
cache = makeCache pkgs."${fcPackage}";
cache32 = makeCache pkgs.pkgsi686Linux."${fcPackage}";
cache = makeCache pkgs.${fcPackage};
cache32 = makeCache pkgs.pkgsi686Linux.${fcPackage};
in
pkgs.writeText "fc-00-nixos-cache.conf" ''
<?xml version='1.0'?>

View File

@ -79,7 +79,7 @@ in
config = mkIf (config.fonts.fontconfig.enable && cfg.enable) {
fonts.fontconfig.confPackages = [ confPkg ];
environment.variables."INFINALITY_FT" = cfg.preset;
environment.variables.INFINALITY_FT = cfg.preset;
};

View File

@ -15,7 +15,7 @@ let
realms = optionalAttrs (lib.all (value: value != null) [
cfg.defaultRealm cfg.kdc cfg.kerberosAdminServer
]) {
"${cfg.defaultRealm}" = {
${cfg.defaultRealm} = {
kdc = cfg.kdc;
admin_server = cfg.kerberosAdminServer;
};
@ -25,7 +25,7 @@ let
cfg.domainRealm cfg.defaultRealm
]) {
".${cfg.domainRealm}" = cfg.defaultRealm;
"${cfg.domainRealm}" = cfg.defaultRealm;
${cfg.domainRealm} = cfg.defaultRealm;
};
};

View File

@ -6,7 +6,7 @@ let
# The set of alternative malloc(3) providers.
providers = {
"graphene-hardened" = rec {
graphene-hardened = {
libPath = "${pkgs.graphene-hardened-malloc}/lib/libhardened_malloc.so";
description = ''
An allocator designed to mitigate memory corruption attacks, such as
@ -14,7 +14,7 @@ let
'';
};
"jemalloc" = {
jemalloc = {
libPath = "${pkgs.jemalloc}/lib/libjemalloc.so";
description = ''
A general purpose allocator that emphasizes fragmentation avoidance
@ -22,7 +22,7 @@ let
'';
};
"scudo" = {
scudo = {
libPath = "${pkgs.llvmPackages.compiler-rt}/lib/linux/libclang_rt.scudo-x86_64.so";
description = ''
A user-mode allocator based on LLVM Sanitizers CombinedAllocator,
@ -32,7 +32,7 @@ let
};
};
providerConf = providers."${cfg.provider}";
providerConf = providers.${cfg.provider};
# An output that contains only the shared library, to avoid
# needlessly bloating the system closure

View File

@ -171,13 +171,13 @@ in
environment.etc =
{ # /etc/services: TCP/UDP port assignments.
"services".source = pkgs.iana-etc + "/etc/services";
services.source = pkgs.iana-etc + "/etc/services";
# /etc/protocols: IP protocol numbers.
"protocols".source = pkgs.iana-etc + "/etc/protocols";
protocols.source = pkgs.iana-etc + "/etc/protocols";
# /etc/hosts: Hostname-to-IP mappings.
"hosts".text = let
hosts.text = let
oneToString = set: ip: ip + " " + concatStringsSep " " set.${ip};
allToString = set: concatMapStringsSep "\n" (oneToString set) (attrNames set);
in ''
@ -190,7 +190,7 @@ in
} // optionalAttrs (pkgs.stdenv.hostPlatform.libc == "glibc") {
# /etc/rpc: RPC program numbers.
"rpc".source = pkgs.glibc.out + "/etc/rpc";
rpc.source = pkgs.glibc.out + "/etc/rpc";
};
networking.proxy.envVars =

View File

@ -78,7 +78,7 @@ in
};
# Service executed before suspending/hibernating.
systemd.services."pre-sleep" =
systemd.services.pre-sleep =
{ description = "Pre-Sleep Actions";
wantedBy = [ "sleep.target" ];
before = [ "sleep.target" ];
@ -89,7 +89,7 @@ in
serviceConfig.Type = "oneshot";
};
systemd.services."post-resume" =
systemd.services.post-resume =
{ description = "Post-Resume Actions";
after = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" ];
script =

View File

@ -163,7 +163,7 @@ in
l = "ls -alh";
};
environment.etc."shells".text =
environment.etc.shells.text =
''
${concatStringsSep "\n" (map utils.toShellPath cfg.shells)}
/bin/sh
@ -171,7 +171,7 @@ in
# For resetting environment with `. /etc/set-environment` when needed
# and discoverability (see motivation of #30418).
environment.etc."set-environment".source = config.system.build.setEnvironment;
environment.etc.set-environment.source = config.system.build.setEnvironment;
system.build.setEnvironment = pkgs.writeText "set-environment"
''

View File

@ -8,7 +8,7 @@
"/share/terminfo"
];
environment.etc."terminfo" = {
environment.etc.terminfo = {
source = "${config.system.path}/share/terminfo";
};

View File

@ -546,11 +546,11 @@ in {
environment.systemPackages = systemShells;
environment.etc = {
"subuid" = {
subuid = {
text = subuidFile;
mode = "0644";
};
"subgid" = {
subgid = {
text = subgidFile;
mode = "0644";
};

View File

@ -36,6 +36,6 @@ in
{ inherit (cfg) group; }
))
];
users.groups."${cfg.group}" = {};
users.groups.${cfg.group} = {};
};
}

View File

@ -33,7 +33,7 @@ in
boot.blacklistedKernelModules = [ "radeon" ];
environment.etc."ati".source = "${ati_x11}/etc/ati";
environment.etc.ati.source = "${ati_x11}/etc/ati";
};

View File

@ -129,7 +129,7 @@ in
];
nixpkgs.config = {
packageOverrides = p: rec {
packageOverrides = p: {
linux_3_4 = p.linux_3_4.override {
extraConfig = ''
# Enable drivers in kernel for most NICs.

View File

@ -18,7 +18,7 @@ with lib;
};
config = rec {
config = {
# Don't build the GRUB menu builder script, since we don't need it
# here and it causes a cyclic dependency.
boot.loader.grub.enable = false;

View File

@ -85,7 +85,7 @@ in
# Generate /etc/os-release. See
# https://www.freedesktop.org/software/systemd/man/os-release.html for the
# format.
environment.etc."os-release".text =
environment.etc.os-release.text =
''
NAME=NixOS
ID=nixos

View File

@ -30,7 +30,7 @@ in
};
config = mkIf (cfg.settings != {}) {
environment.etc."atoprc".text =
environment.etc.atoprc.text =
concatStrings (mapAttrsToList (n: v: "${n} ${toString v}\n") cfg.settings);
};
}

View File

@ -159,7 +159,7 @@ in
};
environment.etc."profile".text =
environment.etc.profile.text =
''
# /etc/profile: DO NOT EDIT -- this file has been generated automatically.
# This file is read for login shells.
@ -184,7 +184,7 @@ in
fi
'';
environment.etc."bashrc".text =
environment.etc.bashrc.text =
''
# /etc/bashrc: DO NOT EDIT -- this file has been generated automatically.
@ -212,7 +212,7 @@ in
# Configuration for readline in bash. We use "option default"
# priority to allow user override using both .text and .source.
environment.etc."inputrc".source = mkOptionDefault ./inputrc;
environment.etc.inputrc.source = mkOptionDefault ./inputrc;
users.defaultUserShell = mkDefault pkgs.bashInteractive;

View File

@ -5,7 +5,7 @@ with lib;
let
cfg = config.programs.firejail;
wrappedBins = pkgs.stdenv.mkDerivation rec {
wrappedBins = pkgs.stdenv.mkDerivation {
name = "firejail-wrapped-binaries";
nativeBuildInputs = with pkgs; [ makeWrapper ];
buildCommand = ''

View File

@ -54,8 +54,8 @@ in
type = types.attrsOf types.str;
default = {};
example = {
"h" = "noaction 5\e(";
"l" = "noaction 5\e)";
h = "noaction 5\e(";
l = "noaction 5\e)";
};
description = "Defines new command keys.";
};
@ -74,7 +74,7 @@ in
type = types.attrsOf types.str;
default = {};
example = {
"\e" = "abort";
e = "abort";
};
description = "Defines new line-editing keys.";
};
@ -111,11 +111,11 @@ in
environment.systemPackages = [ pkgs.less ];
environment.variables = {
"LESSKEY_SYSTEM" = toString lessKey;
LESSKEY_SYSTEM = toString lessKey;
} // optionalAttrs (cfg.lessopen != null) {
"LESSOPEN" = cfg.lessopen;
LESSOPEN = cfg.lessopen;
} // optionalAttrs (cfg.lessclose != null) {
"LESSCLOSE" = cfg.lessclose;
LESSCLOSE = cfg.lessclose;
};
warnings = optional (

View File

@ -35,7 +35,7 @@ in
###### implementation
config = lib.mkIf (cfg.nanorc != "" || cfg.syntaxHighlight) {
environment.etc."nanorc".text = lib.concatStrings [ cfg.nanorc
environment.etc.nanorc.text = lib.concatStrings [ cfg.nanorc
(lib.optionalString cfg.syntaxHighlight ''${LF}include "${pkgs.nano}/share/nano/*.nanorc"'') ];
};

View File

@ -36,7 +36,7 @@ in
###### implementation
config = lib.mkIf cfg.enable {
environment.etc."npmrc".text = cfg.npmrc;
environment.etc.npmrc.text = cfg.npmrc;
environment.variables.NPM_CONFIG_GLOBALCONFIG = "/etc/npmrc";

View File

@ -24,7 +24,7 @@ in
###### implementation
config = mkIf (cfg.screenrc != "") {
environment.etc."screenrc".text = cfg.screenrc;
environment.etc.screenrc.text = cfg.screenrc;
environment.systemPackages = [ pkgs.screen ];
};

View File

@ -61,7 +61,7 @@ in
description = "Setup of xfs_quota projects. Make sure the filesystem is mounted with the pquota option.";
example = {
"projname" = {
projname = {
id = 50;
path = "/xfsprojects/projname";
sizeHardLimit = "50g";

View File

@ -45,7 +45,7 @@ in
config = mkIf cfg.enable {
environment.etc."xonshrc".text = cfg.config;
environment.etc.xonshrc.text = cfg.config;
environment.systemPackages = [ cfg.package ];

View File

@ -133,7 +133,7 @@ in
programs.zsh.shellAliases = mapAttrs (name: mkDefault) cfge.shellAliases;
environment.etc."zshenv".text =
environment.etc.zshenv.text =
''
# /etc/zshenv: DO NOT EDIT -- this file has been generated automatically.
# This file is read for all shells.
@ -157,7 +157,7 @@ in
fi
'';
environment.etc."zprofile".text =
environment.etc.zprofile.text =
''
# /etc/zprofile: DO NOT EDIT -- this file has been generated automatically.
# This file is read for login shells.
@ -176,7 +176,7 @@ in
fi
'';
environment.etc."zshrc".text =
environment.etc.zshrc.text =
''
# /etc/zshrc: DO NOT EDIT -- this file has been generated automatically.
# This file is read for interactive shells.
@ -225,7 +225,7 @@ in
fi
'';
environment.etc."zinputrc".source = ./zinputrc;
environment.etc.zinputrc.source = ./zinputrc;
environment.systemPackages = [ pkgs.zsh ]
++ optional cfg.enableCompletion pkgs.nix-zsh-completions;

View File

@ -213,7 +213,7 @@ in
StateDirectoryMode = rights;
WorkingDirectory = "/var/lib/${lpath}";
ExecStart = "${pkgs.simp_le}/bin/simp_le ${escapeShellArgs cmdline}";
ExecStopPost =
ExecStopPost =
let
script = pkgs.writeScript "acme-post-stop" ''
#!${pkgs.runtimeShell} -e
@ -298,6 +298,9 @@ in
};
})
);
systemd.targets.acme-selfsigned-certificates = mkIf cfg.preliminarySelfsigned {};
systemd.targets.acme-certificates = {};
})
];

View File

@ -24,6 +24,6 @@ in
config = mkIf cfg.enable {
environment.systemPackages = [ sandbox ];
security.wrappers."${sandbox.passthru.sandboxExecutableName}".source = "${sandbox}/bin/${sandbox.passthru.sandboxExecutableName}";
security.wrappers.${sandbox.passthru.sandboxExecutableName}.source = "${sandbox}/bin/${sandbox.passthru.sandboxExecutableName}";
};
}

View File

@ -85,7 +85,7 @@ in
security.wrappers = {
pkexec.source = "${pkgs.polkit.bin}/bin/pkexec";
"polkit-agent-helper-1".source = "${pkgs.polkit.out}/lib/polkit-1/polkit-agent-helper-1";
polkit-agent-helper-1.source = "${pkgs.polkit.out}/lib/polkit-1/polkit-agent-helper-1";
};
systemd.tmpfiles.rules = [

View File

@ -4,7 +4,7 @@ with lib;
let
cfg = config.services.prey;
myPrey = pkgs."prey-bash-client".override {
myPrey = pkgs.prey-bash-client.override {
apiKey = cfg.apiKey;
deviceKey = cfg.deviceKey;
};

View File

@ -7,7 +7,7 @@ let
programs =
(lib.mapAttrsToList
(n: v: (if v ? "program" then v else v // {program=n;}))
(n: v: (if v ? program then v else v // {program=n;}))
wrappers);
securityWrapper = pkgs.stdenv.mkDerivation {
@ -74,15 +74,15 @@ let
mkWrappedPrograms =
builtins.map
(s: if (s ? "capabilities")
(s: if (s ? capabilities)
then mkSetcapProgram
({ owner = "root";
group = "root";
} // s)
else if
(s ? "setuid" && s.setuid) ||
(s ? "setgid" && s.setgid) ||
(s ? "permissions")
(s ? setuid && s.setuid) ||
(s ? setgid && s.setgid) ||
(s ? permissions)
then mkSetuidProgram s
else mkSetuidProgram
({ owner = "root";

View File

@ -99,7 +99,7 @@ in
boot.kernelModules = optional config.sound.enableOSSEmulation "snd_pcm_oss";
systemd.services."alsa-store" =
systemd.services.alsa-store =
{ description = "Store Sound Card State";
wantedBy = [ "multi-user.target" ];
unitConfig.RequiresMountsFor = "/var/lib/alsa";

View File

@ -103,7 +103,7 @@ in
}];
systemd = {
timers."mysql-backup" = {
timers.mysql-backup = {
description = "Mysql backup timer";
wantedBy = [ "timers.target" ];
timerConfig = {
@ -112,7 +112,7 @@ in
Unit = "mysql-backup.service";
};
};
services."mysql-backup" = {
services.mysql-backup = {
description = "Mysql backup service";
enable = true;
serviceConfig = {

View File

@ -78,7 +78,7 @@ in
config = mkIf cfg.enable {
inherit assertions;
programs.tsmClient.enable = true;
programs.tsmClient.servers."${cfg.servername}".passwdDir =
programs.tsmClient.servers.${cfg.servername}.passwdDir =
mkDefault "/var/lib/tsm-backup/password";
systemd.services.tsm-backup = {
description = "IBM Spectrum Protect (Tivoli Storage Manager) Backup";

View File

@ -60,7 +60,7 @@ in {
pkgs.lz4
];
systemd.services."zfs-replication" = {
systemd.services.zfs-replication = {
after = [
"zfs-snapshot-daily.service"
"zfs-snapshot-frequent.service"

View File

@ -361,7 +361,7 @@ in
environment.systemPackages = [ pkgs.znapzend ];
systemd.services = {
"znapzend" = {
znapzend = {
description = "ZnapZend - ZFS Backup System";
wantedBy = [ "zfs.target" ];
after = [ "zfs.target" ];

View File

@ -24,7 +24,7 @@ with lib;
config = mkMerge [
(mkIf cfg.hdfs.namenode.enabled {
systemd.services."hdfs-namenode" = {
systemd.services.hdfs-namenode = {
description = "Hadoop HDFS NameNode";
wantedBy = [ "multi-user.target" ];
@ -44,7 +44,7 @@ with lib;
};
})
(mkIf cfg.hdfs.datanode.enabled {
systemd.services."hdfs-datanode" = {
systemd.services.hdfs-datanode = {
description = "Hadoop HDFS DataNode";
wantedBy = [ "multi-user.target" ];

View File

@ -35,7 +35,7 @@ with lib;
})
(mkIf cfg.yarn.resourcemanager.enabled {
systemd.services."yarn-resourcemanager" = {
systemd.services.yarn-resourcemanager = {
description = "Hadoop YARN ResourceManager";
wantedBy = [ "multi-user.target" ];
@ -53,7 +53,7 @@ with lib;
})
(mkIf cfg.yarn.nodemanager.enabled {
systemd.services."yarn-nodemanager" = {
systemd.services.yarn-nodemanager = {
description = "Hadoop YARN NodeManager";
wantedBy = [ "multi-user.target" ];

View File

@ -74,7 +74,7 @@ in {
spec = {
replicas = 1;
revisionHistoryLimit = 10;
selector.matchLabels."k8s-app" = "kubernetes-dashboard";
selector.matchLabels.k8s-app = "kubernetes-dashboard";
template = {
metadata = {
labels = {

View File

@ -73,7 +73,7 @@ in {
metadata = {
labels = {
"addonmanager.kubernetes.io/mode" = "Reconcile";
"k8s-app" = "kube-dns";
k8s-app = "kube-dns";
"kubernetes.io/cluster-service" = "true";
"kubernetes.io/bootstrapping" = "rbac-defaults";
};
@ -102,7 +102,7 @@ in {
};
labels = {
"addonmanager.kubernetes.io/mode" = "Reconcile";
"k8s-app" = "kube-dns";
k8s-app = "kube-dns";
"kubernetes.io/cluster-service" = "true";
"kubernetes.io/bootstrapping" = "rbac-defaults";
};
@ -130,7 +130,7 @@ in {
metadata = {
labels = {
"addonmanager.kubernetes.io/mode" = "Reconcile";
"k8s-app" = "kube-dns";
k8s-app = "kube-dns";
"kubernetes.io/cluster-service" = "true";
};
name = "coredns";
@ -144,7 +144,7 @@ in {
metadata = {
labels = {
"addonmanager.kubernetes.io/mode" = cfg.reconcileMode;
"k8s-app" = "kube-dns";
k8s-app = "kube-dns";
"kubernetes.io/cluster-service" = "true";
};
name = "coredns";
@ -175,7 +175,7 @@ in {
metadata = {
labels = {
"addonmanager.kubernetes.io/mode" = cfg.reconcileMode;
"k8s-app" = "kube-dns";
k8s-app = "kube-dns";
"kubernetes.io/cluster-service" = "true";
"kubernetes.io/name" = "CoreDNS";
};
@ -301,7 +301,7 @@ in {
};
labels = {
"addonmanager.kubernetes.io/mode" = "Reconcile";
"k8s-app" = "kube-dns";
k8s-app = "kube-dns";
"kubernetes.io/cluster-service" = "true";
"kubernetes.io/name" = "CoreDNS";
};

View File

@ -43,7 +43,7 @@ in
###### interface
options = {
services.hydra = rec {
services.hydra = {
enable = mkOption {
type = types.bool;

View File

@ -397,14 +397,14 @@ in {
}
];
users = mkIf (cfg.user == defaultUser) {
extraUsers."${defaultUser}" =
extraUsers.${defaultUser} =
{ group = cfg.group;
home = cfg.homeDir;
createHome = true;
uid = config.ids.uids.cassandra;
description = "Cassandra service user";
};
extraGroups."${defaultUser}".gid = config.ids.gids.cassandra;
extraGroups.${defaultUser}.gid = config.ids.gids.cassandra;
};
systemd.services.cassandra =

View File

@ -59,8 +59,8 @@ in {
type = types.attrsOf types.str;
default = {};
example = {
"nuc-server" = "hostaddr=192.168.0.100 port=5432 dbname=postgres";
"mini-server" = "hostaddr=127.0.0.1 port=5432 dbname=postgres sslmode=require";
nuc-server = "hostaddr=192.168.0.100 port=5432 dbname=postgres";
mini-server = "hostaddr=127.0.0.1 port=5432 dbname=postgres sslmode=require";
};
description = ''
pgmanage requires at least one PostgreSQL server be defined.
@ -192,13 +192,13 @@ in {
};
};
users = {
users."${pgmanage}" = {
users.${pgmanage} = {
name = pgmanage;
group = pgmanage;
home = cfg.sqlRoot;
createHome = true;
};
groups."${pgmanage}" = {
groups.${pgmanage} = {
name = pgmanage;
};
};

View File

@ -202,14 +202,14 @@ in
];
# restart geoclue service when the configuration changes
systemd.services."geoclue".restartTriggers = [
systemd.services.geoclue.restartTriggers = [
config.environment.etc."geoclue/geoclue.conf".source
];
# this needs to run as a user service, since it's associated with the
# user who is making the requests
systemd.user.services = mkIf cfg.enableDemoAgent {
"geoclue-agent" = {
geoclue-agent = {
description = "Geoclue agent";
script = "${package}/libexec/geoclue-2.0/demos/agent";
# this should really be `partOf = [ "geoclue.service" ]`, but
@ -219,12 +219,12 @@ in
};
};
services.geoclue2.appConfig."epiphany" = {
services.geoclue2.appConfig.epiphany = {
isAllowed = true;
isSystem = false;
};
services.geoclue2.appConfig."firefox" = {
services.geoclue2.appConfig.firefox = {
isAllowed = true;
isSystem = false;
};

View File

@ -4,7 +4,7 @@ with lib;
let
cfg = config.services.terraria;
worldSizeMap = { "small" = 1; "medium" = 2; "large" = 3; };
worldSizeMap = { small = 1; medium = 2; large = 3; };
valFlag = name: val: optionalString (val != null) "-${name} \"${escape ["\\" "\""] (toString val)}\"";
boolFlag = name: val: optionalString val "-${name}";
flags = [

View File

@ -124,7 +124,7 @@ in
environment.sessionVariables = env;
services.udev.packages = backends;
users.groups."scanner".gid = config.ids.gids.scanner;
users.groups.scanner.gid = config.ids.gids.scanner;
})
(mkIf config.services.saned.enable {
@ -152,7 +152,7 @@ in
};
};
users.users."scanner" = {
users.users.scanner = {
uid = config.ids.uids.scanner;
group = "scanner";
};

View File

@ -33,7 +33,7 @@ let
addAllNetDev = xs: concatStringsSep "\n" (map addNetDev xs);
in
stdenv.mkDerivation rec {
stdenv.mkDerivation {
name = "brscan4-etc-files-0.4.3-3";
src = "${brscan4}/opt/brother/scanner/brscan4";

View File

@ -20,7 +20,7 @@ in {
config = mkIf cfg.enable {
systemd.packages = [ pkgs.throttled ];
# The upstream package has this in Install, but that's not enough, see the NixOS manual
systemd.services."lenovo_fix".wantedBy = [ "multi-user.target" ];
systemd.services.lenovo_fix.wantedBy = [ "multi-user.target" ];
environment.etc."lenovo_fix.conf".source =
if cfg.extraConfig != ""

View File

@ -60,11 +60,11 @@ in
powerManagement.cpufreq.max = null;
powerManagement.cpufreq.min = null;
systemd.sockets."systemd-rfkill".enable = false;
systemd.sockets.systemd-rfkill.enable = false;
systemd.services = {
"systemd-rfkill@".enable = false;
"systemd-rfkill".enable = false;
systemd-rfkill.enable = false;
tlp = {
description = "TLP system startup/shutdown";

View File

@ -23,9 +23,9 @@ let
flags = "-r ${rulesDir} -c ${configFile} -L ${logFiles} -${levelFlag} -m ${cfg.mailTo}";
levelFlag = getAttrFromPath [cfg.level]
{ "paranoid" = "p";
"server" = "s";
"workstation" = "w";
{ paranoid = "p";
server = "s";
workstation = "w";
};
cronJob = ''

View File

@ -137,7 +137,7 @@ in
${pkgs.postfix}/bin/postmap ${stateDir}/transports
'';
systemd.services."mlmmj-maintd" = {
systemd.services.mlmmj-maintd = {
description = "mlmmj maintenance daemon";
serviceConfig = {
User = cfg.user;
@ -146,7 +146,7 @@ in
};
};
systemd.timers."mlmmj-maintd" = {
systemd.timers.mlmmj-maintd = {
description = "mlmmj maintenance timer";
timerConfig.OnUnitActiveSec = cfg.maintInterval;
wantedBy = [ "timers.target" ];

View File

@ -40,7 +40,7 @@ with lib;
systemPackages = [ pkgs.pfixtools ];
};
systemd.services."pfix-srsd" = {
systemd.services.pfix-srsd = {
description = "Postfix sender rewriting scheme daemon";
before = [ "postfix.service" ];
#note that we use requires rather than wants because postfix

View File

@ -877,22 +877,22 @@ in
}
(mkIf haveAliases {
services.postfix.aliasFiles."aliases" = aliasesFile;
services.postfix.aliasFiles.aliases = aliasesFile;
})
(mkIf haveTransport {
services.postfix.mapFiles."transport" = transportFile;
services.postfix.mapFiles.transport = transportFile;
})
(mkIf haveVirtual {
services.postfix.mapFiles."virtual" = virtualFile;
services.postfix.mapFiles.virtual = virtualFile;
})
(mkIf haveLocalRecipients {
services.postfix.mapFiles."local_recipients" = localRecipientMapFile;
services.postfix.mapFiles.local_recipients = localRecipientMapFile;
})
(mkIf cfg.enableHeaderChecks {
services.postfix.mapFiles."header_checks" = headerChecksFile;
services.postfix.mapFiles.header_checks = headerChecksFile;
})
(mkIf (cfg.dnsBlacklists != []) {
services.postfix.mapFiles."client_access" = checkClientAccessFile;
services.postfix.mapFiles.client_access = checkClientAccessFile;
})
]);
}

View File

@ -7,7 +7,7 @@ with lib; let
natural = with types; addCheck int (x: x >= 0);
natural' = with types; addCheck int (x: x > 0);
socket = with types; addCheck (either (submodule unixSocket) (submodule inetSocket)) (x: x ? "path" || x ? "port");
socket = with types; addCheck (either (submodule unixSocket) (submodule inetSocket)) (x: x ? path || x ? port);
inetSocket = with types; {
options = {
@ -151,7 +151,7 @@ in {
};
systemd.services.postgrey = let
bind-flag = if cfg.socket ? "path" then
bind-flag = if cfg.socket ? path then
''--unix=${cfg.socket.path} --socketmode=${cfg.socket.mode}''
else
''--inet=${optionalString (cfg.socket.addr != null) (cfg.socket.addr + ":")}${toString cfg.socket.port}'';

View File

@ -387,7 +387,7 @@ in
gid = config.ids.gids.rspamd;
};
environment.etc."rspamd".source = rspamdDir;
environment.etc.rspamd.source = rspamdDir;
systemd.services.rspamd = {
description = "Rspamd Service";

View File

@ -138,8 +138,8 @@ in {
services.nginx = mkIf (cfg.virtualHost != null) {
enable = true;
virtualHosts."${cfg.virtualHost}" = {
locations."${cfg.contextPath}".proxyPass = "http://${cfg.listenAddress}:${toString cfg.port}";
virtualHosts.${cfg.virtualHost} = {
locations.${cfg.contextPath}.proxyPass = "http://${cfg.listenAddress}:${toString cfg.port}";
};
};

View File

@ -8,9 +8,9 @@ let
printProperties = properties:
concatMapStrings (propertyName:
let
property = properties."${propertyName}";
property = properties.${propertyName};
in
if isList property then "${propertyName}=(${lib.concatMapStrings (elem: "\"${toString elem}\" ") (properties."${propertyName}")})\n"
if isList property then "${propertyName}=(${lib.concatMapStrings (elem: "\"${toString elem}\" ") (properties.${propertyName})})\n"
else "${propertyName}=\"${toString property}\"\n"
) (builtins.attrNames properties);
@ -31,7 +31,7 @@ let
${concatMapStrings (containerName:
let
containerProperties = cfg.containers."${containerName}";
containerProperties = cfg.containers.${containerName};
in
''
cat > ${containerName} <<EOF
@ -49,10 +49,10 @@ let
${concatMapStrings (componentName:
let
component = cfg.components."${containerName}"."${componentName}";
component = cfg.components.${containerName}.${componentName};
in
"ln -s ${component} ${containerName}/${componentName}\n"
) (builtins.attrNames (cfg.components."${containerName}" or {}))}
) (builtins.attrNames (cfg.components.${containerName} or {}))}
'';
componentsDir = pkgs.stdenv.mkDerivation {

View File

@ -58,7 +58,7 @@ let
};
};
cliOptions = concatStringsSep " " (mapAttrsToList (k: v: "--${k} ${v}") (filterAttrs (k: v: v != null && v != "") (cliOptionsCommon //
cliOptionsPerConfig."${cfg.configType}" //
cliOptionsPerConfig.${cfg.configType} //
s3CommonOptions //
optionalAttrs cfg.s3Backup { s3backup = "true"; } //
optionalAttrs cfg.fileSystemBackup { filesystembackup = "true"; }

View File

@ -140,7 +140,7 @@ let
RAILS_ENV = "production";
};
gitlab-rake = pkgs.stdenv.mkDerivation rec {
gitlab-rake = pkgs.stdenv.mkDerivation {
name = "gitlab-rake";
buildInputs = [ pkgs.makeWrapper ];
dontBuild = true;
@ -155,7 +155,7 @@ let
'';
};
gitlab-rails = pkgs.stdenv.mkDerivation rec {
gitlab-rails = pkgs.stdenv.mkDerivation {
name = "gitlab-rails";
buildInputs = [ pkgs.makeWrapper ];
dontBuild = true;

View File

@ -147,7 +147,7 @@ in
group = cfg.group;
useDefaultShell = true;
};
users.groups."${cfg.group}".gid = config.ids.gids.gitolite;
users.groups.${cfg.group}.gid = config.ids.gids.gitolite;
systemd.tmpfiles.rules = [
"d '${cfg.dataDir}' 0750 ${cfg.user} ${cfg.group} - -"
@ -157,7 +157,7 @@ in
"Z ${cfg.dataDir} 0750 ${cfg.user} ${cfg.group} - -"
];
systemd.services."gitolite-init" = {
systemd.services.gitolite-init = {
description = "Gitolite initialization";
wantedBy = [ "multi-user.target" ];
unitConfig.RequiresMountsFor = cfg.dataDir;

View File

@ -374,7 +374,7 @@ in {
user = cfg.database_user;
database = cfg.database_name;
};
}."${cfg.database_type}";
}.${cfg.database_type};
description = ''
Arguments to pass to the engine.
'';

View File

@ -500,12 +500,12 @@ in
optionals (pkgs.stdenv.isx86_64 && pkgs.hostPlatform.platform ? gcc.arch) (
# a x86_64 builder can run code for `platform.gcc.arch` and minor architectures:
[ "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++ {
"sandybridge" = [ "gccarch-westmere" ];
"ivybridge" = [ "gccarch-westmere" "gccarch-sandybridge" ];
"haswell" = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" ];
"broadwell" = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" "gccarch-haswell" ];
"skylake" = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" "gccarch-haswell" "gccarch-broadwell" ];
"skylake-avx512" = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" "gccarch-haswell" "gccarch-broadwell" "gccarch-skylake" ];
sandybridge = [ "gccarch-westmere" ];
ivybridge = [ "gccarch-westmere" "gccarch-sandybridge" ];
haswell = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" ];
broadwell = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" "gccarch-haswell" ];
skylake = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" "gccarch-haswell" "gccarch-broadwell" ];
skylake-avx512 = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" "gccarch-haswell" "gccarch-broadwell" "gccarch-skylake" ];
}.${pkgs.hostPlatform.platform.gcc.arch} or []
)
);

View File

@ -54,7 +54,7 @@ in
(mkIf (cfg.showManual && cfgd.enable && cfgd.nixos.enable) {
boot.extraTTYs = [ "tty${toString cfg.ttyNumber}" ];
systemd.services."nixos-manual" = {
systemd.services.nixos-manual = {
description = "NixOS Manual";
wantedBy = [ "multi-user.target" ];
serviceConfig = {

View File

@ -9,7 +9,7 @@ in {
meta.maintainers = with lib.maintainers; [ peterhoeg ];
options = {
services.pykms = rec {
services.pykms = {
enable = mkOption {
type = types.bool;
default = false;

View File

@ -44,7 +44,7 @@ in
configs = mkOption {
default = { };
example = literalExample {
"home" = {
home = {
subvolume = "/home";
extraConfig = ''
ALLOW_USERS="alice"

View File

@ -83,7 +83,7 @@ in
config = mkMerge [
(mkIf cfgC.enable {
systemd.user.services."synergy-client" = {
systemd.user.services.synergy-client = {
after = [ "network.target" "graphical-session.target" ];
description = "Synergy client";
wantedBy = optional cfgC.autoStart "graphical-session.target";
@ -93,7 +93,7 @@ in
};
})
(mkIf cfgS.enable {
systemd.user.services."synergy-server" = {
systemd.user.services.synergy-server = {
after = [ "network.target" "graphical-session.target" ];
description = "Synergy server";
wantedBy = optional cfgS.autoStart "graphical-session.target";

View File

@ -11,7 +11,7 @@ let
group = {
nginx = config.services.nginx.group;
none = user;
}."${cfg.webserver}";
}.${cfg.webserver};
useNginx = cfg.webserver == "nginx";
@ -225,7 +225,7 @@ in {
nginx = lib.mkIf useNginx {
enable = true;
virtualHosts = {
"${cfg.hostname}" = {
${cfg.hostname} = {
default = true;
root = "${pkg}/share/zoneminder/www";
listen = [ { addr = "0.0.0.0"; inherit (cfg) port; } ];
@ -312,7 +312,7 @@ in {
};
systemd.services = {
zoneminder = with pkgs; rec {
zoneminder = with pkgs; {
inherit (zoneminder.meta) description;
documentation = [ "https://zoneminder.readthedocs.org/en/latest/" ];
path = [
@ -356,11 +356,11 @@ in {
};
};
users.groups."${user}" = {
users.groups.${user} = {
gid = config.ids.gids.zoneminder;
};
users.users."${user}" = {
users.users.${user} = {
uid = config.ids.uids.zoneminder;
group = user;
inherit home;

View File

@ -184,7 +184,7 @@ in {
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs."dd-agent" pkgs.sysstat pkgs.procps ];
environment.systemPackages = [ pkgs.dd-agent pkgs.sysstat pkgs.procps ];
users.users.datadog = {
description = "Datadog Agent User";

View File

@ -51,7 +51,7 @@ in {
description = "FusionInventory user";
};
systemd.services."fusion-inventory" = {
systemd.services.fusion-inventory = {
description = "Fusion Inventory Agent";
wantedBy = [ "multi-user.target" ];

View File

@ -23,7 +23,7 @@ in
environment.systemPackages = [ pkgs.monit ];
environment.etc."monitrc" = {
environment.etc.monitrc = {
text = cfg.config;
mode = "0400";
};
@ -39,7 +39,7 @@ in
KillMode = "process";
Restart = "always";
};
restartTriggers = [ config.environment.etc."monitrc".source ];
restartTriggers = [ config.environment.etc.monitrc.source ];
};
};

View File

@ -70,14 +70,14 @@ let
} ''json2yaml -i $json -o $out'';
thanos = cmd: "${cfg.package}/bin/thanos ${cmd}" +
(let args = cfg."${cmd}".arguments;
(let args = cfg.${cmd}.arguments;
in optionalString (length args != 0) (" \\\n " +
concatStringsSep " \\\n " args));
argumentsOf = cmd: concatLists (collect isList
(flip mapParamsRecursive params."${cmd}" (path: param:
(flip mapParamsRecursive params.${cmd} (path: param:
let opt = concatStringsSep "." path;
v = getAttrFromPath path cfg."${cmd}";
v = getAttrFromPath path cfg.${cmd};
in param.toArgs opt v)));
mkArgumentsOption = cmd: mkOption {
@ -95,7 +95,7 @@ let
};
mapParamsRecursive =
let noParam = attr: !(attr ? "toArgs" && attr ? "option");
let noParam = attr: !(attr ? toArgs && attr ? option);
in mapAttrsRecursiveCond noParam;
paramsToOptions = mapParamsRecursive (_path: param: param.option);
@ -607,7 +607,7 @@ let
assertRelativeStateDir = cmd: {
assertions = [
{
assertion = !hasPrefix "/" cfg."${cmd}".stateDir;
assertion = !hasPrefix "/" cfg.${cmd}.stateDir;
message =
"The option services.thanos.${cmd}.stateDir should not be an absolute directory." +
" It should be a directory relative to /var/lib.";

View File

@ -135,7 +135,7 @@ in
users.groups.${group} = { };
systemd.services."zabbix-agent" = {
systemd.services.zabbix-agent = {
description = "Zabbix Agent";
wantedBy = [ "multi-user.target" ];

View File

@ -252,7 +252,7 @@ in
fping.source = "${pkgs.fping}/bin/fping";
};
systemd.services."zabbix-proxy" = {
systemd.services.zabbix-proxy = {
description = "Zabbix Proxy";
wantedBy = [ "multi-user.target" ];

View File

@ -237,7 +237,7 @@ in
fping.source = "${pkgs.fping}/bin/fping";
};
systemd.services."zabbix-server" = {
systemd.services.zabbix-server = {
description = "Zabbix Server";
wantedBy = [ "multi-user.target" ];

View File

@ -69,7 +69,7 @@ let
# functions to generate systemd.service entries
systemdEntry = service: cfgFile: (mapAttrs' ( name: cfg:
(nameValuePair "beegfs-${service}-${name}" (mkIf cfg."${service}".enable {
(nameValuePair "beegfs-${service}-${name}" (mkIf cfg.${service}.enable {
wantedBy = [ "multi-user.target" ];
requires = [ "network-online.target" ];
after = [ "network-online.target" ];

View File

@ -355,10 +355,10 @@ in
# Remove all name-value pairs with null values from the attribute set to avoid making empty sections in the ceph.conf
globalSection' = filterAttrs (name: value: value != null) globalSection;
totalConfig = {
"global" = globalSection';
} // optionalAttrs (cfg.mon.enable && cfg.mon.extraConfig != {}) { "mon" = cfg.mon.extraConfig; }
// optionalAttrs (cfg.mds.enable && cfg.mds.extraConfig != {}) { "mds" = cfg.mds.extraConfig; }
// optionalAttrs (cfg.osd.enable && cfg.osd.extraConfig != {}) { "osd" = cfg.osd.extraConfig; }
global = globalSection';
} // optionalAttrs (cfg.mon.enable && cfg.mon.extraConfig != {}) { mon = cfg.mon.extraConfig; }
// optionalAttrs (cfg.mds.enable && cfg.mds.extraConfig != {}) { mds = cfg.mds.extraConfig; }
// optionalAttrs (cfg.osd.enable && cfg.osd.extraConfig != {}) { osd = cfg.osd.extraConfig; }
// optionalAttrs (cfg.client.enable && cfg.client.extraConfig != {}) cfg.client.extraConfig;
in
generators.toINI {} totalConfig;

View File

@ -3,7 +3,7 @@
let
inherit (lib) concatStringsSep mkOption types;
in rec {
in {
mkCellServDB = cellName: db: ''
>${cellName}

View File

@ -234,10 +234,10 @@ in
# Refer to https://github.com/samba-team/samba/tree/master/packaging/systemd
# for correct use with systemd
services = {
"samba-smbd" = daemonService "smbd" "";
"samba-nmbd" = mkIf cfg.enableNmbd (daemonService "nmbd" "");
"samba-winbindd" = mkIf cfg.enableWinbindd (daemonService "winbindd" "");
"samba-setup" = {
samba-smbd = daemonService "smbd" "";
samba-nmbd = mkIf cfg.enableNmbd (daemonService "nmbd" "");
samba-winbindd = mkIf cfg.enableWinbindd (daemonService "winbindd" "");
samba-setup = {
description = "Samba Setup Task";
script = setupScript;
unitConfig.RequiresMountsFor = "/var/lib/samba";

View File

@ -52,7 +52,7 @@ in
example =
{
type = "tunnel";
"split-horizon" = true;
split-horizon = true;
};
};
@ -66,8 +66,8 @@ in
example =
{ enp0s2 =
{ type = "wired";
"hello-interval" = 5;
"split-horizon" = "auto";
hello-interval = 5;
split-horizon = "auto";
};
};
};

View File

@ -82,7 +82,7 @@ in {
environment.systemPackages = [ connman ];
systemd.services."connman" = {
systemd.services.connman = {
description = "Connection service";
wantedBy = [ "multi-user.target" ];
after = [ "syslog.target" ];
@ -95,7 +95,7 @@ in {
};
};
systemd.services."connman-vpn" = mkIf cfg.enableVPN {
systemd.services.connman-vpn = mkIf cfg.enableVPN {
description = "ConnMan VPN service";
wantedBy = [ "multi-user.target" ];
after = [ "syslog.target" ];
@ -108,7 +108,7 @@ in {
};
};
systemd.services."net-connman-vpn" = mkIf cfg.enableVPN {
systemd.services.net-connman-vpn = mkIf cfg.enableVPN {
description = "D-BUS Service";
serviceConfig = {
Name = "net.connman.vpn";

View File

@ -156,7 +156,7 @@ in
config = mkIf cfg.enable (
mkMerge [{
users.users."consul" = {
users.users.consul = {
description = "Consul agent daemon user";
uid = config.ids.uids.consul;
# The shell is needed for health checks

View File

@ -58,7 +58,7 @@ let
${text}
''; in "${dir}/bin/${name}";
defaultInterface = { default = mapAttrs (name: value: cfg."${name}") commonOptions; };
defaultInterface = { default = mapAttrs (name: value: cfg.${name}) commonOptions; };
allInterfaces = defaultInterface // cfg.interfaces;
startScript = writeShScript "firewall-start" ''

View File

@ -115,7 +115,7 @@ in
gid = config.ids.gids.git;
};
systemd.services."git-daemon" = {
systemd.services.git-daemon = {
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
script = "${pkgs.git}/bin/git daemon --reuseaddr "

View File

@ -68,7 +68,7 @@ let
inherit (cfg) spoolAreaPath;
};
sockets."hylafax-hfaxd" = {
sockets.hylafax-hfaxd = {
description = "HylaFAX server socket";
documentation = [ "man:hfaxd(8)" ];
wantedBy = [ "multi-user.target" ];
@ -77,7 +77,7 @@ let
socketConfig.Accept = true;
};
paths."hylafax-faxq" = {
paths.hylafax-faxq = {
description = "HylaFAX queue manager sendq watch";
documentation = [ "man:faxq(8)" "man:sendq(5)" ];
wantedBy = [ "multi-user.target" ];
@ -87,11 +87,11 @@ let
timers = mkMerge [
(
mkIf (cfg.faxcron.enable.frequency!=null)
{ "hylafax-faxcron".timerConfig.Persistent = true; }
{ hylafax-faxcron.timerConfig.Persistent = true; }
)
(
mkIf (cfg.faxqclean.enable.frequency!=null)
{ "hylafax-faxqclean".timerConfig.Persistent = true; }
{ hylafax-faxqclean.timerConfig.Persistent = true; }
)
];
@ -121,7 +121,7 @@ let
in
service: service // { serviceConfig = apply service; };
services."hylafax-spool" = {
services.hylafax-spool = {
description = "HylaFAX spool area preparation";
documentation = [ "man:hylafax-server(4)" ];
script = ''
@ -140,7 +140,7 @@ let
unitConfig.RequiresMountsFor = [ cfg.spoolAreaPath ];
};
services."hylafax-faxq" = {
services.hylafax-faxq = {
description = "HylaFAX queue manager";
documentation = [ "man:faxq(8)" ];
requires = [ "hylafax-spool.service" ];
@ -178,7 +178,7 @@ let
serviceConfig.PrivateNetwork = null;
};
services."hylafax-faxcron" = rec {
services.hylafax-faxcron = rec {
description = "HylaFAX spool area maintenance";
documentation = [ "man:faxcron(8)" ];
after = [ "hylafax-spool.service" ];
@ -194,7 +194,7 @@ let
];
};
services."hylafax-faxqclean" = rec {
services.hylafax-faxqclean = rec {
description = "HylaFAX spool area queue cleaner";
documentation = [ "man:faxqclean(8)" ];
after = [ "hylafax-spool.service" ];

View File

@ -121,7 +121,7 @@ in
users.groups.ircd.gid = config.ids.gids.ircd;
systemd.services."ircd-hybrid" = {
systemd.services.ircd-hybrid = {
description = "IRCD Hybrid server";
after = [ "started networking" ];
wantedBy = [ "multi-user.target" ];

View File

@ -11,7 +11,7 @@ with lib;
let
cfg = config.services.kippo;
in
rec {
{
options = {
services.kippo = {
enable = mkOption {

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