-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
General question about using disko when boostraping a system (flakes) #24
Comments
I am not 100% sure I get your intention but you can build parts of your nixos system like this:
This assumes that whatever is part of your nixos system is also exposed as an option. {
options.myoption = mkOption {
type = types.str;
default = tsp-create;
};
}
However it seems far easier to just expose it through a packages flake output and than just use.
Notice that when you use I am going to close this issue, since it is not disko related. But you can continue to ask questions. |
Thank you so much for your help, I'll definitely try your suggestion when I get access to my pc.
Definitely, the problem is that I have three hosts and I wouldnt want to have to expose three different new outputs for each of their disko configurations. Do you know of any way to abstract this? |
@Mic92 Right now Im trying to follow your option recommendation. This is it (currently a WIP) in case anyone wants to take a look in the future for documentation purposes. (Baitinq/nixos-config#2) |
@Mic92 Im done with my implementation, maybe we should consider adding some documentation on how this would be achieved? @Lassulus (As it seems like it would be one of the main use cases for disko) For reference (https://github.com/Baitinq/nixos-config/blob/master/hosts/luna/disks.nix) (nix run .#nixosConfigurations.luna.config.disko-create) (nix run .#nixosConfigurations.luna.config.disko-mount) |
Yeah, looks a nice example. |
Hi, I had a general question about the usage of disko.
Currently, I am using disko in the inputs of my nixos configuration flake (https://github.com/baitinq/nixos-config) (example config in hosts/luna/disks.nix). It appears to work wonderfully, correctly creating the tsp-create/mount scripts on my system.
My question is the following, how would I use this when bootstrapping my nixos system on a new install? (which would be when it is really needed and useful).
I havent seen any flake related documentation on this, and I realise this might be a more personal nix problem with how my configuration is set up, but is there any way to just build a certain part of my configuration with flakes without having a new output created?
Thank you so much.
The text was updated successfully, but these errors were encountered: