8 Feb 2024 |
adamcstephens | * I use opentofu with incus (and was using it with lxd too) | 01:46:09 |
aanderse | how much friction do you find in combing these technologies together?
at work we are using this and the friction has been higher than i would like | 01:46:27 |
adamcstephens | I would rather not use opentofu if I had a native nix alternative. | 01:47:24 |
aanderse | you mean like nixops-ish, right? | 01:47:58 |
adamcstephens | I actually use terranix though so I’m still writing nix code | 01:48:02 |
aanderse | does terranix integrate nicely? | 01:48:32 |
adamcstephens | In reply to @aanderse:nixos.dev you mean like nixops-ish, right? I’ve never used nixops, so I’m not too sure about it | 01:48:42 |
mkg20001 | nixos-rebuild --flake .#host --target-host root@your-machine is what I use for my machines after they're created | 01:50:24 |
adamcstephens | I think I envision something like microvm.nix that configures what resources incus should have, but then also doesn’t tightly couple the guest configs to the host | 01:50:43 |
adamcstephens | I have a homegrown deployment tool but it’s effectively using nixos rebuild target host | 01:51:18 |
mkg20001 | In reply to @adam:robins.wtf I think I envision something like microvm.nix that configures what resources incus should have, but then also doesn’t tightly couple the guest configs to the host there is already have the virtualisation.diskSize, etc options from qemu which may be what you want. that could be generalized. | 01:52:01 |
aanderse | ah | 01:52:12 |
aanderse | yeah so i found myself needing terraform resource values in my nixos config... but at the same time needing nixos values inside my terraform config | 01:53:15 |
aanderse | this is something nixops did well | 01:53:32 |
aanderse | i hacked a little script together and am trying it out for deployments | 01:53:59 |
aanderse | it pairs colmena and terraform together | 01:54:18 |
aanderse | specifically I'm using it with lxd though | 01:54:29 |
adamcstephens | Are you planning to stick with lxd or migrate to incus? | 01:55:38 |
aanderse | so you write a colmena deploy like normal
but
you can add terraform in the same file, just write the terraform as nix instead of hcl
in addition your nixos gets access to your evaluated terraform objects and your terraform objects get access to you nixos configs | 01:56:22 |
aanderse | we run lxd on Ubuntu
we provide our own images
so we'll stick to Ubuntu for now because their decisions don't impact us yet
we're keeping an eye on the situation though | 01:57:15 |
adamcstephens | Ok, so if I float deprecating lxd server on nixos it won’t impact you :) | 01:57:51 |
aanderse | yeah i mean i kinda wish we could keep both.. but I'll definitely support you if you want to remove it
no impact here | 01:59:23 |
mkg20001 | looked at colmena, it's really nice. might switch to it | 01:59:27 |
mkg20001 | btw, if anyone has the need to use nixos things on non-nixos to let's say run incus I'm working on a solution for that at work https://github.com/mgit-at/nix-unify | 02:00:24 |
mkg20001 | basically just symlinks the systemd services into the host's /etc/systemd, plus some other stuff (adding users, etc) | 02:00:53 |