monitoring websites with gatus
This commit is contained in:
parent
c347fc0f00
commit
10bd58170b
10 changed files with 262 additions and 25 deletions
|
@ -1,11 +1,14 @@
|
|||
{ self, hostPkgs, machines, flake-utils, deploy-rs, ... }: flake-utils.lib.eachDefaultSystem (system: {
|
||||
# Deploy-rs' flake checks seem broken for architectures different from the deployment machine.
|
||||
# We skip these here.
|
||||
checks = deploy-rs.lib.${system}.deployChecks (self.deploy // {
|
||||
nodes = (hostPkgs.lib.attrsets.filterAttrs
|
||||
(name: node:
|
||||
|
||||
checks = deploy-rs.lib.${system}.deployChecks (
|
||||
hostPkgs.lib.attrsets.updateManyAttrsByPath [{
|
||||
path = [ "nodes" ];
|
||||
update = hostPkgs.lib.attrsets.filterAttrs (name: node:
|
||||
machines.${name}.arch == system
|
||||
)
|
||||
self.deploy.nodes);
|
||||
});
|
||||
);
|
||||
}]
|
||||
self.deploy
|
||||
);
|
||||
})
|
||||
|
|
|
@ -10,14 +10,17 @@ in
|
|||
sshUser = "root";
|
||||
user = "root";
|
||||
|
||||
nodes = mkDeployNodes (name: machine: {
|
||||
hostname = self.nixosConfigurations.${name}.config.networking.fqdn;
|
||||
profiles.system = {
|
||||
remoteBuild = machine.arch != hostPkgs.stdenv.hostPlatform.system;
|
||||
path = deploy-rs.lib.${machine.arch}.activate.nixos
|
||||
self.nixosConfigurations.${name};
|
||||
};
|
||||
});
|
||||
nodes = mkDeployNodes (name: machine:
|
||||
let
|
||||
nixosConfiguration = self.nixosConfigurations.${name};
|
||||
in
|
||||
{
|
||||
hostname = nixosConfiguration.config.networking.fqdn;
|
||||
profiles.system = {
|
||||
remoteBuild = machine.arch != hostPkgs.stdenv.hostPlatform.system;
|
||||
path = deploy-rs.lib.${machine.arch}.activate.nixos nixosConfiguration;
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ nixpkgs, machines, physicalMachines, dns, microvm, disko, agenix, nixos-hardware, ... }:
|
||||
{ nixpkgs, nixpkgs-unstable, machines, physicalMachines, dns, microvm, disko, agenix, nixos-hardware, ... }:
|
||||
let
|
||||
mkNixosSystems = systemDef:
|
||||
builtins.mapAttrs
|
||||
|
@ -11,10 +11,19 @@ in
|
|||
nixosConfigurations = mkNixosSystems (name: machine: {
|
||||
system = machine.arch;
|
||||
|
||||
specialArgs = { inherit machines machine dns microvm disko agenix nixos-hardware; };
|
||||
specialArgs = { inherit nixpkgs-unstable machines machine dns microvm disko agenix nixos-hardware; };
|
||||
modules = [
|
||||
../.
|
||||
{ networking.hostName = name; }
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(final: _prev: {
|
||||
unstable = import nixpkgs-unstable {
|
||||
system = machine.arch;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
];
|
||||
});
|
||||
}
|
||||
|
|
Reference in a new issue