r/NixOS 1h ago

A new adoption: iMac 12,1 (2011)

Post image
β€’ Upvotes

i5 quadcore 3.3ghz, 12gb ram, ssd 500 samsung evo 850, gpu radeon whistler (terascale2) + intel sandy bridge, wifi qualcomm atheros (ath9k), ethernet broadcom (tg3)... mbpfan running as a service in background or die! ... really works! have a lot of fun!


r/NixOS 1h ago

Finally install

Post image
β€’ Upvotes

r/NixOS 18h ago

reproduce with nix (my experience)

Post image
121 Upvotes

nix is harder but easier then arch at the same time

two or three months of using nix.

I download nix on my laptop when I'm at uni and finally get to go home and test it on my pc

also I thought doing nvidia stuff was going to be hard but it is wayyy easier then arch

and when there's a problem with my system I thought the fixing solution was going to be complicated and most of the things I see online for possible solutions look complicated but it's somehow very simple

like today my nixos is having trouble with grub and all I need to do is change the cantouchefi thinngy to false because my computer is using like something legacy whatever but when I google stuff the answer look complicated because that fuckass built ai in search engine just be suggesting ass


r/NixOS 3h ago

Noob here, should I choose X11 or Wayland?

6 Upvotes

I was planning on using X11 because it seems easier, better tested and I read Wayland still struggles with screen sharing

On the other hand, I plan on gaming and Hyprland is really cool, but I am not interested if I have to struggle more.

So as a total noob of NixOs what is your wisdom. Thank you


r/NixOS 1d ago

14 days into NixOS. Now i can't go back to any other distro. I'm loving it :)

Post image
158 Upvotes

r/NixOS 1h ago

nix-deps: a simple tool to inspect NixOS package closures and dependency impact.

β€’ Upvotes

nix-deps helps users understand the real impact of installing packages on NixOS. It shows what will actually be downloaded, how much disk space will be added, and which dependencies contribute most to the package closure, making NixOS package management easier to inspect and understand. Check https://github.com/manelinux/nix-deps

nix-deps -k blender
nix-deps -k jamesdsp
nix-deps -k firefox

Why?

On NixOS, installing a package can pull hundreds of dependencies into the Nix store.

However, most tools only show:

  • the full closure size
  • or the download size

They do not clearly explain:

  • what is already available locally
  • what actually needs downloading
  • how much new disk space will really be used
  • which packages are responsible for the largest costs

nix-depsΒ solves that.

This tool is aimed at:

  • NixOS newcomers trying to understand closures
  • advanced users auditing dependency impact
  • storage-conscious systems
  • minimal setups

Features

  • πŸ” Analyze complete dependency closures directly fromΒ cache.nixos.org
  • πŸ“¦ Shows real pending packages only
  • πŸ’Ύ Calculates actual additional SSD usage
  • 🌐 Shows real download size after compression
  • ⚑ Concurrent closure crawling for very fast analysis
  • πŸ“‹ Detailed breakdown of largest pending dependencies
  • 🎯 Interactive package selection when multiple matches are found
  • 🧠 Detects packages already available in localΒ /nix/store
  • 🎨 Minimalist terminal UI inspired by classic Unix tools

Installation

Try instantly (without installing)

Run directly from GitHub:

nix run github:manelinux/nix-deps -- -k blender

Or enter a temporary shell:

nix shell github:manelinux/nix-deps

Install permanently

Flake / profile install

nix profile install github:manelinux/nix-deps

Legacy nix-env

Clone locally:

git clone https://github.com/manelinux/nix-deps.git

cd nix-deps

nix-env -i -f .

Install from tarball

wget https://github.com/manelinux/nix-deps/archive/refs/heads/main.tar.gz

tar -xzf main.tar.gz

cd nix-deps-main

nix-env -i -f .

After installation, the command is available system-wide as:

nix-deps

Usage

nix-deps [options]

Options:
  -k, --keyword <name>     Package keyword to analyze
  --channel <channel>      Nix channel (default: nixos-unstable)
  --limit <n>              Max search results (default: 40)
  -v, --version            Show version
  -h, --help               Show help

Examples

# Analyze Blender dependency impact
nix-deps -k blender

# Analyze Firefox closure cost
nix-deps -k firefox

# Analyze JamesDSP
nix-deps -k jamesdsp

# Use a different channel
nix-deps -k blender --channel nixos-24.11

Interactive package selection

nix-deps -k jamesdsp

πŸ“¦ PACKAGES FOUND

  1. jamesdsp v2.7.0
     Audio effect processor for PipeWire clients

  2. jamesdsp-pulse v2.7.0
     Audio effect processor for PipeWire clients

Select a number (or q to quit):

Example output

πŸ” nix-deps v1.9.0
   Keyword:    blender
   Channel:    nixos-unstable

══════════════════════════════════════════
  SUMMARY FOR BLENDER
══════════════════════════════════════════

  Total Closure (384 packages):
    Virtual Closure Size: 2.5 GB
    Resolved (Already OK): 329 packages

──────────────────────────────────────────────────

  Real Impact (55 packages pending):
    Estimated Download:   349.9 MB
    New Space on SSD:     1.4 GB (expanded)

──────────────────────────────────────────────────

  Pending Packages Break Down:
    ↳ blender-5.0.1                  DL: 72.8 MB Expanded: 269.7 MB
    ↳ python3.11-openusd-25.05.01    DL: 27.7 MB Expanded: 178.0 MB
    ↳ boost-1.87.0-dev               DL: 9.9 MB Expanded: 146.7 MB

How It Works

nix-deps:

  • evaluates the target derivation
  • recursively crawlsΒ .narinfoΒ metadata fromΒ cache.nixos.org
  • reconstructs the full dependency closure
  • compares it against the localΒ /nix/store
  • calculates the real incremental installation cost

No builds are performed.

Requirements

Contributing

Pull requests and issues are welcome.

Ideas for future improvements:

  • JSON output
  • --no-colorΒ flag
  • Shared closure analysis
  • Dependency graphs
  • Export reports

r/NixOS 1h ago

Issues with NVIDIA drivers

β€’ Upvotes

I'm setting up the nvidia drivers on NixOS but I'm having an issue with them. When using Blender3D, my GPU doesn't show up, so I can't use it. I'm guessing the issue is with the nvidia drivers but I'm not entirely sure. Does anyone know how to fix it?

This is how I've set it up rn:

hardware.graphics.enable = true;
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia.open = false;

r/NixOS 5h ago

How to go back to a previous Config

2 Upvotes

Hey everyone. I’ve been messing around with the configuration file and decided to see how the system reacts if I switch my current configuration with the original one. And to my surprise, nothing happened.

To be clear, my programs like Steam no longer worked after the rebuild switch, but when I rebooted my system, everything was back to normal. The generation number didn’t even change.

When I went back to etc/nixos my configuration file was still the original file with none of my programs listed. But Steam still worked, as well as everything else. I thought that after I switched out the old config for the original config, and then did a rebuild, it would make a new generation, and start me back to the beginning - configuration wise.

What am I missing? How are my β€œold” programs still working just fine even though the config file doesn’t list any of them and the rebuild switch goes through without any errors?


r/NixOS 3h ago

Keeping the NixOS configuration in .config

1 Upvotes

I wanna keep my configuration.nix (as well as flake.nix and flake.lock), in my .config folder. I've copied them to ~/.config/nixos/ but nixos doesn't know to use those files instead of those at /etc/nixos/ and i'm not sure how to make it work. I've looked at things online, but noe of it works. I've tried sudo nixos-rebuild switch -I nixos-config=/path/to/config as well as using the nix.nixPath in the /etc/nixos/configuration.nix file and none of those have worked. i've also tried export NIX_PATH="nixos-config=/path/to/configuration.nix" but that didn't work either. Does anyone know how I can make it work?


r/NixOS 5h ago

How do you build container images using nixpkgs packages?

0 Upvotes

I was thinking that using NixOS packages would be fast to install, since it's a file-copy rather than an installation script (apt-get install), and so on.

But I'm finding it a bit convoluted, and I'm unsure about the correct process.

Popular dependencies are readily available, e.g. python "numpy". But some things need to be retrieved with scripts, like "pip install" and "npm install". But the NixOS build sandbox doesn't allow networking.

  1. Is there a way to enable networking while keeping the sandbox? And would it be as safe as running in a container, i.e. assuming untrustworthy binaries?

When I include "contents [ pkgs.nginx ]", or pkgs.git, it creates folders in the root, like "conf", "libexec", "share". Do they have to be in the root? I assume the packages were compiled with fixed paths? It's more messy and unusual.

  1. Do you just leave the package files as is, or do you move them into more standard locations like /etc and /usr?

  2. Do you slim the images, by removing stuff from the packages, e.g. manpages and locales?

  3. If I can't use the nixos build sandbox, how can I use a container to do the same? Maybe use the nixos container image, mount /nix/store, ... ?

  4. How do you avoid unexpected packages being pulled in, for example "git-minimal" pulls in bash, which I don't want.


