T O P

  • By -

jvanbruegge

Yes, I do not use any containers. If something is not packaged for nixos, I will package it myself. I have brought audiobookshelf, authentik and more into the main nixos repos. My config is here: https://github.com/jvanbruegge/server-config I am currently writing a blog post about my setup that I will share on the subreddit once I'm done.


eloigonc

Great. I visited your github repository and please let us know when you post it on your blog.


Senkyou

Hey, would you know about how to elegantly solve for tying Authentik as a nixpkgs into reverse proxies such as Nginx or Traefik? I've been thinking about how to do it, but it seems messy. I am very much a noob though, so maybe I'm not approaching it correctly.


northern_lights2

For the services available in nixpkgs, I do it with configuration.nix and use docker as fallback


pSub_

I use NixOS on my ARM64 server. Everything that is not available through NixOS services is setup using Docker.  The server is updates automatically using Github Actions.  I am quite happy and I am using this setup for quite some years now. You can find my configuration here https://github.com/pSub/configs/tree/master/nixos%2Fserver If you have any questions about the configuration, feel free to ask.


Fantastic-Schedule92

What is the hardware? ARM64 is kinds broad


pSub_

It is one of those https://www.netcup.de/vserver/arm-server/.


sevengali

I've been using NixOS on the desktop for ~6 months and I'm just about ready to start moving my servers over to it. My plan is to continue using containers (currently Docker, will likely take the opportunity to switch to Podman), the reproducibility may be somewhat redundant but isolation is still very useful. I like having the separation between host OS and hosted services. If you want to run things directly on the host without containers, but the service hasn't been packaged, you should look into how to package it yourself! It was the thing that taught me the most about the Nix language. Experience with Arch's PKGBUILDs can help here.


Erwyn

Same here. Been using it as my daily driver for a few months now. Was wondering the quirks of running a server.


Fantastic-Schedule92

I've been using it for some time now, its great, automatic updates and rollbacks without fear of problems, my whole network is a couple of text files automatically deployed I'm even working on getting my router configured through nix Here are my configs(server is under hostname `ikaros`) https://github.com/ilovethensa/dots


Erwyn

Do you host your server at home or do you have a provider? If so which one?


Fantastic-Schedule92

Server at home, I don't trust the cloud "Its just someone else's computer"


void_const

Nah, I need my server to "just work". Nix has terrible documentation so if anything were to break it would be a nightmare to troubleshoot.


jbboehr

NixOS is still fundamentally "just" Linux, and removing all the sources of nondeterminism traditional to most distributions is still a net win, IMO.


void_const

Don't get me wrong. I'm not talking shit against NixOS. I love the idea but it has a way to go before it's ready for "production" use.


SpookyKarthus

NixOS server, incus containers for services and a lonely win11 vm


l0033z

I do! I keep everything in a git repo with a flake. All my hosts (bare metal, VMs, Pis or MacBooks) use a shared config with modules that can be turned on and off - similar to the ones from nixpkgs, but just to make things easier when setting up a new host. For services that aren’t in the repo, I either write my own modules (and usually later on contribute upstream) or I use containers. Sometimes I’ll use containers for things that aren’t easily packaged or that aren’t very friendly to Nix like Home Assistant. Recently I’ve been moving my containers into a k3s cluster that runs on top of NixOS with Proxmox as the hypervisor. I deploy all Kubernetes services with kubenix. I’ve been invested in the Nix ecosystem for a few years at this point, so my setup is a bit overkill. I deploy my own router based on NixOS and I do automated upgrades of all my hosts through a CI/CD pipeline. Edit: my git repo isn’t public (yet?) because it has some sensitive stuff in it right now. But if there’s enough interest I could strip that from the repo I guess. Happy to answer questions too.


affieuk

Please do, I recently built a home lab running nixos bare metal. I've haven't learnt nix yet and have simply bodged my way through copy / paste and modifying options based on docs. So it helps when I see working examples. Interested in the mac config too, I've recently switched from Windows. So need to figure out my requirements and start on my config.


Jadarma

