Merge pull request #398 from KarolisL/doc_deploy_hm

Document using deploy-rs to deploy home-manager
This commit is contained in:
Timothy DeHerrera 2021-11-13 14:07:41 -07:00 committed by GitHub
commit 633ccde1b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,5 +45,32 @@ deploy '.#hostName' --hostname host.example.com
> ##### _Note:_
> Your user will need **passwordless** sudo access
### Home Manager
Digga's `lib.mkDeployNodes` provides only `system` profile.
In order to deploy your `home-manager` configuration you should provide additional profile(s) to deploy-rs config:
```nix
# Initially, this line looks like this: deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { };
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations
{
<HOSTNAME> = {
profilesOrder = [ "system" "<HM_PROFILE>" "<ANOTHER_HM_PROFILE>"];
profiles.<HM_PROFILE> = {
user = "<YOUR_USERNAME>";
path = deploy.lib.x86_64-linux.activate.home-manager self.homeConfigurationsPortable.x86_64-linux.<YOUR_USERNAME>;
};
profiles.<ANOTHER_HM_PROFILE> = {
user = "<ANOTHER_USERNAME>";
path = deploy.lib.x86_64-linux.activate.home-manager self.homeConfigurationsPortable.x86_64-linux.<ANOTHER_USERNAME>;
};
};
};
```
Substitute `<HOSTNAME>`, `<HM_PROFILE>` and `<YOUR_USERNAME>` placeholders (omitting the `<>`).
`<ANOTHER_HM_PROFILE>` is there to illustrate deploying multiple `home-manager` configurations. Either substitute those as well,
or remove them altogether. Don't forget the `profileOrder` variable.
[d-rs]: https://github.com/serokell/deploy-rs