Skip to content
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

Target Wide Home-Manager not working as expected #124

Open
replicapra opened this issue Aug 1, 2024 · 1 comment
Open

Target Wide Home-Manager not working as expected #124

replicapra opened this issue Aug 1, 2024 · 1 comment

Comments

@replicapra
Copy link

the v3 migration docs state that For example, if you created a home homes/x86_64-linux/jake/default.nix, the home will be included for every x86_64-linux machine and will be exported on your Flake as homeConfigurations."jake@x86_64-linux".

but the generated homeConfiguration will actually be named only "jake"

that becomes a problem as soon as you try to create a target wide home config for more than one target as only the first one ( or only one, can't really tell if it's the first one ) seems to be build

in my exact case I defined a target wide home config for both x86_64-linux and aarch64-linux and while the x86_64-linux config kept building just fine the aarch64-linux one failed, not being able to find the defined home-manager user
my homeConfigurations included only one config with the plain name, no @<target>

@bLuka
Copy link

bLuka commented Aug 29, 2024

I have a few struggles on my side too and I confirm the behavior: my homes/aarch64-darwin/luka and homes/x86_64-linux/luka targets are merged and prevent rebuilds.

$ nix repl
nix-repl> :lf .
nix-repl> homeConfigurations
{
  luka = { ... };
  root = { ... };
}

File tree:

homes/aarch64-darwin/luka/default.nix
homes/x86_64-linux/luka/default.nix
homes/x86_64-linux/root/default.nix

Moreover, if I try to rename to include the host (mv homes/aarch64-darwin/luka{,@foo}), I get an error:

error: path 'fm7i5n6iwkxpsdj2cbzxxrnk25rykwr7-luka@foo' is not a valid store path: name 'luka@foo' 
contains illegal character '@'

I believe it misses a call to lib.strings.sanitizeDerivationName

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants