| 11 Mar 2022 |
@github:maunium.net | [zhaofengli/colmena] scvalex opened
issue
#64: Add plan/diff command
A plan or diff-current-to-next command would be useful to have.
We can get something pretty close already by combining colmena and nix-diff:
$ colmena build --on laptop
[INFO ] Using configuration: ./deployment.nix
[INFO ] Enumerating nodes...
[INFO ] Selected 1 out of 5 hosts.
✅ 11s All done!
laptop ✅ 10s Evaluated laptop
laptop ✅ 1s Built "/nix/store/r829pyjngqxmn7k1j9j39w3rcaarg2d1-nixos-system-laptop-21.11pre-git"
$ nix-diff --color always --character-oriented /var/run/current-system /nix/store/r829pyjngqxmn7k1j9j39w3rcaarg2d1-nixos-system-laptop-21.11pre-git | less -R
There are a few problems with the above:
nix-diff is a separate package to install,
- the diff isn't great (the full diff contains the entirety of
options.xml and is 26MB in size); that said, i think that if we diffed just a few specific things like system-path, that would be useful,
- the diff requires the previous system derivation to be available locally.
If you're interested in a feature like this, I'd be up for rewriting nix-diff as a rust library and trying to integrate it into colmena.
| 11:28:18 |
| finn left the room. | 20:08:50 |
| 13 Mar 2022 |
Winter (she/her) | Does Colmena eval all nodes even when doing --on ...? | 03:02:17 |
Winter (she/her) | I ask since it's throwing an error in a configuration for a host that I didn't specify -- it doesn't try to deploy to it, though. | 03:03:18 |
Zhaofeng Li | It eval all nodes' deployment config only if you match against tags like --on @some-tag. If you just match against names, it will just evaluate the matched attributes. | 03:04:43 |
Zhaofeng Li | * It will eval all nodes' `deployment` config only if you match against tags like `--on @some-tag`. If you just match against names, it will just evaluate the matched attributes. | 03:04:55 |
Winter (she/her) | yeah that seems to be broken 😅 | 03:11:43 |
Winter (she/her) | will file a proper bug report | 03:11:48 |
Zhaofeng Li | In reply to @winterqt:nixos.dev yeah that seems to be broken 😅 Oh right, are you using 0.2 or the unstable version? That was done post-release as part of the deployment logic rewrite | 03:14:11 |
Winter (she/her) | I'm using 2b281286d00ac9a0ae6f671b3b9b6db27b9e0936 | 03:15:25 |
Zhaofeng Li | Hmm, then it should have been there. Probably some bug then | 03:17:27 |
Winter (she/her) | want me to file a proper bug report | 03:17:36 |
Zhaofeng Li | That would be great, with a small hive.nix/flake.nix that can trigger this 👍 | 03:21:23 |
| 14 Mar 2022 |
Chinchilla Washington | How can I deploy to a host with no internet access (or working name resolution)? Builds fail when the remote host tries to download from the the nixos cache. I'd like to still be able to use the cache but download it from the build machine instead of target host. | 01:34:34 |
Chinchilla Washington | * How can I deploy to a host with no internet access (or working name resolution)? Builds fail when the remote host tries to download from the the nixos cache. I'd like to still be able to use the cache but download it from the build machine instead of target host if that's reasonable. | 01:34:46 |
Zhaofeng Li | In reply to @cw:kernelpanic.cafe How can I deploy to a host with no internet access (or working name resolution)? Builds fail when the remote host tries to download from the the nixos cache. I'd like to still be able to use the cache but download it from the build machine instead of target host if that's reasonable. --no-substitutes which will probably be renamed in the future (https://github.com/zhaofengli/colmena/issues/59) | 01:36:52 |
Chinchilla Washington | In reply to @zhaofeng:zhaofeng.li
--no-substitutes which will probably be renamed in the future (https://github.com/zhaofengli/colmena/issues/59) syntaxerror ✅ 4m Activation successful
Thank you very much!
| 01:45:50 |
Chinchilla Washington | I should have asked this a long time ago. | 01:46:09 |
Buckley | I just disable the binary caches in the configs of machines with no internet. Less typing | 04:38:09 |
Chinchilla Washington | In reply to @buckley310:matrix.org I just disable the binary caches in the configs of machines with no internet. Less typing Sometimes the lack of internet isn't planned, heh | 05:42:08 |
Buckley | lol | 13:45:46 |
| 15 Mar 2022 |
Winter (she/her) | So when using buildOnTarget, what decides if the drv should be built and copied on the host or built on the target? I know most do the latter, but things such as a source folder (from a flake input) have definitely gotten copied before, so... | 19:48:55 |
| 16 Mar 2022 |
Zhaofeng Li | In reply to @winterqt:nixos.dev So when using buildOnTarget, what decides if the drv should be built and copied on the host or built on the target? I know most do the latter, but things such as a source folder (from a flake input) have definitely gotten copied before, so... Oops, missed this one. I think sources (fixed hash paths produced by addToStore or similar) are always directly copied, and because Colmena passes --include-outputs when copying the .drvs existing outputs will be copied as well | 21:23:16 |