treewide: apply nixfmt 1.2.0
This commit is contained in:
@@ -10,7 +10,7 @@ The hook runs in `installCheckPhase`, requiring `doInstallCheck` is enabled for
|
||||
lib,
|
||||
stdenv,
|
||||
udevCheckHook,
|
||||
# ...
|
||||
# ...
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
@@ -9,7 +9,7 @@ You use it like this:
|
||||
lib,
|
||||
stdenv,
|
||||
versionCheckHook,
|
||||
# ...
|
||||
# ...
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
@@ -112,7 +112,7 @@ For example, to propagate a dependency on SDL2 for lockfiles that select the Nim
|
||||
lib,
|
||||
# …
|
||||
SDL2,
|
||||
# …
|
||||
# …
|
||||
}:
|
||||
|
||||
{
|
||||
|
||||
@@ -191,7 +191,7 @@ in
|
||||
if isStringLike path then
|
||||
throw ''lib.fileset.maybeMissing: Argument ("${toString path}") is a string-like value, but it should be a path instead.''
|
||||
else
|
||||
throw ''lib.fileset.maybeMissing: Argument is of type ${typeOf path}, but it should be a path instead.''
|
||||
throw "lib.fileset.maybeMissing: Argument is of type ${typeOf path}, but it should be a path instead."
|
||||
else if !pathExists path then
|
||||
_emptyWithoutBase
|
||||
else
|
||||
@@ -443,7 +443,7 @@ in
|
||||
lib.fileset.toSource: `root` (${toString root}) is a string-like value, but it should be a path instead.
|
||||
Paths in strings are not supported by `lib.fileset`, use `lib.sources` or derivations instead.''
|
||||
else
|
||||
throw ''lib.fileset.toSource: `root` is of type ${typeOf root}, but it should be a path instead.''
|
||||
throw "lib.fileset.toSource: `root` is of type ${typeOf root}, but it should be a path instead."
|
||||
# Currently all Nix paths have the same filesystem root, but this could change in the future.
|
||||
# See also ../path/README.md
|
||||
else if !fileset._internalIsEmptyWithoutBase && rootFilesystemRoot != filesetFilesystemRoot then
|
||||
@@ -453,7 +453,7 @@ in
|
||||
`fileset`: Filesystem root is "${toString filesetFilesystemRoot}"
|
||||
Different filesystem roots are not supported.''
|
||||
else if !pathExists root then
|
||||
throw ''lib.fileset.toSource: `root` (${toString root}) is a path that does not exist.''
|
||||
throw "lib.fileset.toSource: `root` (${toString root}) is a path that does not exist."
|
||||
else if pathType root != "directory" then
|
||||
throw ''
|
||||
lib.fileset.toSource: `root` (${toString root}) is a file, but it should be a directory instead. Potential solutions:
|
||||
@@ -619,7 +619,7 @@ in
|
||||
unions =
|
||||
filesets:
|
||||
if !isList filesets then
|
||||
throw ''lib.fileset.unions: Argument is of type ${typeOf filesets}, but it should be a list instead.''
|
||||
throw "lib.fileset.unions: Argument is of type ${typeOf filesets}, but it should be a list instead."
|
||||
else
|
||||
pipe filesets [
|
||||
# Annotate the elements with context, used by _coerceMany for better errors
|
||||
@@ -808,16 +808,16 @@ in
|
||||
fileFilter =
|
||||
predicate: path:
|
||||
if !isFunction predicate then
|
||||
throw ''lib.fileset.fileFilter: First argument is of type ${typeOf predicate}, but it should be a function instead.''
|
||||
throw "lib.fileset.fileFilter: First argument is of type ${typeOf predicate}, but it should be a function instead."
|
||||
else if !isPath path then
|
||||
if path._type or "" == "fileset" then
|
||||
throw ''
|
||||
lib.fileset.fileFilter: Second argument is a file set, but it should be a path instead.
|
||||
If you need to filter files in a file set, use `intersection fileset (fileFilter pred ./.)` instead.''
|
||||
else
|
||||
throw ''lib.fileset.fileFilter: Second argument is of type ${typeOf path}, but it should be a path instead.''
|
||||
throw "lib.fileset.fileFilter: Second argument is of type ${typeOf path}, but it should be a path instead."
|
||||
else if !pathExists path then
|
||||
throw ''lib.fileset.fileFilter: Second argument (${toString path}) is a path that does not exist.''
|
||||
throw "lib.fileset.fileFilter: Second argument (${toString path}) is a path that does not exist."
|
||||
else
|
||||
_fileFilter predicate path;
|
||||
|
||||
@@ -896,9 +896,9 @@ in
|
||||
lib.fileset.fromSource: The source origin of the argument is a string-like value ("${toString path}"), but it should be a path instead.
|
||||
Sources created from paths in strings cannot be turned into file sets, use `lib.sources` or derivations instead.''
|
||||
else
|
||||
throw ''lib.fileset.fromSource: The source origin of the argument is of type ${typeOf path}, but it should be a path instead.''
|
||||
throw "lib.fileset.fromSource: The source origin of the argument is of type ${typeOf path}, but it should be a path instead."
|
||||
else if !pathExists path then
|
||||
throw ''lib.fileset.fromSource: The source origin (${toString path}) of the argument is a path that does not exist.''
|
||||
throw "lib.fileset.fromSource: The source origin (${toString path}) of the argument is a path that does not exist."
|
||||
else if isFiltered then
|
||||
_fromSourceFilter path source.filter
|
||||
else
|
||||
|
||||
@@ -211,7 +211,7 @@ rec {
|
||||
${context} ("${toString value}") is a string-like value, but it should be a file set or a path instead.
|
||||
Paths represented as strings are not supported by `lib.fileset`, use `lib.sources` or derivations instead.''
|
||||
else
|
||||
error ''${context} is of type ${typeOf value}, but it should be a file set or a path instead.''
|
||||
error "${context} is of type ${typeOf value}, but it should be a file set or a path instead."
|
||||
else if !pathExists value then
|
||||
error ''
|
||||
${context} (${toString value}) is a path that does not exist.
|
||||
|
||||
@@ -239,7 +239,7 @@ in
|
||||
# The subpath string to append
|
||||
subpath:
|
||||
assert assertMsg (isPath path)
|
||||
''lib.path.append: The first argument is of type ${builtins.typeOf path}, but a path was expected'';
|
||||
"lib.path.append: The first argument is of type ${builtins.typeOf path}, but a path was expected";
|
||||
assert assertMsg (isValid subpath) ''
|
||||
lib.path.append: Second argument is not a valid subpath string:
|
||||
${subpathInvalidReason subpath}'';
|
||||
|
||||
@@ -331,7 +331,7 @@ in
|
||||
testAttrs = {
|
||||
expectedError = {
|
||||
type = "ThrownError";
|
||||
msg = ''A definition for option `foo' is not of type `string or signed integer convertible to it.*'';
|
||||
msg = "A definition for option `foo' is not of type `string or signed integer convertible to it.*";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -867,7 +867,7 @@ runTests {
|
||||
|
||||
testEscapeNixIdentifierNoQuote = {
|
||||
expr = strings.escapeNixIdentifier "foo";
|
||||
expected = ''foo'';
|
||||
expected = "foo";
|
||||
};
|
||||
|
||||
testEscapeNixIdentifierNumber = {
|
||||
@@ -2634,7 +2634,7 @@ runTests {
|
||||
sections = {
|
||||
};
|
||||
};
|
||||
expected = '''';
|
||||
expected = "";
|
||||
};
|
||||
|
||||
testToINIWithGlobalSectionGlobalEmptyIsTheSameAsToINI =
|
||||
@@ -3002,12 +3002,12 @@ runTests {
|
||||
|
||||
testToLuaEmptyAttrSet = {
|
||||
expr = generators.toLua { } { };
|
||||
expected = ''{}'';
|
||||
expected = "{}";
|
||||
};
|
||||
|
||||
testToLuaEmptyList = {
|
||||
expr = generators.toLua { } [ ];
|
||||
expected = ''{}'';
|
||||
expected = "{}";
|
||||
};
|
||||
|
||||
testToLuaListOfVariousTypes = {
|
||||
@@ -3052,7 +3052,7 @@ runTests {
|
||||
41
|
||||
43
|
||||
];
|
||||
expected = ''{ 41, 43 }'';
|
||||
expected = "{ 41, 43 }";
|
||||
};
|
||||
|
||||
testToLuaEmptyBindings = {
|
||||
|
||||
@@ -1412,7 +1412,7 @@ rec {
|
||||
else if builtins.isBool v then
|
||||
boolToString v
|
||||
else
|
||||
''<${builtins.typeOf v}>'';
|
||||
"<${builtins.typeOf v}>";
|
||||
in
|
||||
mkOptionType rec {
|
||||
name = "enum";
|
||||
|
||||
@@ -46,7 +46,7 @@ in
|
||||
maintainers = mkOption {
|
||||
type = listOfMaintainers;
|
||||
default = [ ];
|
||||
example = lib.literalExpression ''[ lib.maintainers.alice lib.maintainers.bob ]'';
|
||||
example = lib.literalExpression "[ lib.maintainers.alice lib.maintainers.bob ]";
|
||||
description = ''
|
||||
List of maintainers of each module.
|
||||
This option should be defined at most once per module.
|
||||
|
||||
@@ -82,7 +82,7 @@ Example:
|
||||
{
|
||||
stdenv,
|
||||
nixosTests,
|
||||
# ...
|
||||
# ...
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "example";
|
||||
|
||||
@@ -7,7 +7,7 @@ let
|
||||
common = import ./common.nix;
|
||||
inherit (common) outputPath indexPath;
|
||||
devmode = pkgs.devmode.override {
|
||||
buildArgs = ''${toString ../../release.nix} -A manualHTML.${builtins.currentSystem}'';
|
||||
buildArgs = "${toString ../../release.nix} -A manualHTML.${builtins.currentSystem}";
|
||||
open = "/${outputPath}/${indexPath}";
|
||||
};
|
||||
nixos-render-docs-redirects = pkgs.writeShellScriptBin "redirects" ''${pkgs.lib.getExe pkgs.nixos-render-docs-redirects} --file '${toString ./redirects.json}' "$@"'';
|
||||
|
||||
@@ -347,7 +347,7 @@ let
|
||||
--no-root-passwd \
|
||||
--system ${config.system.build.toplevel} \
|
||||
--substituters "" \
|
||||
${lib.optionalString includeChannel ''--channel ${channelSources}''}
|
||||
${lib.optionalString includeChannel "--channel ${channelSources}"}
|
||||
|
||||
df -h
|
||||
|
||||
|
||||
@@ -330,7 +330,7 @@ let
|
||||
--no-root-passwd \
|
||||
--system ${config.system.build.toplevel} \
|
||||
--substituters "" \
|
||||
${lib.optionalString includeChannel ''--channel ${channelSources}''}
|
||||
${lib.optionalString includeChannel "--channel ${channelSources}"}
|
||||
|
||||
df -h
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ in
|
||||
'';
|
||||
type = types.bool;
|
||||
default = config.node.pkgs != null;
|
||||
defaultText = literalExpression ''node.pkgs != null'';
|
||||
defaultText = literalExpression "node.pkgs != null";
|
||||
};
|
||||
|
||||
node.specialArgs = mkOption {
|
||||
|
||||
@@ -410,7 +410,7 @@ let
|
||||
stringOrDefault (concatStringsSep " | " (
|
||||
imap1 (
|
||||
index: name:
|
||||
''${name} = ($ENV.secret${toString index}${optionalString (!secrets.${name}.quote) " | fromjson"})''
|
||||
"${name} = ($ENV.secret${toString index}${optionalString (!secrets.${name}.quote) " | fromjson"})"
|
||||
) (attrNames secrets)
|
||||
)) "."
|
||||
)
|
||||
|
||||
@@ -62,9 +62,9 @@ let
|
||||
"*" # password unset
|
||||
]);
|
||||
|
||||
overrideOrderMutable = ''{option}`initialHashedPassword` -> {option}`initialPassword` -> {option}`hashedPassword` -> {option}`password` -> {option}`hashedPasswordFile`'';
|
||||
overrideOrderMutable = "{option}`initialHashedPassword` -> {option}`initialPassword` -> {option}`hashedPassword` -> {option}`password` -> {option}`hashedPasswordFile`";
|
||||
|
||||
overrideOrderImmutable = ''{option}`initialHashedPassword` -> {option}`hashedPassword` -> {option}`initialPassword` -> {option}`password` -> {option}`hashedPasswordFile`'';
|
||||
overrideOrderImmutable = "{option}`initialHashedPassword` -> {option}`hashedPassword` -> {option}`initialPassword` -> {option}`password` -> {option}`hashedPasswordFile`";
|
||||
|
||||
overrideOrderText = isMutable: ''
|
||||
If the option {option}`users.mutableUsers` is
|
||||
|
||||
@@ -37,7 +37,7 @@ in
|
||||
|
||||
options.xdg.portal = {
|
||||
enable =
|
||||
mkEnableOption ''[xdg desktop integration](https://github.com/flatpak/xdg-desktop-portal)''
|
||||
mkEnableOption "[xdg desktop integration](https://github.com/flatpak/xdg-desktop-portal)"
|
||||
// {
|
||||
default = false;
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
}:
|
||||
|
||||
{
|
||||
options.hardware.inputmodule.enable = lib.mkEnableOption ''Support for Framework input modules'';
|
||||
options.hardware.inputmodule.enable = lib.mkEnableOption "Support for Framework input modules";
|
||||
|
||||
config = lib.mkIf config.hardware.inputmodule.enable {
|
||||
environment.systemPackages = [ pkgs.inputmodule-control ];
|
||||
|
||||
@@ -228,7 +228,7 @@ in
|
||||
cfg.hostPlatform # make identical, so that `==` equality works; see https://github.com/NixOS/nixpkgs/issues/278001
|
||||
else
|
||||
elaborated;
|
||||
defaultText = lib.literalExpression ''config.nixpkgs.hostPlatform'';
|
||||
defaultText = lib.literalExpression "config.nixpkgs.hostPlatform";
|
||||
description = ''
|
||||
Specifies the platform on which NixOS should be built.
|
||||
By default, NixOS is built on the system where it runs, but you can
|
||||
@@ -252,7 +252,7 @@ in
|
||||
# Make sure that the final value has all fields for sake of other modules
|
||||
# referring to this. TODO make `lib.systems` itself use the module system.
|
||||
apply = lib.systems.elaborate;
|
||||
defaultText = lib.literalExpression ''config.nixpkgs.system'';
|
||||
defaultText = lib.literalExpression "config.nixpkgs.system";
|
||||
description = ''
|
||||
Systems with a recently generated `hardware-configuration.nix`
|
||||
do not need to specify this option, unless cross-compiling, in which case
|
||||
|
||||
@@ -24,7 +24,7 @@ in
|
||||
nixpkgs = {
|
||||
pkgs = mkOption {
|
||||
type = lib.types.pkgs;
|
||||
description = ''The pkgs module argument.'';
|
||||
description = "The pkgs module argument.";
|
||||
};
|
||||
config = mkOption {
|
||||
internal = true;
|
||||
|
||||
@@ -28,7 +28,7 @@ let
|
||||
escapeIfNecessary = s: if needsEscaping s then s else ''"${lib.escape [ "$" "\"" "\\" "`" ] s}"'';
|
||||
attrsToText =
|
||||
attrs:
|
||||
concatStringsSep "\n" (mapAttrsToList (n: v: ''${n}=${escapeIfNecessary (toString v)}'') attrs)
|
||||
concatStringsSep "\n" (mapAttrsToList (n: v: "${n}=${escapeIfNecessary (toString v)}") attrs)
|
||||
+ "\n";
|
||||
|
||||
osReleaseContents =
|
||||
|
||||
@@ -27,15 +27,15 @@ let
|
||||
chromium:
|
||||
concatStringsSep " " [
|
||||
''env XDG_CONFIG_HOME="$PREV_CONFIG_HOME"''
|
||||
''${chromium}/bin/chromium''
|
||||
''--user-data-dir=''${XDG_DATA_HOME:-$HOME/.local/share}/chromium-captive''
|
||||
"${chromium}/bin/chromium"
|
||||
"--user-data-dir=\${XDG_DATA_HOME:-$HOME/.local/share}/chromium-captive"
|
||||
''--proxy-server="socks5://$PROXY"''
|
||||
''--host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE localhost"''
|
||||
''--no-first-run''
|
||||
''--new-window''
|
||||
''--incognito''
|
||||
''-no-default-browser-check''
|
||||
''http://cache.nixos.org/''
|
||||
"--no-first-run"
|
||||
"--new-window"
|
||||
"--incognito"
|
||||
"-no-default-browser-check"
|
||||
"http://cache.nixos.org/"
|
||||
];
|
||||
|
||||
desktopItem = pkgs.makeDesktopItem {
|
||||
|
||||
@@ -22,7 +22,7 @@ in
|
||||
{
|
||||
meta.maintainers = [ lib.maintainers.mic92 ];
|
||||
options.programs.nix-ld = {
|
||||
enable = lib.mkEnableOption ''nix-ld, Documentation: <https://github.com/nix-community/nix-ld>'';
|
||||
enable = lib.mkEnableOption "nix-ld, Documentation: <https://github.com/nix-community/nix-ld>";
|
||||
package = lib.mkPackageOption pkgs "nix-ld" { };
|
||||
libraries = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.package;
|
||||
|
||||
@@ -154,7 +154,7 @@ in
|
||||
''
|
||||
+ lib.concatMapStrings (p: "Include ${p}/etc/apparmor.d\n") cfg.packages;
|
||||
# For aa-logprof
|
||||
environment.etc."apparmor/apparmor.conf".text = '''';
|
||||
environment.etc."apparmor/apparmor.conf".text = "";
|
||||
# For aa-logprof
|
||||
environment.etc."apparmor/severity.db".source = pkgs.apparmor-utils + "/etc/apparmor/severity.db";
|
||||
environment.etc."apparmor/logprof.conf".source =
|
||||
|
||||
@@ -290,12 +290,12 @@ in
|
||||
]
|
||||
(
|
||||
_:
|
||||
''${cfg.tctiEnvironment.interface}:${
|
||||
"${cfg.tctiEnvironment.interface}:${
|
||||
if cfg.tctiEnvironment.interface == "tabrmd" then
|
||||
cfg.tctiEnvironment.tabrmdConf
|
||||
else
|
||||
cfg.tctiEnvironment.deviceConf
|
||||
}''
|
||||
}"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -411,7 +411,7 @@ in
|
||||
lib.concatStringsSep "\n" (
|
||||
lib.imap0 (
|
||||
i: c:
|
||||
''${pkgs.replace-secret}/bin/replace-secret '{{password-${toString i}}}' '${c.passwordFile}' /run/mpd/mpd.conf''
|
||||
"${pkgs.replace-secret}/bin/replace-secret '{{password-${toString i}}}' '${c.passwordFile}' /run/mpd/mpd.conf"
|
||||
) cfg.credentials
|
||||
)
|
||||
);
|
||||
|
||||
@@ -64,7 +64,7 @@ let
|
||||
secretFile: placeholder: targetFile:
|
||||
lib.optionalString (
|
||||
secretFile != null
|
||||
) ''${pkgs.replace-secret}/bin/replace-secret '${placeholder}' '${secretFile}' '${targetFile}' '';
|
||||
) "${pkgs.replace-secret}/bin/replace-secret '${placeholder}' '${secretFile}' '${targetFile}' ";
|
||||
|
||||
preStart = pkgs.writeShellScript "mpdscribble-pre-start" ''
|
||||
cp -f "${cfgTemplate}" "${cfgFile}"
|
||||
|
||||
@@ -35,7 +35,7 @@ let
|
||||
let
|
||||
a = cfg.tcp.anonymousClients.allowedIpRanges;
|
||||
in
|
||||
lib.optional (a != [ ]) ''auth-ip-acl=${lib.concatStringsSep ";" a}'';
|
||||
lib.optional (a != [ ]) "auth-ip-acl=${lib.concatStringsSep ";" a}";
|
||||
port = lib.optional (!(isNull cfg.tcp.port)) "port=${toString cfg.tcp.port}";
|
||||
in
|
||||
pkgs.writeTextFile {
|
||||
|
||||
@@ -255,7 +255,7 @@ in
|
||||
runCheck = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = builtins.length config.services.restic.backups.${name}.checkOpts > 0;
|
||||
defaultText = lib.literalExpression ''builtins.length config.services.backups.${name}.checkOpts > 0'';
|
||||
defaultText = lib.literalExpression "builtins.length config.services.backups.${name}.checkOpts > 0";
|
||||
description = "Whether to run the `check` command with the provided `checkOpts` options.";
|
||||
example = true;
|
||||
};
|
||||
|
||||
@@ -240,7 +240,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
recursive = lib.mkEnableOption ''the transfer of child datasets'';
|
||||
recursive = lib.mkEnableOption "the transfer of child datasets";
|
||||
|
||||
sshKey = lib.mkOption {
|
||||
type = with lib.types; nullOr (coercedTo path toString str);
|
||||
|
||||
@@ -246,8 +246,8 @@ in
|
||||
--datadir ${cfg.beacon.dataDir}/${cfg.network} \
|
||||
--execution-endpoint http://${cfg.beacon.execution.address}:${toString cfg.beacon.execution.port} \
|
||||
--execution-jwt ''${CREDENTIALS_DIRECTORY}/LIGHTHOUSE_JWT \
|
||||
${lib.optionalString cfg.beacon.http.enable ''--http --http-address ${cfg.beacon.http.address} --http-port ${toString cfg.beacon.http.port}''} \
|
||||
${lib.optionalString cfg.beacon.metrics.enable ''--metrics --metrics-address ${cfg.beacon.metrics.address} --metrics-port ${toString cfg.beacon.metrics.port}''} \
|
||||
${lib.optionalString cfg.beacon.http.enable "--http --http-address ${cfg.beacon.http.address} --http-port ${toString cfg.beacon.http.port}"} \
|
||||
${lib.optionalString cfg.beacon.metrics.enable "--metrics --metrics-address ${cfg.beacon.metrics.address} --metrics-port ${toString cfg.beacon.metrics.port}"} \
|
||||
${cfg.extraArgs} ${cfg.beacon.extraArgs}
|
||||
'';
|
||||
serviceConfig = {
|
||||
@@ -292,7 +292,7 @@ in
|
||||
--network ${cfg.network} \
|
||||
--beacon-nodes ${lib.concatStringsSep "," cfg.validator.beaconNodes} \
|
||||
--datadir ${cfg.validator.dataDir}/${cfg.network} \
|
||||
${lib.optionalString cfg.validator.metrics.enable ''--metrics --metrics-address ${cfg.validator.metrics.address} --metrics-port ${toString cfg.validator.metrics.port}''} \
|
||||
${lib.optionalString cfg.validator.metrics.enable "--metrics --metrics-address ${cfg.validator.metrics.address} --metrics-port ${toString cfg.validator.metrics.port}"} \
|
||||
${cfg.extraArgs} ${cfg.validator.extraArgs}
|
||||
'';
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ in
|
||||
enable = lib.mkEnableOption "flannel networking";
|
||||
|
||||
openFirewallPorts = lib.mkOption {
|
||||
description = ''Whether to open the Flannel UDP ports in the firewall on all interfaces.'';
|
||||
description = "Whether to open the Flannel UDP ports in the firewall on all interfaces.";
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
|
||||
@@ -116,7 +116,7 @@ in
|
||||
type = lib.types.path;
|
||||
description = "Optionally pass master.cfg path. Other options in this configuration will be ignored.";
|
||||
default = defaultMasterCfg;
|
||||
defaultText = lib.literalMD ''generated configuration file'';
|
||||
defaultText = lib.literalMD "generated configuration file";
|
||||
example = "/etc/nixos/buildbot/master.cfg";
|
||||
};
|
||||
|
||||
|
||||
@@ -728,7 +728,7 @@ in
|
||||
mapAttrsToList
|
||||
(
|
||||
name: serviceConfig:
|
||||
''`services.gitlab-runner.services.${name}.protected` with runner authentication tokens has no effect and will be ignored. Please remove it from your configuration.''
|
||||
"`services.gitlab-runner.services.${name}.protected` with runner authentication tokens has no effect and will be ignored. Please remove it from your configuration."
|
||||
)
|
||||
(
|
||||
filterAttrs (
|
||||
@@ -740,7 +740,7 @@ in
|
||||
mapAttrsToList
|
||||
(
|
||||
name: serviceConfig:
|
||||
''`services.gitlab-runner.services.${name}.runUntagged` with runner authentication tokens has no effect and will be ignored. Please remove it from your configuration.''
|
||||
"`services.gitlab-runner.services.${name}.runUntagged` with runner authentication tokens has no effect and will be ignored. Please remove it from your configuration."
|
||||
)
|
||||
(
|
||||
filterAttrs (
|
||||
@@ -752,7 +752,7 @@ in
|
||||
mapAttrsToList
|
||||
(
|
||||
name: v:
|
||||
''`services.gitlab-runner.services.${name}.maximumTimeout` with runner authentication tokens has no effect and will be ignored. Please remove it from your configuration.''
|
||||
"`services.gitlab-runner.services.${name}.maximumTimeout` with runner authentication tokens has no effect and will be ignored. Please remove it from your configuration."
|
||||
)
|
||||
(
|
||||
filterAttrs (
|
||||
@@ -764,7 +764,7 @@ in
|
||||
mapAttrsToList
|
||||
(
|
||||
name: v:
|
||||
''`services.gitlab-runner.services.${name}.tagList` with runner authentication tokens has no effect and will be ignored. Please remove it from your configuration.''
|
||||
"`services.gitlab-runner.services.${name}.tagList` with runner authentication tokens has no effect and will be ignored. Please remove it from your configuration."
|
||||
)
|
||||
(
|
||||
filterAttrs (
|
||||
|
||||
@@ -191,7 +191,7 @@ in
|
||||
// {
|
||||
NIX_REMOTE = "daemon";
|
||||
AGENT_WORK_DIR = cfg.workDir;
|
||||
AGENT_STARTUP_ARGS = ''${lib.concatStringsSep " " cfg.startupOptions}'';
|
||||
AGENT_STARTUP_ARGS = "${lib.concatStringsSep " " cfg.startupOptions}";
|
||||
LOG_DIR = cfg.workDir;
|
||||
LOG_FILE = "${cfg.workDir}/go-agent-start.log";
|
||||
}
|
||||
|
||||
@@ -205,10 +205,10 @@ in
|
||||
'';
|
||||
|
||||
environment = {
|
||||
ERL_FLAGS = ''-couch_ini ${lib.concatStringsSep " " configFiles}'';
|
||||
ERL_FLAGS = "-couch_ini ${lib.concatStringsSep " " configFiles}";
|
||||
# 5. the vm.args file
|
||||
COUCHDB_ARGS_FILE = ''${cfg.argsFile}'';
|
||||
HOME = ''${cfg.databaseDir}'';
|
||||
COUCHDB_ARGS_FILE = "${cfg.argsFile}";
|
||||
HOME = "${cfg.databaseDir}";
|
||||
};
|
||||
|
||||
serviceConfig = {
|
||||
|
||||
@@ -312,7 +312,7 @@ in
|
||||
|
||||
settings = mkOption {
|
||||
default = { };
|
||||
description = ''configuration options for influxdb2, see <https://docs.influxdata.com/influxdb/v2.0/reference/config-options> for details.'';
|
||||
description = "configuration options for influxdb2, see <https://docs.influxdata.com/influxdb/v2.0/reference/config-options> for details.";
|
||||
type = format.type;
|
||||
};
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ in
|
||||
|
||||
filterFile = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
description = ''Filename for the include exclude filter.'';
|
||||
description = "Filename for the include exclude filter.";
|
||||
default = null;
|
||||
example = lib.literalExpression ''
|
||||
pkgs.writeText "filterFile" '''
|
||||
@@ -285,7 +285,7 @@ in
|
||||
|
||||
robotsFile = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
description = ''Provides /robots.txt for net crawlers.'';
|
||||
description = "Provides /robots.txt for net crawlers.";
|
||||
default = null;
|
||||
example = lib.literalExpression ''pkgs.writeText "robots.txt" "# my custom robots.txt ..."'';
|
||||
};
|
||||
@@ -956,7 +956,7 @@ in
|
||||
serviceConfig = {
|
||||
Restart = "on-abnormal";
|
||||
Nice = 5;
|
||||
ExecStart = ''${cfg.package}/bin/athens -config_file=${configFile}'';
|
||||
ExecStart = "${cfg.package}/bin/athens -config_file=${configFile}";
|
||||
|
||||
KillMode = "mixed";
|
||||
KillSignal = "SIGINT";
|
||||
|
||||
@@ -47,7 +47,7 @@ in
|
||||
{
|
||||
options = {
|
||||
services.freeciv = {
|
||||
enable = lib.mkEnableOption ''freeciv'';
|
||||
enable = lib.mkEnableOption "freeciv";
|
||||
settings = lib.mkOption {
|
||||
description = ''
|
||||
Parameters of freeciv-server.
|
||||
|
||||
@@ -17,9 +17,9 @@ let
|
||||
command,
|
||||
...
|
||||
}:
|
||||
''${
|
||||
"${
|
||||
lib.concatMapStringsSep "+" toString keys
|
||||
}:${lib.concatStringsSep "," events}:${lib.concatStringsSep "," attributes}:${command}''
|
||||
}:${lib.concatStringsSep "," events}:${lib.concatStringsSep "," attributes}:${command}"
|
||||
) cfg.bindings}
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
|
||||
@@ -23,7 +23,7 @@ in
|
||||
'';
|
||||
|
||||
overdrive = {
|
||||
enable = lib.mkEnableOption ''`amdgpu` overdrive mode for overclocking'';
|
||||
enable = lib.mkEnableOption "`amdgpu` overdrive mode for overclocking";
|
||||
|
||||
ppfeaturemask = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
@@ -39,7 +39,7 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
opencl.enable = lib.mkEnableOption ''OpenCL support using ROCM runtime library'';
|
||||
opencl.enable = lib.mkEnableOption "OpenCL support using ROCM runtime library";
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
@@ -65,10 +65,10 @@ in
|
||||
{
|
||||
imports = [
|
||||
(lib.mkRemovedOptionModule [ "services" "keyd" "ids" ]
|
||||
''Use keyboards.<filename>.ids instead. If you don't need a multi-file configuration, just add keyboards.default before the ids. See https://github.com/NixOS/nixpkgs/pull/243271.''
|
||||
"Use keyboards.<filename>.ids instead. If you don't need a multi-file configuration, just add keyboards.default before the ids. See https://github.com/NixOS/nixpkgs/pull/243271."
|
||||
)
|
||||
(lib.mkRemovedOptionModule [ "services" "keyd" "settings" ]
|
||||
''Use keyboards.<filename>.settings instead. If you don't need a multi-file configuration, just add keyboards.default before the settings. See https://github.com/NixOS/nixpkgs/pull/243271.''
|
||||
"Use keyboards.<filename>.settings instead. If you don't need a multi-file configuration, just add keyboards.default before the settings. See https://github.com/NixOS/nixpkgs/pull/243271."
|
||||
)
|
||||
];
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
assertion =
|
||||
((builtins.length config.hardware.nvidia-container-toolkit.csv-files) > 0)
|
||||
-> config.hardware.nvidia-container-toolkit.discovery-mode == "csv";
|
||||
message = ''When CSV files are provided, `config.hardware.nvidia-container-toolkit.discovery-mode` has to be set to `csv`.'';
|
||||
message = "When CSV files are provided, `config.hardware.nvidia-container-toolkit.discovery-mode` has to be set to `csv`.";
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ let
|
||||
cmd,
|
||||
...
|
||||
}:
|
||||
''${lib.concatMapStringsSep "+" (x: "KEY_" + x) keys} ${
|
||||
"${lib.concatMapStringsSep "+" (x: "KEY_" + x) keys} ${
|
||||
toString
|
||||
{
|
||||
press = 1;
|
||||
@@ -26,7 +26,7 @@ let
|
||||
release = 0;
|
||||
}
|
||||
.${event}
|
||||
} ${cmd}''
|
||||
} ${cmd}"
|
||||
) cfg.bindings}
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
|
||||
@@ -134,7 +134,7 @@ let
|
||||
ssl_cert = <${cfg.sslServerCert}
|
||||
ssl_key = <${cfg.sslServerKey}
|
||||
${optionalString (cfg.sslCACert != null) ("ssl_ca = <" + cfg.sslCACert)}
|
||||
${optionalString cfg.enableDHE ''ssl_dh = <${config.security.dhparams.params.dovecot2.path}''}
|
||||
${optionalString cfg.enableDHE "ssl_dh = <${config.security.dhparams.params.dovecot2.path}"}
|
||||
disable_plaintext_auth = yes
|
||||
''
|
||||
)
|
||||
|
||||
@@ -176,7 +176,7 @@ in
|
||||
hostname = lib.mkOption {
|
||||
default = "localhost";
|
||||
type = with lib.types; uniq str;
|
||||
example = ''example.com'';
|
||||
example = "example.com";
|
||||
description = ''
|
||||
Hostname to use. It should be FQDN.
|
||||
'';
|
||||
@@ -185,7 +185,7 @@ in
|
||||
primaryDomain = lib.mkOption {
|
||||
default = "localhost";
|
||||
type = with lib.types; uniq str;
|
||||
example = ''mail.example.com'';
|
||||
example = "mail.example.com";
|
||||
description = ''
|
||||
Primary MX domain to use. It should be FQDN.
|
||||
'';
|
||||
|
||||
@@ -202,9 +202,9 @@ in
|
||||
if cfg.socket ? path then
|
||||
"--unix=${cfg.socket.path} --socketmode=${cfg.socket.mode}"
|
||||
else
|
||||
''--inet=${
|
||||
"--inet=${
|
||||
optionalString (cfg.socket.addr != null) (cfg.socket.addr + ":")
|
||||
}${toString cfg.socket.port}'';
|
||||
}${toString cfg.socket.port}";
|
||||
in
|
||||
{
|
||||
description = "Postfix Greylisting Service";
|
||||
|
||||
@@ -223,7 +223,7 @@ in
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = ''${pkgs.mjolnir}/bin/mjolnir --mjolnir-config ./config/default.yaml'';
|
||||
ExecStart = "${pkgs.mjolnir}/bin/mjolnir --mjolnir-config ./config/default.yaml";
|
||||
ExecStartPre = [ generateConfig ];
|
||||
WorkingDirectory = cfg.dataPath;
|
||||
StateDirectory = "mjolnir";
|
||||
|
||||
@@ -40,7 +40,7 @@ let
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = ''${pkgs.pantalaimon-headless}/bin/pantalaimon --config ${mkConfigFile name instanceConfig} --data-path ${instanceConfig.dataPath}'';
|
||||
ExecStart = "${pkgs.pantalaimon-headless}/bin/pantalaimon --config ${mkConfigFile name instanceConfig} --data-path ${instanceConfig.dataPath}";
|
||||
Restart = "on-failure";
|
||||
DynamicUser = true;
|
||||
NoNewPrivileges = true;
|
||||
|
||||
@@ -37,9 +37,9 @@ in
|
||||
args = synapseConfig.settings.database.args;
|
||||
in
|
||||
if synapseConfig.enable then
|
||||
''postgresql://${args.user}${lib.optionalString (args ? password) (":" + args.password)}@${
|
||||
"postgresql://${args.user}${lib.optionalString (args ? password) (":" + args.password)}@${
|
||||
lib.escapeURL (if (args ? host) then args.host else "/run/postgresql")
|
||||
}${lib.optionalString (args ? port) (":" + args.port)}/${args.database}''
|
||||
}${lib.optionalString (args ? port) (":" + args.port)}/${args.database}"
|
||||
else
|
||||
null;
|
||||
defaultText = lib.literalExpression ''
|
||||
|
||||
@@ -31,7 +31,7 @@ let
|
||||
# export passwords in environment variables in plaintext.
|
||||
${concatMapStringsSep "\n" (
|
||||
x:
|
||||
''export SYNC_USER${toString x.i}=${escapeShellArg x.user.username}:${escapeShellArg x.user.password}''
|
||||
"export SYNC_USER${toString x.i}=${escapeShellArg x.user.username}:${escapeShellArg x.user.password}"
|
||||
) usersWithIndexesNoFile}
|
||||
exec ${lib.getExe cfg.package}
|
||||
'';
|
||||
|
||||
@@ -166,15 +166,15 @@ in
|
||||
imports = [
|
||||
(lib.mkRenamedOptionModule
|
||||
[ "services" "apache-kafka" "brokerId" ]
|
||||
[ "services" "apache-kafka" "settings" ''broker.id'' ]
|
||||
[ "services" "apache-kafka" "settings" "broker.id" ]
|
||||
)
|
||||
(lib.mkRenamedOptionModule
|
||||
[ "services" "apache-kafka" "logDirs" ]
|
||||
[ "services" "apache-kafka" "settings" ''log.dirs'' ]
|
||||
[ "services" "apache-kafka" "settings" "log.dirs" ]
|
||||
)
|
||||
(lib.mkRenamedOptionModule
|
||||
[ "services" "apache-kafka" "zookeeper" ]
|
||||
[ "services" "apache-kafka" "settings" ''zookeeper.connect'' ]
|
||||
[ "services" "apache-kafka" "settings" "zookeeper.connect" ]
|
||||
)
|
||||
|
||||
(lib.mkRemovedOptionModule [
|
||||
|
||||
@@ -136,7 +136,7 @@ in
|
||||
'';
|
||||
};
|
||||
wakeup_cmd = mkOption {
|
||||
default = ''sh -c 'echo 0 > /sys/class/rtc/rtc0/wakealarm && echo {timestamp:.0f} > /sys/class/rtc/rtc0/wakealarm' '';
|
||||
default = "sh -c 'echo 0 > /sys/class/rtc/rtc0/wakealarm && echo {timestamp:.0f} > /sys/class/rtc/rtc0/wakealarm' ";
|
||||
type = with types; str;
|
||||
description = ''
|
||||
The command to execute for scheduling a wake up of the system. The given string is
|
||||
@@ -232,7 +232,7 @@ in
|
||||
after = [ "network.target" ];
|
||||
path = flatten (attrValues (filterAttrs (n: _: hasCheck n) dependenciesForChecks));
|
||||
serviceConfig = {
|
||||
ExecStart = ''${autosuspend}/bin/autosuspend -l ${autosuspend}/etc/autosuspend-logging.conf -c ${autosuspend-conf} daemon'';
|
||||
ExecStart = "${autosuspend}/bin/autosuspend -l ${autosuspend}/etc/autosuspend-logging.conf -c ${autosuspend-conf} daemon";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -242,7 +242,7 @@ in
|
||||
wantedBy = [ "sleep.target" ];
|
||||
after = [ "sleep.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = ''${autosuspend}/bin/autosuspend -l ${autosuspend}/etc/autosuspend-logging.conf -c ${autosuspend-conf} presuspend'';
|
||||
ExecStart = "${autosuspend}/bin/autosuspend -l ${autosuspend}/etc/autosuspend-logging.conf -c ${autosuspend-conf} presuspend";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ let
|
||||
in
|
||||
{
|
||||
options.services.evdevremapkeys = {
|
||||
enable = lib.mkEnableOption ''evdevremapkeys, a daemon to remap events on linux input devices'';
|
||||
enable = lib.mkEnableOption "evdevremapkeys, a daemon to remap events on linux input devices";
|
||||
|
||||
settings = lib.mkOption {
|
||||
type = format.type;
|
||||
|
||||
@@ -11,19 +11,19 @@ in
|
||||
meta.maintainers = [ lib.maintainers.camillemndn ];
|
||||
|
||||
options.services.jellyseerr = {
|
||||
enable = lib.mkEnableOption ''Jellyseerr, a requests manager for Jellyfin'';
|
||||
enable = lib.mkEnableOption "Jellyseerr, a requests manager for Jellyfin";
|
||||
package = lib.mkPackageOption pkgs "jellyseerr" { };
|
||||
|
||||
openFirewall = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''Open port in the firewall for the Jellyseerr web interface.'';
|
||||
description = "Open port in the firewall for the Jellyseerr web interface.";
|
||||
};
|
||||
|
||||
port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 5055;
|
||||
description = ''The port which the Jellyseerr web UI should listen to.'';
|
||||
description = "The port which the Jellyseerr web UI should listen to.";
|
||||
};
|
||||
|
||||
configDir = lib.mkOption {
|
||||
|
||||
@@ -79,7 +79,7 @@ in
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.automatic -> config.nix.enable;
|
||||
message = ''nix.gc.automatic requires nix.enable'';
|
||||
message = "nix.gc.automatic requires nix.enable";
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ in
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.automatic -> config.nix.enable;
|
||||
message = ''nix.optimise.automatic requires nix.enable'';
|
||||
message = "nix.optimise.automatic requires nix.enable";
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -109,9 +109,9 @@ in
|
||||
description = "Synergy client";
|
||||
wantedBy = lib.optional cfgC.autoStart "graphical-session.target";
|
||||
path = [ pkgs.synergy ];
|
||||
serviceConfig.ExecStart = ''${pkgs.synergy}/bin/synergyc -f ${
|
||||
serviceConfig.ExecStart = "${pkgs.synergy}/bin/synergyc -f ${
|
||||
lib.optionalString (cfgC.screenName != "") "-n ${cfgC.screenName}"
|
||||
} ${cfgC.serverAddress}'';
|
||||
} ${cfgC.serverAddress}";
|
||||
serviceConfig.Restart = "on-failure";
|
||||
};
|
||||
})
|
||||
@@ -124,13 +124,13 @@ in
|
||||
description = "Synergy server";
|
||||
wantedBy = lib.optional cfgS.autoStart "graphical-session.target";
|
||||
path = [ pkgs.synergy ];
|
||||
serviceConfig.ExecStart = ''${pkgs.synergy}/bin/synergys -c ${cfgS.configFile} -f${
|
||||
serviceConfig.ExecStart = "${pkgs.synergy}/bin/synergys -c ${cfgS.configFile} -f${
|
||||
lib.optionalString (cfgS.address != "") " -a ${cfgS.address}"
|
||||
}${
|
||||
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}"
|
||||
}'';
|
||||
}";
|
||||
serviceConfig.Restart = "on-failure";
|
||||
};
|
||||
})
|
||||
|
||||
@@ -93,7 +93,7 @@ in
|
||||
|
||||
options = {
|
||||
services.nagios = {
|
||||
enable = lib.mkEnableOption ''[Nagios](https://www.nagios.org/) to monitor your system or network'';
|
||||
enable = lib.mkEnableOption "[Nagios](https://www.nagios.org/) to monitor your system or network";
|
||||
|
||||
objectDefs = lib.mkOption {
|
||||
description = ''
|
||||
|
||||
@@ -63,7 +63,7 @@ in
|
||||
"${pkgs.prometheus-mysqld-exporter}/bin/mysqld_exporter"
|
||||
"--web.listen-address=${cfg.listenAddress}:${toString cfg.port}"
|
||||
"--web.telemetry-path=${cfg.telemetryPath}"
|
||||
(optionalString (cfg.configFile != null) ''--config.my-cnf=''${CREDENTIALS_DIRECTORY}/config'')
|
||||
(optionalString (cfg.configFile != null) "--config.my-cnf=\${CREDENTIALS_DIRECTORY}/config")
|
||||
(escapeShellArgs cfg.extraFlags)
|
||||
];
|
||||
RestrictAddressFamilies = [
|
||||
|
||||
@@ -30,12 +30,12 @@ let
|
||||
sedExpr = '':x /^>\(${localCellsRegex}\) / { n; :y /^>/! { n; by }; bx }; p'';
|
||||
globalCommand =
|
||||
if cfg.cellServDB != { } then
|
||||
''sed -n -e ${lib.escapeShellArg sedExpr} ${cfg.globalCellServDBFile}''
|
||||
"sed -n -e ${lib.escapeShellArg sedExpr} ${cfg.globalCellServDBFile}"
|
||||
else
|
||||
''cat ${cfg.globalCellServDBFile}'';
|
||||
"cat ${cfg.globalCellServDBFile}";
|
||||
in
|
||||
pkgs.runCommand "CellServDB" { preferLocalBuild = true; } ''
|
||||
${lib.optionalString (cfg.globalCellServDBFile != null) ''${globalCommand} > $out''}
|
||||
${lib.optionalString (cfg.globalCellServDBFile != null) "${globalCommand} > $out"}
|
||||
cat ${clientServDB} >> $out
|
||||
'';
|
||||
|
||||
|
||||
@@ -395,7 +395,7 @@ in
|
||||
};
|
||||
|
||||
environment = {
|
||||
TUNNEL_ORIGIN_CERT = lib.mkIf (certFile != null) ''%d/cert.pem'';
|
||||
TUNNEL_ORIGIN_CERT = lib.mkIf (certFile != null) "%d/cert.pem";
|
||||
TUNNEL_EDGE_IP_VERSION = tunnel.edgeIPVersion;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -110,12 +110,12 @@ let
|
||||
concatLines (
|
||||
forEach relevantSecrets (
|
||||
secret:
|
||||
''export ${secret}=$(< ${
|
||||
"export ${secret}=$(< ${
|
||||
if cfg.settingsSecret.${secret} == null then
|
||||
"secrets/${secret}"
|
||||
else
|
||||
"\"$CREDENTIALS_DIRECTORY/${secret}\""
|
||||
})''
|
||||
})"
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ in
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
example = "gns3";
|
||||
description = ''Username used to access the GNS3 Server.'';
|
||||
description = "Username used to access the GNS3 Server.";
|
||||
};
|
||||
|
||||
passwordFile = lib.mkOption {
|
||||
@@ -68,7 +68,7 @@ in
|
||||
file = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
default = "/var/log/gns3/server.log";
|
||||
description = ''Path of the file GNS3 Server should log to.'';
|
||||
description = "Path of the file GNS3 Server should log to.";
|
||||
};
|
||||
|
||||
debug = lib.mkEnableOption "debug logging";
|
||||
@@ -96,17 +96,17 @@ in
|
||||
};
|
||||
|
||||
dynamips = {
|
||||
enable = lib.mkEnableOption ''Dynamips support'';
|
||||
enable = lib.mkEnableOption "Dynamips support";
|
||||
package = lib.mkPackageOption pkgs "dynamips" { };
|
||||
};
|
||||
|
||||
ubridge = {
|
||||
enable = lib.mkEnableOption ''uBridge support'';
|
||||
enable = lib.mkEnableOption "uBridge support";
|
||||
package = lib.mkPackageOption pkgs "ubridge" { };
|
||||
};
|
||||
|
||||
vpcs = {
|
||||
enable = lib.mkEnableOption ''VPCS support'';
|
||||
enable = lib.mkEnableOption "VPCS support";
|
||||
package = lib.mkPackageOption pkgs "vpcs" { };
|
||||
};
|
||||
};
|
||||
|
||||
@@ -56,7 +56,7 @@ in
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.go-autoconfig}/bin/go-autoconfig -config ${configFile}";
|
||||
Restart = "on-failure";
|
||||
WorkingDirectory = ''${pkgs.go-autoconfig}/'';
|
||||
WorkingDirectory = "${pkgs.go-autoconfig}/";
|
||||
DynamicUser = true;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1363,13 +1363,13 @@ in
|
||||
# see https://github.com/openwrt/openwrt/blob/539cb5389d9514c99ec1f87bd4465f77c7ed9b93/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh#L158
|
||||
{
|
||||
assertion = length (filter (bss: bss == radio) (attrNames radioCfg.networks)) == 1;
|
||||
message = ''hostapd radio ${radio}: Exactly one network must be named like the radio, for reasons internal to hostapd.'';
|
||||
message = "hostapd radio ${radio}: Exactly one network must be named like the radio, for reasons internal to hostapd.";
|
||||
}
|
||||
{
|
||||
assertion =
|
||||
(radioCfg.wifi4.enable && builtins.elem "HT40-" radioCfg.wifi4.capabilities)
|
||||
-> radioCfg.channel != 0;
|
||||
message = ''hostapd radio ${radio}: using ACS (channel = 0) together with HT40- (wifi4.capabilities) is unsupported by hostapd'';
|
||||
message = "hostapd radio ${radio}: using ACS (channel = 0) together with HT40- (wifi4.capabilities) is unsupported by hostapd";
|
||||
}
|
||||
]
|
||||
# BSS warnings
|
||||
@@ -1391,42 +1391,42 @@ in
|
||||
}
|
||||
{
|
||||
assertion = (length (attrNames radioCfg.networks) > 1) -> (bssCfg.bssid != null);
|
||||
message = ''hostapd radio ${radio} bss ${bss}: bssid must be specified manually (for now) since this radio uses multiple BSS.'';
|
||||
message = "hostapd radio ${radio} bss ${bss}: bssid must be specified manually (for now) since this radio uses multiple BSS.";
|
||||
}
|
||||
{
|
||||
assertion = countWpaPasswordDefinitions <= 1;
|
||||
message = ''hostapd radio ${radio} bss ${bss}: must use at most one WPA password option (wpaPassword, wpaPasswordFile, wpaPskFile)'';
|
||||
message = "hostapd radio ${radio} bss ${bss}: must use at most one WPA password option (wpaPassword, wpaPasswordFile, wpaPskFile)";
|
||||
}
|
||||
{
|
||||
assertion =
|
||||
auth.wpaPassword != null
|
||||
-> (stringLength auth.wpaPassword >= 8 && stringLength auth.wpaPassword <= 63);
|
||||
message = ''hostapd radio ${radio} bss ${bss}: uses a wpaPassword of invalid length (must be in [8,63]).'';
|
||||
message = "hostapd radio ${radio} bss ${bss}: uses a wpaPassword of invalid length (must be in [8,63]).";
|
||||
}
|
||||
{
|
||||
assertion = auth.saePasswords == [ ] || auth.saePasswordsFile == null;
|
||||
message = ''hostapd radio ${radio} bss ${bss}: must use only one SAE password option (saePasswords or saePasswordsFile)'';
|
||||
message = "hostapd radio ${radio} bss ${bss}: must use only one SAE password option (saePasswords or saePasswordsFile)";
|
||||
}
|
||||
{
|
||||
assertion = auth.mode == "wpa3-sae" -> (auth.saePasswords != [ ] || auth.saePasswordsFile != null);
|
||||
message = ''hostapd radio ${radio} bss ${bss}: uses WPA3-SAE which requires defining a sae password option'';
|
||||
message = "hostapd radio ${radio} bss ${bss}: uses WPA3-SAE which requires defining a sae password option";
|
||||
}
|
||||
{
|
||||
assertion =
|
||||
auth.mode == "wpa3-sae-transition"
|
||||
-> (auth.saePasswords != [ ] || auth.saePasswordsFile != null) && countWpaPasswordDefinitions == 1;
|
||||
message = ''hostapd radio ${radio} bss ${bss}: uses WPA3-SAE in transition mode requires defining both a wpa password option and a sae password option'';
|
||||
message = "hostapd radio ${radio} bss ${bss}: uses WPA3-SAE in transition mode requires defining both a wpa password option and a sae password option";
|
||||
}
|
||||
{
|
||||
assertion =
|
||||
(auth.mode == "wpa2-sha1" || auth.mode == "wpa2-sha256") -> countWpaPasswordDefinitions == 1;
|
||||
message = ''hostapd radio ${radio} bss ${bss}: uses WPA2-PSK which requires defining a wpa password option'';
|
||||
message = "hostapd radio ${radio} bss ${bss}: uses WPA2-PSK which requires defining a wpa password option";
|
||||
}
|
||||
]
|
||||
++ optionals (auth.saePasswords != [ ]) (
|
||||
imap1 (i: entry: {
|
||||
assertion = (entry.password == null) != (entry.passwordFile == null);
|
||||
message = ''hostapd radio ${radio} bss ${bss} saePassword entry ${i}: must set exactly one of `password` or `passwordFile`'';
|
||||
message = "hostapd radio ${radio} bss ${bss} saePassword entry ${i}: must set exactly one of `password` or `passwordFile`";
|
||||
}) auth.saePasswords
|
||||
)
|
||||
) radioCfg.networks
|
||||
|
||||
@@ -221,7 +221,7 @@ in
|
||||
startAt = cfg.interval;
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = ''${lib.getExe pkgs.inadyn} -f ${configFile} --cache-dir ''${CACHE_DIRECTORY} -1 --foreground -l ${cfg.logLevel}'';
|
||||
ExecStart = "${lib.getExe pkgs.inadyn} -f ${configFile} --cache-dir \${CACHE_DIRECTORY} -1 --foreground -l ${cfg.logLevel}";
|
||||
LoadCredential = "config:${configFile}";
|
||||
CacheDirectory = "inadyn";
|
||||
|
||||
|
||||
@@ -301,7 +301,7 @@ in
|
||||
ui.enable = mkOption {
|
||||
type = bool;
|
||||
default = nixosConfig.services.netbird.ui.enable;
|
||||
defaultText = literalExpression ''client.ui.enable'';
|
||||
defaultText = literalExpression "client.ui.enable";
|
||||
description = ''
|
||||
Controls presence of `netbird-ui` wrapper for this NetBird client.
|
||||
'';
|
||||
|
||||
@@ -148,7 +148,7 @@ let
|
||||
'';
|
||||
|
||||
maybeString = prefix: x: optionalString (x != null) ''${prefix} "${x}"'';
|
||||
maybeToString = prefix: x: optionalString (x != null) ''${prefix} ${toString x}'';
|
||||
maybeToString = prefix: x: optionalString (x != null) "${prefix} ${toString x}";
|
||||
forEach = pre: l: concatMapStrings (x: pre + x + "\n") l;
|
||||
|
||||
keyConfigFile = concatStrings (
|
||||
|
||||
@@ -18,7 +18,7 @@ in
|
||||
extraFlags = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
description = ''Extra flags passed to the {command}`robustirc-bridge` command. See [RobustIRC Documentation](https://robustirc.net/docs/adminguide.html#_bridge) or {manpage}`robustirc-bridge(1)` for details.'';
|
||||
description = "Extra flags passed to the {command}`robustirc-bridge` command. See [RobustIRC Documentation](https://robustirc.net/docs/adminguide.html#_bridge) or {manpage}`robustirc-bridge(1)` for details.";
|
||||
example = [
|
||||
"-network robustirc.net"
|
||||
];
|
||||
|
||||
@@ -826,13 +826,13 @@ in
|
||||
"Banner ${if cfg.banner == null then "none" else pkgs.writeText "ssh_banner" cfg.banner}"
|
||||
"AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"}"
|
||||
]
|
||||
++ lib.map (port: ''Port ${toString port}'') cfg.ports
|
||||
++ lib.map (port: "Port ${toString port}") cfg.ports
|
||||
++ lib.map (
|
||||
{ port, addr, ... }:
|
||||
''ListenAddress ${addr}${lib.optionalString (port != null) (":" + toString port)}''
|
||||
"ListenAddress ${addr}${lib.optionalString (port != null) (":" + toString port)}"
|
||||
) cfg.listenAddresses
|
||||
++ lib.optional cfgc.setXAuthLocation "XAuthLocation ${lib.getExe pkgs.xorg.xauth}"
|
||||
++ lib.optional cfg.allowSFTP ''Subsystem sftp ${cfg.sftpServerExecutable} ${lib.concatStringsSep " " cfg.sftpFlags}''
|
||||
++ lib.optional cfg.allowSFTP "Subsystem sftp ${cfg.sftpServerExecutable} ${lib.concatStringsSep " " cfg.sftpFlags}"
|
||||
++ [
|
||||
"AuthorizedKeysFile ${toString cfg.authorizedKeysFiles}"
|
||||
]
|
||||
@@ -901,7 +901,7 @@ in
|
||||
in
|
||||
{
|
||||
assertion = lib.length duplicates == 0;
|
||||
message = ''Duplicate sshd config key; does your capitalization match the option's? Duplicate keys: ${formattedDuplicates}'';
|
||||
message = "Duplicate sshd config key; does your capitalization match the option's? Duplicate keys: ${formattedDuplicates}";
|
||||
}
|
||||
)
|
||||
]
|
||||
|
||||
@@ -90,7 +90,7 @@ let
|
||||
type = with lib.types; nullOr path;
|
||||
default = lib.getExe pkgs.ghostscript;
|
||||
defaultText = lib.literalExpression "lib.getExe pkgs.ghostscript";
|
||||
example = lib.literalExpression ''''${pkgs.ghostscript}/bin/ps2pdf'';
|
||||
example = lib.literalExpression "\${pkgs.ghostscript}/bin/ps2pdf";
|
||||
description = "location of GhostScript binary";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -26,7 +26,7 @@ let
|
||||
${sectName} {
|
||||
''
|
||||
+ lib.generators.toKeyValue { inherit mkKeyValue listsAsDuplicateKeys; } sectValues
|
||||
+ ''}'';
|
||||
+ "}";
|
||||
in
|
||||
# map input to ini sections
|
||||
mapAttrsToStringsSep "\n" mkSection attrsOfAttrs;
|
||||
|
||||
@@ -45,7 +45,7 @@ in
|
||||
instead.
|
||||
'';
|
||||
default = config.services.crowdsec.enable;
|
||||
defaultText = lib.literalExpression ''config.services.crowdsec.enable'';
|
||||
defaultText = lib.literalExpression "config.services.crowdsec.enable";
|
||||
};
|
||||
bouncerName = mkOption {
|
||||
type = types.nonEmptyStr;
|
||||
|
||||
@@ -442,7 +442,7 @@ in
|
||||
// {
|
||||
# Miscellaneous options
|
||||
inherit (cfg) banaction maxretry bantime;
|
||||
ignoreip = ''127.0.0.1/8 ${lib.optionalString config.networking.enableIPv6 "::1"} ${lib.concatStringsSep " " cfg.ignoreIP}'';
|
||||
ignoreip = "127.0.0.1/8 ${lib.optionalString config.networking.enableIPv6 "::1"} ${lib.concatStringsSep " " cfg.ignoreIP}";
|
||||
backend = "systemd";
|
||||
# Actions
|
||||
banaction_allports = cfg.banaction-allports;
|
||||
|
||||
@@ -107,7 +107,7 @@ in
|
||||
outputDir = mkOption {
|
||||
type = types.path;
|
||||
default = "${cfg.configDir}/output";
|
||||
defaultText = ''''${cfg.configDir}/output'';
|
||||
defaultText = "\${cfg.configDir}/output";
|
||||
description = "Directory where cross-seed will place torrent files it finds.";
|
||||
};
|
||||
|
||||
|
||||
@@ -300,7 +300,7 @@ in
|
||||
type = lib.types.str;
|
||||
default =
|
||||
if cfg.hostname == "localhost" then "http://${cfg.hostname}" else "https://${cfg.hostname}";
|
||||
defaultText = ''http(s)://''${config.services.bookstack.hostname}'';
|
||||
defaultText = "http(s)://\${config.services.bookstack.hostname}";
|
||||
description = ''
|
||||
The root URL that you want to host BookStack on. All URLs in BookStack
|
||||
will be generated using this value. It is used to validate specific
|
||||
|
||||
@@ -134,8 +134,8 @@ in
|
||||
);
|
||||
default = { };
|
||||
|
||||
example = '''';
|
||||
description = '''';
|
||||
example = "";
|
||||
description = "";
|
||||
};
|
||||
|
||||
adminLogin = lib.mkOption {
|
||||
|
||||
@@ -556,7 +556,7 @@ in
|
||||
"/" = {
|
||||
priority = 1;
|
||||
index = "doku.php";
|
||||
extraConfig = ''try_files $uri $uri/ @dokuwiki;'';
|
||||
extraConfig = "try_files $uri $uri/ @dokuwiki;";
|
||||
};
|
||||
|
||||
"@dokuwiki" = {
|
||||
|
||||
@@ -359,10 +359,10 @@ in
|
||||
let
|
||||
isUserAuth = cfg.authType == "form" || cfg.authType == "none";
|
||||
|
||||
userScriptArgs = ''--user ${cfg.defaultUser} ${
|
||||
userScriptArgs = "--user ${cfg.defaultUser} ${
|
||||
optionalString (cfg.authType == "form") ''--password "$(cat ${cfg.passwordFile})"''
|
||||
}'';
|
||||
mkUserScript = name: optionalString isUserAuth ''./cli/${name}.php ${userScriptArgs}'';
|
||||
}";
|
||||
mkUserScript = name: optionalString isUserAuth "./cli/${name}.php ${userScriptArgs}";
|
||||
|
||||
updateUserScript = mkUserScript "update-user";
|
||||
createUserScript = mkUserScript "create-user";
|
||||
|
||||
@@ -217,7 +217,7 @@ in
|
||||
excalidraw.port = mkOption {
|
||||
type = types.port;
|
||||
default = 3002;
|
||||
description = ''The port which the Excalidraw backend for Jitsi should listen to.'';
|
||||
description = "The port which the Excalidraw backend for Jitsi should listen to.";
|
||||
};
|
||||
|
||||
secureDomain = {
|
||||
@@ -225,7 +225,7 @@ in
|
||||
authentication = mkOption {
|
||||
type = types.str;
|
||||
default = "internal_hashed";
|
||||
description = ''The authentication type to be used by jitsi'';
|
||||
description = "The authentication type to be used by jitsi";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -88,7 +88,7 @@ in
|
||||
{
|
||||
redis_address => "127.0.0.1:${toString cfg.redis.port}",
|
||||
redis_password => "${
|
||||
lib.optionalString (cfg.redis.passwordFile != null) ''$(head -n1 ${cfg.redis.passwordFile})''
|
||||
lib.optionalString (cfg.redis.passwordFile != null) "$(head -n1 ${cfg.redis.passwordFile})"
|
||||
}",
|
||||
redis_database => "0",
|
||||
redis_database_minion => "1",
|
||||
|
||||
@@ -411,7 +411,7 @@ in
|
||||
path = mkOption {
|
||||
type = types.path;
|
||||
default = "${cfg.dataDir}/mattermost.sock";
|
||||
defaultText = ''''${config.mattermost.dataDir}/mattermost.sock'';
|
||||
defaultText = "\${config.mattermost.dataDir}/mattermost.sock";
|
||||
description = ''
|
||||
Default location for the Mattermost control socket used by `mmctl`.
|
||||
'';
|
||||
|
||||
@@ -473,7 +473,7 @@ in
|
||||
|
||||
nginx.hostName = mkOption {
|
||||
type = types.str;
|
||||
example = literalExpression ''wiki.example.com'';
|
||||
example = literalExpression "wiki.example.com";
|
||||
default = "localhost";
|
||||
description = ''
|
||||
The hostname to use for the nginx virtual host.
|
||||
|
||||
@@ -188,7 +188,7 @@ in
|
||||
--runner-name ${lib.escapeShellArg instance.runnerName} \
|
||||
${lib.optionalString (
|
||||
instance.runnerDescription != null
|
||||
) ''--runner-description ${lib.escapeShellArg instance.runnerDescription}''}
|
||||
) "--runner-description ${lib.escapeShellArg instance.runnerDescription}"}
|
||||
|
||||
# Kill the server
|
||||
kill $!
|
||||
|
||||
@@ -13,11 +13,11 @@ let
|
||||
mkValueString =
|
||||
v:
|
||||
if v == true then
|
||||
''true''
|
||||
"true"
|
||||
else if v == false then
|
||||
''false''
|
||||
"false"
|
||||
else if builtins.isInt v then
|
||||
''${toString v}''
|
||||
"${toString v}"
|
||||
else if builtins.isPath v then
|
||||
''"${toString v}"''
|
||||
else if builtins.isString v then
|
||||
|
||||
@@ -248,9 +248,9 @@ in
|
||||
cp -r ${pkgs.rutorrent}/php ${cfg.dataDir}/
|
||||
|
||||
${optionalString (cfg.plugins != [ ])
|
||||
''cp -r ${
|
||||
"cp -r ${
|
||||
concatMapStringsSep " " (p: "${pkgs.rutorrent}/plugins/${p}") cfg.plugins
|
||||
} ${cfg.dataDir}/plugins/''
|
||||
} ${cfg.dataDir}/plugins/"
|
||||
}
|
||||
|
||||
chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}/{conf,share,logs,plugins}
|
||||
|
||||
@@ -403,7 +403,7 @@ in
|
||||
locations = {
|
||||
"/" = {
|
||||
index = "index.php";
|
||||
extraConfig = ''try_files $uri $uri/ /index.php?$query_string;'';
|
||||
extraConfig = "try_files $uri $uri/ /index.php?$query_string;";
|
||||
};
|
||||
"~ \\.php$" = {
|
||||
extraConfig = ''
|
||||
|
||||
@@ -126,7 +126,7 @@ let
|
||||
stash_boxes = mkOption {
|
||||
type = types.listOf stashBoxType;
|
||||
default = [ ];
|
||||
description = ''Stash-box facilitates automated tagging of scenes and performers based on fingerprints and filenames'';
|
||||
description = "Stash-box facilitates automated tagging of scenes and performers based on fingerprints and filenames";
|
||||
example = literalExpression ''
|
||||
{
|
||||
stash_boxes = [
|
||||
|
||||
@@ -83,7 +83,7 @@ in
|
||||
type = types.int;
|
||||
default = 4;
|
||||
example = 6;
|
||||
description = ''Number of waitress threads to start.'';
|
||||
description = "Number of waitress threads to start.";
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
@@ -94,13 +94,13 @@ in
|
||||
type = types.str;
|
||||
default = "szurubooru";
|
||||
example = "Szuru";
|
||||
description = ''Name shown in the website title and on the front page.'';
|
||||
description = "Name shown in the website title and on the front page.";
|
||||
};
|
||||
|
||||
domain = mkOption {
|
||||
type = types.str;
|
||||
example = "http://example.com";
|
||||
description = ''Full URL to the homepage of this szurubooru site (with no trailing slash).'';
|
||||
description = "Full URL to the homepage of this szurubooru site (with no trailing slash).";
|
||||
};
|
||||
|
||||
# NOTE: this is not a real upstream option
|
||||
@@ -119,7 +119,7 @@ in
|
||||
];
|
||||
default = "no";
|
||||
example = "yes";
|
||||
description = ''Whether to delete thumbnails and source files on post delete.'';
|
||||
description = "Whether to delete thumbnails and source files on post delete.";
|
||||
};
|
||||
|
||||
smtp = {
|
||||
@@ -127,21 +127,21 @@ in
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "localhost";
|
||||
description = ''Host of the SMTP server used to send reset password.'';
|
||||
description = "Host of the SMTP server used to send reset password.";
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.nullOr types.port;
|
||||
default = null;
|
||||
example = 25;
|
||||
description = ''Port of the SMTP server.'';
|
||||
description = "Port of the SMTP server.";
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "bot";
|
||||
description = ''User to connect to the SMTP server.'';
|
||||
description = "User to connect to the SMTP server.";
|
||||
};
|
||||
|
||||
# NOTE: this is not a real upstream option
|
||||
@@ -149,7 +149,7 @@ in
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
example = "/run/secrets/szurubooru-smtp-pass";
|
||||
description = ''File containing the password associated to the given user for the SMTP server.'';
|
||||
description = "File containing the password associated to the given user for the SMTP server.";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -158,7 +158,7 @@ in
|
||||
default = "${cfg.server.settings.domain}/data/";
|
||||
defaultText = lib.literalExpression ''"''${services.szurubooru.server.settings.domain}/data/"'';
|
||||
example = "http://example.com/content/";
|
||||
description = ''Full URL to the data endpoint.'';
|
||||
description = "Full URL to the data endpoint.";
|
||||
};
|
||||
|
||||
data_dir = mkOption {
|
||||
@@ -166,21 +166,21 @@ in
|
||||
default = "${cfg.dataDir}/data";
|
||||
defaultText = lib.literalExpression ''"''${services.szurubooru.dataDir}/data"'';
|
||||
example = "/srv/szurubooru/data";
|
||||
description = ''Path to the static files.'';
|
||||
description = "Path to the static files.";
|
||||
};
|
||||
|
||||
debug = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
example = 1;
|
||||
description = ''Whether to generate server logs.'';
|
||||
description = "Whether to generate server logs.";
|
||||
};
|
||||
|
||||
show_sql = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
example = 1;
|
||||
description = ''Whether to show SQL in server logs.'';
|
||||
description = "Whether to show SQL in server logs.";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -203,13 +203,13 @@ in
|
||||
type = types.str;
|
||||
default = "localhost";
|
||||
example = "192.168.1.2";
|
||||
description = ''Host on which the PostgreSQL database runs.'';
|
||||
description = "Host on which the PostgreSQL database runs.";
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 5432;
|
||||
description = ''The port under which PostgreSQL listens to.'';
|
||||
description = "The port under which PostgreSQL listens to.";
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
@@ -217,20 +217,20 @@ in
|
||||
default = cfg.database.user;
|
||||
defaultText = lib.literalExpression "szurubooru.database.name";
|
||||
example = "szuru";
|
||||
description = ''Name of the PostgreSQL database.'';
|
||||
description = "Name of the PostgreSQL database.";
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "szurubooru";
|
||||
example = "szuru";
|
||||
description = ''PostgreSQL user.'';
|
||||
description = "PostgreSQL user.";
|
||||
};
|
||||
|
||||
passwordFile = mkOption {
|
||||
type = types.path;
|
||||
example = "/run/secrets/szurubooru-db-password";
|
||||
description = ''A file containing the password for the PostgreSQL user.'';
|
||||
description = "A file containing the password for the PostgreSQL user.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -114,7 +114,7 @@ in
|
||||
};
|
||||
MONGO_ENDPOINT = mkOption {
|
||||
type = str;
|
||||
description = ''The endpoint of the Mongo database.'';
|
||||
description = "The endpoint of the Mongo database.";
|
||||
default = "mongodb://localhost:27017/your_spotify";
|
||||
};
|
||||
PORT = mkOption {
|
||||
|
||||
@@ -421,9 +421,9 @@ in
|
||||
|
||||
serviceConfig =
|
||||
let
|
||||
runOptions = ''--config ${configPath} ${
|
||||
runOptions = "--config ${configPath} ${
|
||||
optionalString (cfg.adapter != null) "--adapter ${cfg.adapter}"
|
||||
}'';
|
||||
}";
|
||||
in
|
||||
{
|
||||
# Override the `ExecStart` line from upstream's systemd unit file by our own:
|
||||
@@ -431,7 +431,7 @@ in
|
||||
# If the empty string is assigned to this option, the list of commands to start is reset, prior assignments of this option will have no effect.
|
||||
ExecStart = [
|
||||
""
|
||||
''${lib.getExe cfg.package} run ${runOptions} ${optionalString cfg.resume "--resume"}''
|
||||
"${lib.getExe cfg.package} run ${runOptions} ${optionalString cfg.resume "--resume"}"
|
||||
];
|
||||
# Validating the configuration before applying it ensures we’ll get a proper error that will be reported when switching to the configuration
|
||||
ExecReload = [
|
||||
|
||||
@@ -262,12 +262,12 @@ let
|
||||
);
|
||||
|
||||
# Executing H2O with our generated configuration; `mode` added as needed
|
||||
h2oExe = ''${lib.getExe cfg.package} ${
|
||||
h2oExe = "${lib.getExe cfg.package} ${
|
||||
lib.strings.escapeShellArgs [
|
||||
"--conf"
|
||||
"${h2oConfig}"
|
||||
]
|
||||
}'';
|
||||
}";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
|
||||
@@ -13,7 +13,7 @@ in
|
||||
{
|
||||
options = {
|
||||
services.static-web-server = {
|
||||
enable = lib.mkEnableOption ''Static Web Server'';
|
||||
enable = lib.mkEnableOption "Static Web Server";
|
||||
listen = lib.mkOption {
|
||||
default = "[::]:8787";
|
||||
type = lib.types.str;
|
||||
|
||||
@@ -59,7 +59,7 @@ in
|
||||
|| (fs.fsType == "zfs" && lib.hasPrefix "${device}/" fs.device)
|
||||
) config.system.build.fileSystems)
|
||||
|| (lib.hasAttr device config.boot.initrd.luks.devices);
|
||||
message = ''No filesystem or LUKS device with the name ${device} is declared in your configuration.'';
|
||||
message = "No filesystem or LUKS device with the name ${device} is declared in your configuration.";
|
||||
}) cfg.devices
|
||||
)
|
||||
);
|
||||
|
||||
@@ -12,7 +12,7 @@ in
|
||||
options.boot.kexec = {
|
||||
enable = lib.mkEnableOption "kexec" // {
|
||||
default = lib.meta.availableOn pkgs.stdenv.hostPlatform pkgs.kexec-tools;
|
||||
defaultText = lib.literalExpression ''lib.meta.availableOn pkgs.stdenv.hostPlatform pkgs.kexec-tools'';
|
||||
defaultText = lib.literalExpression "lib.meta.availableOn pkgs.stdenv.hostPlatform pkgs.kexec-tools";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@ in
|
||||
|
||||
installDeviceTree = mkOption {
|
||||
default = with config.hardware.deviceTree; enable && name != null;
|
||||
defaultText = ''with config.hardware.deviceTree; enable && name != null'';
|
||||
defaultText = "with config.hardware.deviceTree; enable && name != null";
|
||||
description = ''
|
||||
Install the devicetree blob specified by `config.hardware.deviceTree.name`
|
||||
to the ESP and instruct systemd-boot to pass this DTB to linux.
|
||||
|
||||
@@ -31,9 +31,9 @@ let
|
||||
${lib.concatLines (
|
||||
lib.mapAttrsToList (
|
||||
groupname: opts:
|
||||
''g ${groupname} ${
|
||||
"g ${groupname} ${
|
||||
if opts.gid == null then "/var/lib/nixos/gid/${groupname}" else toString opts.gid
|
||||
}''
|
||||
}"
|
||||
) userCfg.groups
|
||||
)}
|
||||
|
||||
|
||||
@@ -12,13 +12,13 @@ in
|
||||
{
|
||||
options.boot.initrd.unl0kr = {
|
||||
enable = lib.mkEnableOption "unl0kr in initrd" // {
|
||||
description = ''Whether to enable the unl0kr on-screen keyboard in initrd to unlock LUKS.'';
|
||||
description = "Whether to enable the unl0kr on-screen keyboard in initrd to unlock LUKS.";
|
||||
};
|
||||
|
||||
package = lib.mkPackageOption pkgs "buffybox" { };
|
||||
|
||||
allowVendorDrivers = lib.mkEnableOption "load optional drivers" // {
|
||||
description = ''Whether to load additional drivers for certain vendors (I.E: Wacom, Intel, etc.)'';
|
||||
description = "Whether to load additional drivers for certain vendors (I.E: Wacom, Intel, etc.)";
|
||||
};
|
||||
|
||||
settings = lib.mkOption {
|
||||
@@ -56,10 +56,10 @@ in
|
||||
|
||||
warnings = lib.mkMerge [
|
||||
(lib.mkIf (config.hardware.amdgpu.initrd.enable) [
|
||||
''Use early video loading at your risk. It's not guaranteed to work with unl0kr.''
|
||||
"Use early video loading at your risk. It's not guaranteed to work with unl0kr."
|
||||
])
|
||||
(lib.mkIf (config.boot.plymouth.enable) [
|
||||
''Upstream clearly intends unl0kr to not run with Plymouth. Good luck''
|
||||
"Upstream clearly intends unl0kr to not run with Plymouth. Good luck"
|
||||
])
|
||||
];
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user