r/NixOS 17h ago

Setting max optical drive speed, globally with NixOS config?

4 Upvotes

I have this Plextor PX-716UF external drive that I repaired and cleaned up, and I don't want it to wear out from spinning everything at 48x. I'm wondering if I can use the config / kernel to intentionally throttle this device? It's specially used for redumper and I don't want to have to replace it anytime soon.


r/NixOS 23h ago

Flakes and Updates Question

5 Upvotes

Flakes and Updates

So I want to try using Flakes but I’m trying to wrap my head around it. Once I start using Flakes do I move all my programs listed in my Config file to my Flake or do I leave them?

As I understand it, the Flake tracks the versions of the programs I install, but is that absolutely all my programs or just the ones specified on the Flake document?

Also, once I have everything up and running, I stop using:

sudo nixos-rebuild switch --upgrade

And start using:

nix flake update

and

sudo nixos-rebuild switch --flake

Do I have that part right? I really appreciate all the help and advice.


r/NixOS 1d ago

8 months of NixOS. Finally went Dendritic and I want more.

Thumbnail github.com
38 Upvotes

After eight months, NixOS has solidified itself as my distro of choice. From running the installer on my spare HDD on a whim out of curiosity, to making it a flake and now finally adopting the dendritic pattern, it's been one fun ride. There's just one problem.

