2021-11-18 11:49:04 -08:00
|
|
|
{
|
|
|
|
description = "Definition of the Seattle NixOps network.";
|
|
|
|
|
2021-11-18 11:57:38 -08:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "nixpkgs/nixos-21.05";
|
|
|
|
|
|
|
|
fudo-secrets.url = "path:/state/secrets";
|
|
|
|
|
|
|
|
fudo-nixos = {
|
2021-11-19 13:51:02 -08:00
|
|
|
url = "path:/state/nixops/fudo-nixos";
|
|
|
|
# url = "git+ssh://fudo_git@git.fudo.org:2222/fudosys/NixOS.git?ref=nixops-flake";
|
2021-11-18 11:57:38 -08:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2021-11-28 10:11:39 -08:00
|
|
|
|
|
|
|
fudo-entities = {
|
|
|
|
url = "path:/state/fudo-entities";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
fudo-lib = {
|
|
|
|
url = "path:/state/fudo-lib";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2021-11-18 11:52:14 -08:00
|
|
|
};
|
2021-11-18 11:49:04 -08:00
|
|
|
|
2021-11-28 10:11:39 -08:00
|
|
|
outputs = { self, nixpkgs, fudo-nixos, fudo-entities, fudo-secrets, ... } @ inputs:
|
2021-11-19 22:30:51 -08:00
|
|
|
with nixpkgs.lib; {
|
|
|
|
nixopsConfigurations.default = let
|
|
|
|
deployment-hosts = filterAttrs
|
2021-11-28 10:11:39 -08:00
|
|
|
(hostname: hostOpts:
|
|
|
|
hostOpts.domain == "sea.fudo.org" &&
|
|
|
|
hostOpts.nixos-system)
|
|
|
|
fudo-entities.entities.hosts;
|
2021-11-19 22:30:51 -08:00
|
|
|
in {
|
|
|
|
inherit nixpkgs;
|
|
|
|
|
|
|
|
network = {
|
|
|
|
description = "Seattle NixOps network";
|
|
|
|
enableRollback = true;
|
|
|
|
};
|
2021-11-29 16:40:16 -08:00
|
|
|
} // (mapAttrs (hostname: hostOpts:
|
|
|
|
fudo-nixos.nixopsHostConfigurations.${hostname})
|
|
|
|
deployment-hosts);
|
2021-11-18 11:57:38 -08:00
|
|
|
};
|
2021-11-18 11:49:04 -08:00
|
|
|
}
|