this post was submitted on 01 Dec 2026
31 points (100.0% liked)

Linux

68974 readers
641 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS
31
Considering nix (sh.itjust.works)
submitted 1 day ago* (last edited 1 day ago) by muusemuuse@sh.itjust.works to c/linux@lemmy.ml
 

I’m getting ready to rebuild the home server and was going to go back to fedora server, but I’m seeing a lot of interest around NixOS lately and figure this might be a good opportunity to learn about it.

But I’m concerned about security in this system. It seems to have no fully functional SElinux or apparmor layer so any long running services that talk to the internet would be left in a vulnerable state without that fallback layer of protection.

Am I being paranoid here?

top 16 comments
sorted by: hot top controversial new old
[–] savvywolf@pawb.social 13 points 1 day ago

If I may provide an alternate perspective: Having your entire server's config in a single source controlled space makes it easier to see what is running and what isn't, as well as how everything is configured.

Security issues sneak in via the cruft that develops over time as server config mutates and changes in random config files scattered across the disk.

[–] Flatearth_Habeebi@lemmy.zip 1 points 16 hours ago

Old man Debian stable has been fantastic. Enabled automatic updates (especially the security ones) and it’s been churning like a champ for years now.

[–] captain_teebs@piefed.social 6 points 1 day ago

You can try just the Nix package manager for a while and see if you like it. I wanted to switch to Nix so I could create one declarative config for all my servers and update that from my dev machine instead of tracking stuff on each server. Nix worked pretty well for that, but I use rootless podman and quadlets extensively on one server, and the files for those are already in a Codeberg repo, so the marginal gains when switching to Nix were minimal for me. It did achieve what I expected, it just didn't make a lot of sense for me to go from Nix package manager to NixOS. YMMV depending on your use case.

[–] ShutUpWesley@piefed.zip 12 points 1 day ago

I've enjoyed NIX, but I'd play with on a spare system or VM before using it on anything you need to be reliable, as it has lots of quirks that are good to know about before dailying it. I'd check out Vimjoyer on the tube if you haven't already.

As for SELinux and AppArmor, how important that is really depends on your setup, it's not something I personally concern myself with much, but I maintain as small an attack surface as possible.

[–] hendrik@palaver.p3x.de 4 points 1 day ago (1 children)

NixOS is nice and quite unique compared to something like a Fedora server. Make sure to try it first. There's a lot to learn and the learning curve is steep. And oftentimes it's weird quirks and specifics you'd learn. Not some general Linux knowledge.

I think whether someone wants or needs SELinux or Apparmor is a case by case decision. That depends on your threat scenario and what software/services you're running. I'm not sure if it's of any help considering the average attack and issues on a home server with services like Nextcloud and Jellyfin running.

[–] muusemuuse@sh.itjust.works 3 points 1 day ago (1 children)

Well, I’d like to leave something like I2P, reticulum, or bit torrent running overtime. It’s constantly talking to things on the outside world, so I’m trying to figure out how proactive I need to be about that

[–] hendrik@palaver.p3x.de 2 points 1 day ago (1 children)

Hmmh. I'm just not sure if either SELinux or Apparmor address issues with something like those projects. I mean they're established open-source projects with a larger userbase and should be somewhat okay?! They shouldn't call other executables and don't need elevated privileges to run (and there's other ways to contain these kinds of issues). And they're doing all kinds of network connections anyway, so not sure if you can even restrict those networking platforms in any meaningful way?!

[–] muusemuuse@sh.itjust.works 3 points 22 hours ago (1 children)

There’s a couple ways to do it but I’m not great at container networking and tossing it into a VM with. Seperate physical Ethernet jack is more of a blunt instrument than I wanted. Really it’s more of an exercise to improve my skills than anything else.

[–] hendrik@palaver.p3x.de 3 points 21 hours ago* (last edited 20 hours ago)

Sure. What I mainly do is use seperate user accounts for all the services so they can't access each other's data. That's also what Linux distributions do anyway when setting up server software. I try not to give them any extra privileges and use whatever SystemD services offer to restrict stuff. I'll make database access as strict as possible. Disable unneeded stuff, unnecessary open ports and then focus on having appropriate passwords, fail2ban and timely updates. I run most stuff bare metal and only use containers and VMs if it makes it easier or I feel it's more risky than usual. I think that's somewhat alright for a home server setup.

[–] erer@lemmy.zip 1 points 22 hours ago* (last edited 22 hours ago) (1 children)

Ubuntu server + unattended updates + live kernel updates and forget about it.

You shouldn't be touching the base of your home server, use container or VMs on top for your applications

[–] muusemuuse@sh.itjust.works 1 points 19 hours ago

I don’t consider Ubuntu an option. Containerizing everything could be interesting but I want to use bcachefs for the array and that exists outside the kernel.

[–] nixos_fan@lemmy.world 6 points 1 day ago (2 children)

You can use systemd hardening to secure your services. There are also nixos containers, although I haven't delved into them and can't tell you much about them. You can also deploy oci containers in various ways (I'd recommend quadlet-nix).

[–] unexpectedprism@programming.dev 3 points 22 hours ago

Some services even get extra systemd hardening from nixos maintainers that goes further than upstream.

[–] muusemuuse@sh.itjust.works 2 points 1 day ago (1 children)

I do have some containers I was going to deploy, though those I’m going to need to crash course rootless vs rootful security vs network complexity and performance, but the general idea of this is I can just leave it alone and if something compromises it, the blast radius will be limited until I notice and catch it on the firewall doing something sus

[–] nixos_fan@lemmy.world 2 points 1 day ago (1 children)

The best way to limit the blast radius would be to have separate physical hardware per service, so there is always a tradeoff.

I'm not sure what your questions and goals are, how do you currently deploy applications? Playing around with quadlets is probably the best idea here

[–] muusemuuse@sh.itjust.works 2 points 1 day ago

I have one virtual machine for home assistant. I’m trying to break down into containers like the other services I have running on here because the idle power consumption has always been higher on this Ryzen rig with the virtual machine than idle containers. It also means if home assistant has to compile new firmware, it can use all available cores and RAM that it needs and then give it back when it’s done. Would that have to worry about borrowing resources and maybe or maybe not giving them back afterward like it would with a VM