this post was submitted on 11 Apr 2024
5 points (100.0% liked)

Nix / NixOS

1765 readers
8 users here now

Main links

Videos

founded 1 year ago
MODERATORS
 

I'm trying to switch my home server over to nix and currently I'm struggling a bit with k3s. In a "regular" distro I would just create a registries.yaml in /etc/rancher and the rest happens on its own - that's not really how nix is supposed to work, though.

So how would I do that? There seems to be no way to create a registry using the command line (so the ConfigFlags option won't work), so pointing to the config file directly seems to be the way to go.

But how do I do that in a "nixy" way? Can I somehow say "this string here is actually a config file that's supposed to be in that dir"?

you are viewing a single comment's thread
view the rest of the comments
[–] MaienM@sopuli.xyz 3 points 7 months ago (1 children)
[–] TrilightZone@lemmy.world 3 points 7 months ago (1 children)

That seems to work - at least I can get the file to appear. Now I only have get k3s working.

[–] onlinepersona@programming.dev 1 points 5 months ago* (last edited 5 months ago)

Tot do that you need to start a systems service.

systemd.services.k3s = { ... }

These are the options you can set. You can inspire yourself from an existing module like deluge.

However, there already is module for k3s! All you need to do is set the options in your

configuration.nix

Anti Commercial-AI license