zhaofengli / colmena

A simple, stateless NixOS deployment tool
https://colmena.cli.rs
MIT License
1.2k stars 64 forks source link

Boostrapping from ISO #68

Open blaggacao opened 2 years ago

blaggacao commented 2 years ago

Can you give me a few pointers where to implement this?

zhaofengli commented 2 years ago

For this usecase, I currently use an external script that calls colmena eval to evaluate and build system profiles outside of the normal deployment flow: https://github.com/zhaofengli/colmena/issues/42#issuecomment-1004528027

blaggacao commented 2 years ago

Awesome, thank you.

Why are you using nix-env & nix-build instead of nix profile & nix build?

But still nix copy.

zhaofengli commented 2 years ago

Why are you using nix-env & nix-build instead of nix profile & nix build?

But still nix copy.

Oops, missed this one. nix profile is not compatible with nix-env and has different semantics. The output of nix-build is also easier to work with in scripts compared to nix build --json.

I'm using nix copy instead of nix-copy-closure because the former allows you to directly copy to a chroot store.

blaggacao commented 2 years ago

Notably nix profile doesn't support priority, yet. This leads sometimes to installation failures.

dminuoso commented 2 years ago

We have a simple python installer wizard on a custom image, which formats the disk with labels according to a standard, sets up the correct IP address and sets up SSH with proper users. After that is run, we can simply adopt with colmena.

Maybe a similar approach could work for you too?

otavio commented 2 years ago

@dminuoso is it available somewhere?