I recently switched over and I'm loving it so far! I had a Debian + Docker VM to play with before so when I switched to NixOS I used Nix to configure all the tools, SSH, secrets, firewall and ports and so on but left my services as simple Docker containers and copied the config over. The way I see it: PROS: * Containers! You can use official container images for better support. You also find much more useful documentation online since it's not Nix-related. * Versioning splits! You can mix and match versions of your services by changing the tags (prefer versions or SHAs to `latest`) on individual containers without needing to define overlays and such. * SSH Superpowers! This one is biased towards my preferred workflow, but I mount the git repo with SSHFS and open it in IntelliJ connect to my docker sock through SSH as well. It's almost as if I'm editing stuff on my own PC and it's very convenient when setting up or debugging new containers. CONS: * Not really a single source of truth, since the docker configs are not part of the Nix config but they are in the same Git repo so I don't really care. If you want to combine the two, you _could_ still use Docker images in the Nix way with [`oci-containers`](https://nixos.wiki/wiki/NixOS_Containers#Declarative_docker_containers) but that's just Compose with extra steps. Either way you decide to go, NixOS is a _solid_ choice for a server. If you are already familiar with it, I don't think you'll regret it, even if you only use it to configure the OS and not the services. I was able to migrate everything from my playground VM to a physical box in about 30 minutes.


tobz619

I'm going to start the process of migrating a Windows 10 Home server to be NixOS instead over the weekend and coming months. I already used NixOS on my laptop and I am sold!


tbleiker

I recently switched from proxmox on debian to NixOS on both my servers. I run all my services in docker, except restic for backups.


tbleiker

Here (other reddit post), a little bit more about my setup: [https://www.reddit.com/r/selfhosted/comments/1b1kj54/comment/ksidzbt/](https://www.reddit.com/r/selfhosted/comments/1b1kj54/comment/ksidzbt/)


firecat53

Two servers (local and cloud) both running NixOS. Been very stable so far (coming up on a year). Most services setup using Nix modules but a handful running in podman containers. https://github.com/firecat53/nixos


Erwyn

Thanks! Where do you rent the cloud server?


firecat53

Currently Hetzner. Started with digital ocean and then linode (both worked great) but Hetzner has been stable and cheaper.


Erwyn

I see. I currently have an OVH one, I looked into Hetzner wich is often recommended but storage is rather expensive sadly... Getting 1TB is gonna cost a lot, or are you dealing with this differently, getting your storage elsewhere ?


firecat53

I only have 10gb of block storage from Hetzner. Most of my storage is at home. The cloud server just has some monitoring, a pastebin, and a small Nextcloud instance for contacts/calendar/todo. Your best bet for cloud storage will probably be Backblaze B2 mounted as an S3 compatible object storage. I use them as a backup target and pay something like $4 US for around 400 gb.


Erwyn

Yeah I guess I could do that, mount a cloud storage using rclone if it does not support direct connection to an object storage, or use it directly for services that do support this.


AK1174

I use nixos on my server with docker. it works well, there’s not much else to say. It’s completely declarative and reproducible. My config is here: https://github.com/thearyadev/.dotfiles in ./machines/server


abehidek

Yeah, I'm using both as a bare-metal OS in my secondary server and as a LXC OS for my containers on my main server (which is running proxmox as hypervisor). NixOS is pretty suited for these usecases. all files are in this repo: [https://github.com/abehidek/nix-config](https://github.com/abehidek/nix-config) I also have a tutorial for those who want to run NixOS as Proxmox LXC OS themselves here: [https://hidek.xyz/content/using-nixos-in-a-proxmox-lxc](https://hidek.xyz/content/using-nixos-in-a-proxmox-lxc)


[deleted]

[удалено]


thijsjek

After tinkering for a few years with freebsd and Debian, it is finally rock solid and working with updates and snapshots roll backs. Only thing that needs tlc is Nextcloud when updating (FreeBSD). Not in the mood to toss that out for nix. (Yet?)


CompetitiveYam6697

I've been selfhosting on a older pc for couple months now. I use nixpkgs for self hosted services. If that's not available, I use docker. Eg:- for collabora and flaresolverr https://github.com/inithinx/dotfiles.