From d8b28ce6177acbfde1438808a7555423f7e272d5 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Wed, 30 Nov 2022 08:35:30 +0800 Subject: [PATCH] config: add home-manager configurations deploy nodes --- flake.nix | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/flake.nix b/flake.nix index 83881a54..3fc3ed31 100644 --- a/flake.nix +++ b/flake.nix @@ -439,17 +439,21 @@ # Take note for automatically imported nodes, various options should be # overridden in the deploy utility considering that most have only # certain values and likely not work if run with the intended value. - deploy.nodes = (lib'.mapAttrs' - (name: value: - lib'.nameValuePair name { - hostname = name; - profiles.system = { - sshUser = "admin"; - user = "root"; - path = inputs.deploy.lib.${defaultSystem}.activate.nixos value; - }; - }) - self.nixosConfigurations); + deploy.nodes = let + importNodes = prefix: systems: + lib'.mapAttrs' + (name: value: + lib'.nameValuePair "${prefix}-name" { + hostname = name; + profiles.system = { + sshUser = "admin"; + user = "root"; + path = inputs.deploy.lib.${defaultSystem}.activate.nixos value; + }; + }) + systems; + in (importNodes "nixos" self.nixosConfigurations) + // (importNodes "home-manager" self.homeManagerConfigurations); # How to make yourself slightly saner than before. So far the main checks # are for deploy nodes.