serokell / deploy-rs

A simple multi-profile Nix-flake deploy tool.
Other
1.41k stars 101 forks source link

[#210] Add activation script for darwin system and provide a usage example #213

Closed rvem closed 1 year ago

rvem commented 1 year ago

Problem: It's possible to use 'deploy-rs' for deploying 'darwinSystem' configuration from 'nix-darwin' to a darwin system. However, there is no dedicated activatiot script for darwin and thus one has to come up with 'custom' activation script.

Solution: 1) Add 'darwin' attribute to 'lib.activate' that provides a script that should be used to activate 'darwinSystem' config with 'deploy-rs'. 2) Add a new 'examples/darwin' example that provides simple flake for deploying configuration to a darwin target.

Resolves #210

PhilTaken commented 1 year ago

Personally I wouldnt check the lockfile for an example into version control but apart from that it looks good. Can't test currently :/

rvem commented 1 year ago

Personally I wouldnt check the lockfile for an example into version control

I didn't think about that previously by it indeed makes sense to not include it

rvem commented 1 year ago

@PhilTaken, will you get a chance to look at this PR once again? :sweat_smile:

rvem commented 1 year ago

From my side I can confirm that I already tested this on a VM and baremetal macOS instances

PhilTaken commented 1 year ago

@rvem I'll check it out this evening 😉 might even fire up a vm and try it out