Changes over time...
This commit is contained in:
parent
7677ab3f4f
commit
ebd1be3428
|
@ -1,28 +1,29 @@
|
|||
{ inputs, deployment-hosts, description, enable-rollback ? true, ... }:
|
||||
with inputs.nixpkgs.lib; let
|
||||
with inputs.nixpkgs.lib;
|
||||
let
|
||||
network-config = {
|
||||
nixpkgs = inputs.nixpkgs;
|
||||
network = {
|
||||
inherit description;
|
||||
enableRollback = enable-rollback;
|
||||
|
||||
storage.legacy = {
|
||||
databasefile = "~/.nixops/deployments.nixops";
|
||||
};
|
||||
storage.legacy = { databasefile = "~/.nixops/deployments.nixops"; };
|
||||
};
|
||||
};
|
||||
|
||||
host-config = hostname: inputs.fudo-nixos.nixopsHostConfigurations.${hostname};
|
||||
host-config = hostname:
|
||||
inputs.fudo-nixos.nixopsHostConfigurations.${hostname};
|
||||
|
||||
host-ip = hostname: domain: let
|
||||
zone-hosts = inputs.fudo-entities.entities.zones.${domain}.hosts;
|
||||
host-ip = hostname: domain:
|
||||
let zone-hosts = inputs.fudo-entities.entities.zones.${domain}.hosts;
|
||||
in zone-hosts.${hostname}.ipv4-address;
|
||||
|
||||
host-uber-secrets = hostname: { config, ... }: let
|
||||
uber-secrets = config.fudo.secrets.files.host-filesystem-keys;
|
||||
host-uber-secrets = hostname:
|
||||
{ config, ... }:
|
||||
let uber-secrets = config.fudo.secrets.files.host-filesystem-keys;
|
||||
in {
|
||||
config.deployment.keys = mkIf (hasAttr hostname uber-secrets)
|
||||
(mapAttrs (secret: secret-file: {
|
||||
config.deployment.keys = mkIf (hasAttr hostname uber-secrets) (mapAttrs
|
||||
(secret: secret-file: {
|
||||
keyFile = secret-file;
|
||||
user = "root";
|
||||
permissions = "0400";
|
||||
|
@ -30,10 +31,7 @@ with inputs.nixpkgs.lib; let
|
|||
};
|
||||
|
||||
in network-config // (mapAttrs (hostname: hostOpts: {
|
||||
imports = [
|
||||
(host-config hostname)
|
||||
(host-uber-secrets hostname)
|
||||
];
|
||||
imports = [ (host-config hostname) (host-uber-secrets hostname) ];
|
||||
|
||||
deployment.targetHost = host-ip hostname hostOpts.domain;
|
||||
}) deployment-hosts)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,7 +2,7 @@
|
|||
description = "Fudo NixOps network.";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-22.11";
|
||||
nixpkgs.url = "nixpkgs/nixos-23.11";
|
||||
|
||||
fudo-secrets.url = "path:/secrets";
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
|||
};
|
||||
|
||||
fudo-entities = {
|
||||
url = "git+ssh://fudo_git@git.fudo.org:2222/fudo-nix/entities.git";
|
||||
url = "git+https://fudo.dev/nix/entities.git";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
@ -28,7 +28,8 @@
|
|||
nixopsConfigurations.default = let
|
||||
description = "Fudo NixOps Network";
|
||||
|
||||
fudo-site = site: site == "nuttyclub" || site == "worldstream";
|
||||
fudo-site = site:
|
||||
site == "nuttyclub" || site == "worldstream" || site == "portage";
|
||||
|
||||
deployment-hosts = filterAttrs (hostname: hostOpts:
|
||||
hostOpts.nixos-system && (fudo-site hostOpts.site))
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,7 +2,7 @@
|
|||
description = "Informis NixOps network.";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-22.11";
|
||||
nixpkgs.url = "nixpkgs/nixos-23.11";
|
||||
|
||||
fudo-nixos = {
|
||||
url = "path:/state/deploy/config";
|
||||
|
@ -10,7 +10,7 @@
|
|||
};
|
||||
|
||||
fudo-entities = {
|
||||
url = "git+ssh://fudo_git@git.fudo.org:2222/fudo-nix/entities.git";
|
||||
url = "git+https://fudo.dev/nix/entities.git";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,7 +2,7 @@
|
|||
description = "Seattle Fudo NixOps network.";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-22.11";
|
||||
nixpkgs.url = "nixpkgs/nixos-23.11";
|
||||
|
||||
fudo-secrets.url = "path:/secrets";
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
|||
};
|
||||
|
||||
fudo-entities = {
|
||||
url = "git+ssh://fudo_git@git.fudo.org:2222/fudo-nix/entities.git";
|
||||
url = "git+https://fudo.dev/nix/entities.git";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue