Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could this replace nixos containers? #47

Open
VanCoding opened this issue Oct 31, 2024 · 5 comments
Open

Could this replace nixos containers? #47

VanCoding opened this issue Oct 31, 2024 · 5 comments

Comments

@VanCoding
Copy link

Hi there

I'm curious: Could I run this on top of NixOS the same way NixOS-Containers work?

My thought process is the following: When I have a lot of different services running on a single machine, and each one has some child-services like a database, for example, it's cool to sandbox these systems grouped together.

NixOS Containers do just that, but they are probably a bit heavyweight. If the goal of NixNG is leightweight "containers", couldn't it also make lightweight NixOS containers. They would work exactly like NixOS containers, but with the modules&options of NixNG inside the container instead of the NixOS ones.

Do you think that would even make a big difference?

@MagicRB
Copy link
Collaborator

MagicRB commented Oct 31, 2024

Yeah so uh that exists, https://git.sr.ht/~magic_rb/uk3s.nix/tree/master/item/nixos/modules/ucontainers/default.nix but to be honest the main problem is eval time, nixng helps a bit but still nix is slow just, well, because irs slow

@VanCoding
Copy link
Author

Ah, interesting, I'll have a look at that.

What's the problem with eval time, though? If the services don't change that often, does it even matter? I mean, in a highly dynamic system like kubernetes, where containers change all the time, it might be an issue, but then, I'd probably use imperative containers, no?

@MagicRB
Copy link
Collaborator

MagicRB commented Oct 31, 2024

Ah ya if you do imperative its fine. The thing i linked doesnt support imperative yet though. I do have a plan for a hybrid imperative/declarative approach similar to how i deploy into kubernetes. I just havent written it

@VanCoding
Copy link
Author

Nice! Thanks for commenting on the subject a bit, that's all I could've asked for :)

@MagicRB
Copy link
Collaborator

MagicRB commented Nov 1, 2024

Not completed tho :) moving ucontainers into its own repo would be nice and also docs, so ill keep this open.

@MagicRB MagicRB reopened this Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants