deployments/seattle/flake.nix

46 lines
1.2 KiB
Nix

{
description = "Definition of the Seattle NixOps network.";
inputs = {
nixpkgs.url = "nixpkgs/nixos-21.05";
fudo-secrets.url = "path:/state/secrets";
fudo-nixos = {
url = "path:/state/nixops/fudo-nixos";
# url = "git+ssh://fudo_git@git.fudo.org:2222/fudosys/NixOS.git?ref=nixops-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
fudo-entities = {
url = "path:/state/fudo-entities";
inputs.nixpkgs.follows = "nixpkgs";
};
fudo-lib = {
url = "path:/state/fudo-lib";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, fudo-nixos, fudo-entities, fudo-secrets, ... } @ inputs:
with nixpkgs.lib; {
nixopsConfigurations.default = let
deployment-hosts = filterAttrs
(hostname: hostOpts:
hostOpts.domain == "sea.fudo.org" &&
hostOpts.nixos-system)
fudo-entities.entities.hosts;
in {
inherit nixpkgs;
network = {
description = "Seattle NixOps network";
enableRollback = true;
};
} // (mapAttrs (hostname: hostOpts:
fudo-nixos.nixopsHostConfigurations.${hostname})
deployment-hosts);
};
}