deploy-rs icon indicating copy to clipboard operation
deploy-rs copied to clipboard

Node name cannot contain `.`

Open ReneHollander opened this issue 1 year ago • 4 comments

Hello!

The node name cannot contain a . character:

[rene@renespc:~/repositories/infra]$ nix run github:serokell/deploy-rs -- -d .#"chwei01.serv0r.xyz"
🚀 ❌ [deploy] [ERROR] Error parsing flake: Unrecognized node or token encountered

I would like to do that because it allows me to have the same name between hostname, nixosConfiguration and the deploy rs configuration.

ReneHollander avatar Dec 25 '24 15:12 ReneHollander

As per usual I figured it out a few minutes later: deploy-rs does not like the node name to contain ..

Updated the issue title accordingly.

ReneHollander avatar Dec 25 '24 15:12 ReneHollander

You can fix this by wrapping the node name in single quotes and adding a dot at the end:

nix run github:serokell/deploy-rs -- -d '.#"chwei01.serv0r.xyz".'

Munksgaard avatar Jan 09 '25 10:01 Munksgaard

deploy-rs appears to parse the node names as flake paths. This means when you specify .#my.awesome.node you don't reference deploy.nodes."my.awesome.node" but instead deploy.nodes.my.awesome.node. The code interpreting the AST from the parser stops the moment it sees neither an indent nor a string, which is why you are shown a ParseFlakeError::Unrecognized error.

Chaostheorie avatar Mar 27 '25 18:03 Chaostheorie

#317 fixes this, now --targets .#info.archive.org. should reference the node info.archive.org with the default profile. The fix was easier than expected.

Chaostheorie avatar Mar 27 '25 19:03 Chaostheorie