r/NixOS • • 5h ago

Friend-to-friend ZFS backups

7 Upvotes

Hi folks!

I love the Nix + ZFS combo and I run >10 of my machines on it. My friend is also fan of ZFS and we both have a NAS. We wanted to use each other's machines to do remote backups in a safe but simple way (zfs send | zfs receive and plain SSH). However, without giving each other any insight into what runs on the other machine and without being able to see what that other person has, not even metadata about other datasets.

I wrote about it in this blog post, the repo is here gh:basnijholt/zfs-tenant, and the docs are here.

Quick start on NixOS from the docs:

Add the flake to the host:

```nix { inputs.zfs-tenant.url = "github:basnijholt/zfs-tenant";

outputs = { nixpkgs, zfs-tenant, ... }: { nixosConfigurations.nas = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ zfs-tenant.nixosModules.host ./configuration.nix ]; }; }; } ```

On the host, give friend a tenant root:

nix services.zfs-tenant = { enable = true; tenants.joe = { dataset = "tank/friends/joe"; quota = "2T"; authorizedKeys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA... joe-nas" ]; allowedFrom = [ "100.64.0.12" ]; # Joe's tailnet address }; };

Disclaimer: I used AI to help me build it but I have high confidence on correctness, my security reviews went deep and even found a RCE in Synoid.


r/NixOS • • 7h ago

Declarative World of Warcraft addon management using Nix

Thumbnail github.com
25 Upvotes

r/NixOS • • 7h ago

The nix language is incomprehensible

70 Upvotes

I know three languages(Lua, Python and rust), which I know isn't a lot but at this point in my journey it's very easy to learn a new one. But nix just escapes my grasp, there are so many weird things and the documentation is so horrible. The complex packages like VSCode fhs and the fhs that wraps other packaged are insanely confusing and then there's complex flakes which have tests and have them run a vm. And then it just stops working and it spews forth a unreadable error message that makes you want to clamp your balls in a vise. Not to mention dentritic pattern with all It's helper flakes that have god awful documentation so you just end up reading the source which is incomprehensible.

Maybe it's just because I am not used to functional programming.

Nevertheless I am still going to keep using NixOS and with each year that passes I will understand more.


r/NixOS • • 10h ago

How do I change my password from the login screen? :(

4 Upvotes

I’m using Hyprland and the Kitty terminal

Apologies for the basic question. I’m not a very Linux savvy person, but I had a brief foray into it last year. I forgot what my password was and I’ve forgotten basically everything since then, including how to open the terminal to change the password. I need to use my computer for a class, and I’ve been desperately googling for an hour to no avail. I swear I remember it being super easy, but I can’t find the keybind anywhere. Please help. And for proof that I’m not some thief trying to hack into someone else’s computer, you can search “NixOS” in my post history


r/NixOS • • 13h ago

So it begins (appreciation post)

Thumbnail image
71 Upvotes

The original reason I got into Linux was because I was forced to reinstall Windows after an update broke my system. And while I knew nothing about Linux, or NixOS, at that time; that impetus inevitably led me to appreciate reproducibility.

Now I can finally say, after 3 months of configuring, ricing, and testing - I’m at the point of being able to reinstall my NixOS setup from the minimal ISO, using a single command.

I’m fortunate enough to have an old laptop from work to actually test everything on bare metal, rather than relying solely on results from a VM. And after some trial and error, I have to say that it really feels like magic to just have everything set up, with minimal effort.

None of this is to say I’ve got the best setup or the coolest rice. This is just me appreciating all the work that went in to create such an amazing OS.

Thank you, NixOS for my first 100 days of pure enjoyment, and absolutely everything else.


r/NixOS • • 14h ago

Unstable releas + legacy nvidia card.

0 Upvotes

Hello! I recently hopped onto NixOS and have been running 26.05 stable release since. I wanted to hop onto the unstable release for the latest versions of my apps but asking around (claude) it appears not to be advisable on my system because rn I'm on a laptop with a dual gpu (intel uhd and rtx 1060) and my nvidia card runs on legacy drivers that will break when the current kernel stops supporting them.

Is claude being truthful or did it eat magic mushrooms? Is being on the unstable release worth it?

Also since when is a 1060 considered legacy??? this card still rock pretty hard.

PS: Any tips willing to give a new cult... emmm community member?


r/NixOS • • 15h ago

Six months later: my 30-PC school lab setup became Nixorium 2.1

66 Upvotes

Six months ago I posted here about the NixOS setup I built for the 30-PC computer lab where I teach.

At the time, it worked well for me, but it was still very much my setup: tied to one lab, one network, and a lot of assumptions I had accumulated along the way.

Since then I've been trying to turn it into something other people could actually install, understand, and maintain.

Today I released Nixorium 2.1.

The idea is still simple:

  • one NixOS machine acts as the controller
  • the lab is described declaratively
  • clients can be installed and updated over the LAN
  • only the controller needs Internet access
  • applications still run locally on each PC
  • student environments return to a clean state between lessons
  • machines can be replaced and brought back to the same configuration

A lot of the work since my original post has been on the less exciting parts: separating private site configuration from the reusable framework, safer installation flows, recovery from interrupted operations, backups, diagnostics, VM-based release validation, CI, and documentation.

I also made a short 1-minute explainer, because describing this only in Nix terminology makes it sound more complicated than it is:

https://nixorium.org/

The source is here:

https://github.com/giovantenne/nixorium

One caveat I want to be clear about: Nixorium grew out of a real 30-PC lab, and I test releases in VMs, but hardware is hardware. Different firmware, NICs, switches and disk layouts can still expose things that virtual testing won't.

So now I'm especially interested in real-world feedback.

If you run a homelab, classroom, training room, makerspace, or just have a couple of disposable machines around, I'd be very interested to hear:

  • what would stop you from trying this?
  • which parts of the deployment/recovery story still feel unclear?
  • what would you want to see before trusting it on real hardware?

And if anyone actually tries it on hardware different from mine, even a failed attempt would be genuinely useful feedback.

For context, this was my original post from six months ago:

https://www.reddit.com/r/NixOS/comments/1rqtu0j/i_built_a_reproducible_nixos_deployment_system/

-----

EDIT:

A lot of Nixorium is basically an attempt to automate and simplify the workflow I originally did by hand. If you're curious about where it started, the old v1 README from six months ago describes that setup and the manual steps much more directly:

https://github.com/giovantenne/nixorium/tree/11b87a9ca185b0d2a0f2f32bdd342dfba0677d55


r/NixOS • • 22h ago

Nixos isn't allowing me to login to root even after changing the password with chroot

2 Upvotes

Basically the title. I have no idea why this is happening. It happened after a fresh install. Any help is welcomed. Thanks.


r/NixOS • • 22h ago

NixOS root password not working after fresh install

2 Upvotes

Why is this? Im on unstable


r/NixOS • • 1d ago

What should a NixOS recovery drill prove before you trust the configuration backup?

10 Upvotes

A version-controlled NixOS configuration is an important recovery asset, but rebuilding the declared system is not the same as restoring the machine. Hardware-specific files, boot setup, secrets, persistent application data, database state, imperatively installed items, and inputs that are no longer available can all sit outside the apparent source of truth. A configuration that still evaluates may also produce a system that cannot reach the network or unlock its storage.

A realistic drill could start from blank media or a disposable VM, recreate partitions and encryption, restore the flake or configuration and pinned inputs, supply secrets through the intended path, rebuild, and then restore stateful data separately. The result would need checks for boot, networking, users and SSH access, mounts, timers, containers or virtual machines, application health, monitoring, and another reboot. The drill should also identify every manual step that was not represented declaratively.

What do you include in a NixOS recovery test? How do you distinguish configuration backup from data and secret backup, and what evidence tells you the machine can be rebuilt after the original disk and cache are both gone?


r/NixOS • • 1d ago

Looking for NixOs animated logo on Fastfetch

Thumbnail video
89 Upvotes

Does someone knows the repo for the animated logo in the video please?
Original video: https://www.instagram.com/reel/DdriK38Jp8N/?stkn=YnQ4NTllOWJ5MTJs


r/NixOS • • 1d ago

I wish Türkiye's Linux distribution, Pardus, was based on NixOS instead of Debian. Single config and installation in thousands of schools and government institutions according to need. Great...

Thumbnail image
275 Upvotes

France and Netherland's decision on Nixos based own distros.


r/NixOS • • 1d ago

programs.enable or package ?

36 Upvotes

Is there some difference between:

programs.great_program.enable = true;

configuration.packages = [

pkgs.grear_program

]


r/NixOS • • 1d ago

[AYUDA] initrd con systemd-cryptenroll + lanzaboote + impermanence sobre ZFS se cuelga en stage 1

3 Upvotes

Llevo 3 días con esto y ya no sé qué más probar.

Uso NixOS con flakes, boot.initrd.systemd.enable = true, root en tmpfs con impermanence y /persist en ZFS con cifrado nativo, desbloqueado por TPM2 con systemd-cryptenroll.

El problema: sops-nix intenta leer la age key de /persist antes de que el dataset esté montado, y encima el PCR 7 cambia con cada actualización de firmware, así que el TPM2 deja de desbloquear y me cae en el emergency shell.

Ya descarté un problema de ZFS porque, como está en el kernel mainline, no debería haber incompatibilidades con mi kernel parcheado con linux-hardened.

Probé la misma config en Gentoo con OpenRC y funciona perfecto, pero no pienso volver a eso.

¿Alguien lo ha resuelto sin usar Secure Boot con claves propias? Ya me estoy planteando que la solución real es instalar Arch. 😔


r/NixOS • • 1d ago

Stuck on blinking cursor on boot

8 Upvotes

Hi,

My last update on nixos failed. I use a simple gnome setup with flakes, pointing to the 26.05 stable release. With last update, After boot splash, I'm stuck on a blinking cursor, GDM does not launch. I can switch to another virtual terminal, reboot the machine, and boot on the last functional generations (thank you nixos!). But I don't know how to investigate the problem. I think it may be related to the last systemd update. Anyone experience the same problem? Any fix found?

My last functional generation was generated with "nh os boot --update" yesterday.

Solved: do not use unstable mesa on stable release :)


r/NixOS • • 2d ago

Jovian-NixOS + enabled Secureboot?

5 Upvotes

I'm willing to get into the nitty gritty, but before throwing myself at the documentation, anyone running this? Is that even possible? Would like to spend my weekend on setting this up on a spare Handheld.


r/NixOS • • 2d ago

Sound went KAPUT on upgrade! ...Old GPU?

1 Upvotes

I recently upgraded my NixOS system (on unstable) to find all sound/audio missing. I'm using a desktop system with speakers and pipewire. Pwvucontrol (and qpwgraph) only show "dummy output". Rolling back does fix it, but this is not a long-term solution. Alsamixer looks like this both on rollback and upgrade.

Running sudo lspci -nnk | grep -A3 -i audio yields no output, which leads me to think my sound card is no longer being recognized. Granted that doesn't print anything on rollback, either.

This is where I'm a little unfamiliar with how computer hardware handles audio. Do GPUs handle audio? (I don't think they do.) I have an old GPU: an AMD Radeon RX 550 / 550 Series from 2017.

Running sudo dmesg -Tx | grep ERROR yields:

kern :err : [Wed Sep 30 08:29:55 2026] amdgpu 0000:01:00.0: amdgpu: [drm] *ERROR* Unsupported screen format RA24 little-endian (0x34324152)

several times. But is "screen format" relevant in this situation? We're talking audio.

If anyone has any ideas or further bread-and-butter audio commands to run, I'd love to hear them.


r/NixOS • • 2d ago

Human reviewers for nixpkgs went up 4 times but PR volume increased by 14x since 2016

61 Upvotes

https://x.com/venRuN0w/status/2105295130819252275

Most of it just people adding new packages and maintainers not having time to review it


r/NixOS • • 2d ago

i make flake empty just bcz idk what add on it

Thumbnail gallery
0 Upvotes

r/NixOS • • 2d ago

Every game I run crashes after 10 minutes

5 Upvotes

I’ve been using NixOS for a month or so and every game I’ve played ends up freezing and crashing soon after. I have installed NVIDIA drivers and every game, including steam games that use proton, runs smoothly but not for long (most of the times).

I really can’t figure out what the problem could be and it’s annoying smh.

EDIT: i have an RTX5050 nvidia GPU along with a core i9, then looking at the comments i enabled zramSwap and tried using LD_PRELOAD="" %COMMAND% on steam config, I also set boot.kernel.sysctl to 2147483642.
My assumption at this point is the game that has this problem, and that is Minecraft Dungeons 2, AND YES I'M AWARE THAT THE GAME CAME OUT 2 DAYS AGO AND STILL HAS PROBLEMS.


r/NixOS • • 2d ago

Day 1 in NixOs.

Thumbnail image
70 Upvotes

I went used the minimal ISO to check it out for the first time after about 2 months of Linux with only arch as my experience

so far I just fell in love!

Nothing special yet, just set up my drive encryption, auto login and basic Sway / waybar config and a few basic things I needed.

But I just love this way of editing my system!

10/10, Thinkpad stays NixOS!

will install it on the internal soon instead of just on a 120gb external ssd.

Have a great day ! ❤️


r/NixOS • • 2d ago

GPU using more power in NixOS

27 Upvotes

My GPU is idling at 30-50 Watts in nixos, while just using 4-5 Watts in CachyOS.

Any help?

Thanks in advance :)

