-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Activation preset for home-manager #43
Comments
It would be great if you could share the code for how to do this. I don't entirely know how to use the custom activate script, so I wasn't able to figure it out myself. |
I don't actually remember the modifications I made, the original file which I copied and altered has changed quite some bit (and I think the way I made it work was not entirely correct anyway). I'm going to revisit how to do it from scratch, and document it as I go. |
So it looks like the issue is that My modified code was simply a It looks like the actual NixOS module ( |
There's also a little bit of philosphical design consideration to be done, for the NixOS activation it makes a lot of sense, you use |
Thankfully, I now believe I am an idiot, and everything I have just said seems to be wrong. Adding EDIT: wrong again |
So basically, something like this does seem to work {
profiles.notgne2-home-manager = {
user = "notgne2";
profilePath = "/nix/var/nix/profiles/per-user/notgne2/home-manager";
path = deploy-rs.lib.${system}.activate.custom (home-manager.lib.homeManagerConfiguration {
inherit pkgs system;
extraSpecialArgs = { inherit pkgs inputs; };
homeDirectory = "/home/notgne2";
username = "notgne2";
configuration = ./home-manager/configuration.nix;
}).activationPackage "$PROFILE/activate";
};
} And if we add a preset for it, it can look like this {
profiles.notgne2-home-manager = {
user = "notgne2";
profilePath = "/nix/var/nix/profiles/per-user/notgne2/home-manager";
path = deploy-rs.lib.${system}.activate.hm (home-manager.lib.homeManagerConfiguration {
inherit pkgs system;
extraSpecialArgs = { inherit pkgs inputs; };
homeDirectory = "/home/notgne2";
username = "notgne2";
configuration = ./home-manager/configuration.nix;
});
};
} I'm still not sure why it works, or why it didn't, but I don't think that matters too much |
Despite intentionally remaining profile-agnostic, deploy-rs provides support for NixOS in the form of
activate.nixos
, I would like to provide a similar option for home-manager deployments, this is something I know to be possible as I use it in my own deployments, though last time I checked required modifying some of home-manager's code.The text was updated successfully, but these errors were encountered: