Sigh. Still trying.
This commit is contained in:
Generated
+1
-1
@@ -303,7 +303,7 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"narHash": "sha256-B2M99aciJcFkAfyNk5c0KXMc3wtfUxDZuBM8xeaYzes=",
|
||||
"narHash": "sha256-1Z8ZrVFDTq9ohhYwD7Ti4KFYLgnRZG58OHvAQQAKZOU=",
|
||||
"path": "/state/nixops/fudo-nixos",
|
||||
"type": "path"
|
||||
},
|
||||
|
||||
@@ -13,17 +13,27 @@
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, fudo-nixos, ... } @ inputs: with nixpkgs.lib;
|
||||
let
|
||||
deployment = import ../../common/deployment.nix {
|
||||
description = "Seattle NixOps network";
|
||||
deployment-hosts = let
|
||||
domain = "sea.fudo.org";
|
||||
in filterAttrs
|
||||
(hostname: hostOpts: hostOpts.domain == domain)
|
||||
outputs = { self, nixpkgs, fudo-nixos, fudo-secrets, ... } @ inputs:
|
||||
with nixpkgs.lib; {
|
||||
nixopsConfigurations.default = let
|
||||
deployment-hosts = filterAttrs
|
||||
(hostname: hostOpts: hostOpts.domain == "sea.fudo.org")
|
||||
fudo-nixos.fudoHosts;
|
||||
};
|
||||
in {
|
||||
nixopsConfigurations.default = (deployment inputs);
|
||||
|
||||
build-timestamp = self.sourceInfo.lastModified;
|
||||
|
||||
host-gen-config = import ./host-config.nix {
|
||||
inherit inputs build-timestamp;
|
||||
};
|
||||
|
||||
host-configs = mapAttrs host-gen-config deployment-hosts;
|
||||
in {
|
||||
inherit nixpkgs;
|
||||
|
||||
network = {
|
||||
description = "Seattle NixOps network";
|
||||
enableRollback = true;
|
||||
};
|
||||
} // host-configs;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
inputs: build-timestamp: hostname: hostOpts:
|
||||
|
||||
{ config, ... }:
|
||||
|
||||
let
|
||||
pkgs-for = system: import inputs.nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [
|
||||
"openssh-with-gssapi-8.4p1"
|
||||
];
|
||||
overlays = [
|
||||
(import (inputs.fudo-pkgs + /overlay.nix))
|
||||
(import (inputs.fudo-nixos + /lib/overlay.nix))
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
host-ip = hostname:
|
||||
inputs.fudo-nixos.fudoNetworks.${hostOpts.domain}.hosts.${hostname}.ipv4-address;
|
||||
|
||||
|
||||
in {
|
||||
config = {
|
||||
nixpkgs.pkgs = pkgs-for hostOpts.arch;
|
||||
|
||||
imports = [
|
||||
inputs.fudo-nixos.nixosModule
|
||||
inputs.fudo-secrets.nixosModule
|
||||
];
|
||||
|
||||
instance = {
|
||||
inherit hostname build-timestamp;
|
||||
};
|
||||
|
||||
deployments = {
|
||||
targetHost = host-ip hostname;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user