my config repo


r/NixOS • • 3d ago

How good of a idea would it to use luau instead of nixlang?

0 Upvotes

(Keep in mind im a start-mid level programmer, this is just a fun idea, dont flame me.)

While nix is amazing, some people have some points they dont like which are fair, one usually is nixlang. While I myself really love the syntax, nixlang evaluation is not very fast, and for noob programmers it might be more confusing then using, say, python or lua, and its very unique which isnt always a good thing. (No hate at all.)

Luau is a lua fork which has strict type evaluations and is run sandboxed with strict control over std/_G which can also be freezed, so it could easily be used for a pure packaging system like nix. In my opinion, lua is one of, if not the easiest language which also has great lsp support and great speed out of the box, and the best pick for a bolt-on configuration/scripting language, and afaik luau has c++ support so it should work with nix. One issue I might see is lazy loading, but it shouldnt be hard to achieve using metatables and storing functions and storing the value if evaluated, for example:

``` --!strict export type Package = { name: string, version: string, dependencies: { Package }, build: (self: Package) -> (), } export type PackageSet = { [string]: Package } export type PackageFactory = (pkgs: PackageSet) -> Package export type PackageMap = { [string]: PackageFactory }

local function create_lazy_pkgs(pkg_map: PackageMap): PackageSet local pkgs = {} local cache: { [string]: Package } = {}

setmetatable(pkgs, {
    __index = function(self, key: string): Package
        if cache[key] then
            return cache[key]
        end

        local factory = pkg_map[key]
        if not factory then
            error(`Package '{key}' not found in package map.`)
        end

        print(`[EVALUATING] Instantiating derivation for: {key}`)

        local evaluated_pkg = factory(self :: PackageSet)
        cache[key] = evaluated_pkg
        return evaluated_pkg
    end
})

return pkgs :: PackageSet

end

local registry: PackageMap = { zlib = function(pkgs) return { name = "zlib", version = "1.2.13", dependencies = {pkgs.curl}, -- Dependencies are also lazily evaluated build = function(self) print(Building {self.name}-{self.version}...) end } end, unused_package = function(pkgs) error("This package should NEVER be evaluated because nobody requested it!") end }

`` Also, lua metatables are really powerfull and if wrapped with functions can be the user friendly nix module replacement (lib.mkOptions, ...), currently nixos imports all modules by default which makes nixos evalation quite slow, luau is much faster and if multi-level __index support is added even modules could be lazy loaded (i.e. steam only being loaded if aprograms.steam.*is referenced even if its a option of a option likegamescopeSession.steamArgs`, and then checking if its a valid option).

