Compare commits

...

4 commits

5 changed files with 17 additions and 9 deletions

View file

@ -11,12 +11,17 @@ in
};
});
services.consul = {
nodes.agent = [ "checkmate" "grail" "thunderskin" "VEGAS" "prophet" ];
nixos.agent = [
nodes = {
agent = [ "checkmate" "grail" "thunderskin" "VEGAS" "prophet" ];
ready = config.services.consul.nodes.agent;
};
nixos = {
agent = [
./agent.nix
./remote-api.nix
./ready.nix
];
ready = ./ready.nix;
};
};
dns.records."consul-remote.internal".consulService = "consul-remote";

View file

@ -42,8 +42,8 @@ in
{
systemd.services.consul-ready = {
description = "Wait for Consul";
requires = [ "consul.service" ];
after = [ "consul.service" ];
requires = lib.mkIf config.services.consul.enable [ "consul.service" ];
after = lib.mkIf config.services.consul.enable [ "consul.service" ];
serviceConfig = {
ExecStart = lib.getExe consulReady;
DynamicUser = true;

View file

@ -1,4 +1,4 @@
{ testers, nixosModules, consul }:
{ testers, nixosModules, consul, cluster }:
let
dataDir = {
@ -28,6 +28,7 @@ testers.runNixOSTest {
nixosModules.ascensions
nixosModules.systemd-extras
nixosModules.consul-distributed-services
cluster.config.services.consul.nixos.ready
];
systemd.services = {
create-file = {

View file

@ -12,6 +12,7 @@ in
ascensions = pkgs.callPackage ./ascensions.nix {
inherit (self'.packages) consul;
inherit (self) nixosModules;
inherit (config) cluster;
};
garage = pkgs.callPackage ./garage.nix {

View file

@ -22,6 +22,7 @@ testers.runNixOSTest {
nixosModules.port-magic
cluster.config.services.storage.nixos.garage
cluster.config.services.storage.nixos.garageInternal
cluster.config.services.consul.nixos.ready
];
options.services.locksmith.providers = lib.mkOption {
type = lib.types.raw;