mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
Merge master into staging-next
This commit is contained in:
commit
b459003bdd
56 changed files with 1270 additions and 722 deletions
|
@ -4,8 +4,8 @@ with lib;
|
|||
|
||||
let
|
||||
cfg = config.services.frp;
|
||||
settingsFormat = pkgs.formats.ini { };
|
||||
configFile = settingsFormat.generate "frp.ini" cfg.settings;
|
||||
settingsFormat = pkgs.formats.toml { };
|
||||
configFile = settingsFormat.generate "frp.toml" cfg.settings;
|
||||
isClient = (cfg.role == "client");
|
||||
isServer = (cfg.role == "server");
|
||||
in
|
||||
|
@ -31,17 +31,13 @@ in
|
|||
default = { };
|
||||
description = mdDoc ''
|
||||
Frp configuration, for configuration options
|
||||
see the example of [client](https://github.com/fatedier/frp/blob/dev/conf/frpc_legacy_full.ini)
|
||||
or [server](https://github.com/fatedier/frp/blob/dev/conf/frps_legacy_full.ini) on github.
|
||||
'';
|
||||
example = literalExpression ''
|
||||
{
|
||||
common = {
|
||||
server_addr = "x.x.x.x";
|
||||
server_port = 7000;
|
||||
};
|
||||
}
|
||||
see the example of [client](https://github.com/fatedier/frp/blob/dev/conf/frpc_full_example.toml)
|
||||
or [server](https://github.com/fatedier/frp/blob/dev/conf/frps_full_example.toml) on github.
|
||||
'';
|
||||
example = {
|
||||
serverAddr = "x.x.x.x";
|
||||
serverPort = 7000;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -62,7 +58,7 @@ in
|
|||
Type = "simple";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 15;
|
||||
ExecStart = "${cfg.package}/bin/${executableFile} -c ${configFile}";
|
||||
ExecStart = "${cfg.package}/bin/${executableFile} --strict_config -c ${configFile}";
|
||||
StateDirectoryMode = optionalString isServer "0700";
|
||||
DynamicUser = true;
|
||||
# Hardening
|
||||
|
|
|
@ -804,14 +804,14 @@ in
|
|||
];
|
||||
|
||||
system.checks = singleton (pkgs.runCommand "xkb-validated" {
|
||||
inherit (cfg.xkb) model layout variant options;
|
||||
inherit (cfg.xkb) dir model layout variant options;
|
||||
nativeBuildInputs = with pkgs.buildPackages; [ xkbvalidate ];
|
||||
preferLocalBuild = true;
|
||||
} ''
|
||||
${optionalString (config.environment.sessionVariables ? XKB_CONFIG_ROOT)
|
||||
"export XKB_CONFIG_ROOT=${config.environment.sessionVariables.XKB_CONFIG_ROOT}"
|
||||
}
|
||||
xkbvalidate "$model" "$layout" "$variant" "$options"
|
||||
XKB_CONFIG_ROOT="$dir" xkbvalidate "$model" "$layout" "$variant" "$options"
|
||||
touch "$out"
|
||||
'');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue