minimal working state
This commit is contained in:
parent
855430ef16
commit
6c1a0a5d33
26 changed files with 331 additions and 326 deletions
|
|
@ -1,37 +1,10 @@
|
|||
{
|
||||
_snow,
|
||||
_snowFlake,
|
||||
snow,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(builtins)
|
||||
mapAttrs
|
||||
;
|
||||
|
||||
mapNodes = nodes: f:
|
||||
nodes.nodes
|
||||
|> mapAttrs (name: node: let
|
||||
# use per-node base or default to nodes' base
|
||||
base =
|
||||
if node.base != null
|
||||
then node.base
|
||||
else if nodes.base != null
|
||||
then nodes.base
|
||||
else
|
||||
abort ''
|
||||
snow cannot construct nodes node "${name}" without a base package source.
|
||||
Ensure `nodes.nodes.*.base` or `nodes.base` is a flake reference to the github:NixOS/nixpkgs repository.
|
||||
'';
|
||||
in
|
||||
f rec {
|
||||
inherit name node base;
|
||||
inherit (base) lib;
|
||||
|
||||
groups = node.groups (parseGroupsDecl nodes.groups);
|
||||
groupModules = root: getGroupModules root groups;
|
||||
});
|
||||
in {
|
||||
outputs.deploy.nodes = mapNodes config.nodes ({
|
||||
}: {
|
||||
outputs.deploy.nodes = snow.lib.mapNodes config.nodes ({
|
||||
name,
|
||||
node,
|
||||
...
|
||||
|
|
@ -49,7 +22,7 @@ in {
|
|||
confirmTimeout
|
||||
;
|
||||
|
||||
nixosFor = system: _snow.inputs.deploy-rs.lib.${system}.activate.nixos;
|
||||
nixosFor = system: _snowFlake.inputs.deploy-rs.lib.${system}.activate.nixos;
|
||||
in {
|
||||
hostname =
|
||||
if ssh.host != null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue