mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-02-27 22:13:12 -08:00
chore(rosenpass): Add integration tests for basic connectivity, backwards compatability and multi-peer connectivity
This commit is contained in:
38
tests/integration/rp-key-exchange.nix
Normal file
38
tests/integration/rp-key-exchange.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.services.rosenpassKeyExchange;
|
||||
in
|
||||
{
|
||||
options.services.rosenpassKeyExchange = {
|
||||
enable = lib.mkEnableOption "rosenpass key-exchange";
|
||||
config = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
description = "Path to rosenpass configuration";
|
||||
};
|
||||
rosenpassVersion = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
description = "Rosenpass package to use";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.services.rp-exchange = {
|
||||
description = "Rosenpass Key Exchanger";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
requires = [ "network-online.target" ];
|
||||
script = ''
|
||||
${cfg.rosenpassVersion}/bin/rosenpass exchange-config ${cfg.config}
|
||||
'';
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
RestartSec = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user