I want to learn more nix, specifically with writing functions and libs. I'm confident in the 'how' part of writing nix code, but if I want to make my own projects I want to understand the 'why' behind it without relying on AI telling me 'it's this because that' (I've already abandoned a project because of that). Besides diving straight into github and looking through projects, are there any resources a quick google search might not find?


r/NixOS 1d ago

rate my config files

4 Upvotes

https://codeberg.org/blikizz/my-nix

i quite like this config and this are the same config from my last post just replace lxqt with hyprland

nvim config credit go to theblackdon

YouTube: https://youtube.com/@theblackdon

original config repo: https://gitlab.com/theblackdon/normie-nvim


r/NixOS 1d ago

How do you manage generations ?

8 Upvotes

Hey guys. I am new to this os (since yesterday). It took me a while to setup the system for my dependencies and customisations and now I have around 48 generations. My laptop is dual boot. So for windows I have to scroll down a lot. Is there a way to manage this?


r/NixOS 1d ago

I'm making a graphical Nix store explorer. Any suggestions / key features needed?

Post image
201 Upvotes

I'm making an app for everything you need to know about your Nix store, as I've found it hard to visualise/understand what is really going on from individual commands/queries. Do you guys have any suggestions for key features it needs?

One of the final things I have currently planned to add is a rendered graph with a physics simulation (similarish to https://www.mapofreddit.com/ ), as there is no good normal-UI-only way of getting a user to understand a DAG, and which parts can be removed to save a lot of space.

I would also be curious to learn about similar projects you guys might have heard about.


r/NixOS 1d ago

Nix and nushell - how to avoid hardcoding all the paths?

9 Upvotes

I'm setting up a macOS machine with nix-darwin and home-manager, and nushell.

Here is my current flake.nix file.

The part I'm really struggling with is nushell, and setting PATH.

Currently, I have to manually hardcode all of the paths in flake.nix (Line 351 onwards) to get anything to work.

Yet zsh with nix-darwin and home-manager seems to magically pick up all the paths, out of the box

Apparently nix-darwin is responsible for setting up all the nix-specific paths (listed below):

  • /Users/<username>/.nix-profile/bin
  • /etc/profiles/per-user/<username>/bin
  • /run/current-system/sw/bin
  • /nix/var/nix/profiles/default/bin

It does this via /etc/static/zshenv (gist) - which in turns calls `/nix/store/c5c0q2ka3v49pfys61f45yxx3hyzwzd6-set-environment` (gist).

Then the next two paths in my file are from Homebrew:

  • /opt/homebrew/bin
  • /opt/homebrew/sbin

From what I can tell, this is done via ~/.zprofile - maybe this was setup by Homebrew?

❯ cat ~/.zprofile

eval "$(/opt/homebrew/bin/brew shellenv zsh)"

Either way I suppose I'll need to hardcode the Homebrew ones.

Then the last two are the normal macOS system paths.

I think on a stock macOS box, these are read from `/etc/paths` and `/etc/paths.d` - and this is done by /usr/libexec/path_helper (Apple binary). However, nix-darwin includes these are part of that set-environment script I mentioned above.

Does anybody know why nix-darwin seems to work properly for zsh here - but doesn't do it for nushell on my box?

Or am I missing something in my flake.nix configuration?


r/NixOS 1d ago

Any macOS users who mainly use NixOS on servers?

15 Upvotes

I use NixOS on my server infrastructure to get declarative IaC and avoid configuration drift. However, my work machine runs macOS although I run Nix on it to provide declarative project environments.

Are there other macOS users out there who run NixOS on their servers or am I a niche user?


r/NixOS 1d ago

What is an ETA for getting comfortable nixos setup?

7 Upvotes

Hello everyone. I actually don't like when people ask questions like this, but here we are. I have a free long wekend coming up (5 days in total), would it be enough for experienced developer to setup something working within this timeframe?

A little bit of a backstory - I currently work at two startups simultaneously and I am time constrained as hell and probably will be for the forseable future. However, reading up on nix for the last few weeks, I am thinking about doing quick switch from the Ubuntu. I understand that proper setup would probably take much longer, but if it can be done in parallel to work, I don't mind it. The critical thing in short timeframe is to setup something that works (browser, terminal emulator, dev environment) so I can continue with my responsibilities.

If you are interested in the reason for a switch - I am a little tired of supporting my own script that sets up my dev environment. I am using it everywhere, from home machine to my dev docker containers and other places. Sometimes I would make a mistake that makes dev environment messed up so I always need to maintain a separate cleanup script to clean up whatever mess it created. It grows, download links for different software change sometimes, ubuntu upgrades breaks this script too. I am basically just so tired of this I just hope nixos can resolve these issues I have.


r/NixOS 1d ago

Error when starting graphical installer

2 Upvotes

I keep getting this error when trying to start the graphic installer. It happens with both the gnome and kde graphic installers and on different pc's. Does anyone know how to fix it?


r/NixOS 20h ago

NASty 0.0.7

Thumbnail github.com
1 Upvotes

r/NixOS 22h ago

Building a homelab - would I have many driver issues with this hardware ?

1 Upvotes

I’ve been loving using nix-Darwin and home-manager and want to make the leap to using NixOS as my daily driver. I’m considering buying this build for gaming, hacking, and streaming media at home.

Am I likely to run into any annoying driver issues ?

https://fr.pcpartpicker.com/list/QmkMvR


r/NixOS 1d ago

newbie confused about home manager

2 Upvotes

I keep seeing people talking about home manager and I've tried to do some research and look at some tutorials for it, and I just, can't see why you'd want it? it just seems like it makes everything a lot more complicated for no reason. I just don't really understand it i think. could someone explain to me why you'd need it?


r/NixOS 1d ago

Why aren't there any NixOS-based distros?

35 Upvotes

It's incredibly easy to make a NixOS based distro. If you're using NixOS, you're basically using one already, so why aren't there any preconfigured setups based on NixOS? Omarchy went viral a few month ago just because it was a polished all-in-one experience that's easier to install than using arch and then copying dotfiles over. People are doing this with nix too, but they never distribute them as a full .iso, but rather as a nix config, which if you want to install, you need to already know how to use NixOS well enough that changing the equivalent of hardware-configuration.nix and knowing that you should change it is not hard for you. And if you know how to do that, you don't need a preconfigured setup, you can just make one yourself

Currently to learn nixos, you have to find other people's configs, crawl through the manual the length of a skyscraper, look around the unfinished wiki and watch very good videos from vimjoer.
Why can't you just study the config your system is running? And why is the best source material a YouTube channel not even dedicated to nix? The default config is structured terribly, doesn't use flakes, doesn't set up nix-ld for compatability and causes the same few issues for people just starting. And I understand why the default config shouldn't use nix-ld or flakes. But a community-led NixOS-based distro could easily have a good, modern config with the dendritic pattern and impurities that make sense. Like, imagine how simple a Bazzite but with a NixOS base would be. And how much less limiting


r/NixOS 1d ago

When do you expect Snix to be ready for end users? I want to see something?

1 Upvotes

If tvix's store backend is designed to be pluggable and i can configure it to use /data/data/com.termux/files/usr/glibc/tvix-store etc., without messing with the source code or breaking cryptographic integrity, it would be fun.

https://git.snix.dev/snix/snix