(Credit to dacctal who made pkgit, a source only make-like lua package manager that reminded me of nix) PS: going to bed, will reply late


r/NixOS • • 3d ago

Is there any way to remove the spaces between each prompt?

Thumbnail image
0 Upvotes

I find it really annoying. I also couldn’t find any bash conf file on here


r/NixOS • • 3d ago

I’m building a NixOS-based desktop with a native seat for AI agents

0 Upvotes

I’m working on SlateOS, an open-source Linux desktop built on NixOS.

Learn more: https://slate.benchgrid.dev/.

I wanted to explore what happens when a human and an AI agent use the same desktop at the same time. SlateOS gives the agent a separate Wayland input seat, so it can interact with a supported application while I keep typing in another window.

It connects to Claude Code or Codex and includes a conversational shell, accessibility-tree access, and services for task tracking, approvals, and snapshot-based file recovery.

It’s still pre-alpha. Independent input currently works with Firefox, foot, and GTK3 apps. Some applications need a visible takeover of the human input seat. Approval and recovery integration is currently more complete with Claude Code.

Source and setup: https://github.com/BenchGrid-dev/slate

SlateOS is still under active development, and I'd really appreciate any feedback or contributions. The shell and the os are available for trial today, but I'll recommend trying it in a VM instead of your primary device.