2023-01-28 07:44:41 +01:00
|
|
|
{ pkgs }:
|
2021-12-08 08:13:31 +01:00
|
|
|
|
2021-11-22 10:52:35 +01:00
|
|
|
let
|
2021-12-08 08:13:31 +01:00
|
|
|
tools = pkgs.callPackage ../tools.nix {
|
2021-12-05 10:14:12 +01:00
|
|
|
targets = [];
|
|
|
|
prebuiltTarget = "deployer";
|
2022-06-10 20:29:25 +02:00
|
|
|
extraDeployerConfig = {
|
|
|
|
users.users.colmena = {
|
|
|
|
isNormalUser = true;
|
|
|
|
extraGroups = [ "wheel" ];
|
|
|
|
};
|
|
|
|
security.sudo.wheelNeedsPassword = false;
|
|
|
|
};
|
2021-12-05 10:14:12 +01:00
|
|
|
};
|
2022-12-01 09:57:56 +01:00
|
|
|
in tools.runTest {
|
2021-11-22 22:18:28 +01:00
|
|
|
name = "colmena-apply-local";
|
2021-11-22 10:52:35 +01:00
|
|
|
|
2022-12-01 09:57:56 +01:00
|
|
|
colmena.test = {
|
|
|
|
bundle = ./.;
|
2021-11-22 10:52:35 +01:00
|
|
|
|
2022-12-01 09:57:56 +01:00
|
|
|
testScript = ''
|
|
|
|
deployer.succeed("cd /tmp/bundle && sudo -u colmena ${tools.colmenaExec} apply-local --sudo")
|
|
|
|
deployer.succeed("grep SUCCESS /etc/deployment")
|
|
|
|
deployer.succeed("grep SECRET /run/keys/key-text")
|
|
|
|
'';
|
|
|
|
};
|
2021-11-22 10:52:35 +01:00
|
|
|
}
|