nix-community / disko

Declarative disk partitioning and formatting using nix [maintainers=@Lassulus @Enzime @iFreilicht]
MIT License
1.85k stars 198 forks source link

Omitting disko phase still requires me to define a disko script #879

Open jtara1 opened 2 days ago

jtara1 commented 2 days ago

command and error

host=my_host
ip=192.168.1.100

nix run github:nix-community/nixos-anywhere -- --phases kexec,install,reboot --flake .#$host root@$ip

error: flake 'git+file:///home/j/nixcfg' does not provide attribute 'packages.x86_64-linux.nixosConfigurations."my_host".config.system.build.diskoScript', 'legacyPackages.x86_64-linux.nixosConfigurations."my_host".config.system.build.diskoScript' or 'nixosConfigurations."my_host".config.system.build.diskoScript'

I want to do my own partitioning. I mount new target for install to /mnt and /mnt/boot as per nixos defaults.

Am I breaking things trying to remove the disko phase?

Mic92 commented 2 days ago

I think you need to provide some own logic anyway if you also do kexec. Otherwise you boot into a new machine that doesn't have anything mounted. We should probably not build disko if we omit the disko phase. But than you would need to do first the kexec part only, followed by your own manual partitioning and than install + reboot.

Mic92 commented 2 days ago

https://github.com/nix-community/nixos-anywhere/pull/425

jtara1 commented 11 minutes ago

I quickly tested this installing to a virtual machine and I'm not getting the same error now, thanks. I thought I had opened this issue in nixos-anywhere, guess not.