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

Migrate to disko/examples #14

Open
iFreilicht opened this issue Oct 31, 2024 · 3 comments
Open

Migrate to disko/examples #14

iFreilicht opened this issue Oct 31, 2024 · 3 comments

Comments

@iFreilicht
Copy link

I'd like to open this as an alternative to nix-community/disko#849.

The three templates we have here are somewhat underwhelming, and they're not tested. As @Mic92 said in the linked issue, the original idea was to have all of these templates tested against the current latest version of disko, but as we already have an example directory that is tested properly by CI, it seems like unnecessary work to build up a new pipeline here.

I'd much rather make the disko repository itself the definitive source of truth for example code and templates, and delete the content of this repo (apart from a README.md that redirects users to https://github.com/nix-community/disko).

Whether the three templates here should be moved into examples or whether we should create a new templates directory I'm uncertain of.

I don't see a strong advantage in making these proper templates and exposing them in a flake, when you could just as easily tell people to curl example files to disko-config.nix locally.

@rvveber
Copy link

rvveber commented Jan 2, 2025

Agree, the ZFS impermanence config here is not working.

@bittner
Copy link

bittner commented Jan 17, 2025

I've tried integrating the examples in my nixos-config repository, with mixed results:

  • The "single-disk-ext4" works best so far for the installation (no errors), but when booting the installed system fsck.ext4 complains about a "Bad magic number in super-block while trying to open /dev/disk/by-partlabel/disk-main-root". 😬
  • The "ZFS impermanence" config requires a networking.hostid attribute set. This seems to be a thing taken for granted by anyone experienced with ZFS, so ... not me. 😟
error:
Failed assertions:
- ZFS requires networking.hostId to be set

That looks all a bit like, "almost there!"

With the examples from the disko/example directory I don't even get that far. I tried btrfs-subvolumes.nix and I get:

error: attribute 'disko' missing

As a NixOS beginner I'm a bit lost.

Where can I find a working BTRFS impermanence setup with sensible defaults that "just works"? ™
And is the impermanence module really optional or do I need to set it up, in addition?

@iFreilicht
Copy link
Author

The "ZFS impermanence" config requires a networking.hostid attribute set. This seems to be a thing taken for granted by anyone experienced with ZFS, so ... not me. 😟

Yeah I don't think we can do much about that, unless we change our examples to be full NixOS configs. The error message is pretty clear though, and if you search the NixOS options for networking.hostId, you'll find enough information to continue.

With the examples from the disko/example directory I don't even get that far. I tried btrfs-subvolumes.nix and I get:

This is a common error when you forget to import the disko module in your configuration.

Where can I find a working BTRFS impermanence setup with sensible defaults that "just works"? ™

Search on Github for the NixOS config of other users.

And is the impermanence module really optional or do I need to set it up, in addition?

You have to set it up like the impermance module docs tell you to. Disko does not help you with that in any way.

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

3 participants