-
Notifications
You must be signed in to change notification settings - Fork 21
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
Per-host home-manager configurations #19
Comments
I tried to temporarily make this work in a somewhat hacky way since:
But it doesn't work for some reason. If you have any ideas on a quick work-around it would save me the time of having to go back to flake-utils-plus where I know how to do this. Long term I think I want a flake-parts based config... I think :) Here's my code: {
# ...
outputs = inputs@{ self, ... }:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
# ...
flake = {
nixosConfigurations = {
laptop = self.nixos-flake.lib.mkLinuxSystem {
imports = [
self.nixosModules.default
./nixos/gui/wayland.nix
{
# not ideal, see https://github.com/srid/nixos-flake/issues/19
home-manager.users.paretoOptimalDev = [
./home/window-manager/sway.nix
];
}
];
};
};
};
};
} |
Well, this should be straightforward to implement, right? Look for hostname (fallback to $USER), and then use that to set the attribute here ... all done in the bash script: |
Ideally we want to have that in this repo, but for quick workaround, you can simply add a |
Alright, checkout #60 With it, you can do |
cc @bketelsen
Basically add hostname, along with username, to the
legacyPackages.homeConfigurations
keys.Then
nix run .#activate -- --home
(see #18) knows which configuration to activate.The text was updated successfully, but these errors were encountered: