mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
config: fix and improve upon importNodes
This commit is contained in:
parent
9a0079a7fc
commit
acfc617e10
13
flake.nix
13
flake.nix
@ -449,20 +449,21 @@
|
||||
# ignoring the shell entry by simply prefixing it with a space which most
|
||||
# command-line shells have support for (e.g., Bash, zsh, fish).
|
||||
deploy.nodes = let
|
||||
importNodes = prefix: systems:
|
||||
importNodes = { prefix, activation ? prefix, environments, system ? defaultSystem }:
|
||||
lib'.mapAttrs'
|
||||
(name: value:
|
||||
lib'.nameValuePair "${prefix}-name" {
|
||||
lib'.nameValuePair "${prefix}-${name}" {
|
||||
hostname = name;
|
||||
profiles.system = {
|
||||
sshUser = "admin";
|
||||
user = "root";
|
||||
path = inputs.deploy.lib.${defaultSystem}.activate.nixos value;
|
||||
path = inputs.deploy.lib.${defaultSystem}.activate."${activation}" value;
|
||||
remoteBuild = true;
|
||||
};
|
||||
})
|
||||
systems;
|
||||
in (importNodes "nixos" self.nixosConfigurations)
|
||||
// (importNodes "home-manager" self.homeManagerConfigurations);
|
||||
environments;
|
||||
in (importNodes { prefix = "nixos"; environments = self.nixosConfigurations; })
|
||||
// (importNodes { prefix = "home-manager"; environments = self.homeManagerConfigurations; });
|
||||
|
||||
# How to make yourself slightly saner than before. So far the main checks
|
||||
# are for deploy nodes.
|
||||
|
Loading…
Reference in New Issue
Block a user