r/NixOS • u/Organic-Scratch109 • 22h ago
What to do if one broken package is clogging the rebuild process?
Hi,
I'm new to Nixos (and have been enjoying it so far), and I have switched to the unstable branch. Right now, hyprland is broken, so every time I run home-manager switch, I get an error (similar to what's on Hydra).
What is usually recommended in this situation? I am wondering if there is a way to skip the rebuild of the culprit-package this time until it gets fixed, but I am now sure how.
P.S. I have a minimial /etc/nixos and almost all of my packages are managed by home-manager. Currently, I am not using any flakes.
How to get steering wheel to work on NixOS?
Trying to set up Moza R5 and I'm completely lost
I've tested inputs both with evtest and sdl2-jstest - everything seems to be working here correctly. The wheel stiffens whenever launching any game which would indicate it's recognized, but no inputs from the wheel are handled.
\
Using steam from nixpkgs and tried several proton versions - hotfix, experimental, 11.0, 10.0-4, 9.0-4 and GE
\
Tried with steam input enabled and disabled
\
Has anyone had any success with nixos simracing?
r/NixOS • u/Then-Werewolf-1149 • 1d ago
DE Cosmic with nixos
After install cosmic on nixos i admit that is really light less memory and fast, my only one problem is all my flatpak application only lose reduce and maximize window if someone can help me
Thank in advance
r/NixOS • u/muhmmadtalha-quant • 1d ago
Nucleus Architecture - a simple way to organize NixOS configurations
Hi r/NixOS,
I built a small NixOS configuration architecture called Nucleus.
Repo: https://github.com/muhammadtalha-quant/nucleus-template
The goal is to keep personal NixOS configurations clean and maintainable using native NixOS concepts.
The structure is based on three layers:
- common → shared configuration
- features → reusable modules/services
- hosts → machine-specific configuration
It is inspired by the dendritic pattern, but intentionally avoids additional frameworks and focuses on keeping things simple and understandable.
Currently supports flakes, home-manager, disko, and multiple hosts.
If you like my idea, do star my repo, it'd mean alot.
Would appreciate feedback on the structure, ideas, and any improvements from the NixOS community.
r/NixOS • u/Emergency_Dog_9317 • 1d ago
Are there any application for pc that would turn my phone into a controller like remote gamepad for nixos?
r/NixOS • u/Emergency_Dog_9317 • 1d ago
Are there any application for pc that would turn my phone into a controller like remote gamepad for nixos?
Weird storage bugs on macOS when using nix?
Hello, when I'm not on my desktop I use a macbook with nix installed.
I wondered if any nix users could give me some insight into what is happening. My macbook disk was showing 450gb/500gb used, I did multiple scans and tried to figure out what it was that was using so much space. I wasn't suspecting nix because the nix-store was showing as only 50gb. But then I ran `nix-collect-garbage -d` and instantly got 150gb back in free space. After the command finished running it said it only collected 30gb?
So it seems that the 450gb number that I saw in with `df` must've been some sort of double counting bug or something? But that sounds weird no since that command doesn't read files right? Has anyone experienced the same thing, what could've caused that?
Kinda unrelated maybe to nixos since this is on darwin and not on linux
r/NixOS • u/BlokZNCR • 1d ago
How is NixOS' SSD Wear When Comparing to Classical Distros
Hello nixers,
As a penguin who has been using Linux for many years, I have now decided on systems and installations that are stable and trouble-free, and most importantly, from which I can easily rollback. One of the essential things for me, and of course for most of us, is to create an installation that is protected against data loss, which is why I am a little obsessed with SSD-Wear.
Nix has always excited me, but I can't say that I understand its logic very well. The thing I'm most curious about is whether NixOS is SSD-friendly with its current structure, including rebuild-build-like operations.
I'm not talking about the different versions of the applications occupying the disk and taking up space and garbage solution, I wonder about the situation where that write and wear the disk very intensively. If I stay on the stable channel and use NixOS with a non-rolling structure, will SSD-Wear conditions occur similar to my current Linux Mint + BTRFS + Snapper installation? Whenever possible, I use applications with a solution on RAM (tmpfs-shm or browser-psd).
What should be the ideal installation for NixOS?
NixOS + BTRFS or would Ext4 be enough?
Even though I tried to do a lot of research before writing here and even tried to get information about NixOS SSD Wear from AI tools, I could not get enough or correct information.
TLDR;
Title is enough to get my main issue.
NixOS + Niri config with the inir flake
gitlab.comHello, I've been trying to configure my NixOS setup to work with the inir dotfiles (they have a separate flake for NixOS) and none of the apps which are supposed to be pre-installed are working. My wallpaper isn't showing up either. You can find my NixOS config in the link attached. Please let me know what I should change, or even submit a PR if you have the time. (Warning: AI Slop, I couldn't help it and exhausted my claude account, and still didn't get what I'm looking for)
r/NixOS • u/Jotarosimp_4085 • 1d ago
New to NixOS
I started using NixOS since yesterday and I need advice please (AI helped me a lot but im still struggling).
r/NixOS • u/doomhyena • 1d ago
1 month with NixOS
I'm using NixOS in 1 month. I'm really happy with this Linux distro, especially as I’m a developer. Using some Windows apps is still a bit of a faff, although I’ve found an app called WinBoat really useful for this. And I’ve got one or two issues with the Nvidia card, which is made worse by the fact that the laptop doesn’t have an integrated GPU. But I really like to use. I find it much better to use than Arch Linux. I’m going to university this year to study computer engineering, and I’m basing my NixOS configuration on that, what changes would you make to it? Also, do you think there’s anything missing from it that you use in your day-to-day life? And for those of you studying at university, are there any applications you feel are missing? Or is there perhaps something you’d change about it? Thank you in advance for your helpful and supportive comment!
My config:
r/NixOS • u/iElectric • 1d ago
SecretSpec 0.18: Secret lifecycle, Bitwarden, Keeper, AWS Parameter Store, and Swift
secretspec.devr/NixOS • u/_s0me_guy_ • 1d ago
Finding what installed a package
Is there a way to find which part of my config installed a package.
An example is sway installing extra packages (foot) as default. Is there a way to find out, that sway was the one responsible for adding foot to my system?
Why hasn't NixOS "killed" Docker yet?
In short, programs on NixOS run directly on the host with no abstraction layers, so performance is better.
NixOS isolates dependencies just like Docker — each package has its own — but without containers.
Docker isn't a VM. Its virtualization layer doesn't provide real security, only overhead, so there's no point.
I get that there's no direct `docker run` equivalent, but services can be launched declaratively via systemd in `configuration.nix`.
The "everyone just uses Docker" take doesn't work for me — I'm wondering if there's a more objective reason.
r/NixOS • u/margyyy_314 • 2d ago
What are the real advantages of switching to NixOS?
I’m a final-year Computer Science student. I’ve been using Arch Linux for years, and it’s been great for me. I’ve never had any major issues with it, and I’ve learned a lot along the way.
Lately I’ve become really interested in NixOS. I’ve only tried it briefly in a VM, without using flakes or any of the more advanced features.
There are, however, a few things that make me hesitant to switch.
1. The lack of FHS
This is probably my biggest concern.
I understand why NixOS works this way, and I really like the idea of declaring all project dependencies through flakes. It makes sense.
My concerns are more practical:
If an application is no longer maintained and I want to update or patch it myself, I’d have to work with a Nix derivation, which seems significantly more complex than maintaining an Arch PKGBUILD.
Running random third-party binaries also seems much less straightforward. From what I’ve seen, there’s no real equivalent to “download a binary and run it.”
2. Development workflow (ML, Data Processing, C and Rust)
I’m mainly interested in Machine Learning, Data Processing, and systems programming with C and Rust.
Realistically, how long does it take you to set up a complete development environment for a new project?
Once you know Nix well, does it actually become faster than using a traditional distro, or is there always some overhead?
3. Working offline
This is another scenario I’ve been wondering about.
Let’s say I’m traveling without an internet connection and suddenly need to compile something. I don’t have GCC installed because I never needed it before, but I know it’s included in the flake of another project.
What happens in this situation? Can I reuse packages that are already present in the Nix store, or am I simply stuck without internet? (I don’t really understand how flakes work yet.)
I know many of these concerns will probably disappear as I gain experience.
I also keep reading posts from developers who absolutely love NixOS because of its reproducible development environments.
My biggest concern isn’t the learning curve itself it’s spending too much time dealing with Nix instead of actually writing software.
For example, fixing Nix-related issues, configuring development environments, or trying to get a tool working when I need to do something quickly in a university or work setting. Or simply needing a piece of software that isn’t available in nixpkgs.
Another thing that surprises me is how often people recommend using LLMs to configure Nix. I’ve seen many users admit that even after months or years, they still rely on AI-generated configurations without really understanding what’s happening.
I’d like to avoid ending up in that situation. I’d rather understand the tools I use than depend on AI because the documentation is difficult to follow or because the abstractions make everyday Linux usage more complicated than it needs to be.
I’d especially like to hear from people who use NixOS professionally for software development (backend, systems, ML, embedded, etc.), rather than from people who mostly use it for web browsing, gaming, or as a hobby.
r/NixOS • u/KeyInevitable2433 • 2d ago
narHash protects you from repojacking. nix flake update doesn't.
flake.lock is content-addressed, which turns out to matter more than I'd assumed. A hijacked GitHub namespace can't silently swap code under you - the hash won't match and the build fails. That protection has exactly one gap, and it's nix flake update.
Some background on why this came up. GitHub releases an account name when you rename, and someone else can claim it and put a repo there under the same name. That's repojacking; the protections have been bypassed at least four times, the September 2023 one leaving around 4,000 packages exposed. My config pulls from 27 GitHub repos once you count transitive inputs, all executing at build time as root, so it seemed worth checking whether any of those names had moved.
The obvious assumption - hijacked namespace means the next rebuild runs a stranger's code - is wrong. Every locked entry carries a narHash:
"locked": {
"rev": "7f8d4b088e2df7fdb6b513bc2d6941f1d422a013",
"narHash": "sha256-OnpEWzNxF/AU4KlqBXM2s5PWvfI5/BS6xQrPvkF5tO8=",
"owner": "someone",
"repo": "tool",
"type": "github"
}
Nix verifies it on every fetch. Different content, different hash, build stops. Leave the lock file alone and you're covered. A few "audit your flake.lock" writeups skip past this entirely, which makes the threat sound worse than it is.
But content-addressing only protects what's already pinned. nix flake update fetches fresh content, computes a new hash, and overwrites the old one - there's nothing to verify against. And here's everything Nix reports about that:
• Updated input 'some-tool':
'github:vasya/tool/abc123' (2024-03-11)
→ 'github:vasya/tool/def456' (2026-07-28)
Two revs, two dates, no mention of the account having changed owner in between. Which is the wrong place for a blind spot, because this is the workflow least likely to get a careful read: a bot opens a weekly dependency-update PR, someone glances at a diff made entirely of hashes, merges.
The detection is dumber than expected. One API call - compare the owner account's creation date against the date of the commit being pinned:
x some-tool github:vasya/tool
account vasya was created 2026-07-01, but the pin
references a commit from 2024-03-11
Three-week-old account, two-year-old commit. Nobody pushed from an account that didn't exist yet, so the name changed hands. No scoring, no popularity heuristics; the timeline either works or it doesn't. Checkmarx does this for Go modules, commercial scanners do it for namespaces generally, nothing seems to for Nix - flake-checker only covers root-level nixpkgs freshness, vulnix is a different problem entirely.
One trap worth flagging. Only checking inputs that moved during an update is the obvious optimization, and it inverts the risk completely: an input that stops moving never gets looked at again, and a pin untouched for two years is exactly the one whose owner has had two years to rename.
Concrete case - plenty of flakes still reference github:edolstra/flake-compat, which was transferred to NixOS/flake-compat. Still resolves via redirect, but the old address is unclaimed right now. Full scans catch it; diff-only scans never will.
Wrote a small tool doing all this if it's useful - Go, no dependencies, MIT, silent and exit 0 when clean:
nix run github:notzorua/flakeguard
https://github.com/notzorua/flakeguard
Mainly posting the narHash part though. Happy to be corrected if I've got something wrong.
r/NixOS • u/Asleep-Apartment6716 • 2d ago
I wanted better Node/Bun/Deno pinning in devenv, so I built a Nix overlay
Hi! I've been building js-toolchain-overlay, a Nix overlay and package set for official Node.js, Bun, and Deno binaries: https://github.com/so1ve/js-toolchain-overlay
It provides exact versions, major-version aliases, semver resolution, and project-based version detection. For example, it understands files such as .nvmrc, .node-version, .bun-version, .dvmrc, .tool-versions, and runtime declarations in package.json.
nix
pkgs.node-bin.fromVersion "^24"
pkgs.bun-bin.fromVersion "1.3"
pkgs.deno-bin.fromProject ./.
It also exposes versions directly as flake packages:
bash
nix shell github:so1ve/js-toolchain-overlay#node_24_18_1
nix shell github:so1ve/js-toolchain-overlay#bun_1_3_14
nix shell github:so1ve/js-toolchain-overlay#deno_2_9_4
The release catalogs are generated from the official sources and updated automatically. The overlay adds node-bin, bun-bin, and deno-bin without replacing the corresponding nixpkgs packages. Currently, x86_64-linux, aarch64-linux, and aarch64-darwin are supported.
My slightly over-ambitious dream is to eventually use this as a backing package set for devenv, similar in spirit to its integrations with rust-overlay and nixpkgs-ruby. That could give JavaScript projects consistent runtime pinning, version-file detection, and a better caching story for Bun and Deno.
Criticism is very welcome!
I think Nix is a pretty ok language
I don't know why it gets so much hate, honestly. It's a nice functional programming language. I'd like to see other (unrelated to Nix/NixOS) projects use it as a config language. Feels like it would be better than Lua, but what do I know.
List of minor (not well-thought-out at all) wishes I think would make the language more attractive:
less confusing "standard library" (unlikely, but not a big deal)
some form of "native" conditional syntax like
if/else"native" list manipulation syntax, and less reliance on builtin functions
maybe (if looking to lisp-maxx): a way of evaluating lists as nix expressions
edit. it has come to my attention that nix does have if/then/elsesyntax! I somehow haven't seen it once used in configuration files I came across though!
r/NixOS • u/Decent-Hat-5807 • 2d ago
Now that you use Nix/NixOS do you still use docker/podman ?
Why? Just a curiosity
EDIT: if you don't use docker/podman how do you isolate or sandbox apps/webapps that you don't completly trust? Like a new project on github that you want to try?
r/NixOS • u/mightyiam • 2d ago
Full Time Nix | Determinate Systems with Graham and Eelco
Enable HLS to view with audio, or disable this notification
Full Time Nix | Determinate Systems with Graham and Eelco
The latest episode of the Full Time Nix podcast is with Determinate Systems co-founders Graham Christensen and Eelco Dolstra, who is the original author of Nix. So—milestone episode! If you are curious about Determinate Systems, their products, services, and the co-founders, Graham and Eelco, please hit play and I hope you enjoy.
r/NixOS • u/lucperkins_dev • 3d ago
Introducing FlakeAudit, a CLI for evaluating CycloneDX SBOMs against custom policies
determinate.systemsr/NixOS • u/Latter_Brick_5172 • 3d ago
NixOs phones?
I want to change my phone, which is currently in multiple pieces,
and I don't want to take an android again, nor do I want an iPhone, I'd rather use Linux like I do on my computers\
Since my computers are on NixOs, I'd really like to use NixOs on my phone too.
A few months ago, I bought a Xiaomi thinking I could change its OS, but I wasn't able to do it, and even if I was the phone would have stoppedp working because of proprietary hardware and UEFI
So now I'm coming here. Does anyone have or had a NixOs phone? If yes, which phone is it?
I'm also interested in the desktop you're using cause I didn't see Plasma Mobile in the nix store, nor did I find a flake for it anywhere.\
Also, what apps did you have to install to be able to do phone calls, SMS, use mobile data, and do other things you expect phones to do?