8 Feb 2024 |
adamcstephens | I normally just `imports = [ (modulesPath + "/virtualisation/lxc-container.nix") ];` on the host | 01:21:47 |
aanderse | i thought so... hmmm | 01:22:33 |
adamcstephens | It may be possible to turn this into a regularly imported nixos module. I’ve never investigated doing so though | 01:23:16 |
aanderse | that wouldn't be trivial unfortunately... because lxc-container.nix imports things too | 01:24:03 |
adamcstephens | It looks like a handful of the virtualization modules are | 01:24:06 |
aanderse | 🤔 | 01:24:14 |
aanderse | but i *really* want to mark a container using `config`
hmmm | 01:24:41 |
adamcstephens | We could duplicate the common config into the container/vm modules. It’s not that extensive | 01:25:23 |
aanderse | yeah?
i would really love that | 01:26:05 |
aanderse | I'm not sure what the precedent for module vs import is
anyone know? | 01:27:17 |
aanderse | I'm trying to think of more examples of module vs import | 01:28:29 |
aanderse | i can't at the moment, though I'm sure there are a number | 01:28:44 |
adamcstephens | I’m not sure what the impact to releases is. mkg20001initially created the lxc-container file it seems :) | 01:29:09 |
aanderse | ah
they would have something useful to say I'm sure
ping mkg20001 ... whenever you have a chance to comment i would greatly appreciate it, specifically why lxc-container.nix is a file to be imported rather than a nixos module | 01:30:57 |
mkg20001 | the import idea came from qemu doing something similar | 01:33:35 |
mkg20001 | there's no real reason why it's not just virtualisation.lxc.container-guest.enable = true; or similar | 01:33:57 |
aanderse | ah so it was precedent based
thank you for the information! | 01:34:22 |
aanderse | ok so if i were to turn lxc-container.nix into a module i have everyone's support? | 01:35:19 |
mkg20001 | yes. we can make the file a stub that issues a warning and sets the required options | 01:35:51 |
aanderse | great
thanks everyone | 01:36:38 |
adamcstephens | Yes I’m on board. I don’t love the UX of requiring an import from modulesPath | 01:36:48 |
aanderse | yeah, it is a little bit jarring compared to the rest of the system | 01:37:47 |
adamcstephens | As mkg mentioned, it’s a common pattern for these profiles, but that doesn’t mean it needs to stay that way | 01:38:54 |
aanderse | yeah, good point | 01:39:08 |