Skip to content
Discussion options

You must be logged in to vote

Hey @HPCesia, all those attributes you need in your code snippet host.{system,name} exist on the host schema (you can also add new free-form attributes to them in case you need it, or use den.base.host to add module typed options to all hosts schema).

I see your flake output looks like it can already be a function of host,

nodeDeploy = name: host: {
    hostname = host.hostName;
    profiles.system.path = inputs.deploy-rs.lib.${host.system}.activate.nixos self.nixosConfigurations.${name};
};

flake.deploy.nodes = mapAttrs nodeDeploy den.hosts.x86_64-linux;

that's the easiest way I might believe.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by HPCesia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants