Compare commits
4 commits
c922615666
...
0e8abeb78b
Author | SHA1 | Date | |
---|---|---|---|
0e8abeb78b | |||
c3073e347b | |||
4957c6f07f | |||
03bfb51682 |
5 changed files with 17 additions and 9 deletions
|
@ -11,12 +11,17 @@ in
|
|||
};
|
||||
});
|
||||
services.consul = {
|
||||
nodes.agent = [ "checkmate" "grail" "thunderskin" "VEGAS" "prophet" ];
|
||||
nixos.agent = [
|
||||
./agent.nix
|
||||
./remote-api.nix
|
||||
./ready.nix
|
||||
];
|
||||
nodes = {
|
||||
agent = [ "checkmate" "grail" "thunderskin" "VEGAS" "prophet" ];
|
||||
ready = config.services.consul.nodes.agent;
|
||||
};
|
||||
nixos = {
|
||||
agent = [
|
||||
./agent.nix
|
||||
./remote-api.nix
|
||||
];
|
||||
ready = ./ready.nix;
|
||||
};
|
||||
};
|
||||
|
||||
dns.records."consul-remote.internal".consulService = "consul-remote";
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue