Merge commit 'aee3f2ec9ef6ddea6115097946bc237a5b6ad8d9' into haskell-updates

This commit is contained in:
Wolfgang Walther
2025-10-05 11:43:34 +02:00
1695 changed files with 2832 additions and 3000 deletions
+5
View File
@@ -295,3 +295,8 @@ b1c5cd3e794cdf89daa5e4f0086274a416a1cded
#nixos/nextcloud: remove with lib usage
b6088b0d8e13e8d18464d78935f0130052784658
f7611cad5154a9096faa26d156a4079577bfae17
# nixf-diagnose
90e7159c559021ac4f4cc1222000f08a91feff69 # !autorebase nix-shell --run treefmt
c283f32d296564fd649ef3ed268c1f1f7b199c49 # !autorebase nix-shell --run treefmt
91a8fee3aaf79348aa2dc1552a29fc1b786c5133 # !autorebase nix-shell --run treefmt
+26
View File
@@ -87,6 +87,32 @@ let
"pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml"
];
programs.nixf-diagnose.enable = true;
settings.formatter.nixf-diagnose = {
# Ensure nixfmt cleans up after nixf-diagnose.
priority = -1;
options = [
"--auto-fix"
# Rule names can currently be looked up here:
# https://github.com/nix-community/nixd/blob/main/libnixf/src/Basic/diagnostic.py
# TODO: Remove the following and fix things.
"--ignore=sema-unused-def-lambda-noarg-formal"
"--ignore=sema-unused-def-lambda-witharg-arg"
"--ignore=sema-unused-def-lambda-witharg-formal"
"--ignore=sema-unused-def-let"
# Keep this rule, because we have `lib.or`.
"--ignore=or-identifier"
];
excludes = [
# Auto-generated; violates sema-extra-with
# Can only sensibly be removed when --auto-fix supports multiple fixes at once:
# https://github.com/inclyc/nixf-diagnose/issues/13
"pkgs/servers/home-assistant/component-packages.nix"
# https://github.com/nix-community/nixd/issues/708
"nixos/maintainers/scripts/azure-new/examples/basic/system.nix"
];
};
settings.formatter.editorconfig-checker = {
command = "${pkgs.lib.getExe pkgs.editorconfig-checker}";
options = [ "-disable-indent-size" ];
+5 -5
View File
@@ -22,7 +22,7 @@ let
anyMatchingFiles = files: builtins.any anyMatchingFile files;
attrsWithMaintainers = lib.pipe (changedattrs ++ removedattrs) [
(builtins.map (
(map (
name:
let
# Some packages might be reported as changed on a different platform, but
@@ -46,7 +46,7 @@ let
relevantFilenames =
drv:
(lib.lists.unique (
builtins.map (pos: lib.strings.removePrefix (toString ../..) pos.file) (
map (pos: lib.strings.removePrefix (toString ../..) pos.file) (
builtins.filter (x: x != null) [
((drv.meta or { }).maintainersPosition or null)
((drv.meta or { }).teamsPosition or null)
@@ -73,7 +73,7 @@ let
)
));
attrsWithFilenames = builtins.map (
attrsWithFilenames = map (
pkg: pkg // { filenames = relevantFilenames pkg.package; }
) attrsWithMaintainers;
@@ -81,7 +81,7 @@ let
listToPing = lib.concatMap (
pkg:
builtins.map (maintainer: {
map (maintainer: {
id = maintainer.githubId;
inherit (maintainer) github;
packageName = pkg.name;
@@ -92,7 +92,7 @@ let
byMaintainer = lib.groupBy (ping: toString ping.${if byName then "github" else "id"}) listToPing;
packagesPerMaintainer = lib.attrsets.mapAttrs (
maintainer: packages: builtins.map (pkg: pkg.packageName) packages
maintainer: packages: map (pkg: pkg.packageName) packages
) byMaintainer;
in
packagesPerMaintainer
+2 -2
View File
@@ -66,7 +66,7 @@ rec {
*/
convertToPackagePlatformAttrs =
packagePlatformPaths:
builtins.filter (x: x != null) (builtins.map convertToPackagePlatformAttr packagePlatformPaths);
builtins.filter (x: x != null) (map convertToPackagePlatformAttr packagePlatformPaths);
/*
Converts a list of `packagePlatformPath`s directly to a list of (unique) package names
@@ -91,7 +91,7 @@ rec {
let
packagePlatformAttrs = convertToPackagePlatformAttrs (uniqueStrings packagePlatformPaths);
in
uniqueStrings (builtins.map (p: p.name) packagePlatformAttrs);
uniqueStrings (map (p: p.name) packagePlatformAttrs);
/*
Group a list of `packagePlatformAttr`s by platforms
+1 -1
View File
@@ -95,7 +95,7 @@ let
in
tweak (
(builtins.removeAttrs nixpkgsJobs blacklist)
(removeAttrs nixpkgsJobs blacklist)
// {
nixosTests.simple = nixosJobs.tests.simple;
}
+1 -1
View File
@@ -35,7 +35,7 @@ stdenvNoCC.mkDerivation (
decl:
let
declStr = toString decl;
root = toString (../..);
root = toString ../..;
subpath = lib.removePrefix "/" (lib.removePrefix root declStr);
in
if lib.hasPrefix root declStr then
+2
View File
@@ -126,6 +126,8 @@
- `stalwart-mail` since `0.13.0` "introduces a significant redesign of the MTAs delivery and queueing subsystem". See [the upgrading announcement for the `0.13.0` release](https://github.com/stalwartlabs/stalwart/blob/89b561b5ca1c5a11f2a768b4a2cfef0f473b7a01/UPGRADING.md#upgrading-from-v012x-and-v011x-to-v013x).
- `meilisearch_1_11` has been removed, as it is no longer supported.
- Greetd and its original greeters (`tuigreet`, `gtkgreet`, `qtgreet`, `regreet`, `wlgreet`) were moved from `greetd` namespace to top level (`greetd.tuigreet` -> `tuigreet`, `greetd.greetd` -> `greetd`, etc). The original attrs are available for compatibility as passthrus of `greetd`, but will emit a warning. They will be removed in future releases.
- The `archipelago-minecraft` package was removed, as upstream no longer provides support for the Minecraft APWorld.
+1 -1
View File
@@ -91,7 +91,7 @@
)
];
}
// builtins.removeAttrs args [ "modules" ]
// removeAttrs args [ "modules" ]
);
}
);
+1 -1
View File
@@ -396,7 +396,7 @@ rec {
outputs = drv.outputs or [ "out" ];
commonAttrs =
drv // (listToAttrs outputsList) // ({ all = map (x: x.value) outputsList; }) // passthru;
drv // (listToAttrs outputsList) // { all = map (x: x.value) outputsList; } // passthru;
outputToAttrListElement = outputName: {
name = outputName;
@@ -26,29 +26,29 @@ in
{
imports = [
# Module A
({
{
options.attrsOfModule = attrsOfModule;
options.mergedAttrsOfModule = attrsOfModule;
options.listOfModule = listOfModule;
options.mergedListOfModule = listOfModule;
})
}
# Module B
({
{
options.mergedAttrsOfModule = attrsOfModule;
options.mergedListOfModule = listOfModule;
})
}
# Values
# It is important that the value is defined in a separate module
# Without valueMeta the actual value and sub-options wouldn't be accessible via:
# options.attrsOfModule.type.getSubOptions
({
{
attrsOfModule = {
foo.bar = 42;
};
mergedAttrsOfModule = {
foo.bar = 42;
};
})
}
(
{ options, ... }:
{
@@ -4,9 +4,9 @@ let
in
{
options.number = mkOption {
type = types.submodule ({
type = types.submodule {
freeformType = types.attrsOf (types.either types.int types.int);
});
};
default = {
int = 42;
}; # should not emit a warning
@@ -4,31 +4,31 @@ let
in
{
options.either = mkOption {
type = types.submodule ({
type = types.submodule {
freeformType = (types.either types.int types.int);
});
};
};
options.eitherBehindNullor = mkOption {
type = types.submodule ({
type = types.submodule {
freeformType = types.nullOr (types.either types.int types.int);
});
};
};
options.oneOf = mkOption {
type = types.submodule ({
type = types.submodule {
freeformType = (
types.oneOf [
types.int
types.int
]
);
});
};
};
options.number = mkOption {
type = types.submodule ({
type = types.submodule {
freeformType = (types.number); # either int float
});
};
};
}
@@ -56,7 +56,7 @@ in
default = lib.concatStringsSep " " (
lib.concatLists (
lib.mapAttrsToList (k: v: if k == "_module" then [ ] else [ (lib.showOption v.loc) ]) (
(options.fun.type.getSubOptions [ "fun" ])
options.fun.type.getSubOptions [ "fun" ]
)
)
);
+1 -3
View File
@@ -157,9 +157,7 @@ lib.runTests (
"x86_64-genode"
];
testredox = mseteq redox [ "x86_64-redox" ];
testgnu = mseteq gnu (
linux # ++ kfreebsd ++ ...
);
testgnu = mseteq gnu linux; # ++ kfreebsd ++ ...
testillumos = mseteq illumos [ "x86_64-solaris" ];
testlinux = mseteq linux [
"aarch64-linux"
+9 -9
View File
@@ -14879,6 +14879,12 @@
githubId = 918448;
name = "Anthony Lodi";
};
logger = {
name = "Ido Samuelson";
email = "ido.samuelson@gmail.com";
github = "i-am-logger";
githubId = 1440852;
};
logo = {
email = "logo4poop@protonmail.com";
matrix = "@logo4poop:matrix.org";
@@ -17624,11 +17630,11 @@
name = "Marko Poikonen";
};
mtpham99 = {
name = "Matthew Pham";
email = "mtpham.nixos@protonmail.com";
name = "Matthew T. Pham";
email = "pham.matthew+git@protonmail.com";
github = "mtpham99";
githubId = 72663763;
keys = [ { fingerprint = "DB3E A12D B291 594A 79C5 F6B3 10AB 6868 37F6 FA3F"; } ];
keys = [ { fingerprint = "9656 0514 5815 198E 4EC6 8FCB 7E21 7574 BF8B 385B"; } ];
};
mtreskin = {
email = "zerthurd@gmail.com";
@@ -21620,12 +21626,6 @@
githubId = 1973389;
name = "Reuben D'Netto";
};
realsnick = {
name = "Ido Samuelson";
email = "ido.samuelson@gmail.com";
github = "i-am-logger";
githubId = 1440852;
};
rebmit = {
name = "Lu Wang";
email = "rebmit@rebmit.moe";
@@ -8,7 +8,7 @@ rustPlatform.buildRustPackage {
filter =
name: type:
let
name' = builtins.baseNameOf name;
name' = baseNameOf name;
in
name' != "default.nix" && name' != "target";
};
@@ -65,7 +65,7 @@ let
inherit (pkgs) lib;
# see usage explanation for the input format `files` allows
files' = builtins.map builtins.baseNameOf (if !builtins.isList files then [ files ] else files);
files' = map baseNameOf (if !builtins.isList files then [ files ] else files);
packageSetsWithVersionedHead =
pkgs.haskell.packages
@@ -99,7 +99,7 @@ let
# match the major and minor version of the GHC the config is intended for, if any
configVersion = lib.concatStrings (builtins.match "ghc-([0-9]+).([0-9]+).x" configName);
# return all package sets under haskell.packages matching the version components
setsForVersion = builtins.map (name: packageSetsWithVersionedHead.${name}) (
setsForVersion = map (name: packageSetsWithVersionedHead.${name}) (
builtins.filter (
setName:
lib.hasPrefix "ghc${configVersion}" setName && (skipBinaryGHCs -> !(lib.hasInfix "Binary" setName))
@@ -120,7 +120,7 @@ let
# attribute set that has all the attributes of haskellPackages set to null
availableHaskellPackages = builtins.listToAttrs (
builtins.map (attr: lib.nameValuePair attr null) (builtins.attrNames pkgs.haskellPackages)
map (attr: lib.nameValuePair attr null) (builtins.attrNames pkgs.haskellPackages)
);
# evaluate a configuration and only return the attributes changed by it,
@@ -155,7 +155,7 @@ let
sets = setsForFile fileName;
attrs = overriddenAttrs fileName;
in
lib.concatMap (set: builtins.map (attr: set.${attr}) attrs) sets
lib.concatMap (set: map (attr: set.${attr}) attrs) sets
) files'
);
in
+1 -1
View File
@@ -69,7 +69,7 @@ nixexpr() {
];
in
tweak (builtins.removeAttrs hydraJobs blacklist)
tweak (removeAttrs hydraJobs blacklist)
EONIX
}
+6 -6
View File
@@ -120,7 +120,7 @@ let
let
maintainer =
if !builtins.hasAttr maintainer' lib.maintainers then
builtins.throw "Maintainer with name `${maintainer'} does not exist in `maintainers/maintainer-list.nix`."
throw "Maintainer with name `${maintainer'} does not exist in `maintainers/maintainer-list.nix`."
else
builtins.getAttr maintainer' lib.maintainers;
in
@@ -147,7 +147,7 @@ let
pathContent = lib.attrByPath prefix null pkgs;
in
if pathContent == null then
builtins.throw "Attribute path `${path}` does not exist."
throw "Attribute path `${path}` does not exist."
else
packagesWithPath prefix (path: pkg: (get-script pkg != null)) pathContent;
@@ -158,9 +158,9 @@ let
package = lib.attrByPath (lib.splitString "." path) null pkgs;
in
if package == null then
builtins.throw "Package with an attribute name `${path}` does not exist."
throw "Package with an attribute name `${path}` does not exist."
else if get-script package == null then
builtins.throw "Package with an attribute name `${path}` does not have a `passthru.updateScript` attribute defined."
throw "Package with an attribute name `${path}` does not have a `passthru.updateScript` attribute defined."
else
{
attrPath = path;
@@ -178,7 +178,7 @@ let
else if path != null then
packagesWithUpdateScript path pkgs
else
builtins.throw "No arguments provided.\n\n${helpText}";
throw "No arguments provided.\n\n${helpText}";
helpText = ''
Please run:
@@ -242,7 +242,7 @@ let
name = package.name;
pname = lib.getName package;
oldVersion = lib.getVersion package;
updateScript = map builtins.toString (lib.toList (updateScript.command or updateScript));
updateScript = map toString (lib.toList (updateScript.command or updateScript));
supportedFeatures = updateScript.supportedFeatures or [ ];
attrPath = updateScript.attrPath or attrPath;
};
@@ -216,6 +216,8 @@
- The `services.snapserver` module has been migrated to use the settings option and render a configuration file instead of passing every option over the command line.
- The `services.meilisearch` module now always defaults to the latest version of meilisearch, as the previous `meilisearch_1_11` package was removed. This is only an issue if you were using the old version.
- The `services.postgresql` module now sets up a systemd unit `postgresql.target`. Depending on `postgresql.target` guarantees that postgres is in read-write mode and initial/ensure scripts were executed. Depending on `postgresql.service` only guarantees a read-only connection.
- The `services.mysql` module now restarts the database `on-abnormal`, which means that it now will be restarted in certain situations, it wasn't before. For example an OOM-kill.
+2 -2
View File
@@ -104,7 +104,7 @@ let
in
locatedModules ++ legacyModules;
noUserModules = evalModulesMinimal ({
noUserModules = evalModulesMinimal {
inherit prefix specialArgs;
modules =
baseModules
@@ -113,7 +113,7 @@ let
pkgsModule
modulesModule
];
});
};
# Extra arguments that are useful for constructing a similar configuration.
modulesModule = {
+3 -2
View File
@@ -361,12 +361,13 @@ rec {
}:
let
typeDir =
({
{
system = "system";
initrd = "system";
user = "user";
nspawn = "nspawn";
}).${type};
}
.${type};
in
pkgs.runCommand "${type}-units"
{
+3 -3
View File
@@ -104,9 +104,9 @@ let
optionalString (
config.networking.primaryIPAddress != ""
) "${config.networking.primaryIPAddress} ${hostnames}"
+ optionalString (config.networking.primaryIPv6Address != "") (
"${config.networking.primaryIPv6Address} ${hostnames}"
)
+ optionalString (
config.networking.primaryIPv6Address != ""
) "${config.networking.primaryIPv6Address} ${hostnames}"
);
virtualisation.qemu.options = qemuOptions;
+1 -1
View File
@@ -241,7 +241,7 @@ in
Invalid machine specifications:
''
+ " "
+ (concatStringsSep "\n " (map (m: m.hostName) (filter (badMachine) cfg.buildMachines)));
+ (concatStringsSep "\n " (map (m: m.hostName) (filter badMachine cfg.buildMachines)));
}
];
+1 -1
View File
@@ -8,7 +8,7 @@
}:
{
options = with lib; {
options = {
environment.enableAllTerminfo = lib.mkOption {
default = false;
type = lib.types.bool;
+3 -3
View File
@@ -54,9 +54,9 @@ in
etc = lib.mapAttrs' (
desktop: terminals:
# map desktop name such as GNOME to `xdg/gnome-xdg-terminals.list`, default to `xdg/xdg-terminals.list`
lib.nameValuePair (
"xdg/${if desktop == "default" then "" else "${lib.toLower desktop}-"}xdg-terminals.list"
) { text = lib.concatLines terminals; }
lib.nameValuePair "xdg/${
if desktop == "default" then "" else "${lib.toLower desktop}-"
}xdg-terminals.list" { text = lib.concatLines terminals; }
) cfg.settings;
};
};
+4 -4
View File
@@ -333,7 +333,7 @@ in
lib.mkIf cfg.enabled (
lib.mkMerge [
# Common
({
{
assertions = [
{
assertion = !(nvidiaEnabled && cfg.datacenter.enable);
@@ -388,7 +388,7 @@ in
extraPackages32 = [ nvidia_x11.lib32 ];
};
environment.systemPackages = [ nvidia_x11.bin ];
})
}
# X11
(lib.mkIf nvidiaEnabled {
@@ -709,7 +709,7 @@ in
"L+ /run/nvidia-docker/extras/bin/nvidia-persistenced - - - - ${nvidia_x11.persistenced}/origBin/nvidia-persistenced";
services = lib.mkMerge [
({
{
nvidia-fabricmanager = {
enable = true;
description = "Start NVIDIA NVLink Management";
@@ -736,7 +736,7 @@ in
LimitCORE = "infinity";
};
};
})
}
(lib.mkIf cfg.nvidiaPersistenced {
"nvidia-persistenced" = {
description = "NVIDIA Persistence Daemon";
+1 -1
View File
@@ -114,7 +114,7 @@ in
};
meta = {
maintainers = with lib.maintainers; [ ];
maintainers = [ ];
doc = ./default.md;
};
+1 -1
View File
@@ -117,7 +117,7 @@ in
++ lib.optionals (cfg.quickPhraseFiles != { }) [
(pkgs.linkFarm "quickPhraseFiles" (
lib.mapAttrs' (
name: value: lib.nameValuePair ("share/fcitx5/data/quickphrase.d/${name}.mb") value
name: value: lib.nameValuePair "share/fcitx5/data/quickphrase.d/${name}.mb" value
) cfg.quickPhraseFiles
))
];
+2 -2
View File
@@ -950,7 +950,7 @@ in
let
cfgFiles =
cfg:
lib.optionals cfg.isoImage.showConfiguration ([
lib.optionals cfg.isoImage.showConfiguration [
{
source = cfg.boot.kernelPackages.kernel + "/" + cfg.system.boot.loader.kernelFile;
target = "/boot/" + cfg.boot.kernelPackages.kernel + "/" + cfg.system.boot.loader.kernelFile;
@@ -959,7 +959,7 @@ in
source = cfg.system.build.initialRamdisk + "/" + cfg.system.boot.loader.initrdFile;
target = "/boot/" + cfg.system.build.initialRamdisk + "/" + cfg.system.boot.loader.initrdFile;
}
])
]
++ lib.concatLists (
lib.mapAttrsToList (_: { configuration, ... }: cfgFiles configuration) cfg.specialisation
);
@@ -3,8 +3,6 @@
{ lib, ... }:
with lib;
{
imports = [
./netboot.nix
-2
View File
@@ -3,8 +3,6 @@
{ lib, ... }:
with lib;
{
# Don't start a tty on the serial consoles.
systemd.services."serial-getty@ttyS0".enable = lib.mkDefault false;
+4 -4
View File
@@ -212,18 +212,18 @@ in
''
);
run-builder = hostPkgs.writeShellScriptBin "run-builder" (''
run-builder = hostPkgs.writeShellScriptBin "run-builder" ''
set -euo pipefail
KEYS="''${KEYS:-./keys}"
KEYS="$(${hostPkgs.nix}/bin/nix-store --add "$KEYS")" ${lib.getExe config.system.build.vm}
'');
'';
script = hostPkgs.writeShellScriptBin "create-builder" (''
script = hostPkgs.writeShellScriptBin "create-builder" ''
set -euo pipefail
export KEYS="''${KEYS:-./keys}"
${lib.getExe add-keys}
${lib.getExe run-builder}
'');
'';
in
script.overrideAttrs (old: {
+1 -1
View File
@@ -16,7 +16,7 @@ in
options = {
programs.atop = rec {
programs.atop = {
enable = lib.mkEnableOption "Atop, a tool for monitoring system resources";
+2 -2
View File
@@ -29,7 +29,7 @@ in
config = lib.mkIf cfg.enable (
lib.mkMerge [
# Common
({
{
environment.systemPackages = with pkgs.coolercontrol; [
coolercontrol-gui
];
@@ -46,7 +46,7 @@ in
coolercontrold.wantedBy = [ "multi-user.target" ];
};
};
})
}
# Nvidia support
(lib.mkIf cfg.nvidiaSupport {
+4 -4
View File
@@ -149,7 +149,7 @@ in
languagePacks = lib.mkOption {
# Available languages can be found in https://releases.mozilla.org/pub/firefox/releases/${cfg.package.version}/linux-x86_64/xpi/
type = lib.types.listOf (
lib.types.enum ([
lib.types.enum [
"ach"
"af"
"an"
@@ -253,7 +253,7 @@ in
"xh"
"zh-CN"
"zh-TW"
])
]
);
default = [ ];
description = ''
@@ -285,7 +285,7 @@ in
'';
};
nativeMessagingHosts = ({
nativeMessagingHosts = {
packages = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [ ];
@@ -293,7 +293,7 @@ in
Additional packages containing native messaging hosts that should be made available to Firefox extensions.
'';
};
})
}
// (builtins.mapAttrs (k: v: lib.mkEnableOption "${v.name} support") nmhOptions);
};
+1 -1
View File
@@ -9,7 +9,7 @@ let
cfg = config.programs.fuse;
in
{
meta.maintainers = with lib.maintainers; [ ];
meta.maintainers = [ ];
options.programs.fuse = {
enable = lib.mkEnableOption "fuse" // {
+1 -1
View File
@@ -78,5 +78,5 @@ in
environment.systemPackages = lib.mkIf (!cfg.capSysNice) [ gamescope ];
};
meta.maintainers = with lib.maintainers; [ ];
meta.maintainers = [ ];
}
@@ -80,7 +80,7 @@ in
'';
allowedPatterns =
with lib.types;
lib.mkOption rec {
lib.mkOption {
type = attrsOf Pattern;
description = "The hook config, describing which paths to mount for which system features";
default = { };
+2 -2
View File
@@ -382,8 +382,8 @@ in
ExecStartPre = "${pkgs.coreutils}/bin/rm -f %t/ssh-agent";
ExecStart =
"${cfg.package}/bin/ssh-agent "
+ lib.optionalString (cfg.agentTimeout != null) ("-t ${cfg.agentTimeout} ")
+ lib.optionalString (cfg.agentPKCS11Whitelist != null) ("-P ${cfg.agentPKCS11Whitelist} ")
+ lib.optionalString (cfg.agentTimeout != null) "-t ${cfg.agentTimeout} "
+ lib.optionalString (cfg.agentPKCS11Whitelist != null) "-P ${cfg.agentPKCS11Whitelist} "
+ "-a %t/ssh-agent";
StandardOutput = "null";
Type = "forking";
+16 -16
View File
@@ -280,22 +280,22 @@ let
# skip `null` value
else
[
(
" ${key}${
if value == true then
""
# just output key if value is `true`
else if isInt value then
" ${builtins.toString value}"
else if path.check value then
" \"${value}\""
# enclose path in ".."
else if singleLineStr.check value then
" ${value}"
else
throw "assertion failed: cannot convert type" # should never happen
}"
)
" ${key}${
if value == true then
""
# just output key if value is `true`
else if isInt value then
" ${builtins.toString value}"
else if path.check value then
" \"${value}\""
# enclose path in ".."
else if singleLineStr.check value then
" ${value}"
else
throw "assertion failed: cannot convert type" # should never happen
}"
];
makeDsmSysStanza =
+1 -1
View File
@@ -9,7 +9,7 @@ let
cfg = config.programs.labwc;
in
{
meta.maintainers = with lib.maintainers; [ ];
meta.maintainers = [ ];
options.programs.labwc = {
enable = lib.mkEnableOption "labwc";
+1 -1
View File
@@ -4,7 +4,7 @@
genFinalPackage =
pkg: args:
let
expectedArgs = with lib; lib.naturalSort (lib.attrNames args);
expectedArgs = lib.naturalSort (lib.attrNames args);
existingArgs =
with lib;
naturalSort (intersectLists expectedArgs (attrNames (functionArgs pkg.override)));
+1 -1
View File
@@ -204,5 +204,5 @@ in
]
);
meta.maintainers = with lib.maintainers; [ ];
meta.maintainers = [ ];
}
+1 -1
View File
@@ -10,7 +10,7 @@ let
in
{
options.programs.winbox = {
enable = lib.mkEnableOption ("MikroTik Winbox");
enable = lib.mkEnableOption "MikroTik Winbox";
package = lib.mkPackageOption pkgs "winbox" { };
openFirewall = lib.mkOption {
+1 -1
View File
@@ -27,5 +27,5 @@ in
};
};
meta.maintainers = with lib.maintainers; [ ];
meta.maintainers = [ ];
}
@@ -37,7 +37,7 @@ in
# https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md
type = lib.types.listOf (
lib.types.enum ([
lib.types.enum [
"main"
"brackets"
"pattern"
@@ -45,7 +45,7 @@ in
"regexp"
"root"
"line"
])
]
);
description = ''
+1 -1
View File
@@ -203,7 +203,7 @@ let
# Create hashes for cert data directories based on configuration
# Flags are separated to avoid collisions
hashData =
with builtins;
''
${lib.concatStringsSep " " data.extraLegoFlags} -
${lib.concatStringsSep " " data.extraLegoRunFlags} -
+2 -2
View File
@@ -97,7 +97,7 @@ in
etc."please.ini".source = ini.generate "please.ini" (
cfg.settings
// (rec {
// rec {
# The "root" user is allowed to do anything by default and this cannot
# be overridden.
root_run_as_any = {
@@ -113,7 +113,7 @@ in
root_list_as_any = root_run_as_any // {
type = "list";
};
})
}
);
};
+2 -2
View File
@@ -294,11 +294,11 @@ in
where = parentWrapperDir;
what = "tmpfs";
type = "tmpfs";
options = lib.concatStringsSep "," ([
options = lib.concatStringsSep "," [
"nodev"
"mode=755"
"size=${config.security.wrapperDirSize}"
]);
];
}
];
+4 -4
View File
@@ -157,7 +157,7 @@ in
controls = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule ({
lib.types.submodule {
options.name = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
@@ -187,7 +187,7 @@ in
The maximum volume in dB.
'';
};
})
}
);
default = { };
example = lib.literalExpression ''
@@ -206,7 +206,7 @@ in
cardAliases = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule ({
lib.types.submodule {
options.driver = lib.mkOption {
type = lib.types.str;
description = ''
@@ -220,7 +220,7 @@ in
The ID of the sound card
'';
};
})
}
);
default = { };
example = lib.literalExpression ''
+15 -12
View File
@@ -81,18 +81,21 @@ in
SupplementaryGroups = [ "audio" ];
ExecStart =
"${cfg.package}/bin/gmediarender "
+ lib.optionalString (cfg.audioDevice != null) (
"--gstout-audiodevice=${utils.escapeSystemdExecArg cfg.audioDevice} "
)
+ lib.optionalString (cfg.audioSink != null) (
"--gstout-audiosink=${utils.escapeSystemdExecArg cfg.audioSink} "
)
+ lib.optionalString (cfg.friendlyName != null) (
"--friendly-name=${utils.escapeSystemdExecArg cfg.friendlyName} "
)
+ lib.optionalString (cfg.initialVolume != 0) ("--initial-volume=${toString cfg.initialVolume} ")
+ lib.optionalString (cfg.port != null) ("--port=${toString cfg.port} ")
+ lib.optionalString (cfg.uuid != null) ("--uuid=${utils.escapeSystemdExecArg cfg.uuid} ");
+ lib.optionalString (
cfg.audioDevice != null
) "--gstout-audiodevice=${utils.escapeSystemdExecArg cfg.audioDevice} "
+ lib.optionalString (
cfg.audioSink != null
) "--gstout-audiosink=${utils.escapeSystemdExecArg cfg.audioSink} "
+ lib.optionalString (
cfg.friendlyName != null
) "--friendly-name=${utils.escapeSystemdExecArg cfg.friendlyName} "
+ lib.optionalString (cfg.initialVolume != 0) "--initial-volume=${toString cfg.initialVolume} "
+ lib.optionalString (cfg.port != null) "--port=${toString cfg.port} "
+ lib.optionalString (cfg.uuid != null) "--uuid=${utils.escapeSystemdExecArg cfg.uuid} ";
Restart = "always";
RuntimeDirectory = "gmediarender";
+7 -9
View File
@@ -206,15 +206,13 @@ let
{
nativeBuildInputs = [ pkgs.makeWrapper ];
}
(
with lib;
''
makeWrapper "${original}" "$out/bin/${name}" \
${lib.concatStringsSep " \\\n " (
lib.mapAttrsToList (name: value: ''--set ${name} "${value}"'') set
)}
''
);
''
makeWrapper "${original}" "$out/bin/${name}" \
${lib.concatStringsSep " \\\n " (
lib.mapAttrsToList (name: value: ''--set ${name} "${value}"'') set
)}
'';
# Returns a singleton list, due to usage of lib.optional
mkBorgWrapper =
+42 -44
View File
@@ -31,39 +31,38 @@ let
# datasets.
buildAllowCommand =
permissions: dataset:
(
"-+${pkgs.writeShellScript "zfs-allow-${dataset}" ''
# Here we explicitly use the booted system to guarantee the stable API needed by ZFS
# Run a ZFS list on the dataset to check if it exists
if ${
lib.escapeShellArgs [
"/run/booted-system/sw/bin/zfs"
"list"
dataset
]
} 2> /dev/null; then
"-+${pkgs.writeShellScript "zfs-allow-${dataset}" ''
# Here we explicitly use the booted system to guarantee the stable API needed by ZFS
# Run a ZFS list on the dataset to check if it exists
if ${
lib.escapeShellArgs [
"/run/booted-system/sw/bin/zfs"
"list"
dataset
]
} 2> /dev/null; then
${lib.escapeShellArgs [
"/run/booted-system/sw/bin/zfs"
"allow"
cfg.user
(lib.concatStringsSep "," permissions)
dataset
]}
${lib.optionalString ((builtins.dirOf dataset) != ".") ''
else
${lib.escapeShellArgs [
"/run/booted-system/sw/bin/zfs"
"allow"
cfg.user
(lib.concatStringsSep "," permissions)
dataset
# Remove the last part of the path
(builtins.dirOf dataset)
]}
${lib.optionalString ((builtins.dirOf dataset) != ".") ''
else
${lib.escapeShellArgs [
"/run/booted-system/sw/bin/zfs"
"allow"
cfg.user
(lib.concatStringsSep "," permissions)
# Remove the last part of the path
(builtins.dirOf dataset)
]}
''}
fi
''}"
);
''}
fi
''}";
# Function to build "zfs unallow" commands for the filesystems we've
# delegated permissions to. Here we unallow both the target but also
@@ -73,28 +72,27 @@ let
# since the dataset should have been created at this point.
buildUnallowCommand =
permissions: dataset:
(
"-+${pkgs.writeShellScript "zfs-unallow-${dataset}" ''
# Here we explicitly use the booted system to guarantee the stable API needed by ZFS
${lib.escapeShellArgs [
"-+${pkgs.writeShellScript "zfs-unallow-${dataset}" ''
# Here we explicitly use the booted system to guarantee the stable API needed by ZFS
${lib.escapeShellArgs [
"/run/booted-system/sw/bin/zfs"
"unallow"
cfg.user
(lib.concatStringsSep "," permissions)
dataset
]}
${lib.optionalString ((builtins.dirOf dataset) != ".") (
lib.escapeShellArgs [
"/run/booted-system/sw/bin/zfs"
"unallow"
cfg.user
(lib.concatStringsSep "," permissions)
dataset
]}
${lib.optionalString ((builtins.dirOf dataset) != ".") (
lib.escapeShellArgs [
"/run/booted-system/sw/bin/zfs"
"unallow"
cfg.user
(lib.concatStringsSep "," permissions)
# Remove the last part of the path
(builtins.dirOf dataset)
]
)}
''}"
);
# Remove the last part of the path
(builtins.dirOf dataset)
]
)}
''}";
in
{
@@ -189,13 +189,13 @@ in
services.hadoop.yarnSiteInternal =
with cfg.yarn.nodemanager;
lib.mkMerge [
({
{
"yarn.nodemanager.local-dirs" = lib.mkIf (localDir != null) (concatStringsSep "," localDir);
"yarn.scheduler.maximum-allocation-vcores" = resource.maximumAllocationVCores;
"yarn.scheduler.maximum-allocation-mb" = resource.maximumAllocationMB;
"yarn.nodemanager.resource.cpu-vcores" = resource.cpuVCores;
"yarn.nodemanager.resource.memory-mb" = resource.memoryMB;
})
}
(lib.mkIf useCGroups (
lib.warnIf (lib.versionOlder cfg.package.version "3.5.0")
''
@@ -342,14 +342,12 @@ in
# dns addon is enabled by default
services.kubernetes.addons.dns.enable = lib.mkDefault true;
services.kubernetes.apiserverAddress = lib.mkDefault (
"https://${
if cfg.apiserver.advertiseAddress != null then
cfg.apiserver.advertiseAddress
else
"${cfg.masterAddress}:${toString cfg.apiserver.securePort}"
}"
);
services.kubernetes.apiserverAddress = lib.mkDefault "https://${
if cfg.apiserver.advertiseAddress != null then
cfg.apiserver.advertiseAddress
else
"${cfg.masterAddress}:${toString cfg.apiserver.securePort}"
}";
}
)
];
@@ -137,7 +137,7 @@ in
"@chown"
];
}
// (lib.optionalAttrs (usingDefaultDataDir) {
// (lib.optionalAttrs usingDefaultDataDir {
StateDirectory = "temporal";
StateDirectoryMode = "0700";
});
@@ -110,6 +110,6 @@ in
};
meta = {
maintainers = with lib.maintainers; [ ];
maintainers = [ ];
};
}
@@ -245,7 +245,7 @@ in
pythonPackages = lib.mkOption {
type = lib.types.functionTo (lib.types.listOf lib.types.package);
default = pythonPackages: with pythonPackages; [ ];
default = pythonPackages: [ ];
defaultText = lib.literalExpression "pythonPackages: with pythonPackages; [ ]";
description = "Packages to add the to the PYTHONPATH of the buildbot process.";
example = lib.literalExpression "pythonPackages: with pythonPackages; [ requests ]";
@@ -200,10 +200,10 @@ in
after = [
"network-online.target"
]
++ optionals (wantsDocker) [
++ optionals wantsDocker [
"docker.service"
]
++ optionals (wantsPodman) [
++ optionals wantsPodman [
"podman.service"
];
wantedBy = [
@@ -213,7 +213,7 @@ in
optionalAttrs (instance.token != null) {
TOKEN = "${instance.token}";
}
// optionalAttrs (wantsPodman) {
// optionalAttrs wantsPodman {
DOCKER_HOST = "unix:///run/podman/podman.sock";
}
// {
@@ -266,10 +266,10 @@ in
];
ExecStart = "${cfg.package}/bin/act_runner daemon --config ${configFile}";
SupplementaryGroups =
optionals (wantsDocker) [
optionals wantsDocker [
"docker"
]
++ optionals (wantsPodman) [
++ optionals wantsPodman [
"podman"
];
}
@@ -17,7 +17,7 @@ let
in
{
meta.maintainers = with lib.maintainers; [ ];
meta.maintainers = [ ];
imports = [
(lib.mkRemovedOptionModule [ "services" "chromadb" "logFile" ] ''
@@ -230,7 +230,7 @@ in
'';
type = lib.types.nullOr (
lib.types.submodule ({
lib.types.submodule {
options = {
certificate = lib.mkOption {
type = lib.types.str;
@@ -258,7 +258,7 @@ in
'';
};
};
})
}
);
};
@@ -274,7 +274,7 @@ in
FoundationDB locality settings.
'';
type = lib.types.submodule ({
type = lib.types.submodule {
options = {
machineId = lib.mkOption {
default = null;
@@ -316,7 +316,7 @@ in
'';
};
};
});
};
};
extraReadWritePaths = lib.mkOption {
@@ -12,7 +12,7 @@ let
ldapValueType =
let
# Can't do types.either with multiple non-overlapping submodules, so define our own
singleLdapValueType = lib.mkOptionType rec {
singleLdapValueType = lib.mkOptionType {
name = "LDAP";
# TODO: It would be nice to define a { secret = ...; } option, using
# systemd's LoadCredentials for secrets. That would remove the last
@@ -357,7 +357,7 @@ in
]
) contentsFiles)
++ [ "${openldap}/bin/slaptest -u -F ${configDir}" ];
ExecStart = lib.escapeShellArgs ([
ExecStart = lib.escapeShellArgs [
"${openldap}/libexec/slapd"
"-d"
"0"
@@ -365,7 +365,7 @@ in
configDir
"-h"
(lib.concatStringsSep " " cfg.urlList)
]);
];
Type = "notify";
# Fixes an error where openldap attempts to notify from a thread
# outside the main process:
@@ -42,7 +42,7 @@ let
inherit flashbackEnabled nixos-background-dark nixos-background-light;
};
nixos-background-info = pkgs.writeTextFile rec {
nixos-background-info = pkgs.writeTextFile {
name = "nixos-background-info";
text = ''
<?xml version="1.0"?>
@@ -181,7 +181,7 @@ in
services.gnome.evolution-data-server = {
enable = true;
plugins = with pkgs; [
plugins = [
# TODO: lomiri.address-book-service
];
};
+2 -2
View File
@@ -6,8 +6,8 @@
...
}:
{
meta = with lib; {
maintainers = with lib.maintainers; [ ];
meta = {
maintainers = [ ];
};
###### interface
@@ -136,9 +136,9 @@ let
++ (optional (a.nice != null) "nice=${toString a.nice}")
++ (optional (a.class != null) "sched=${prioToString a.class a.prio}")
++ (optional (a.ioClass != null) "io=${prioToString a.ioClass a.ioPrio}")
++ (optional ((builtins.length a.matchers) != 0) (
++ (optional ((builtins.length a.matchers) != 0)
"{\n${concatStringsSep "\n" (map (m: " ${indent}${m}") a.matchers)}\n${indent}}"
))
)
);
in
+2 -2
View File
@@ -17,8 +17,8 @@ in
(lib.mkRemovedOptionModule [ "services" "tumbler" "package" ] "")
];
meta = with lib; {
maintainers = with lib.maintainers; [ ] ++ lib.teams.pantheon.members;
meta = {
maintainers = [ ] ++ lib.teams.pantheon.members;
};
###### interface
@@ -7,7 +7,7 @@
let
cfg = config.services.athens;
athensConfig = lib.flip lib.recursiveUpdate cfg.extraConfig ({
athensConfig = lib.flip lib.recursiveUpdate cfg.extraConfig {
GoBinary = "${cfg.goBinary}/bin/go";
GoEnv = cfg.goEnv;
GoBinaryEnvVars = lib.mapAttrsToList (k: v: "${k}=${v}") cfg.goBinaryEnvVars;
@@ -141,7 +141,7 @@ let
};
};
};
});
};
configFile = lib.pipe athensConfig [
(lib.filterAttrsRecursive (_k: v: v != null))
+2 -2
View File
@@ -132,7 +132,7 @@ in
hardware.display.outputs = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule ({
lib.types.submodule {
options = {
edid = lib.mkOption {
type = with lib.types; nullOr str;
@@ -161,7 +161,7 @@ in
'';
};
};
})
}
);
description = ''
Hardware/kernel-level configuration of specific outputs.
+2 -2
View File
@@ -370,12 +370,12 @@ in
(
option:
lib.mkRenamedOptionModule
([
[
"services"
"xserver"
"libinput"
option
])
]
[
"services"
"libinput"
+1 -1
View File
@@ -39,7 +39,7 @@ in
###### implementation
config = lib.mkIf cfg.enable {
systemd.services.fluentd = with pkgs; {
systemd.services.fluentd = {
description = "Fluentd Daemon";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
+1 -1
View File
@@ -64,7 +64,7 @@ in
"d '${cfg.stateDir}' - nobody nogroup - -"
];
systemd.services.heartbeat = with pkgs; {
systemd.services.heartbeat = {
description = "heartbeat log shipper";
wantedBy = [ "multi-user.target" ];
preStart = ''
+1 -1
View File
@@ -104,7 +104,7 @@ in
MemoryDenyWriteExecute = true;
PrivateUsers = true;
SupplementaryGroups = lib.optional (allowSystemdJournal) "systemd-journal";
SupplementaryGroups = lib.optional allowSystemdJournal "systemd-journal";
}
// (optionalAttrs (!pkgs.stdenv.hostPlatform.isAarch64) {
# FIXME: figure out why this breaks on aarch64
+2 -2
View File
@@ -165,11 +165,11 @@ in
# Default parameters from https://github.com/knadh/listmonk/blob/master/config.toml.sample
services.listmonk.settings."app".address = lib.mkDefault "localhost:9000";
services.listmonk.settings."db" = lib.mkMerge [
({
{
max_open = lib.mkDefault 25;
max_idle = lib.mkDefault 25;
max_lifetime = lib.mkDefault "300s";
})
}
(lib.mkIf cfg.database.createLocally {
host = lib.mkDefault "/run/postgresql";
port = lib.mkDefault 5432;
+3 -3
View File
@@ -605,7 +605,7 @@ in
];
}
)
({
{
public-inbox-init =
let
PI_CONFIG = gitIni.generate "public-inbox.ini" (
@@ -674,9 +674,9 @@ in
};
}
];
})
}
];
environment.systemPackages = with pkgs; [ cfg.package ];
environment.systemPackages = [ cfg.package ];
};
meta.maintainers = with lib.maintainers; [
julm
+1 -1
View File
@@ -129,7 +129,7 @@ in
config = lib.mkIf cfg.enable {
# backward compatibility: if password is set but not passwordFile, make one.
services.roundcube.database.passwordFile = lib.mkIf (!localDB && cfg.database.password != "") (
lib.mkDefault ("${pkgs.writeText "roundcube-password" cfg.database.password}")
lib.mkDefault "${pkgs.writeText "roundcube-password" cfg.database.password}"
);
warnings =
lib.optional (!localDB && cfg.database.password != "")
@@ -133,7 +133,7 @@ in
in
{
path = "/var/cache/stalwart-mail";
resource = lib.mkIf (hasHttpListener) (lib.mkDefault "file://${cfg.package.webadmin}/webadmin.zip");
resource = lib.mkIf hasHttpListener (lib.mkDefault "file://${cfg.package.webadmin}/webadmin.zip");
};
};
+2 -2
View File
@@ -143,10 +143,10 @@ in
wantedBy = [ "multi-user.target" ];
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
environment = lib.mkMerge ([
environment = lib.mkMerge [
{ CONDUIT_CONFIG = configFile; }
cfg.extraEnvironment
]);
];
serviceConfig = {
DynamicUser = true;
User = "conduit";
@@ -619,5 +619,5 @@ in
}
];
meta.maintainers = with lib.maintainers; [ ];
meta.maintainers = [ ];
}
+4 -4
View File
@@ -232,7 +232,7 @@ let
profileToFiles =
name: profile:
with profile;
lib.mkMerge ([
lib.mkMerge [
{
"xdg/autorandr/${name}/setup".text = lib.concatStringsSep "\n" (
lib.mapAttrsToList fingerprintToString fingerprint
@@ -244,7 +244,7 @@ let
(lib.mapAttrs' (hookToFile "${name}/postswitch.d") hooks.postswitch)
(lib.mapAttrs' (hookToFile "${name}/preswitch.d") hooks.preswitch)
(lib.mapAttrs' (hookToFile "${name}/predetect.d") hooks.predetect)
]);
];
fingerprintToString = name: edid: "${name} ${edid}";
configToString =
name: config:
@@ -373,12 +373,12 @@ in
environment = {
systemPackages = [ pkgs.autorandr ];
etc = lib.mkMerge ([
etc = lib.mkMerge [
(lib.mapAttrs' (hookToFile "postswitch.d") cfg.hooks.postswitch)
(lib.mapAttrs' (hookToFile "preswitch.d") cfg.hooks.preswitch)
(lib.mapAttrs' (hookToFile "predetect.d") cfg.hooks.predetect)
(lib.mkMerge (lib.mapAttrsToList profileToFiles cfg.profiles))
]);
];
};
systemd.services.autorandr = {
+2 -2
View File
@@ -138,7 +138,7 @@ in
# creates gunicorn systemd service for each configured server
systemd.services = lib.mapAttrs' (
name: server:
lib.nameValuePair ("bepasty-server-${name}-gunicorn") ({
lib.nameValuePair "bepasty-server-${name}-gunicorn" {
description = "Bepasty Server ${name}";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
@@ -186,7 +186,7 @@ in
-k gevent
'';
};
})
}
) cfg.servers;
users.users.${user} = {
+2 -2
View File
@@ -7,12 +7,12 @@
let
cfg = config.services.cgminer;
convType = with builtins; v: if lib.isBool v then lib.boolToString v else toString v;
convType = v: if lib.isBool v then lib.boolToString v else toString v;
mergedHwConfig = lib.mapAttrsToList (
n: v: ''"${n}": "${(lib.concatStringsSep "," (map convType v))}"''
) (lib.foldAttrs (n: a: [ n ] ++ a) [ ] cfg.hardware);
mergedConfig =
with builtins;
lib.mapAttrsToList (
n: v: ''"${n}": ${if lib.isBool v then convType v else ''"${convType v}"''}''
) cfg.config;
@@ -127,5 +127,5 @@ in
networking.firewall = lib.mkIf cfg.openFirewall { allowedTCPPorts = [ cfg.port ]; };
};
meta.maintainers = with lib.maintainers; [ ];
meta.maintainers = [ ];
}
+1 -1
View File
@@ -1699,7 +1699,7 @@ in
filteredConfig = filterAttrs (_: v: v != null) cfg.pages.settings;
isSecret = v: isAttrs v && v ? _secret && isString v._secret;
mkPagesKeyValue = lib.generators.toKeyValue {
mkKeyValue = lib.flip lib.generators.mkKeyValueDefault "=" rec {
mkKeyValue = lib.flip lib.generators.mkKeyValueDefault "=" {
mkValueString =
v:
if isInt v then
+1 -1
View File
@@ -178,5 +178,5 @@ in
networking.firewall = lib.mkIf cfg.openFirewall { allowedTCPPorts = [ cfg.port ]; };
};
meta.maintainers = with lib.maintainers; [ ];
meta.maintainers = [ ];
}
+1 -1
View File
@@ -130,5 +130,5 @@ in
time.timeZone = lib.mkDefault "UTC";
};
meta.maintainers = with lib.maintainers; [ ];
meta.maintainers = [ ];
}
+2 -2
View File
@@ -270,9 +270,9 @@ in
PORTUNUS_SLAPD_USER = cfg.ldap.user;
PORTUNUS_SLAPD_SCHEMA_DIR = "${cfg.ldap.package}/etc/schema";
}
// (lib.optionalAttrs (cfg.seedPath != null) ({
// (lib.optionalAttrs (cfg.seedPath != null) {
PORTUNUS_SEED_PATH = cfg.seedPath;
}))
})
// (lib.optionalAttrs cfg.ldap.tls (
let
acmeDirectory = config.security.acme.certs."${cfg.domain}".directory;
+2 -2
View File
@@ -20,10 +20,10 @@ let
cfg = config.services.redlib;
args = concatStringsSep " " ([
args = concatStringsSep " " [
"--port ${toString cfg.port}"
"--address ${cfg.address}"
]);
];
boolToString' = b: if b then "on" else "off";
in
+2 -2
View File
@@ -265,11 +265,11 @@ in
}
// (lib.mapAttrs' (
name: subvolume:
lib.nameValuePair "snapper/configs/${name}" ({
lib.nameValuePair "snapper/configs/${name}" {
text = lib.generators.toKeyValue { inherit mkKeyValue; } (
lib.filterAttrs (k: v: v != defaultOf k) subvolume
);
})
}
) cfg.configs)
// (lib.optionalAttrs (cfg.filters != null) { "snapper/filters/default.txt".text = cfg.filters; });
};
+1 -1
View File
@@ -129,7 +129,7 @@ in
}${
lib.optionalString (cfgS.screenName != "") " -n ${cfgS.screenName}"
}${lib.optionalString cfgS.tls.enable " --enable-crypto"}${
lib.optionalString (cfgS.tls.cert != null) (" --tls-cert ${cfgS.tls.cert}")
lib.optionalString (cfgS.tls.cert != null) " --tls-cert ${cfgS.tls.cert}"
}'';
serviceConfig.Restart = "on-failure";
};
@@ -51,10 +51,9 @@ let
];
};
carbonOpts =
name: with config.ids; ''
--nodaemon --syslog --prefix=${name} --pidfile /run/${name}/${name}.pid ${name}
'';
carbonOpts = name: ''
--nodaemon --syslog --prefix=${name} --pidfile /run/${name}/${name}.pid ${name}
'';
carbonEnv = {
PYTHONPATH =
@@ -355,7 +354,7 @@ in
];
})
(lib.mkIf cfg.web.enable ({
(lib.mkIf cfg.web.enable {
systemd.services.graphiteWeb = {
description = "Graphite Web Interface";
wantedBy = [ "multi-user.target" ];
@@ -416,7 +415,7 @@ in
};
environment.systemPackages = [ pkgs.python3Packages.graphite-web ];
}))
})
(lib.mkIf cfg.seyren.enable {
systemd.services.seyren = {
@@ -11,7 +11,7 @@ let
opt = options.services.parsedmarc;
isSecret = v: isAttrs v && v ? _secret && isString v._secret;
ini = pkgs.formats.ini {
mkKeyValue = lib.flip lib.generators.mkKeyValueDefault "=" rec {
mkKeyValue = lib.flip lib.generators.mkKeyValueDefault "=" {
mkValueString =
v:
if isInt v then
@@ -344,7 +344,7 @@ let
"-m comment --comment ${name}-exporter -j nixos-fw-accept"
]);
networking.firewall.extraInputRules = mkIf (conf.openFirewall && nftables) conf.firewallRules;
systemd.services."prometheus-${name}-exporter" = mkMerge ([
systemd.services."prometheus-${name}-exporter" = mkMerge [
{
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
@@ -381,14 +381,14 @@ let
serviceConfig.UMask = "0077";
}
serviceOpts
]);
];
};
in
{
options.services.prometheus.exporters = mkOption {
type = types.submodule {
options = (mkSubModules);
options = mkSubModules;
imports = [
../../../misc/assertions.nix
(lib.mkRenamedOptionModule [ "unifi-poller" ] [ "unpoller" ])
@@ -49,9 +49,9 @@ in
For more information, take a look at the official documentation
(https://github.com/prometheus-community/json_exporter) of the json_exporter.
'')
({
{
options.warnings = options.warnings;
options.assertions = options.assertions;
})
}
];
}
@@ -83,9 +83,9 @@ in
(mkRemovedOptionModule [ "insecure" ] ''
This option was replaced by 'prometheus.exporters.nginx.sslVerify'.
'')
({
{
options.warnings = options.warnings;
options.assertions = options.assertions;
})
}
];
}
@@ -188,9 +188,9 @@ in
into the cmdline of the exporter making the connection string effectively
world-readable.
'')
({
{
options.warnings = options.warnings;
options.assertions = options.assertions;
})
}
];
}
@@ -18,10 +18,10 @@ in
{
imports = [
(mkRemovedOptionModule [ "interval" ] "This option has been removed.")
({
{
options.warnings = options.warnings;
options.assertions = options.assertions;
})
}
];
port = 9617;
@@ -111,9 +111,9 @@ in
For more information, take a look at the official documentation
(https://github.com/prometheus-community/json_exporter) of the json_exporter.
'')
({
{
options.warnings = options.warnings;
options.assertions = options.assertions;
})
}
];
}
@@ -26,10 +26,10 @@ in
(mkRemovedOptionModule [
"fetchType"
] "This option was removed, use the `unbound.host` option instead.")
({
{
options.warnings = options.warnings;
options.assertions = options.assertions;
})
}
];
port = 9167;

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