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

Some more lanzatool refactoring #43

Merged
merged 3 commits into from
Jan 1, 2023
Merged

Conversation

nikstur
Copy link
Member

@nikstur nikstur commented Dec 31, 2022

Implements some requested changes from #34.

@RaitoBezarius
Copy link
Member

@nikstur Do you think we could get the "alternative Nix store" path feature and make it a parameter or something smart?

@nikstur
Copy link
Member Author

nikstur commented Jan 1, 2023

@nikstur Do you think we could get the "alternative Nix store" path feature and make it a parameter or something smart?

From some research, I got the impression, that an alternative Nix Store path is not really a well-supported feature of Nix e.g. NixOS/nix#1971. I'd say we just do not explicitly support an alternative path. With the implementation from #42 lanzatool doesn't really know about /nix/store at all anyways, so other store locations should just work. I implemented it that way so I can test with files in a temporary directory instead of /nix/store. (See: https://github.com/nix-community/lanzaboote/blob/master/rust/lanzatool/src/esp.rs#L56)

@RaitoBezarius
Copy link
Member

@nikstur Do you think we could get the "alternative Nix store" path feature and make it a parameter or something smart?

From some research, I got the impression, that an alternative Nix Store path is not really a well-supported feature of Nix e.g. NixOS/nix#1971.

It definitely is, the issue you linked is about rewriting the paths which is something different and could be useful to reuse the NixOS cache in an alternative store path.
But, if you do nix-build x --store ~/nix, it will create a new Nix store at this path.

Some people do run Nix store paths at alternative locations, certainly, this is very edgy, but I'm not sure if it cost that much to support it as a flag.

I'd say we just do not explicitly support an alternative path. With the implementation from #42 lanzatool doesn't really know about /nix/store at all anyways, so other store locations should just work.

Hm, that's fair. We can wait for a feature request then.

I implemented it that way so I can test with files in a temporary directory instead of /nix/store. (See: https://github.com/nix-community/lanzaboote/blob/master/rust/lanzatool/src/esp.rs#L56)

Great!

Copy link
Member

@blitz blitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the unit tests!

@nikstur nikstur force-pushed the some-more-lanzatool-refactoring branch from 73b02e0 to 1e632c0 Compare January 1, 2023 23:34
@nikstur nikstur merged commit 7afbc43 into master Jan 1, 2023
@nikstur nikstur deleted the some-more-lanzatool-refactoring branch January 2, 2023 00:07
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

Successfully merging this pull request may close these issues.

3 participants