Merge branch 'staging-next' into staging
This commit is contained in:
commit
3c5dff210a
|
@ -87,7 +87,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
|
||||||
|
|
||||||
beerware = spdx {
|
beerware = spdx {
|
||||||
spdxId = "Beerware";
|
spdxId = "Beerware";
|
||||||
fullName = ''Beerware License'';
|
fullName = "Beerware License";
|
||||||
};
|
};
|
||||||
|
|
||||||
blueOak100 = spdx {
|
blueOak100 = spdx {
|
||||||
|
@ -107,7 +107,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
|
||||||
|
|
||||||
bsd2Patent = spdx {
|
bsd2Patent = spdx {
|
||||||
spdxId = "BSD-2-Clause-Patent";
|
spdxId = "BSD-2-Clause-Patent";
|
||||||
fullName = ''BSD-2-Clause Plus Patent License'';
|
fullName = "BSD-2-Clause Plus Patent License";
|
||||||
};
|
};
|
||||||
|
|
||||||
bsd3 = spdx {
|
bsd3 = spdx {
|
||||||
|
|
|
@ -3699,6 +3699,12 @@
|
||||||
githubId = 896431;
|
githubId = 896431;
|
||||||
name = "Chris Hodapp";
|
name = "Chris Hodapp";
|
||||||
};
|
};
|
||||||
|
holymonson = {
|
||||||
|
email = "holymonson@gmail.com";
|
||||||
|
github = "holymonson";
|
||||||
|
githubId = 902012;
|
||||||
|
name = "Monson Shao";
|
||||||
|
};
|
||||||
hongchangwu = {
|
hongchangwu = {
|
||||||
email = "wuhc85@gmail.com";
|
email = "wuhc85@gmail.com";
|
||||||
github = "hongchangwu";
|
github = "hongchangwu";
|
||||||
|
|
|
@ -83,7 +83,7 @@ in
|
||||||
packages = mkOption {
|
packages = mkOption {
|
||||||
type = types.listOf types.package;
|
type = types.listOf types.package;
|
||||||
default = with pkgs.kbdKeymaps; [ dvp neo ];
|
default = with pkgs.kbdKeymaps; [ dvp neo ];
|
||||||
defaultText = ''with pkgs.kbdKeymaps; [ dvp neo ]'';
|
defaultText = "with pkgs.kbdKeymaps; [ dvp neo ]";
|
||||||
description = ''
|
description = ''
|
||||||
List of additional packages that provide console fonts, keymaps and
|
List of additional packages that provide console fonts, keymaps and
|
||||||
other resources for virtual consoles use.
|
other resources for virtual consoles use.
|
||||||
|
|
|
@ -436,7 +436,7 @@ in
|
||||||
useEmbeddedBitmaps = mkOption {
|
useEmbeddedBitmaps = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''Use embedded bitmaps in fonts like Calibri.'';
|
description = "Use embedded bitmaps in fonts like Calibri.";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -84,7 +84,7 @@ with lib;
|
||||||
environment.etc."locale.conf".source = pkgs.writeText "locale.conf"
|
environment.etc."locale.conf".source = pkgs.writeText "locale.conf"
|
||||||
''
|
''
|
||||||
LANG=${config.i18n.defaultLocale}
|
LANG=${config.i18n.defaultLocale}
|
||||||
${concatStringsSep "\n" (mapAttrsToList (n: v: ''${n}=${v}'') config.i18n.extraLocaleSettings)}
|
${concatStringsSep "\n" (mapAttrsToList (n: v: "${n}=${v}") config.i18n.extraLocaleSettings)}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -195,8 +195,7 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# /etc/netgroup: Network-wide groups.
|
# /etc/netgroup: Network-wide groups.
|
||||||
netgroup.text = mkDefault ''
|
netgroup.text = mkDefault "";
|
||||||
'';
|
|
||||||
|
|
||||||
# /etc/host.conf: resolver configuration file
|
# /etc/host.conf: resolver configuration file
|
||||||
"host.conf".text = ''
|
"host.conf".text = ''
|
||||||
|
|
|
@ -183,7 +183,7 @@ in {
|
||||||
config = mkOption {
|
config = mkOption {
|
||||||
type = types.attrsOf types.unspecified;
|
type = types.attrsOf types.unspecified;
|
||||||
default = {};
|
default = {};
|
||||||
description = ''Config of the pulse daemon. See <literal>man pulse-daemon.conf</literal>.'';
|
description = "Config of the pulse daemon. See <literal>man pulse-daemon.conf</literal>.";
|
||||||
example = literalExample ''{ realtime-scheduling = "yes"; }'';
|
example = literalExample ''{ realtime-scheduling = "yes"; }'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -364,7 +364,7 @@ let
|
||||||
count = mkOption {
|
count = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 1;
|
default = 1;
|
||||||
description = ''Count of subordinate user ids'';
|
description = "Count of subordinate user ids";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -381,7 +381,7 @@ let
|
||||||
count = mkOption {
|
count = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 1;
|
default = 1;
|
||||||
description = ''Count of subordinate group ids'';
|
description = "Count of subordinate group ids";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,7 +40,7 @@ in
|
||||||
default = "wheel";
|
default = "wheel";
|
||||||
example = "video";
|
example = "video";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = ''Group for bumblebee socket'';
|
description = "Group for bumblebee socket";
|
||||||
};
|
};
|
||||||
|
|
||||||
connectDisplay = mkOption {
|
connectDisplay = mkOption {
|
||||||
|
|
|
@ -215,7 +215,7 @@ in {
|
||||||
''
|
''
|
||||||
else ''
|
else ''
|
||||||
exec ${cfg.locate}/bin/updatedb \
|
exec ${cfg.locate}/bin/updatedb \
|
||||||
${optionalString (cfg.localuser != null && ! isMLocate) ''--localuser=${cfg.localuser}''} \
|
${optionalString (cfg.localuser != null && ! isMLocate) "--localuser=${cfg.localuser}"} \
|
||||||
--output=${toString cfg.output} ${concatStringsSep " " cfg.extraFlags}
|
--output=${toString cfg.output} ${concatStringsSep " " cfg.extraFlags}
|
||||||
'';
|
'';
|
||||||
environment = optionalAttrs (!isMLocate) {
|
environment = optionalAttrs (!isMLocate) {
|
||||||
|
|
|
@ -73,7 +73,7 @@ in
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
type = pkgsType;
|
type = pkgsType;
|
||||||
example = literalExample ''import <nixpkgs> {}'';
|
example = literalExample "import <nixpkgs> {}";
|
||||||
description = ''
|
description = ''
|
||||||
If set, the pkgs argument to all NixOS modules is the value of
|
If set, the pkgs argument to all NixOS modules is the value of
|
||||||
this option, extended with <code>nixpkgs.overlays</code>, if
|
this option, extended with <code>nixpkgs.overlays</code>, if
|
||||||
|
|
|
@ -27,14 +27,14 @@ in
|
||||||
# the options below are the same as in "captive-browser.toml"
|
# the options below are the same as in "captive-browser.toml"
|
||||||
browser = mkOption {
|
browser = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = concatStringsSep " " [ ''${pkgs.chromium}/bin/chromium''
|
default = concatStringsSep " " [ "${pkgs.chromium}/bin/chromium"
|
||||||
''--user-data-dir=''${XDG_DATA_HOME:-$HOME/.local/share}/chromium-captive''
|
"--user-data-dir=\${XDG_DATA_HOME:-$HOME/.local/share}/chromium-captive"
|
||||||
''--proxy-server="socks5://$PROXY"''
|
''--proxy-server="socks5://$PROXY"''
|
||||||
''--host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE localhost"''
|
''--host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE localhost"''
|
||||||
''--no-first-run''
|
"--no-first-run"
|
||||||
''--new-window''
|
"--new-window"
|
||||||
''--incognito''
|
"--incognito"
|
||||||
''http://cache.nixos.org/''
|
"http://cache.nixos.org/"
|
||||||
];
|
];
|
||||||
description = ''
|
description = ''
|
||||||
The shell (/bin/sh) command executed once the proxy starts.
|
The shell (/bin/sh) command executed once the proxy starts.
|
||||||
|
@ -62,7 +62,7 @@ in
|
||||||
socks5-addr = mkOption {
|
socks5-addr = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "localhost:1666";
|
default = "localhost:1666";
|
||||||
description = ''the listen address for the SOCKS5 proxy server'';
|
description = "the listen address for the SOCKS5 proxy server";
|
||||||
};
|
};
|
||||||
|
|
||||||
bindInterface = mkOption {
|
bindInterface = mkOption {
|
||||||
|
|
|
@ -80,6 +80,8 @@ in
|
||||||
# Retry the command if we just installed it.
|
# Retry the command if we just installed it.
|
||||||
if [ $? = 126 ]; then
|
if [ $? = 126 ]; then
|
||||||
"$@"
|
"$@"
|
||||||
|
else
|
||||||
|
return 127
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Indicate than there was an error so ZSH falls back to its default handler
|
# Indicate than there was an error so ZSH falls back to its default handler
|
||||||
|
|
|
@ -24,7 +24,7 @@ let
|
||||||
"source /etc/fish/${file}.fish"
|
"source /etc/fish/${file}.fish"
|
||||||
else
|
else
|
||||||
''
|
''
|
||||||
set fish_function_path ${pkgs.fishPlugins.foreign-env}/share/fish-foreign-env/functions $fish_function_path
|
set fish_function_path ${pkgs.fishPlugins.foreign-env}/share/fish/vendor_functions.d $fish_function_path
|
||||||
fenv source /etc/fish/foreign-env/${file} > /dev/null
|
fenv source /etc/fish/foreign-env/${file} > /dev/null
|
||||||
set -e fish_function_path[1]
|
set -e fish_function_path[1]
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -36,7 +36,7 @@ in
|
||||||
askPassword = mkOption {
|
askPassword = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass";
|
default = "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass";
|
||||||
description = ''Program used by SSH to ask for passwords.'';
|
description = "Program used by SSH to ask for passwords.";
|
||||||
};
|
};
|
||||||
|
|
||||||
forwardX11 = mkOption {
|
forwardX11 = mkOption {
|
||||||
|
|
|
@ -11,7 +11,7 @@ in
|
||||||
|
|
||||||
lockerCommand = mkOption {
|
lockerCommand = mkOption {
|
||||||
default = "${pkgs.i3lock}/bin/i3lock";
|
default = "${pkgs.i3lock}/bin/i3lock";
|
||||||
example = literalExample ''''${pkgs.i3lock-fancy}/bin/i3lock-fancy'';
|
example = literalExample "\${pkgs.i3lock-fancy}/bin/i3lock-fancy";
|
||||||
type = types.separatedString " ";
|
type = types.separatedString " ";
|
||||||
description = "Locker to be used with xsslock";
|
description = "Locker to be used with xsslock";
|
||||||
};
|
};
|
||||||
|
|
|
@ -74,7 +74,7 @@ in {
|
||||||
musicDirectory = mkOption {
|
musicDirectory = mkOption {
|
||||||
type = with types; either path (strMatching "(http|https|nfs|smb)://.+");
|
type = with types; either path (strMatching "(http|https|nfs|smb)://.+");
|
||||||
default = "${cfg.dataDir}/music";
|
default = "${cfg.dataDir}/music";
|
||||||
defaultText = ''''${dataDir}/music'';
|
defaultText = "\${dataDir}/music";
|
||||||
description = ''
|
description = ''
|
||||||
The directory or NFS/SMB network share where MPD reads music from. If left
|
The directory or NFS/SMB network share where MPD reads music from. If left
|
||||||
as the default value this directory will automatically be created before
|
as the default value this directory will automatically be created before
|
||||||
|
@ -86,7 +86,7 @@ in {
|
||||||
playlistDirectory = mkOption {
|
playlistDirectory = mkOption {
|
||||||
type = types.path;
|
type = types.path;
|
||||||
default = "${cfg.dataDir}/playlists";
|
default = "${cfg.dataDir}/playlists";
|
||||||
defaultText = ''''${dataDir}/playlists'';
|
defaultText = "\${dataDir}/playlists";
|
||||||
description = ''
|
description = ''
|
||||||
The directory where MPD stores playlists. If left as the default value
|
The directory where MPD stores playlists. If left as the default value
|
||||||
this directory will automatically be created before the MPD server starts,
|
this directory will automatically be created before the MPD server starts,
|
||||||
|
@ -155,7 +155,7 @@ in {
|
||||||
dbFile = mkOption {
|
dbFile = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
default = "${cfg.dataDir}/tag_cache";
|
default = "${cfg.dataDir}/tag_cache";
|
||||||
defaultText = ''''${dataDir}/tag_cache'';
|
defaultText = "\${dataDir}/tag_cache";
|
||||||
description = ''
|
description = ''
|
||||||
The path to MPD's database. If set to <literal>null</literal> the
|
The path to MPD's database. If set to <literal>null</literal> the
|
||||||
parameter is omitted from the configuration.
|
parameter is omitted from the configuration.
|
||||||
|
|
|
@ -190,8 +190,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
devices = mkOption {
|
devices = mkOption {
|
||||||
description = ''
|
description = "";
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extraAutochangerConfig = mkOption {
|
extraAutochangerConfig = mkOption {
|
||||||
|
|
|
@ -354,7 +354,7 @@ in
|
||||||
|
|
||||||
script = let
|
script = let
|
||||||
tarsnap = ''tarsnap --configfile "/etc/tarsnap/${name}.conf"'';
|
tarsnap = ''tarsnap --configfile "/etc/tarsnap/${name}.conf"'';
|
||||||
lastArchive = ''$(${tarsnap} --list-archives | sort | tail -1)'';
|
lastArchive = "$(${tarsnap} --list-archives | sort | tail -1)";
|
||||||
run = ''${tarsnap} -x -f "${lastArchive}" ${optionalString cfg.verbose "-v"}'';
|
run = ''${tarsnap} -x -f "${lastArchive}" ${optionalString cfg.verbose "-v"}'';
|
||||||
|
|
||||||
in if (cfg.cachedir != null) then ''
|
in if (cfg.cachedir != null) then ''
|
||||||
|
|
|
@ -50,8 +50,7 @@ with lib;
|
||||||
default = pkgs.hadoop;
|
default = pkgs.hadoop;
|
||||||
defaultText = "pkgs.hadoop";
|
defaultText = "pkgs.hadoop";
|
||||||
example = literalExample "pkgs.hadoop";
|
example = literalExample "pkgs.hadoop";
|
||||||
description = ''
|
description = "";
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ let
|
||||||
ClusterName=${cfg.clusterName}
|
ClusterName=${cfg.clusterName}
|
||||||
StateSaveLocation=${cfg.stateSaveLocation}
|
StateSaveLocation=${cfg.stateSaveLocation}
|
||||||
SlurmUser=${cfg.user}
|
SlurmUser=${cfg.user}
|
||||||
${optionalString (cfg.controlMachine != null) ''controlMachine=${cfg.controlMachine}''}
|
${optionalString (cfg.controlMachine != null) "controlMachine=${cfg.controlMachine}"}
|
||||||
${optionalString (cfg.controlAddr != null) ''controlAddr=${cfg.controlAddr}''}
|
${optionalString (cfg.controlAddr != null) "controlAddr=${cfg.controlAddr}"}
|
||||||
${toString (map (x: "NodeName=${x}\n") cfg.nodeName)}
|
${toString (map (x: "NodeName=${x}\n") cfg.nodeName)}
|
||||||
${toString (map (x: "PartitionName=${x}\n") cfg.partitionName)}
|
${toString (map (x: "PartitionName=${x}\n") cfg.partitionName)}
|
||||||
PlugStackConfig=${plugStackConfig}/plugstack.conf
|
PlugStackConfig=${plugStackConfig}/plugstack.conf
|
||||||
|
@ -25,7 +25,7 @@ let
|
||||||
|
|
||||||
plugStackConfig = pkgs.writeTextDir "plugstack.conf"
|
plugStackConfig = pkgs.writeTextDir "plugstack.conf"
|
||||||
''
|
''
|
||||||
${optionalString cfg.enableSrunX11 ''optional ${pkgs.slurm-spank-x11}/lib/x11.so''}
|
${optionalString cfg.enableSrunX11 "optional ${pkgs.slurm-spank-x11}/lib/x11.so"}
|
||||||
${cfg.extraPlugstackConfig}
|
${cfg.extraPlugstackConfig}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -223,6 +223,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
pythonPackages = mkOption {
|
pythonPackages = mkOption {
|
||||||
|
type = types.listOf types.package;
|
||||||
default = pythonPackages: with pythonPackages; [ ];
|
default = pythonPackages: with pythonPackages; [ ];
|
||||||
defaultText = "pythonPackages: with pythonPackages; [ ]";
|
defaultText = "pythonPackages: with pythonPackages; [ ]";
|
||||||
description = "Packages to add the to the PYTHONPATH of the buildbot process.";
|
description = "Packages to add the to the PYTHONPATH of the buildbot process.";
|
||||||
|
|
|
@ -16,8 +16,7 @@ let
|
||||||
[admins]
|
[admins]
|
||||||
${cfg.adminUser} = ${cfg.adminPass}
|
${cfg.adminUser} = ${cfg.adminPass}
|
||||||
'' else
|
'' else
|
||||||
''
|
"") + (if useVersion2 then
|
||||||
'') + (if useVersion2 then
|
|
||||||
''
|
''
|
||||||
[chttpd]
|
[chttpd]
|
||||||
'' else
|
'' else
|
||||||
|
|
|
@ -117,7 +117,7 @@ in
|
||||||
serviceConfig.User = cfg.user;
|
serviceConfig.User = cfg.user;
|
||||||
serviceConfig.LogsDirectory = "firebird";
|
serviceConfig.LogsDirectory = "firebird";
|
||||||
serviceConfig.LogsDirectoryMode = "0700";
|
serviceConfig.LogsDirectoryMode = "0700";
|
||||||
serviceConfig.ExecStart = ''${firebird}/bin/fbserver -d'';
|
serviceConfig.ExecStart = "${firebird}/bin/fbserver -d";
|
||||||
|
|
||||||
# TODO think about shutdown
|
# TODO think about shutdown
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,14 +16,14 @@ let
|
||||||
''}
|
''}
|
||||||
dbms.ssl.policy.${name}.client_auth=${conf.clientAuth}
|
dbms.ssl.policy.${name}.client_auth=${conf.clientAuth}
|
||||||
${if length (splitString "/" conf.privateKey) > 1 then
|
${if length (splitString "/" conf.privateKey) > 1 then
|
||||||
''dbms.ssl.policy.${name}.private_key=${conf.privateKey}''
|
"dbms.ssl.policy.${name}.private_key=${conf.privateKey}"
|
||||||
else
|
else
|
||||||
''dbms.ssl.policy.${name}.private_key=${conf.baseDirectory}/${conf.privateKey}''
|
"dbms.ssl.policy.${name}.private_key=${conf.baseDirectory}/${conf.privateKey}"
|
||||||
}
|
}
|
||||||
${if length (splitString "/" conf.privateKey) > 1 then
|
${if length (splitString "/" conf.privateKey) > 1 then
|
||||||
''dbms.ssl.policy.${name}.public_certificate=${conf.publicCertificate}''
|
"dbms.ssl.policy.${name}.public_certificate=${conf.publicCertificate}"
|
||||||
else
|
else
|
||||||
''dbms.ssl.policy.${name}.public_certificate=${conf.baseDirectory}/${conf.publicCertificate}''
|
"dbms.ssl.policy.${name}.public_certificate=${conf.baseDirectory}/${conf.publicCertificate}"
|
||||||
}
|
}
|
||||||
dbms.ssl.policy.${name}.revoked_dir=${conf.revokedDir}
|
dbms.ssl.policy.${name}.revoked_dir=${conf.revokedDir}
|
||||||
dbms.ssl.policy.${name}.tls_versions=${concatStringsSep "," conf.tlsVersions}
|
dbms.ssl.policy.${name}.tls_versions=${concatStringsSep "," conf.tlsVersions}
|
||||||
|
|
|
@ -44,7 +44,7 @@ in {
|
||||||
};
|
};
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = ''${pkgs.bloop}/bin/bloop server'';
|
ExecStart = "${pkgs.bloop}/bin/bloop server";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -141,14 +141,14 @@ in {
|
||||||
install -o ${cfg.user} -g ${cfg.group} -m 0600 /dev/null /var/lib/infinoted/infinoted.conf
|
install -o ${cfg.user} -g ${cfg.group} -m 0600 /dev/null /var/lib/infinoted/infinoted.conf
|
||||||
cat >>/var/lib/infinoted/infinoted.conf <<EOF
|
cat >>/var/lib/infinoted/infinoted.conf <<EOF
|
||||||
[infinoted]
|
[infinoted]
|
||||||
${optionalString (cfg.keyFile != null) ''key-file=${cfg.keyFile}''}
|
${optionalString (cfg.keyFile != null) "key-file=${cfg.keyFile}"}
|
||||||
${optionalString (cfg.certificateFile != null) ''certificate-file=${cfg.certificateFile}''}
|
${optionalString (cfg.certificateFile != null) "certificate-file=${cfg.certificateFile}"}
|
||||||
${optionalString (cfg.certificateChain != null) ''certificate-chain=${cfg.certificateChain}''}
|
${optionalString (cfg.certificateChain != null) "certificate-chain=${cfg.certificateChain}"}
|
||||||
port=${toString cfg.port}
|
port=${toString cfg.port}
|
||||||
security-policy=${cfg.securityPolicy}
|
security-policy=${cfg.securityPolicy}
|
||||||
root-directory=${cfg.rootDirectory}
|
root-directory=${cfg.rootDirectory}
|
||||||
plugins=${concatStringsSep ";" cfg.plugins}
|
plugins=${concatStringsSep ";" cfg.plugins}
|
||||||
${optionalString (cfg.passwordFile != null) ''password=$(head -n 1 ${cfg.passwordFile})''}
|
${optionalString (cfg.passwordFile != null) "password=$(head -n 1 ${cfg.passwordFile})"}
|
||||||
|
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -19,7 +19,7 @@ in
|
||||||
extraFlags = mkOption {
|
extraFlags = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
description = ''Extra flags to pass to <command>oa_ded</command>'';
|
description = "Extra flags to pass to <command>oa_ded</command>";
|
||||||
example = [
|
example = [
|
||||||
"+set dedicated 2"
|
"+set dedicated 2"
|
||||||
"+set sv_hostname 'My NixOS OpenArena Server'"
|
"+set sv_hostname 'My NixOS OpenArena Server'"
|
||||||
|
|
|
@ -100,7 +100,7 @@ in
|
||||||
|
|
||||||
inputConfig = mkOption {
|
inputConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = ''generator { }'';
|
default = "generator { }";
|
||||||
description = "Logstash input configuration.";
|
description = "Logstash input configuration.";
|
||||||
example = ''
|
example = ''
|
||||||
# Read from journal
|
# Read from journal
|
||||||
|
@ -131,7 +131,7 @@ in
|
||||||
|
|
||||||
outputConfig = mkOption {
|
outputConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = ''stdout { codec => rubydebug }'';
|
default = "stdout { codec => rubydebug }";
|
||||||
description = "Logstash output configuration.";
|
description = "Logstash output configuration.";
|
||||||
example = ''
|
example = ''
|
||||||
redis { host => ["localhost"] data_type => "list" key => "logstash" codec => json }
|
redis { host => ["localhost"] data_type => "list" key => "logstash" codec => json }
|
||||||
|
|
|
@ -163,7 +163,7 @@ in {
|
||||||
|
|
||||||
systemd.services.postgrey = let
|
systemd.services.postgrey = let
|
||||||
bind-flag = if cfg.socket ? path then
|
bind-flag = if cfg.socket ? path then
|
||||||
''--unix=${cfg.socket.path} --socketmode=${cfg.socket.mode}''
|
"--unix=${cfg.socket.path} --socketmode=${cfg.socket.mode}"
|
||||||
else
|
else
|
||||||
''--inet=${optionalString (cfg.socket.addr != null) (cfg.socket.addr + ":")}${toString cfg.socket.port}'';
|
''--inet=${optionalString (cfg.socket.addr != null) (cfg.socket.addr + ":")}${toString cfg.socket.port}'';
|
||||||
in {
|
in {
|
||||||
|
|
|
@ -52,6 +52,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
timeout = mkOption {
|
timeout = mkOption {
|
||||||
|
type = types.int;
|
||||||
default = 600;
|
default = 600;
|
||||||
description = "Set the global minimum timeout, in seconds, until directories are unmounted";
|
description = "Set the global minimum timeout, in seconds, until directories are unmounted";
|
||||||
};
|
};
|
||||||
|
|
|
@ -120,7 +120,7 @@ in
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
LD_LIBRARY_PATH = ''/run/opengl-driver/lib:/run/opengl-driver-32/lib'';
|
LD_LIBRARY_PATH = "/run/opengl-driver/lib:/run/opengl-driver-32/lib";
|
||||||
DISPLAY = ":${toString config.services.xserver.display}";
|
DISPLAY = ":${toString config.services.xserver.display}";
|
||||||
GPU_MAX_ALLOC_PERCENT = "100";
|
GPU_MAX_ALLOC_PERCENT = "100";
|
||||||
GPU_USE_SYNC_OBJECTS = "1";
|
GPU_USE_SYNC_OBJECTS = "1";
|
||||||
|
|
|
@ -27,7 +27,7 @@ in
|
||||||
default = with pkgs.dictdDBs; [ wiktionary wordnet ];
|
default = with pkgs.dictdDBs; [ wiktionary wordnet ];
|
||||||
defaultText = "with pkgs.dictdDBs; [ wiktionary wordnet ]";
|
defaultText = "with pkgs.dictdDBs; [ wiktionary wordnet ]";
|
||||||
example = literalExample "[ pkgs.dictdDBs.nld2eng ]";
|
example = literalExample "[ pkgs.dictdDBs.nld2eng ]";
|
||||||
description = ''List of databases to make available.'';
|
description = "List of databases to make available.";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -185,7 +185,7 @@ in
|
||||||
};
|
};
|
||||||
zkExtraCfg = mkOption {
|
zkExtraCfg = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = ''initLimit=5&syncLimit=2&tickTime=2000'';
|
default = "initLimit=5&syncLimit=2&tickTime=2000";
|
||||||
description = ''
|
description = ''
|
||||||
Extra options to pass into Zookeeper
|
Extra options to pass into Zookeeper
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -597,8 +597,7 @@ in
|
||||||
users.groups.gitea = {};
|
users.groups.gitea = {};
|
||||||
|
|
||||||
warnings =
|
warnings =
|
||||||
optional (cfg.database.password != "") ''
|
optional (cfg.database.password != "") "config.services.gitea.database.password will be stored as plaintext in the Nix store. Use database.passwordFile instead." ++
|
||||||
config.services.gitea.database.password will be stored as plaintext in the Nix store. Use database.passwordFile instead.'' ++
|
|
||||||
optional (cfg.extraConfig != null) ''
|
optional (cfg.extraConfig != null) ''
|
||||||
services.gitea.`extraConfig` is deprecated, please use services.gitea.`settings`.
|
services.gitea.`extraConfig` is deprecated, please use services.gitea.`settings`.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -504,8 +504,7 @@ in {
|
||||||
report_stats = mkOption {
|
report_stats = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = "";
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
servers = mkOption {
|
servers = mkOption {
|
||||||
type = types.attrsOf (types.attrsOf types.str);
|
type = types.attrsOf (types.attrsOf types.str);
|
||||||
|
|
|
@ -104,7 +104,7 @@ in
|
||||||
hooks = mkOption {
|
hooks = mkOption {
|
||||||
default = {};
|
default = {};
|
||||||
example = {
|
example = {
|
||||||
doshutdown = ''# shell commands to notify that the computer is shutting down'';
|
doshutdown = "# shell commands to notify that the computer is shutting down";
|
||||||
};
|
};
|
||||||
type = types.attrsOf types.lines;
|
type = types.attrsOf types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
|
|
|
@ -25,10 +25,10 @@ let
|
||||||
|
|
||||||
graphiteApiConfig = pkgs.writeText "graphite-api.yaml" ''
|
graphiteApiConfig = pkgs.writeText "graphite-api.yaml" ''
|
||||||
search_index: ${dataDir}/index
|
search_index: ${dataDir}/index
|
||||||
${optionalString (config.time.timeZone != null) ''time_zone: ${config.time.timeZone}''}
|
${optionalString (config.time.timeZone != null) "time_zone: ${config.time.timeZone}"}
|
||||||
${optionalString (cfg.api.finders != []) ''finders:''}
|
${optionalString (cfg.api.finders != []) "finders:"}
|
||||||
${concatMapStringsSep "\n" (f: " - " + f.moduleName) cfg.api.finders}
|
${concatMapStringsSep "\n" (f: " - " + f.moduleName) cfg.api.finders}
|
||||||
${optionalString (cfg.api.functions != []) ''functions:''}
|
${optionalString (cfg.api.functions != []) "functions:"}
|
||||||
${concatMapStringsSep "\n" (f: " - " + f) cfg.api.functions}
|
${concatMapStringsSep "\n" (f: " - " + f) cfg.api.functions}
|
||||||
${cfg.api.extraConfig}
|
${cfg.api.extraConfig}
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -67,7 +67,7 @@ in
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
warnings = optional (cfg.allow != null && cfg.deny != null)
|
warnings = optional (cfg.allow != null && cfg.deny != null)
|
||||||
''If `services.incron.allow` is set then `services.incron.deny` will be ignored.'';
|
"If `services.incron.allow` is set then `services.incron.deny` will be ignored.";
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.incron ];
|
environment.systemPackages = [ pkgs.incron ];
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ in
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 25826;
|
default = 25826;
|
||||||
description = ''Network address on which to accept collectd binary network packets.'';
|
description = "Network address on which to accept collectd binary network packets.";
|
||||||
};
|
};
|
||||||
|
|
||||||
listenAddress = mkOption {
|
listenAddress = mkOption {
|
||||||
|
|
|
@ -69,7 +69,7 @@ in {
|
||||||
umask 077
|
umask 077
|
||||||
${pkgs.envsubst}/bin/envsubst -i "${configFile}" > /var/run/telegraf/config.toml
|
${pkgs.envsubst}/bin/envsubst -i "${configFile}" > /var/run/telegraf/config.toml
|
||||||
'');
|
'');
|
||||||
ExecStart=''${cfg.package}/bin/telegraf -config ${finalConfigFile}'';
|
ExecStart="${cfg.package}/bin/telegraf -config ${finalConfigFile}";
|
||||||
ExecReload="${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
ExecReload="${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
RuntimeDirectory = "telegraf";
|
RuntimeDirectory = "telegraf";
|
||||||
User = "telegraf";
|
User = "telegraf";
|
||||||
|
|
|
@ -12,7 +12,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
optionToArgs = opt: v : optional (v != null) ''--${opt}="${toString v}"'';
|
optionToArgs = opt: v : optional (v != null) ''--${opt}="${toString v}"'';
|
||||||
flagToArgs = opt: v : optional v ''--${opt}'';
|
flagToArgs = opt: v : optional v "--${opt}";
|
||||||
listToArgs = opt: vs : map (v: ''--${opt}="${v}"'') vs;
|
listToArgs = opt: vs : map (v: ''--${opt}="${v}"'') vs;
|
||||||
attrsToArgs = opt: kvs: mapAttrsToList (k: v: ''--${opt}=${k}=\"${v}\"'') kvs;
|
attrsToArgs = opt: kvs: mapAttrsToList (k: v: ''--${opt}=${k}=\"${v}\"'') kvs;
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ let
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
json = builtins.toFile "${name}.json" (builtins.toJSON attrs);
|
json = builtins.toFile "${name}.json" (builtins.toJSON attrs);
|
||||||
nativeBuildInputs = [ pkgs.remarshal ];
|
nativeBuildInputs = [ pkgs.remarshal ];
|
||||||
} ''json2yaml -i $json -o $out'';
|
} "json2yaml -i $json -o $out";
|
||||||
|
|
||||||
thanos = cmd: "${cfg.package}/bin/thanos ${cmd}" +
|
thanos = cmd: "${cfg.package}/bin/thanos ${cmd}" +
|
||||||
(let args = cfg.${cmd}.arguments;
|
(let args = cfg.${cmd}.arguments;
|
||||||
|
|
|
@ -205,7 +205,7 @@ in
|
||||||
after = [ "upsd.service" ];
|
after = [ "upsd.service" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
# TODO: replace 'root' by another username.
|
# TODO: replace 'root' by another username.
|
||||||
script = ''${pkgs.nut}/bin/upsdrvctl -u root start'';
|
script = "${pkgs.nut}/bin/upsdrvctl -u root start";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
|
|
|
@ -48,7 +48,7 @@ let
|
||||||
ExecStart = ''${ceph.out}/bin/${if daemonType == "rgw" then "radosgw" else "ceph-${daemonType}"} \
|
ExecStart = ''${ceph.out}/bin/${if daemonType == "rgw" then "radosgw" else "ceph-${daemonType}"} \
|
||||||
-f --cluster ${clusterName} --id ${daemonId}'';
|
-f --cluster ${clusterName} --id ${daemonId}'';
|
||||||
} // optionalAttrs (daemonType == "osd") {
|
} // optionalAttrs (daemonType == "osd") {
|
||||||
ExecStartPre = ''${ceph.lib}/libexec/ceph/ceph-osd-prestart.sh --id ${daemonId} --cluster ${clusterName}'';
|
ExecStartPre = "${ceph.lib}/libexec/ceph/ceph-osd-prestart.sh --id ${daemonId} --cluster ${clusterName}";
|
||||||
RestartSec = "20s";
|
RestartSec = "20s";
|
||||||
PrivateDevices = "no"; # osd needs disk access
|
PrivateDevices = "no"; # osd needs disk access
|
||||||
} // optionalAttrs ( daemonType == "mon") {
|
} // optionalAttrs ( daemonType == "mon") {
|
||||||
|
@ -353,7 +353,7 @@ in
|
||||||
];
|
];
|
||||||
|
|
||||||
warnings = optional (cfg.global.monInitialMembers == null)
|
warnings = optional (cfg.global.monInitialMembers == null)
|
||||||
''Not setting up a list of members in monInitialMembers requires that you set the host variable for each mon daemon or else the cluster won't function'';
|
"Not setting up a list of members in monInitialMembers requires that you set the host variable for each mon daemon or else the cluster won't function";
|
||||||
|
|
||||||
environment.etc."ceph/ceph.conf".text = let
|
environment.etc."ceph/ceph.conf".text = let
|
||||||
# Merge the extraConfig set for mgr daemons, as mgr don't have their own section
|
# Merge the extraConfig set for mgr daemons, as mgr don't have their own section
|
||||||
|
|
|
@ -24,13 +24,15 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
dataDir = mkOption {
|
dataDir = mkOption {
|
||||||
default = ''/home/${user}/'';
|
type = types.str;
|
||||||
|
default = "/home/${user}/";
|
||||||
description = ''
|
description = ''
|
||||||
The directory holding configuration, incoming and temporary files.
|
The directory holding configuration, incoming and temporary files.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
user = mkOption {
|
user = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
The user the AMule daemon should run as.
|
The user the AMule daemon should run as.
|
||||||
|
|
|
@ -42,13 +42,13 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
domain = mkOption {
|
domain = mkOption {
|
||||||
description = ''Proxy account domain/workgroup name.'';
|
description = "Proxy account domain/workgroup name.";
|
||||||
};
|
};
|
||||||
|
|
||||||
password = mkOption {
|
password = mkOption {
|
||||||
default = "/etc/cntlm.password";
|
default = "/etc/cntlm.password";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = ''Proxy account password. Note: use chmod 0600 on /etc/cntlm.password for security.'';
|
description = "Proxy account password. Note: use chmod 0600 on /etc/cntlm.password for security.";
|
||||||
};
|
};
|
||||||
|
|
||||||
netbios_hostname = mkOption {
|
netbios_hostname = mkOption {
|
||||||
|
|
|
@ -42,8 +42,7 @@ in {
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = ''
|
default = "";
|
||||||
'';
|
|
||||||
description = ''
|
description = ''
|
||||||
Configuration lines appended to the generated connman configuration file.
|
Configuration lines appended to the generated connman configuration file.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -26,8 +26,7 @@ in {
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = ''
|
default = "";
|
||||||
'';
|
|
||||||
description = ''
|
description = ''
|
||||||
Extra lines to be added verbatim to dnsdist.conf.
|
Extra lines to be added verbatim to dnsdist.conf.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -10,12 +10,12 @@ options = {
|
||||||
pidDir = mkOption {
|
pidDir = mkOption {
|
||||||
default = "/run/gateone";
|
default = "/run/gateone";
|
||||||
type = types.path;
|
type = types.path;
|
||||||
description = ''Path of pid files for GateOne.'';
|
description = "Path of pid files for GateOne.";
|
||||||
};
|
};
|
||||||
settingsDir = mkOption {
|
settingsDir = mkOption {
|
||||||
default = "/var/lib/gateone";
|
default = "/var/lib/gateone";
|
||||||
type = types.path;
|
type = types.path;
|
||||||
description = ''Path of configuration files for GateOne.'';
|
description = "Path of configuration files for GateOne.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,8 +20,8 @@ let
|
||||||
ssid=${cfg.ssid}
|
ssid=${cfg.ssid}
|
||||||
hw_mode=${cfg.hwMode}
|
hw_mode=${cfg.hwMode}
|
||||||
channel=${toString cfg.channel}
|
channel=${toString cfg.channel}
|
||||||
${optionalString (cfg.countryCode != null) ''country_code=${cfg.countryCode}''}
|
${optionalString (cfg.countryCode != null) "country_code=${cfg.countryCode}"}
|
||||||
${optionalString (cfg.countryCode != null) ''ieee80211d=1''}
|
${optionalString (cfg.countryCode != null) "ieee80211d=1"}
|
||||||
|
|
||||||
# logging (debug level)
|
# logging (debug level)
|
||||||
logger_syslog=-1
|
logger_syslog=-1
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{
|
{
|
||||||
|
|
||||||
TagLineFont = "etc/LiberationSans-25.pcf";
|
TagLineFont = "etc/LiberationSans-25.pcf";
|
||||||
TagLineLocale = ''en_US.UTF-8'';
|
TagLineLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
AdminGroup = "root"; # groups that can change server config
|
AdminGroup = "root"; # groups that can change server config
|
||||||
AnswerRotary = "fax"; # don't accept anything else but faxes
|
AnswerRotary = "fax"; # don't accept anything else but faxes
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
SessionTracing = "0x78701";
|
SessionTracing = "0x78701";
|
||||||
UUCPLockDir = "/var/lock";
|
UUCPLockDir = "/var/lock";
|
||||||
|
|
||||||
SendPageCmd = ''${pkgs.coreutils}/bin/false''; # prevent pager transmit
|
SendPageCmd = "${pkgs.coreutils}/bin/false"; # prevent pager transmit
|
||||||
SendUUCPCmd = ''${pkgs.coreutils}/bin/false''; # prevent UUCP transmit
|
SendUUCPCmd = "${pkgs.coreutils}/bin/false"; # prevent UUCP transmit
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,8 +85,8 @@ let
|
||||||
# Otherwise, we use `false` to provoke
|
# Otherwise, we use `false` to provoke
|
||||||
# an error if hylafax tries to use it.
|
# an error if hylafax tries to use it.
|
||||||
c.sendmailPath = mkMerge [
|
c.sendmailPath = mkMerge [
|
||||||
(mkIfDefault noWrapper ''${pkgs.coreutils}/bin/false'')
|
(mkIfDefault noWrapper "${pkgs.coreutils}/bin/false")
|
||||||
(mkIfDefault (!noWrapper) ''${wrapperDir}/${program}'')
|
(mkIfDefault (!noWrapper) "${wrapperDir}/${program}")
|
||||||
];
|
];
|
||||||
importDefaultConfig = file:
|
importDefaultConfig = file:
|
||||||
lib.attrsets.mapAttrs
|
lib.attrsets.mapAttrs
|
||||||
|
@ -121,7 +121,7 @@ in
|
||||||
|
|
||||||
options.services.hylafax = {
|
options.services.hylafax = {
|
||||||
|
|
||||||
enable = mkEnableOption ''HylaFAX server'';
|
enable = mkEnableOption "HylaFAX server";
|
||||||
|
|
||||||
autostart = mkOption {
|
autostart = mkOption {
|
||||||
type = bool;
|
type = bool;
|
||||||
|
@ -139,28 +139,28 @@ in
|
||||||
type = nullOr str1;
|
type = nullOr str1;
|
||||||
default = null;
|
default = null;
|
||||||
example = "49";
|
example = "49";
|
||||||
description = ''Country code for server and all modems.'';
|
description = "Country code for server and all modems.";
|
||||||
};
|
};
|
||||||
|
|
||||||
areaCode = mkOption {
|
areaCode = mkOption {
|
||||||
type = nullOr str1;
|
type = nullOr str1;
|
||||||
default = null;
|
default = null;
|
||||||
example = "30";
|
example = "30";
|
||||||
description = ''Area code for server and all modems.'';
|
description = "Area code for server and all modems.";
|
||||||
};
|
};
|
||||||
|
|
||||||
longDistancePrefix = mkOption {
|
longDistancePrefix = mkOption {
|
||||||
type = nullOr str;
|
type = nullOr str;
|
||||||
default = null;
|
default = null;
|
||||||
example = "0";
|
example = "0";
|
||||||
description = ''Long distance prefix for server and all modems.'';
|
description = "Long distance prefix for server and all modems.";
|
||||||
};
|
};
|
||||||
|
|
||||||
internationalPrefix = mkOption {
|
internationalPrefix = mkOption {
|
||||||
type = nullOr str;
|
type = nullOr str;
|
||||||
default = null;
|
default = null;
|
||||||
example = "00";
|
example = "00";
|
||||||
description = ''International prefix for server and all modems.'';
|
description = "International prefix for server and all modems.";
|
||||||
};
|
};
|
||||||
|
|
||||||
spoolAreaPath = mkOption {
|
spoolAreaPath = mkOption {
|
||||||
|
@ -267,7 +267,7 @@ in
|
||||||
spoolExtraInit = mkOption {
|
spoolExtraInit = mkOption {
|
||||||
type = lines;
|
type = lines;
|
||||||
default = "";
|
default = "";
|
||||||
example = ''chmod 0755 . # everyone may read my faxes'';
|
example = "chmod 0755 . # everyone may read my faxes";
|
||||||
description = ''
|
description = ''
|
||||||
Additional shell code that is executed within the
|
Additional shell code that is executed within the
|
||||||
spooling area directory right after its setup.
|
spooling area directory right after its setup.
|
||||||
|
@ -345,7 +345,7 @@ in
|
||||||
faxqclean.doneqMinutes = mkOption {
|
faxqclean.doneqMinutes = mkOption {
|
||||||
type = int1;
|
type = int1;
|
||||||
default = 15;
|
default = 15;
|
||||||
example = literalExample ''24*60'';
|
example = literalExample "24*60";
|
||||||
description = ''
|
description = ''
|
||||||
Set the job
|
Set the job
|
||||||
age threshold (in minutes) that controls how long
|
age threshold (in minutes) that controls how long
|
||||||
|
@ -355,7 +355,7 @@ in
|
||||||
faxqclean.docqMinutes = mkOption {
|
faxqclean.docqMinutes = mkOption {
|
||||||
type = int1;
|
type = int1;
|
||||||
default = 60;
|
default = 60;
|
||||||
example = literalExample ''24*60'';
|
example = literalExample "24*60";
|
||||||
description = ''
|
description = ''
|
||||||
Set the document
|
Set the document
|
||||||
age threshold (in minutes) that controls how long
|
age threshold (in minutes) that controls how long
|
||||||
|
|
|
@ -16,12 +16,12 @@ let
|
||||||
mkLines = conf:
|
mkLines = conf:
|
||||||
(lib.concatLists
|
(lib.concatLists
|
||||||
(lib.flip lib.mapAttrsToList conf
|
(lib.flip lib.mapAttrsToList conf
|
||||||
(k: map (v: ''${k}: ${v}'')
|
(k: map (v: "${k}: ${v}")
|
||||||
)));
|
)));
|
||||||
include = mkLines { Include = conf.Include or []; };
|
include = mkLines { Include = conf.Include or []; };
|
||||||
other = mkLines ( conf // { Include = []; } );
|
other = mkLines ( conf // { Include = []; } );
|
||||||
in
|
in
|
||||||
pkgs.writeText ''hylafax-config${name}''
|
pkgs.writeText "hylafax-config${name}"
|
||||||
(concatStringsSep "\n" (include ++ other));
|
(concatStringsSep "\n" (include ++ other));
|
||||||
|
|
||||||
globalConfigPath = mkConfigFile "" cfg.faxqConfig;
|
globalConfigPath = mkConfigFile "" cfg.faxqConfig;
|
||||||
|
@ -29,7 +29,7 @@ let
|
||||||
modemConfigPath =
|
modemConfigPath =
|
||||||
let
|
let
|
||||||
mkModemConfigFile = { config, name, ... }:
|
mkModemConfigFile = { config, name, ... }:
|
||||||
mkConfigFile ''.${name}''
|
mkConfigFile ".${name}"
|
||||||
(cfg.commonModemConfig // config);
|
(cfg.commonModemConfig // config);
|
||||||
mkLine = { name, type, ... }@modem: ''
|
mkLine = { name, type, ... }@modem: ''
|
||||||
# check if modem config file exists:
|
# check if modem config file exists:
|
||||||
|
@ -81,7 +81,7 @@ let
|
||||||
description = "HylaFAX queue manager sendq watch";
|
description = "HylaFAX queue manager sendq watch";
|
||||||
documentation = [ "man:faxq(8)" "man:sendq(5)" ];
|
documentation = [ "man:faxq(8)" "man:sendq(5)" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
pathConfig.PathExistsGlob = [ ''${cfg.spoolAreaPath}/sendq/q*'' ];
|
pathConfig.PathExistsGlob = [ "${cfg.spoolAreaPath}/sendq/q*" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
timers = mkMerge [
|
timers = mkMerge [
|
||||||
|
@ -134,7 +134,7 @@ let
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
serviceConfig.ExecStop = ''${setupSpoolScript}'';
|
serviceConfig.ExecStop = "${setupSpoolScript}";
|
||||||
serviceConfig.RemainAfterExit = true;
|
serviceConfig.RemainAfterExit = true;
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
unitConfig.RequiresMountsFor = [ cfg.spoolAreaPath ];
|
unitConfig.RequiresMountsFor = [ cfg.spoolAreaPath ];
|
||||||
|
@ -145,7 +145,7 @@ let
|
||||||
documentation = [ "man:faxq(8)" ];
|
documentation = [ "man:faxq(8)" ];
|
||||||
requires = [ "hylafax-spool.service" ];
|
requires = [ "hylafax-spool.service" ];
|
||||||
after = [ "hylafax-spool.service" ];
|
after = [ "hylafax-spool.service" ];
|
||||||
wants = mapModems ( { name, ... }: ''hylafax-faxgetty@${name}.service'' );
|
wants = mapModems ( { name, ... }: "hylafax-faxgetty@${name}.service" );
|
||||||
wantedBy = mkIf cfg.autostart [ "multi-user.target" ];
|
wantedBy = mkIf cfg.autostart [ "multi-user.target" ];
|
||||||
serviceConfig.Type = "forking";
|
serviceConfig.Type = "forking";
|
||||||
serviceConfig.ExecStart = ''${pkgs.hylafaxplus}/spool/bin/faxq -q "${cfg.spoolAreaPath}"'';
|
serviceConfig.ExecStart = ''${pkgs.hylafaxplus}/spool/bin/faxq -q "${cfg.spoolAreaPath}"'';
|
||||||
|
@ -155,7 +155,7 @@ let
|
||||||
# stopped will always yield a failed send attempt:
|
# stopped will always yield a failed send attempt:
|
||||||
# The fax service is started when the job is created with
|
# The fax service is started when the job is created with
|
||||||
# `sendfax`, but modems need some time to initialize.
|
# `sendfax`, but modems need some time to initialize.
|
||||||
serviceConfig.ExecStartPost = [ ''${waitFaxqScript}'' ];
|
serviceConfig.ExecStartPost = [ "${waitFaxqScript}" ];
|
||||||
# faxquit fails if the pipe is already gone
|
# faxquit fails if the pipe is already gone
|
||||||
# (e.g. the service is already stopping)
|
# (e.g. the service is already stopping)
|
||||||
serviceConfig.ExecStop = ''-${pkgs.hylafaxplus}/spool/bin/faxquit -q "${cfg.spoolAreaPath}"'';
|
serviceConfig.ExecStop = ''-${pkgs.hylafaxplus}/spool/bin/faxquit -q "${cfg.spoolAreaPath}"'';
|
||||||
|
@ -186,7 +186,7 @@ let
|
||||||
wantedBy = mkIf cfg.faxcron.enable.spoolInit requires;
|
wantedBy = mkIf cfg.faxcron.enable.spoolInit requires;
|
||||||
startAt = mkIf (cfg.faxcron.enable.frequency!=null) cfg.faxcron.enable.frequency;
|
startAt = mkIf (cfg.faxcron.enable.frequency!=null) cfg.faxcron.enable.frequency;
|
||||||
serviceConfig.ExecStart = concatStringsSep " " [
|
serviceConfig.ExecStart = concatStringsSep " " [
|
||||||
''${pkgs.hylafaxplus}/spool/bin/faxcron''
|
"${pkgs.hylafaxplus}/spool/bin/faxcron"
|
||||||
''-q "${cfg.spoolAreaPath}"''
|
''-q "${cfg.spoolAreaPath}"''
|
||||||
''-info ${toString cfg.faxcron.infoDays}''
|
''-info ${toString cfg.faxcron.infoDays}''
|
||||||
''-log ${toString cfg.faxcron.logDays}''
|
''-log ${toString cfg.faxcron.logDays}''
|
||||||
|
@ -202,18 +202,18 @@ let
|
||||||
wantedBy = mkIf cfg.faxqclean.enable.spoolInit requires;
|
wantedBy = mkIf cfg.faxqclean.enable.spoolInit requires;
|
||||||
startAt = mkIf (cfg.faxqclean.enable.frequency!=null) cfg.faxqclean.enable.frequency;
|
startAt = mkIf (cfg.faxqclean.enable.frequency!=null) cfg.faxqclean.enable.frequency;
|
||||||
serviceConfig.ExecStart = concatStringsSep " " [
|
serviceConfig.ExecStart = concatStringsSep " " [
|
||||||
''${pkgs.hylafaxplus}/spool/bin/faxqclean''
|
"${pkgs.hylafaxplus}/spool/bin/faxqclean"
|
||||||
''-q "${cfg.spoolAreaPath}"''
|
''-q "${cfg.spoolAreaPath}"''
|
||||||
''-v''
|
"-v"
|
||||||
(optionalString (cfg.faxqclean.archiving!="never") ''-a'')
|
(optionalString (cfg.faxqclean.archiving!="never") "-a")
|
||||||
(optionalString (cfg.faxqclean.archiving=="always") ''-A'')
|
(optionalString (cfg.faxqclean.archiving=="always") "-A")
|
||||||
''-j ${toString (cfg.faxqclean.doneqMinutes*60)}''
|
''-j ${toString (cfg.faxqclean.doneqMinutes*60)}''
|
||||||
''-d ${toString (cfg.faxqclean.docqMinutes*60)}''
|
''-d ${toString (cfg.faxqclean.docqMinutes*60)}''
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mkFaxgettyService = { name, ... }:
|
mkFaxgettyService = { name, ... }:
|
||||||
lib.nameValuePair ''hylafax-faxgetty@${name}'' rec {
|
lib.nameValuePair "hylafax-faxgetty@${name}" rec {
|
||||||
description = "HylaFAX faxgetty for %I";
|
description = "HylaFAX faxgetty for %I";
|
||||||
documentation = [ "man:faxgetty(8)" ];
|
documentation = [ "man:faxgetty(8)" ];
|
||||||
bindsTo = [ "dev-%i.device" ];
|
bindsTo = [ "dev-%i.device" ];
|
||||||
|
@ -221,7 +221,7 @@ let
|
||||||
after = bindsTo ++ requires;
|
after = bindsTo ++ requires;
|
||||||
before = [ "hylafax-faxq.service" "getty.target" ];
|
before = [ "hylafax-faxq.service" "getty.target" ];
|
||||||
unitConfig.StopWhenUnneeded = true;
|
unitConfig.StopWhenUnneeded = true;
|
||||||
unitConfig.AssertFileNotEmpty = ''${cfg.spoolAreaPath}/etc/config.%I'';
|
unitConfig.AssertFileNotEmpty = "${cfg.spoolAreaPath}/etc/config.%I";
|
||||||
serviceConfig.UtmpIdentifier = "%I";
|
serviceConfig.UtmpIdentifier = "%I";
|
||||||
serviceConfig.TTYPath = "/dev/%I";
|
serviceConfig.TTYPath = "/dev/%I";
|
||||||
serviceConfig.Restart = "always";
|
serviceConfig.Restart = "always";
|
||||||
|
|
|
@ -17,37 +17,37 @@ in
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = ''Enable the kippo honeypot ssh server.'';
|
description = "Enable the kippo honeypot ssh server.";
|
||||||
};
|
};
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
default = 2222;
|
default = 2222;
|
||||||
type = types.int;
|
type = types.int;
|
||||||
description = ''TCP port number for kippo to bind to.'';
|
description = "TCP port number for kippo to bind to.";
|
||||||
};
|
};
|
||||||
hostname = mkOption {
|
hostname = mkOption {
|
||||||
default = "nas3";
|
default = "nas3";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = ''Hostname for kippo to present to SSH login'';
|
description = "Hostname for kippo to present to SSH login";
|
||||||
};
|
};
|
||||||
varPath = mkOption {
|
varPath = mkOption {
|
||||||
default = "/var/lib/kippo";
|
default = "/var/lib/kippo";
|
||||||
type = types.path;
|
type = types.path;
|
||||||
description = ''Path of read/write files needed for operation and configuration.'';
|
description = "Path of read/write files needed for operation and configuration.";
|
||||||
};
|
};
|
||||||
logPath = mkOption {
|
logPath = mkOption {
|
||||||
default = "/var/log/kippo";
|
default = "/var/log/kippo";
|
||||||
type = types.path;
|
type = types.path;
|
||||||
description = ''Path of log files needed for operation and configuration.'';
|
description = "Path of log files needed for operation and configuration.";
|
||||||
};
|
};
|
||||||
pidPath = mkOption {
|
pidPath = mkOption {
|
||||||
default = "/run/kippo";
|
default = "/run/kippo";
|
||||||
type = types.path;
|
type = types.path;
|
||||||
description = ''Path of pid files needed for operation.'';
|
description = "Path of pid files needed for operation.";
|
||||||
};
|
};
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
description = ''Extra verbatim configuration added to the end of kippo.cfg.'';
|
description = "Extra verbatim configuration added to the end of kippo.cfg.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,20 @@ in
|
||||||
description = ''
|
description = ''
|
||||||
Configuration for Nomad. See the <link xlink:href="https://www.nomadproject.io/docs/configuration">documentation</link>
|
Configuration for Nomad. See the <link xlink:href="https://www.nomadproject.io/docs/configuration">documentation</link>
|
||||||
for supported values.
|
for supported values.
|
||||||
|
|
||||||
|
Notes about <literal>data_dir</literal>:
|
||||||
|
|
||||||
|
If <literal>data_dir</literal> is set to a value other than the
|
||||||
|
default value of <literal>"/var/lib/nomad"</literal> it is the Nomad
|
||||||
|
cluster manager's responsibility to make sure that this directory
|
||||||
|
exists and has the appropriate permissions.
|
||||||
|
|
||||||
|
Additionally, if <literal>dropPrivileges</literal> is
|
||||||
|
<literal>true</literal> then <literal>data_dir</literal>
|
||||||
|
<emphasis>cannot</emphasis> be customized. Setting
|
||||||
|
<literal>dropPrivileges</literal> to <literal>true</literal> enables
|
||||||
|
the <literal>DynamicUser</literal> feature of systemd which directly
|
||||||
|
manages and operates on <literal>StateDirectory</literal>.
|
||||||
'';
|
'';
|
||||||
example = literalExample ''
|
example = literalExample ''
|
||||||
{
|
{
|
||||||
|
@ -109,25 +123,28 @@ in
|
||||||
iptables
|
iptables
|
||||||
]);
|
]);
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = mkMerge [
|
||||||
DynamicUser = cfg.dropPrivileges;
|
{
|
||||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
DynamicUser = cfg.dropPrivileges;
|
||||||
ExecStart = "${cfg.package}/bin/nomad agent -config=/etc/nomad.json" +
|
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
concatMapStrings (path: " -config=${path}") cfg.extraSettingsPaths;
|
ExecStart = "${cfg.package}/bin/nomad agent -config=/etc/nomad.json" +
|
||||||
KillMode = "process";
|
concatMapStrings (path: " -config=${path}") cfg.extraSettingsPaths;
|
||||||
KillSignal = "SIGINT";
|
KillMode = "process";
|
||||||
LimitNOFILE = 65536;
|
KillSignal = "SIGINT";
|
||||||
LimitNPROC = "infinity";
|
LimitNOFILE = 65536;
|
||||||
OOMScoreAdjust = -1000;
|
LimitNPROC = "infinity";
|
||||||
Restart = "on-failure";
|
OOMScoreAdjust = -1000;
|
||||||
RestartSec = 2;
|
Restart = "on-failure";
|
||||||
# Agrees with the default `data_dir = "/var/lib/nomad"` in `settings` above.
|
RestartSec = 2;
|
||||||
StateDirectory = "nomad";
|
TasksMax = "infinity";
|
||||||
TasksMax = "infinity";
|
}
|
||||||
User = optionalString cfg.dropPrivileges "nomad";
|
(mkIf cfg.enableDocker {
|
||||||
} // (optionalAttrs cfg.enableDocker {
|
SupplementaryGroups = "docker"; # space-separated string
|
||||||
SupplementaryGroups = "docker"; # space-separated string
|
})
|
||||||
});
|
(mkIf (cfg.settings.data_dir == "/var/lib/nomad") {
|
||||||
|
StateDirectory = "nomad";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
unitConfig = {
|
unitConfig = {
|
||||||
StartLimitIntervalSec = 10;
|
StartLimitIntervalSec = 10;
|
||||||
|
@ -135,6 +152,13 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = cfg.dropPrivileges -> cfg.settings.data_dir == "/var/lib/nomad";
|
||||||
|
message = "settings.data_dir must be equal to \"/var/lib/nomad\" if dropPrivileges is true";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
# Docker support requires the Docker daemon to be running.
|
# Docker support requires the Docker daemon to be running.
|
||||||
virtualisation.docker.enable = mkIf cfg.enableDocker true;
|
virtualisation.docker.enable = mkIf cfg.enableDocker true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -82,6 +82,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
initstepslew = mkOption {
|
initstepslew = mkOption {
|
||||||
|
type = types.attrsOf (types.either types.bool types.int);
|
||||||
default = {
|
default = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
threshold = 1000; # by default, same threshold as 'ntpd -g' (1000s)
|
threshold = 1000; # by default, same threshold as 'ntpd -g' (1000s)
|
||||||
|
|
|
@ -10,7 +10,7 @@ in
|
||||||
###### interface
|
###### interface
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
services.owamp.enable = mkEnableOption ''Enable OWAMP server'';
|
services.owamp.enable = mkEnableOption "Enable OWAMP server";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
dataDir = mkOption {
|
dataDir = mkOption {
|
||||||
default = ''/home/${user}/.config/quassel-irc.org'';
|
default = "/home/${user}/.config/quassel-irc.org";
|
||||||
description = ''
|
description = ''
|
||||||
The directory holding configuration files, the SQlite database and the SSL Cert.
|
The directory holding configuration files, the SQlite database and the SSL Cert.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -303,7 +303,7 @@ in
|
||||||
${cfg.package}/bin/smokeping --check --config=${configPath}
|
${cfg.package}/bin/smokeping --check --config=${configPath}
|
||||||
${cfg.package}/bin/smokeping --static --config=${configPath}
|
${cfg.package}/bin/smokeping --static --config=${configPath}
|
||||||
'';
|
'';
|
||||||
script = ''${cfg.package}/bin/smokeping --config=${configPath} --nodaemon'';
|
script = "${cfg.package}/bin/smokeping --config=${configPath} --nodaemon";
|
||||||
};
|
};
|
||||||
systemd.services.thttpd = mkIf cfg.webService {
|
systemd.services.thttpd = mkIf cfg.webService {
|
||||||
wantedBy = [ "multi-user.target"];
|
wantedBy = [ "multi-user.target"];
|
||||||
|
|
|
@ -56,25 +56,25 @@ in
|
||||||
syslog = mkOption {
|
syslog = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''Whether to enable syslog output.'';
|
description = "Whether to enable syslog output.";
|
||||||
};
|
};
|
||||||
|
|
||||||
passwordAuthentication = mkOption {
|
passwordAuthentication = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''Whether to enable password authentication.'';
|
description = "Whether to enable password authentication.";
|
||||||
};
|
};
|
||||||
|
|
||||||
publicKeyAuthentication = mkOption {
|
publicKeyAuthentication = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''Whether to enable public key authentication.'';
|
description = "Whether to enable public key authentication.";
|
||||||
};
|
};
|
||||||
|
|
||||||
rootLogin = mkOption {
|
rootLogin = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''Whether to enable remote root login.'';
|
description = "Whether to enable remote root login.";
|
||||||
};
|
};
|
||||||
|
|
||||||
loginShell = mkOption {
|
loginShell = mkOption {
|
||||||
|
@ -96,13 +96,13 @@ in
|
||||||
tcpForwarding = mkOption {
|
tcpForwarding = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''Whether to enable TCP/IP forwarding.'';
|
description = "Whether to enable TCP/IP forwarding.";
|
||||||
};
|
};
|
||||||
|
|
||||||
x11Forwarding = mkOption {
|
x11Forwarding = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''Whether to enable X11 forwarding.'';
|
description = "Whether to enable X11 forwarding.";
|
||||||
};
|
};
|
||||||
|
|
||||||
subsystems = mkOption {
|
subsystems = mkOption {
|
||||||
|
|
|
@ -1273,7 +1273,7 @@ in {
|
||||||
provided the user is prompted during an interactive
|
provided the user is prompted during an interactive
|
||||||
<literal>--load-creds</literal> call.
|
<literal>--load-creds</literal> call.
|
||||||
'';
|
'';
|
||||||
} ''Definition for a private key that's stored on a token/smartcard/TPM.'';
|
} "Definition for a private key that's stored on a token/smartcard/TPM.";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ in
|
||||||
value must be a function which receives the attrset defined
|
value must be a function which receives the attrset defined
|
||||||
in <varname>python3Packages</varname> as the sole argument.
|
in <varname>python3Packages</varname> as the sole argument.
|
||||||
'';
|
'';
|
||||||
example = literalExample ''p: [ p.lxml p.requests ]'';
|
example = literalExample "p: [ p.lxml p.requests ]";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,8 +14,8 @@ let
|
||||||
then ''"${psk}"''
|
then ''"${psk}"''
|
||||||
else pskRaw;
|
else pskRaw;
|
||||||
baseAuth = if key != null
|
baseAuth = if key != null
|
||||||
then ''psk=${key}''
|
then "psk=${key}"
|
||||||
else ''key_mgmt=NONE'';
|
else "key_mgmt=NONE";
|
||||||
in ''
|
in ''
|
||||||
network={
|
network={
|
||||||
ssid="${ssid}"
|
ssid="${ssid}"
|
||||||
|
|
|
@ -173,7 +173,7 @@ in
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = ''${cfg.package}/bin/usbguard-daemon -P -k -c ${daemonConfFile}'';
|
ExecStart = "${cfg.package}/bin/usbguard-daemon -P -k -c ${daemonConfFile}";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
|
|
||||||
StateDirectory = [
|
StateDirectory = [
|
||||||
|
|
|
@ -27,6 +27,11 @@ let
|
||||||
''}
|
''}
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
allConfigPaths = [configFile] ++ cfg.extraSettingsPaths;
|
||||||
|
|
||||||
|
configOptions = escapeShellArgs (concatMap (p: ["-config" p]) allConfigPaths);
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -84,7 +89,14 @@ in
|
||||||
storageConfig = mkOption {
|
storageConfig = mkOption {
|
||||||
type = types.nullOr types.lines;
|
type = types.nullOr types.lines;
|
||||||
default = null;
|
default = null;
|
||||||
description = "Storage configuration";
|
description = ''
|
||||||
|
HCL configuration to insert in the storageBackend section.
|
||||||
|
|
||||||
|
Confidential values should not be specified here because this option's
|
||||||
|
value is written to the Nix store, which is publicly readable.
|
||||||
|
Provide credentials and such in a separate file using
|
||||||
|
<xref linkend="opt-services.vault.extraSettingsPaths"/>.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
telemetryConfig = mkOption {
|
telemetryConfig = mkOption {
|
||||||
|
@ -98,6 +110,36 @@ in
|
||||||
default = "";
|
default = "";
|
||||||
description = "Extra text appended to <filename>vault.hcl</filename>.";
|
description = "Extra text appended to <filename>vault.hcl</filename>.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraSettingsPaths = mkOption {
|
||||||
|
type = types.listOf types.path;
|
||||||
|
default = [];
|
||||||
|
description = ''
|
||||||
|
Configuration files to load besides the immutable one defined by the NixOS module.
|
||||||
|
This can be used to avoid putting credentials in the Nix store, which can be read by any user.
|
||||||
|
|
||||||
|
Each path can point to a JSON- or HCL-formatted file, or a directory
|
||||||
|
to be scanned for files with <literal>.hcl</literal> or
|
||||||
|
<literal>.json</literal> extensions.
|
||||||
|
|
||||||
|
To upload the confidential file with NixOps, use for example:
|
||||||
|
|
||||||
|
<programlisting><![CDATA[
|
||||||
|
# https://releases.nixos.org/nixops/latest/manual/manual.html#opt-deployment.keys
|
||||||
|
deployment.keys."vault.hcl" = let db = import ./db-credentials.nix; in {
|
||||||
|
text = ${"''"}
|
||||||
|
storage "postgresql" {
|
||||||
|
connection_url = "postgres://''${db.username}:''${db.password}@host.example.com/exampledb?sslmode=verify-ca"
|
||||||
|
}
|
||||||
|
${"''"};
|
||||||
|
user = "vault";
|
||||||
|
};
|
||||||
|
services.vault.extraSettingsPaths = ["/run/keys/vault.hcl"];
|
||||||
|
services.vault.storageBackend = "postgresql";
|
||||||
|
users.users.vault.extraGroups = ["keys"];
|
||||||
|
]]></programlisting>
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -136,7 +178,7 @@ in
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "vault";
|
User = "vault";
|
||||||
Group = "vault";
|
Group = "vault";
|
||||||
ExecStart = "${cfg.package}/bin/vault server -config ${configFile}";
|
ExecStart = "${cfg.package}/bin/vault server ${configOptions}";
|
||||||
ExecReload = "${pkgs.coreutils}/bin/kill -SIGHUP $MAINPID";
|
ExecReload = "${pkgs.coreutils}/bin/kill -SIGHUP $MAINPID";
|
||||||
PrivateDevices = true;
|
PrivateDevices = true;
|
||||||
PrivateTmp = true;
|
PrivateTmp = true;
|
||||||
|
|
|
@ -98,7 +98,7 @@ in
|
||||||
- final-message
|
- final-message
|
||||||
- power-state-change
|
- power-state-change
|
||||||
'';
|
'';
|
||||||
description = ''cloud-init configuration.'';
|
description = "cloud-init configuration.";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -336,7 +336,7 @@ in
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
priority = 1;
|
priority = 1;
|
||||||
index = "doku.php";
|
index = "doku.php";
|
||||||
extraConfig = ''try_files $uri $uri/ @dokuwiki;'';
|
extraConfig = "try_files $uri $uri/ @dokuwiki;";
|
||||||
};
|
};
|
||||||
|
|
||||||
locations."@dokuwiki" = {
|
locations."@dokuwiki" = {
|
||||||
|
|
|
@ -565,7 +565,7 @@ in
|
||||||
assertions = [
|
assertions = [
|
||||||
{
|
{
|
||||||
assertion = (cfg.databaseUseSSL && cfg.databaseType == "postgresql") -> (cfg.databaseCaCert != null);
|
assertion = (cfg.databaseUseSSL && cfg.databaseType == "postgresql") -> (cfg.databaseCaCert != null);
|
||||||
message = ''A CA certificate must be specified (in 'services.keycloak.databaseCaCert') when PostgreSQL is used with SSL'';
|
message = "A CA certificate must be specified (in 'services.keycloak.databaseCaCert') when PostgreSQL is used with SSL";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ in
|
||||||
type = mkOption {
|
type = mkOption {
|
||||||
type = types.enum [ "mysql" "pgsql" ];
|
type = types.enum [ "mysql" "pgsql" ];
|
||||||
default = "mysql";
|
default = "mysql";
|
||||||
description = ''Database engine to use.'';
|
description = "Database engine to use.";
|
||||||
};
|
};
|
||||||
|
|
||||||
host = mkOption {
|
host = mkOption {
|
||||||
|
|
|
@ -193,7 +193,7 @@ in
|
||||||
configText = mkOption {
|
configText = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
example = ''...verbatim config file contents...'';
|
example = "...verbatim config file contents...";
|
||||||
description = ''
|
description = ''
|
||||||
Overridable config file contents to use for lighttpd. By default, use
|
Overridable config file contents to use for lighttpd. By default, use
|
||||||
the contents automatically generated by NixOS.
|
the contents automatically generated by NixOS.
|
||||||
|
|
|
@ -60,8 +60,7 @@ in
|
||||||
version = mkOption {
|
version = mkOption {
|
||||||
default = 2;
|
default = 2;
|
||||||
type = types.enum [ 0 1 2 3 4 ];
|
type = types.enum [ 0 1 2 3 4 ];
|
||||||
description = ''
|
description = "";
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
uboot = {
|
uboot = {
|
||||||
|
|
|
@ -662,7 +662,7 @@ in
|
||||||
# - HDDs are mixed with SSDs
|
# - HDDs are mixed with SSDs
|
||||||
# - There is a SSDs in a pool that is currently trimmed.
|
# - There is a SSDs in a pool that is currently trimmed.
|
||||||
# - There are only HDDs and we would set the system in a degraded state
|
# - There are only HDDs and we would set the system in a degraded state
|
||||||
serviceConfig.ExecStart = ''${pkgs.runtimeShell} -c 'for pool in $(zpool list -H -o name); do zpool trim $pool; done || true' '';
|
serviceConfig.ExecStart = "${pkgs.runtimeShell} -c 'for pool in $(zpool list -H -o name); do zpool trim $pool; done || true' ";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.timers.zpool-trim.timerConfig.Persistent = "yes";
|
systemd.timers.zpool-trim.timerConfig.Persistent = "yes";
|
||||||
|
|
|
@ -170,7 +170,7 @@ let
|
||||||
|
|
||||||
${concatStringsSep "\n" (
|
${concatStringsSep "\n" (
|
||||||
mapAttrsToList (name: cfg:
|
mapAttrsToList (name: cfg:
|
||||||
''ip link del dev ${name} 2> /dev/null || true ''
|
"ip link del dev ${name} 2> /dev/null || true "
|
||||||
) cfg.extraVeths
|
) cfg.extraVeths
|
||||||
)}
|
)}
|
||||||
'';
|
'';
|
||||||
|
@ -185,7 +185,7 @@ let
|
||||||
fi
|
fi
|
||||||
''
|
''
|
||||||
else
|
else
|
||||||
''${ipcmd} add ${cfg.${attribute}} dev $ifaceHost'';
|
"${ipcmd} add ${cfg.${attribute}} dev $ifaceHost";
|
||||||
renderExtraVeth = name: cfg:
|
renderExtraVeth = name: cfg:
|
||||||
if cfg.hostBridge != null then
|
if cfg.hostBridge != null then
|
||||||
''
|
''
|
||||||
|
|
|
@ -136,10 +136,8 @@ let
|
||||||
cp ${bootDisk}/efi-vars.fd "$NIX_EFI_VARS" || exit 1
|
cp ${bootDisk}/efi-vars.fd "$NIX_EFI_VARS" || exit 1
|
||||||
chmod 0644 "$NIX_EFI_VARS" || exit 1
|
chmod 0644 "$NIX_EFI_VARS" || exit 1
|
||||||
fi
|
fi
|
||||||
'' else ''
|
'' else ""}
|
||||||
''}
|
'' else ""}
|
||||||
'' else ''
|
|
||||||
''}
|
|
||||||
|
|
||||||
cd $TMPDIR
|
cd $TMPDIR
|
||||||
idx=0
|
idx=0
|
||||||
|
@ -187,8 +185,7 @@ let
|
||||||
efiVars=$out/efi-vars.fd
|
efiVars=$out/efi-vars.fd
|
||||||
cp ${efiVarsDefault} $efiVars
|
cp ${efiVarsDefault} $efiVars
|
||||||
chmod 0644 $efiVars
|
chmod 0644 $efiVars
|
||||||
'' else ''
|
'' else ""}
|
||||||
''}
|
|
||||||
'';
|
'';
|
||||||
buildInputs = [ pkgs.util-linux ];
|
buildInputs = [ pkgs.util-linux ];
|
||||||
QEMU_OPTS = "-nographic -serial stdio -monitor none"
|
QEMU_OPTS = "-nographic -serial stdio -monitor none"
|
||||||
|
|
|
@ -105,7 +105,7 @@ in
|
||||||
|
|
||||||
stateDir = mkOption {
|
stateDir = mkOption {
|
||||||
type = types.path;
|
type = types.path;
|
||||||
default = ''/var/railcar'';
|
default = "/var/railcar";
|
||||||
description = "Railcar persistent state directory";
|
description = "Railcar persistent state directory";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -60,8 +60,7 @@ in rec {
|
||||||
(onFullSupported "nixos.tests.boot-stage1")
|
(onFullSupported "nixos.tests.boot-stage1")
|
||||||
(onSystems ["x86_64-linux"] "nixos.tests.boot.uefiCdrom")
|
(onSystems ["x86_64-linux"] "nixos.tests.boot.uefiCdrom")
|
||||||
(onSystems ["x86_64-linux"] "nixos.tests.boot.uefiUsb")
|
(onSystems ["x86_64-linux"] "nixos.tests.boot.uefiUsb")
|
||||||
# TODO (@primeos): Fix the test failure since https://github.com/NixOS/nixpkgs/pull/110010:
|
(onSystems ["x86_64-linux"] "nixos.tests.chromium")
|
||||||
#(onSystems ["x86_64-linux"] "nixos.tests.chromium")
|
|
||||||
(onFullSupported "nixos.tests.containers-imperative")
|
(onFullSupported "nixos.tests.containers-imperative")
|
||||||
(onFullSupported "nixos.tests.containers-ip")
|
(onFullSupported "nixos.tests.containers-ip")
|
||||||
(onSystems ["x86_64-linux"] "nixos.tests.docker")
|
(onSystems ["x86_64-linux"] "nixos.tests.docker")
|
||||||
|
|
|
@ -408,6 +408,7 @@ in
|
||||||
uwsgi = handleTest ./uwsgi.nix {};
|
uwsgi = handleTest ./uwsgi.nix {};
|
||||||
v2ray = handleTest ./v2ray.nix {};
|
v2ray = handleTest ./v2ray.nix {};
|
||||||
vault = handleTest ./vault.nix {};
|
vault = handleTest ./vault.nix {};
|
||||||
|
vault-postgresql = handleTest ./vault-postgresql.nix {};
|
||||||
vector = handleTest ./vector.nix {};
|
vector = handleTest ./vector.nix {};
|
||||||
victoriametrics = handleTest ./victoriametrics.nix {};
|
victoriametrics = handleTest ./victoriametrics.nix {};
|
||||||
virtualbox = handleTestOn ["x86_64-linux"] ./virtualbox.nix {};
|
virtualbox = handleTestOn ["x86_64-linux"] ./virtualbox.nix {};
|
||||||
|
|
|
@ -51,7 +51,7 @@ mapAttrs (channel: chromiumPkg: makeTest rec {
|
||||||
testScript = let
|
testScript = let
|
||||||
xdo = name: text: let
|
xdo = name: text: let
|
||||||
xdoScript = pkgs.writeText "${name}.xdo" text;
|
xdoScript = pkgs.writeText "${name}.xdo" text;
|
||||||
in "${pkgs.xdotool}/bin/xdotool '${xdoScript}'";
|
in "${pkgs.xdotool}/bin/xdotool ${xdoScript}";
|
||||||
in ''
|
in ''
|
||||||
import shlex
|
import shlex
|
||||||
from contextlib import contextmanager, _GeneratorContextManager
|
from contextlib import contextmanager, _GeneratorContextManager
|
||||||
|
@ -76,96 +76,59 @@ mapAttrs (channel: chromiumPkg: makeTest rec {
|
||||||
|
|
||||||
|
|
||||||
def create_new_win():
|
def create_new_win():
|
||||||
|
"""Creates a new Chromium window."""
|
||||||
with machine.nested("Creating a new Chromium window"):
|
with machine.nested("Creating a new Chromium window"):
|
||||||
status, _ = machine.execute(
|
machine.wait_until_succeeds(
|
||||||
ru(
|
ru(
|
||||||
"${xdo "new-window" ''
|
"${xdo "create_new_win-select_main_window" ''
|
||||||
search --onlyvisible --name "startup done"
|
search --onlyvisible --name "startup done"
|
||||||
windowfocus --sync
|
windowfocus --sync
|
||||||
windowactivate --sync
|
windowactivate --sync
|
||||||
''}"
|
''}"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if status == 0:
|
machine.send_key("ctrl-n")
|
||||||
machine.execute(
|
# Wait until the new window appears:
|
||||||
ru(
|
machine.wait_until_succeeds(
|
||||||
"${xdo "new-window" ''
|
|
||||||
key Ctrl+n
|
|
||||||
''}"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def close_win():
|
|
||||||
def try_close(_):
|
|
||||||
status, _ = machine.execute(
|
|
||||||
ru(
|
ru(
|
||||||
"${xdo "close-window" ''
|
"${xdo "create_new_win-wait_for_window" ''
|
||||||
search --onlyvisible --name "new tab"
|
search --onlyvisible --name "New Tab"
|
||||||
windowfocus --sync
|
windowfocus --sync
|
||||||
windowactivate --sync
|
windowactivate --sync
|
||||||
''}"
|
''}"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if status == 0:
|
|
||||||
machine.execute(
|
|
||||||
ru(
|
|
||||||
"${xdo "close-window" ''
|
|
||||||
key Ctrl+w
|
|
||||||
''}"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
for _ in range(1, 20):
|
|
||||||
status, _ = machine.execute(
|
|
||||||
ru(
|
|
||||||
"${xdo "wait-for-close" ''
|
|
||||||
search --onlyvisible --name "new tab"
|
|
||||||
''}"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if status != 0:
|
|
||||||
return True
|
|
||||||
machine.sleep(1)
|
|
||||||
return False
|
|
||||||
|
|
||||||
retry(try_close)
|
|
||||||
|
|
||||||
|
|
||||||
def wait_for_new_win():
|
def close_new_tab_win():
|
||||||
ret = False
|
"""Closes the Chromium window with the title "New Tab"."""
|
||||||
with machine.nested("Waiting for new Chromium window to appear"):
|
machine.wait_until_succeeds(
|
||||||
for _ in range(1, 20):
|
ru(
|
||||||
status, _ = machine.execute(
|
"${xdo "close_new_tab_win-select_main_window" ''
|
||||||
ru(
|
search --onlyvisible --name "New Tab"
|
||||||
"${xdo "wait-for-window" ''
|
windowfocus --sync
|
||||||
search --onlyvisible --name "new tab"
|
windowactivate --sync
|
||||||
windowfocus --sync
|
''}"
|
||||||
windowactivate --sync
|
)
|
||||||
''}"
|
)
|
||||||
)
|
machine.send_key("ctrl-w")
|
||||||
)
|
# Wait until the closed window disappears:
|
||||||
if status == 0:
|
machine.wait_until_fails(
|
||||||
ret = True
|
ru(
|
||||||
machine.sleep(10)
|
"${xdo "close_new_tab_win-wait_for_close" ''
|
||||||
break
|
search --onlyvisible --name "New Tab"
|
||||||
machine.sleep(1)
|
''}"
|
||||||
return ret
|
)
|
||||||
|
)
|
||||||
|
|
||||||
def create_and_wait_for_new_win():
|
|
||||||
for _ in range(1, 3):
|
|
||||||
create_new_win()
|
|
||||||
if wait_for_new_win():
|
|
||||||
return True
|
|
||||||
assert False, "new window did not appear within 60 seconds"
|
|
||||||
|
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def test_new_win(description):
|
def test_new_win(description):
|
||||||
create_and_wait_for_new_win()
|
create_new_win()
|
||||||
with machine.nested(description):
|
with machine.nested(description):
|
||||||
yield
|
yield
|
||||||
close_win()
|
# Close the newly created window:
|
||||||
|
machine.send_key("ctrl-w")
|
||||||
|
|
||||||
|
|
||||||
machine.wait_for_x()
|
machine.wait_for_x()
|
||||||
|
@ -192,9 +155,11 @@ mapAttrs (channel: chromiumPkg: makeTest rec {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
create_and_wait_for_new_win()
|
create_new_win()
|
||||||
|
# Optional: Wait for the new tab page to fully load before taking the screenshot:
|
||||||
|
machine.wait_for_text("Web Store")
|
||||||
machine.screenshot("empty_windows")
|
machine.screenshot("empty_windows")
|
||||||
close_win()
|
close_new_tab_win()
|
||||||
|
|
||||||
machine.screenshot("startup_done")
|
machine.screenshot("startup_done")
|
||||||
|
|
||||||
|
@ -202,7 +167,7 @@ mapAttrs (channel: chromiumPkg: makeTest rec {
|
||||||
machine.succeed(
|
machine.succeed(
|
||||||
ru(
|
ru(
|
||||||
"${xdo "type-url" ''
|
"${xdo "type-url" ''
|
||||||
search --sync --onlyvisible --name "new tab"
|
search --sync --onlyvisible --name "New Tab"
|
||||||
windowfocus --sync
|
windowfocus --sync
|
||||||
type --delay 1000 "chrome://sandbox"
|
type --delay 1000 "chrome://sandbox"
|
||||||
''}"
|
''}"
|
||||||
|
@ -212,7 +177,7 @@ mapAttrs (channel: chromiumPkg: makeTest rec {
|
||||||
machine.succeed(
|
machine.succeed(
|
||||||
ru(
|
ru(
|
||||||
"${xdo "submit-url" ''
|
"${xdo "submit-url" ''
|
||||||
search --sync --onlyvisible --name "new tab"
|
search --sync --onlyvisible --name "New Tab"
|
||||||
windowfocus --sync
|
windowfocus --sync
|
||||||
key --delay 1000 Return
|
key --delay 1000 Return
|
||||||
''}"
|
''}"
|
||||||
|
@ -224,7 +189,7 @@ mapAttrs (channel: chromiumPkg: makeTest rec {
|
||||||
machine.succeed(
|
machine.succeed(
|
||||||
ru(
|
ru(
|
||||||
"${xdo "find-window" ''
|
"${xdo "find-window" ''
|
||||||
search --sync --onlyvisible --name "sandbox status"
|
search --sync --onlyvisible --name "Sandbox Status"
|
||||||
windowfocus --sync
|
windowfocus --sync
|
||||||
''}"
|
''}"
|
||||||
)
|
)
|
||||||
|
@ -258,7 +223,7 @@ mapAttrs (channel: chromiumPkg: makeTest rec {
|
||||||
machine.succeed(
|
machine.succeed(
|
||||||
ru(
|
ru(
|
||||||
"${xdo "find-window-after-copy" ''
|
"${xdo "find-window-after-copy" ''
|
||||||
search --onlyvisible --name "sandbox status"
|
search --onlyvisible --name "Sandbox Status"
|
||||||
''}"
|
''}"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -2,7 +2,7 @@ import ./make-test-python.nix (
|
||||||
{ lib, ... }: {
|
{ lib, ... }: {
|
||||||
name = "nomad";
|
name = "nomad";
|
||||||
nodes = {
|
nodes = {
|
||||||
server = { pkgs, lib, ... }: {
|
default_server = { pkgs, lib, ... }: {
|
||||||
networking = {
|
networking = {
|
||||||
interfaces.eth1.ipv4.addresses = lib.mkOverride 0 [{
|
interfaces.eth1.ipv4.addresses = lib.mkOverride 0 [{
|
||||||
address = "192.168.1.1";
|
address = "192.168.1.1";
|
||||||
|
@ -30,24 +30,68 @@ import ./make-test-python.nix (
|
||||||
enableDocker = false;
|
enableDocker = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
custom_state_dir_server = { pkgs, lib, ... }: {
|
||||||
|
networking = {
|
||||||
|
interfaces.eth1.ipv4.addresses = lib.mkOverride 0 [{
|
||||||
|
address = "192.168.1.1";
|
||||||
|
prefixLength = 16;
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc."nomad.custom.json".source =
|
||||||
|
(pkgs.formats.json { }).generate "nomad.custom.json" {
|
||||||
|
region = "universe";
|
||||||
|
datacenter = "earth";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nomad = {
|
||||||
|
enable = true;
|
||||||
|
dropPrivileges = false;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
data_dir = "/nomad/data/dir";
|
||||||
|
server = {
|
||||||
|
enabled = true;
|
||||||
|
bootstrap_expect = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
extraSettingsPaths = [ "/etc/nomad.custom.json" ];
|
||||||
|
enableDocker = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.nomad.serviceConfig.ExecStartPre = "${pkgs.writeShellScript "mk_data_dir" ''
|
||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
${pkgs.coreutils}/bin/mkdir -p /nomad/data/dir
|
||||||
|
''}";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
server.wait_for_unit("nomad.service")
|
def test_nomad_server(server):
|
||||||
|
server.wait_for_unit("nomad.service")
|
||||||
|
|
||||||
# wait for healthy server
|
# wait for healthy server
|
||||||
server.wait_until_succeeds(
|
server.wait_until_succeeds(
|
||||||
"[ $(nomad operator raft list-peers | grep true | wc -l) == 1 ]"
|
"[ $(nomad operator raft list-peers | grep true | wc -l) == 1 ]"
|
||||||
)
|
)
|
||||||
|
|
||||||
# wait for server liveness
|
# wait for server liveness
|
||||||
server.succeed("[ $(nomad server members | grep -o alive | wc -l) == 1 ]")
|
server.succeed("[ $(nomad server members | grep -o alive | wc -l) == 1 ]")
|
||||||
|
|
||||||
# check the region
|
# check the region
|
||||||
server.succeed("nomad server members | grep -o universe")
|
server.succeed("nomad server members | grep -o universe")
|
||||||
|
|
||||||
# check the datacenter
|
# check the datacenter
|
||||||
server.succeed("[ $(nomad server members | grep -o earth | wc -l) == 1 ]")
|
server.succeed("[ $(nomad server members | grep -o earth | wc -l) == 1 ]")
|
||||||
|
|
||||||
|
|
||||||
|
servers = [default_server, custom_state_dir_server]
|
||||||
|
|
||||||
|
for server in servers:
|
||||||
|
test_nomad_server(server)
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -0,0 +1,70 @@
|
||||||
|
/* This test checks that
|
||||||
|
- multiple config files can be loaded
|
||||||
|
- the storage backend can be in a file outside the nix store
|
||||||
|
as is required for security (required because while confidentiality is
|
||||||
|
always covered, availability isn't)
|
||||||
|
- the postgres integration works
|
||||||
|
*/
|
||||||
|
import ./make-test-python.nix ({ pkgs, ... }:
|
||||||
|
{
|
||||||
|
name = "vault-postgresql";
|
||||||
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
|
maintainers = [ lnl7 roberth ];
|
||||||
|
};
|
||||||
|
machine = { lib, pkgs, ... }: {
|
||||||
|
virtualisation.memorySize = 512;
|
||||||
|
environment.systemPackages = [ pkgs.vault ];
|
||||||
|
environment.variables.VAULT_ADDR = "http://127.0.0.1:8200";
|
||||||
|
services.vault.enable = true;
|
||||||
|
services.vault.extraSettingsPaths = [ "/run/vault.hcl" ];
|
||||||
|
|
||||||
|
systemd.services.vault = {
|
||||||
|
after = [
|
||||||
|
"postgresql.service"
|
||||||
|
];
|
||||||
|
# Try for about 10 minutes rather than the default of 5 attempts.
|
||||||
|
serviceConfig.RestartSec = 1;
|
||||||
|
serviceConfig.StartLimitBurst = 600;
|
||||||
|
};
|
||||||
|
# systemd.services.vault.unitConfig.RequiresMountsFor = "/run/keys/";
|
||||||
|
|
||||||
|
services.postgresql.enable = true;
|
||||||
|
services.postgresql.initialScript = pkgs.writeText "init.psql" ''
|
||||||
|
CREATE USER vaultuser WITH ENCRYPTED PASSWORD 'thisisthepass';
|
||||||
|
GRANT CONNECT ON DATABASE postgres TO vaultuser;
|
||||||
|
|
||||||
|
-- https://www.vaultproject.io/docs/configuration/storage/postgresql
|
||||||
|
CREATE TABLE vault_kv_store (
|
||||||
|
parent_path TEXT COLLATE "C" NOT NULL,
|
||||||
|
path TEXT COLLATE "C",
|
||||||
|
key TEXT COLLATE "C",
|
||||||
|
value BYTEA,
|
||||||
|
CONSTRAINT pkey PRIMARY KEY (path, key)
|
||||||
|
);
|
||||||
|
CREATE INDEX parent_path_idx ON vault_kv_store (parent_path);
|
||||||
|
|
||||||
|
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO vaultuser;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript =
|
||||||
|
''
|
||||||
|
secretConfig = """
|
||||||
|
storage "postgresql" {
|
||||||
|
connection_url = "postgres://vaultuser:thisisthepass@localhost/postgres?sslmode=disable"
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|
||||||
|
start_all()
|
||||||
|
|
||||||
|
machine.wait_for_unit("multi-user.target")
|
||||||
|
machine.succeed("cat >/root/vault.hcl <<EOF\n%s\nEOF\n" % secretConfig)
|
||||||
|
machine.succeed(
|
||||||
|
"install --owner vault --mode 0400 /root/vault.hcl /run/vault.hcl; rm /root/vault.hcl"
|
||||||
|
)
|
||||||
|
machine.wait_for_unit("vault.service")
|
||||||
|
machine.wait_for_open_port(8200)
|
||||||
|
machine.succeed("vault operator init")
|
||||||
|
machine.succeed("vault status | grep Sealed | grep true")
|
||||||
|
'';
|
||||||
|
})
|
|
@ -8,6 +8,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
|
||||||
environment.systemPackages = [ pkgs.vault ];
|
environment.systemPackages = [ pkgs.vault ];
|
||||||
environment.variables.VAULT_ADDR = "http://127.0.0.1:8200";
|
environment.variables.VAULT_ADDR = "http://127.0.0.1:8200";
|
||||||
services.vault.enable = true;
|
services.vault.enable = true;
|
||||||
|
virtualisation.memorySize = 512;
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript =
|
testScript =
|
||||||
|
|
|
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = [ jack2Full libsndfile libGLU libGL lv2 cairo ladspaH ];
|
buildInputs = [ jack2Full libsndfile libGLU libGL lv2 cairo ladspaH ];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"PREFIX=${placeholder ''out''}"
|
"PREFIX=${placeholder "out"}"
|
||||||
"ETC_PATH=$(out)/etc"
|
"ETC_PATH=$(out)/etc"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"PREFIX=${placeholder ''out''}"
|
"PREFIX=${placeholder "out"}"
|
||||||
];
|
];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
|
@ -4,11 +4,11 @@ cups, vivaldi-ffmpeg-codecs, libpulseaudio, at-spi2-core, libxkbcommon, mesa }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "exodus";
|
pname = "exodus";
|
||||||
version = "21.1.7";
|
version = "21.1.18";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://downloads.exodus.io/releases/${pname}-linux-x64-${version}.zip";
|
url = "https://downloads.exodus.io/releases/${pname}-linux-x64-${version}.zip";
|
||||||
sha256 = "sha256-im0z3g225EhboJFoHBweHefn2QAKvYGSAP7e4Mz6Jm8=";
|
sha256 = "sha256-cc0m1gOwIY4M0ljSSdj8WaQfU/ikGI1Zlf8gGDdht4Q=";
|
||||||
};
|
};
|
||||||
|
|
||||||
sourceRoot = ".";
|
sourceRoot = ".";
|
||||||
|
|
|
@ -12,16 +12,16 @@
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "openethereum";
|
pname = "openethereum";
|
||||||
version = "3.1.0";
|
version = "3.1.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "openethereum";
|
owner = "openethereum";
|
||||||
repo = "openethereum";
|
repo = "openethereum";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "cs84Zz0nhagGDu5sDFTaFZF3SPEgJU8F4vGX7KLihOM=";
|
sha256 = "sha256-RUrJuJF0R0mc7XdLyk915fRWtMfzjp5QE6oeWxHfyEQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoSha256 = "6suNkHw1BbISb0MkYkUaD+mpUal+kn3y1SFVqzJFqJc=";
|
cargoSha256 = "sha256-b+winsCzU0sXGDX6nUtWq4JrIyTcJ3uva7RlV5VsXfk=";
|
||||||
|
|
||||||
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
|
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -26,7 +26,7 @@ python3Packages.buildPythonApplication rec {
|
||||||
--replace sample-projects $out/share/${pname}/sample-projects
|
--replace sample-projects $out/share/${pname}/sample-projects
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = '''';
|
buildPhase = "";
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/share/${pname}
|
mkdir -p $out/share/${pname}
|
||||||
|
|
|
@ -122,7 +122,7 @@ mkDerivation rec {
|
||||||
mimeType = "text/x-r-source;text/x-r;text/x-R;text/x-r-doc;text/x-r-sweave;text/x-r-markdown;text/x-r-html;text/x-r-presentation;application/x-r-data;application/x-r-project;text/x-r-history;text/x-r-profile;text/x-tex;text/x-markdown;text/html;text/css;text/javascript;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;";
|
mimeType = "text/x-r-source;text/x-r;text/x-R;text/x-r-doc;text/x-r-sweave;text/x-r-markdown;text/x-r-html;text/x-r-presentation;application/x-r-data;application/x-r-project;text/x-r-history;text/x-r-profile;text/x-tex;text/x-markdown;text/html;text/css;text/javascript;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;";
|
||||||
};
|
};
|
||||||
|
|
||||||
qtWrapperArgs = [ ''--suffix PATH : ${gnumake}/bin'' ];
|
qtWrapperArgs = [ "--suffix PATH : ${gnumake}/bin" ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir $out/share
|
mkdir $out/share
|
||||||
|
|
|
@ -137,8 +137,7 @@ in stdenv.mkDerivation rec {
|
||||||
++ lib.optional tclSupport tcl
|
++ lib.optional tclSupport tcl
|
||||||
++ lib.optional rubySupport ruby;
|
++ lib.optional rubySupport ruby;
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = "" + lib.optionalString ftNixSupport ''
|
||||||
'' + lib.optionalString ftNixSupport ''
|
|
||||||
cp ${vimPlugins.vim-nix.src}/ftplugin/nix.vim runtime/ftplugin/nix.vim
|
cp ${vimPlugins.vim-nix.src}/ftplugin/nix.vim runtime/ftplugin/nix.vim
|
||||||
cp ${vimPlugins.vim-nix.src}/indent/nix.vim runtime/indent/nix.vim
|
cp ${vimPlugins.vim-nix.src}/indent/nix.vim runtime/indent/nix.vim
|
||||||
cp ${vimPlugins.vim-nix.src}/syntax/nix.vim runtime/syntax/nix.vim
|
cp ${vimPlugins.vim-nix.src}/syntax/nix.vim runtime/syntax/nix.vim
|
||||||
|
|
|
@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
NIX_LDFLAGS = "-lpthread";
|
NIX_LDFLAGS = "-lpthread";
|
||||||
|
|
||||||
postPatch = ''patchShebangs version.sh'';
|
postPatch = "patchShebangs version.sh";
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/ahoviewer \
|
wrapProgram $out/bin/ahoviewer \
|
||||||
|
|
|
@ -22,7 +22,7 @@ mkDerivation rec {
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
|
|
||||||
qtWrapperArgs = [ ''--prefix PATH : ${texlive}/bin'' ];
|
qtWrapperArgs = [ "--prefix PATH : ${texlive}/bin" ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ mkDerivation rec {
|
||||||
sourceRoot = "${src.name}/mandelbulber2";
|
sourceRoot = "${src.name}/mandelbulber2";
|
||||||
|
|
||||||
qmakeFlags = [
|
qmakeFlags = [
|
||||||
"SHARED_PATH=${placeholder ''out''}"
|
"SHARED_PATH=${placeholder "out"}"
|
||||||
(if withOpenCL
|
(if withOpenCL
|
||||||
then "qmake/mandelbulber-opencl.pro"
|
then "qmake/mandelbulber-opencl.pro"
|
||||||
else "qmake/mandelbulber.pro")
|
else "qmake/mandelbulber.pro")
|
||||||
|
|
|
@ -56,9 +56,9 @@ buildDotnetPackage rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeWrapperArgs = [
|
makeWrapperArgs = [
|
||||||
''--prefix MONO_GAC_PREFIX : ${gtksharp}''
|
"--prefix MONO_GAC_PREFIX : ${gtksharp}"
|
||||||
''--prefix LD_LIBRARY_PATH : ${gtksharp}/lib''
|
"--prefix LD_LIBRARY_PATH : ${gtksharp}/lib"
|
||||||
''--prefix LD_LIBRARY_PATH : ${gtksharp.gtk.out}/lib''
|
"--prefix LD_LIBRARY_PATH : ${gtksharp.gtk.out}/lib"
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{ buildGoModule, fetchFromGitHub, installShellFiles, lib, stdenv }:
|
{ buildGoModule, fetchFromGitHub, installShellFiles, lib, stdenv }:
|
||||||
|
|
||||||
let
|
let
|
||||||
humioCtlVersion = "0.28.1";
|
humioCtlVersion = "0.28.2";
|
||||||
sha256 = "0vy07nzafqhc14i179sfrzb795yh4pcyjj3py9fwq0nwnmxndby4";
|
sha256 = "sha256-mCYxgBiuKylL2Qx4RCnD4ZoMFUm2J6VIL/Erc0u3BMA=";
|
||||||
vendorSha256 = "0anvah2rpqvxgmdrdj73k3vbf8073nmsl3aykgvb1nraf3gz3bpk";
|
vendorSha256 = "sha256-867x33Aq27D2m14NqqsdByC39pjjyJZbfX3jmwVU2yo=";
|
||||||
in buildGoModule {
|
in buildGoModule {
|
||||||
name = "humioctl-${humioCtlVersion}";
|
name = "humioctl-${humioCtlVersion}";
|
||||||
pname = "humioctl";
|
pname = "humioctl";
|
||||||
|
|
|
@ -54,7 +54,7 @@ python3Packages.buildPythonApplication rec {
|
||||||
# prevent double wrapping from wrapGApps and wrapPythonProgram
|
# prevent double wrapping from wrapGApps and wrapPythonProgram
|
||||||
dontWrapGApps = true;
|
dontWrapGApps = true;
|
||||||
makeWrapperArgs = [
|
makeWrapperArgs = [
|
||||||
''''${gappsWrapperArgs[@]}''
|
"\${gappsWrapperArgs[@]}"
|
||||||
];
|
];
|
||||||
|
|
||||||
strictDeps = false;
|
strictDeps = false;
|
||||||
|
|
|
@ -94,7 +94,7 @@ in mkDerivation rec {
|
||||||
"format"
|
"format"
|
||||||
];
|
];
|
||||||
|
|
||||||
qtWrapperArgs = [ ''--prefix LD_LIBRARY_PATH : $out/lib'' ];
|
qtWrapperArgs = [ "--prefix LD_LIBRARY_PATH : $out/lib" ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p "$out/lib"
|
mkdir -p "$out/lib"
|
||||||
|
|
|
@ -38,7 +38,7 @@ python3Packages.buildPythonApplication rec {
|
||||||
];
|
];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"PREFIX=${placeholder ''out''}"
|
"PREFIX=${placeholder "out"}"
|
||||||
"NO_VENV=1"
|
"NO_VENV=1"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ lib, stdenv, fetchurl, openssl }:
|
{ lib, stdenv, fetchurl, openssl }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "6.4.14";
|
version = "6.4.15";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "fetchmail";
|
pname = "fetchmail";
|
||||||
|
@ -9,7 +9,7 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/fetchmail/fetchmail-${version}.tar.xz";
|
url = "mirror://sourceforge/fetchmail/fetchmail-${version}.tar.xz";
|
||||||
sha256 = "1jxxb3qyrh7118fwqa3bhirjh97j2w8r71s8vcb6vp3w1wwhfis2";
|
sha256 = "sha256-c1shdHSTfhPPzeotQqNGv2hIfg1h7+vk0Nnt3LOia5Y=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ openssl ];
|
buildInputs = [ openssl ];
|
||||||
|
|
|
@ -60,13 +60,13 @@ stdenv.mkDerivation {
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
for a in "$out/bin/"*; do
|
for a in "$out/bin/"*; do
|
||||||
wrapProgram $a --suffix PERL5LIB : $PERL5LIB --prefix PATH : ${perlPackages.perl}/bin:$out/bin \
|
wrapProgram $a --suffix PERL5LIB : $PERL5LIB --prefix PATH : ${perlPackages.perl}/bin:$out/bin \
|
||||||
${lib.optionalString gitSupport ''--prefix PATH : ${git}/bin ''} \
|
${lib.optionalString gitSupport "--prefix PATH : ${git}/bin "} \
|
||||||
${lib.optionalString monotoneSupport ''--prefix PATH : ${monotone}/bin ''} \
|
${lib.optionalString monotoneSupport "--prefix PATH : ${monotone}/bin "} \
|
||||||
${lib.optionalString bazaarSupport ''--prefix PATH : ${breezy}/bin ''} \
|
${lib.optionalString bazaarSupport "--prefix PATH : ${breezy}/bin "} \
|
||||||
${lib.optionalString cvsSupport ''--prefix PATH : ${cvs}/bin ''} \
|
${lib.optionalString cvsSupport "--prefix PATH : ${cvs}/bin "} \
|
||||||
${lib.optionalString cvsSupport ''--prefix PATH : ${cvsps}/bin ''} \
|
${lib.optionalString cvsSupport "--prefix PATH : ${cvsps}/bin "} \
|
||||||
${lib.optionalString subversionSupport ''--prefix PATH : ${subversion.out}/bin ''} \
|
${lib.optionalString subversionSupport "--prefix PATH : ${subversion.out}/bin "} \
|
||||||
${lib.optionalString mercurialSupport ''--prefix PATH : ${mercurial}/bin ''} \
|
${lib.optionalString mercurialSupport "--prefix PATH : ${mercurial}/bin "} \
|
||||||
${lib.optionalString docutilsSupport ''--prefix PYTHONPATH : "$(toPythonPath ${docutils})" ''} \
|
${lib.optionalString docutilsSupport ''--prefix PYTHONPATH : "$(toPythonPath ${docutils})" ''} \
|
||||||
${lib.concatMapStrings (x: "--prefix PATH : ${x}/bin ") extraUtils}
|
${lib.concatMapStrings (x: "--prefix PATH : ${x}/bin ") extraUtils}
|
||||||
done
|
done
|
||||||
|
|
|
@ -101,7 +101,7 @@ in buildPythonApplication rec {
|
||||||
dontWrapGApps = true;
|
dontWrapGApps = true;
|
||||||
makeWrapperArgs = [
|
makeWrapperArgs = [
|
||||||
"--prefix PATH : ${binPath}"
|
"--prefix PATH : ${binPath}"
|
||||||
''''${gappsWrapperArgs[@]}''
|
"\${gappsWrapperArgs[@]}"
|
||||||
];
|
];
|
||||||
# needed for glib-schemas to work correctly (will crash on dialogues otherwise)
|
# needed for glib-schemas to work correctly (will crash on dialogues otherwise)
|
||||||
# see https://github.com/NixOS/nixpkgs/issues/56943
|
# see https://github.com/NixOS/nixpkgs/issues/56943
|
||||||
|
|
|
@ -2,16 +2,16 @@
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "navi";
|
pname = "navi";
|
||||||
version = "2.13.1";
|
version = "2.14.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "denisidoro";
|
owner = "denisidoro";
|
||||||
repo = "navi";
|
repo = "navi";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0nzjcahnx637m24xhzgrhvaic52b1bqx6lkklmy8xlbka7i2xid2";
|
sha256 = "sha256-4XR+HazX65jiMvZpLNMNOc8gVVAxMx3bNcVNT6UPJ3o=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoSha256 = "12xyh57b6lblplh87fw1cvfwzkx9bz9qbhii34n4yzfzp6sv530n";
|
cargoSha256 = "sha256-ZBs9/yoY3na21rQd5zJzFujZZSq2BDoENKYAWI1fnTg=";
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue