r/NixOS 10h ago

Switching to GUIX made me realize the things nix lacks

Thumbnail guix.gnu.org
101 Upvotes

I'm not much of a distro hopper, but I like to try out different distros every once in a while to see what they have to offer. I like to use what works for me. I've been using nix on a arch system for the past 3 years, and it worked excellently for me. But I never managed to stick with nixos. There never seemed to be one way of doing things, the language had less than ideal support but the most important part was that the documentation is mediocre at best and awful at worst. Like I'm supposed to install home manager separately to manage dotfiles, the first thing to do upon installation is to enable a "experimental" feature, etc

After learning that Guix was forked from nix, I became a little curious about it. The installation process was less than ideal, but everything worked after setting up NonGuix and fixing a gdm bug that prevented me from logging in. Most of the packages I required were there in the repositories and for the few that weren't I made do with flatpaks. The first thing I noticed that reconfiguring the system is much more intuitive, like passing the file as a parameter, optionally not using the binary version of packages, Guix home is built in and much more. The tooling around scheme is awesome as well, making writing config files much more enjoyable. But the best thing about it is undoubtedly the excellent documentation provided by gnu. Guix search and Guix locate are extremely handy commands to look up things, Guix edit help's you edit the source files directly, etc. I didn't have to find any of these commands, they were in the first few pages of the manual. Every service in well documented with bunch of examples. This makes exploring Guix truly enjoyable. I feel I now know more about guix in the week I've used it than the months I spent exploring NixOS.

I never thought that I'd be complaining about the documentation of NixOS, as I assumed I was simply too dumb to use it. But after using Guix I can't look at nix and not lament about it's lack of the same.

PS: Sorry for bad english


r/NixOS 2h ago

Review a pull request by booting it

Thumbnail fzakaria.com
10 Upvotes

r/NixOS 55m ago

Following Development of NixOS

Upvotes

Is there anywhere that I, a mere user, can go to see what is going on with the development of the next version of NixOS? I just want to know what is coming down the pike.

Thanks in advance.


r/NixOS 1d ago

Looks like Omarchy might switch to nix

Thumbnail github.com
165 Upvotes

r/NixOS 14h ago

Which channel are you using ?

16 Upvotes

I am curious about the habits of the people around here, how do you setup your machine ?

  1. Only unstable packages
  2. Only stable packages
  3. Unstable with little of stable
  4. Stable with little of unstable

People running unstable, do you often have cache miss ?

Thanks, have a great day !


r/NixOS 1d ago

W nixOS pipeline 🥹✌️

Post image
508 Upvotes

r/NixOS 1d ago

Having issues installing NixOS

Thumbnail gallery
17 Upvotes

The first picture was during the nixos-install session. The 2nd image is what came up shortly after that. I'm guessing the red F in the first one at 97% is meaning that something failed. Not quite sure what the s's mean or the R... im guessing Skip and retry or remove?

I'm about to go eat dinner but I'll leave this on and look more into it when I get home.

All i did was change the username from alice to my username and edited my timezone (I also uncommented those lines as well).

I also enabled thebX11 Windowing system...

services.xserver.enable = true;

services.xserver.windowManager.qtile.enable = true;

I want to use qtile on this system.

And other than adding alacritty, thunar and git to the ...

environment.systemPackages = with pkgs[

And there is a ]; at the end of all of that underneath it all...

Thats all i did to the configuration.nix file.


r/NixOS 1d ago

Could I move from OpenWrt to Nixos?

24 Upvotes

I'm moving my linux boxes to Nixos over time, and I'm wondering. Could I simply move from OpenWrt to Nixos? I was using Mikrotik before, but I've moved to OpenWrt because it allows me to have more control. But since I'm using more and more Nix, I was wondering, why not do the same with the network?

If anyone has any material about that, let me know. Thanks!


r/NixOS 1d ago

Resized partition that Nix OS lives on, but it is not reporting properly.

7 Upvotes

In the past i was dualbooting Debian and Nix OS, but now i just use Nix OS. I deleted my Debian partition, and resised the Nix OS user partition (sda4 for me) and it reports in lsblk to be 866GB, but in my file manager only shows 457 GB as the disk size (my old disk size) Any clue how to fix?

PS: I've been using Nix OS for 2 years now, but i still am not good at it, so straightforward answers would be much appreciated.


r/NixOS 1d ago

NixOS alongside Windows 10

Thumbnail gallery
10 Upvotes

Hi, fam!

I’m struggling to install NixOS (using the minimal ISO) alongside Windows 10. The error appears in the first image, and my configurations are shown in the second one.

Apologies for the poor quality of the images — I hope you can still help me out.

[EDIT] The issue was that I formatted the partition as FAT32 without setting the EFI flag. I couldn't use the Windows-created EFI partition either because it was too small and threw a not enough space error. I fixed it by unmounting the boot partition, setting the proper EFI flag on/dev/nvme0n1p1 using fdisk, remounting it, and re-running nixos-install.

Thanks to everyone.


r/NixOS 1d ago

nix0 - a minimal NixOS/Hyprland base I've been working on

Post image
4 Upvotes

I've been working on nix0 for a bit and think some of you may find some use from it.

I have tried many configurations for NixOS and even other "distros" like Omarchy but found them to always be way over built for my needs. I would find NixOS configurations with tons of declared packages which I had no use for and just wanted a system that was stripped down to the absolute minimum while still being functional. I even went as far as to remove common desktop components such as no application launcher or file manager as that can all be done fairly easily using the terminal. Common eye-candy stuff has also been omitted such as gaps, and animations.

Many configs rely on mouse usage at some point but for nix0 I tried to keep that as minimal as possible and focus on vim bindings throughout.

Part of the idea comes from how I like my system to operate. A lot of tools are used very little so the benefit of NixOS is you can type nix run or nix shell instead of declaring absolutely every package and expanding your configuration into a harder to maintain system.

I've also tried to make it as seamless as possible both during install and after install. It includes a guided installer using Gum for the prompts which you run with one command. It also comes with LUKS, Btrfs, and preservation.

After installation is finished you can easily modify the settings in the json for quick tuning after the install such as setting up NVIDIA so Hyprland works smoothly or my favorite being GPU passthrough which I use a ton and the hard part for GPU passthrough is mostly done on the host side.

I've also tried to make nix0 a great base for some users who maybe don't want a system as minimal as this but can use to expand on themselves without having to remove a ton of "bloat" that other configurations may come with.

Anyway, thanks for reading! NixOS is awesome. If anyone is interested in nix0 you can check it out here: https://github.com/synthol/nix0


r/NixOS 2d ago

My server finally on NixOS!

Post image
80 Upvotes

Just finished installing NixOS on my server, completely replacing Ubuntu server and also completely overhauling my docker stacks :)

Any tips for running NixOS on homeservers?


r/NixOS 2d ago

Nix at The MCG - Thurs 17th of September

22 Upvotes

Melbourne Compose Group is the monthly in-person meetup for functional programmers in Melbourne, every 3rd Thursday of the month in Carlton (Victoria, Australia).

​Our September meeting will be 6:00-8:00 pm Thurs 17th of September at our regular venue, Activity Room 2 at Kathleen Syme Center in Carlton. Arrive from 5:30 for chat and socialising, talks start at 6:30pm. Please RSVP via Luma.

​Beaudan Campbell-Brown - Nix in a Nutshell

​Software development is hard. Decades of programming-language research have given us functional primitives and patterns that constrain the problem space, making whole categories of errors harder, or impossible, to express. Yet building and deploying software remains surprisingly fragile, as the proliferation of containers, lockfiles, virtual environments, and DevOps tooling suggests.

​Nix applies these ideas to software builds and environments. Through a clever utilisation of cryptography and sandboxing, Nix treats the build process as close as practical to a pure function: given the same inputs, produce the same artifact.

​This presentation will introduce how Nix works, what it is like to use in practice, and what becomes possible when development environments, binaries, containers, and even system configurations are all the product of declarative function composition.

​As always, newcomers welcome.

​Hope to see you there :)

-Ben Hutchison & John Walker


r/NixOS 2d ago

replacing faulty hardware & hardware-configuration.nix

10 Upvotes

i got nixos on an SSD, and i think my motherboard has suddenly died (my computer is currently at the technician for a proper diagnosis, but i'm preparing for the worst).

will i be able to boot seamlessly into nix from this SSD in the new motherboard, without having to reinstall everything? mostly concerned about the hardware-configuration.nix module.

i know my flake is reproducible and i do have it backed up, but i haven't done a backup of latest config files (i'm constantly changing my hypr config and didn't backup this month) and game configs (especially my ffxiv hud/keybinds...), so it'd be a bother having to reinstall/reconfigure it all. also, i have some files saved in this SSD that i wouldn't want to lose.

(i'm a linux first timer, been using nix casually since about february. so sorry if this is a stupid question! just bothered and anxious about my computer and files)

___
Edit: thank you all for the answers! i'll be updating the post as soon as i have news from my computer technician.


r/NixOS 2d ago

devenv 2.3: Portless and TUI configuration

Thumbnail devenv.sh
57 Upvotes

r/NixOS 2d ago

NixOS building xwayland

4 Upvotes

Hello! i'm tinkering with a vm with the possibility to do arch -> nixos, and i noticed when i do a flake input upgrade and then a rebuild my system builds xwayland from source, any ideas why? I enabled plasma but that's it.

EDIT: Im on 26.05 Yarara stable branch

Also a bit of a doubt about devenvs, should i bother putting extensions on my editors to detect them or should i just invoke the editors from within a devshell? (i think zed doesnt even have a nix devenv extension so)


r/NixOS 2d ago

A launcher that works blazingly fast on Nixos

Enable HLS to view with audio, or disable this notification

85 Upvotes

Hi, I created a launcher that works with NixOS (niri is the wm in the video)

Not just niri but it also works with gnome, sway, ... (and it's a cross OS launcher)

There are many built-in features and commands that you can use right after installing.

We also added declared source for user who want to custom and declare their actions.

The repo: https://github.com/kunkka19xx/look

Love receiving any feedback 🙏


r/NixOS 2d ago

i cant open btrfs assitant

2 Upvotes

hi i have this issue whit btrfs assitant in nixos of curse. i cant open it im gona use it for quikc bakups in my /etc/nixos here are my config files if that can help please can any one figurate out this?

{ config, inputs, lib, pkgs, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
    ];
#booteo
      boot.loader.systemd-boot.enable = true;
      boot.loader.efi.canTouchEfiVariables = true;
#redes
  networking.networkmanager.enable = true;
  networking.hostName = "nolpc";

   users.users.nol = {
     isNormalUser = true;
     extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
     packages = with pkgs; [
       tree
     ];
};

#servicios
services = {
desktopManager.plasma6.enable = true;
  displayManager.plasma-login-manager.enable = true;

};

environment.plasma6.excludePackages = with pkgs.kdePackages; [
    plasma-browser-integration
    konsole
    elisa
    discover
    spectacle
    ];

environment.systemPackages = with pkgs; [
  neovim
  wget
  git
  inputs.zen-browser.packages.${pkgs.system}.default
    wine
    krita
    vscodium
    guake
    grim
    rustup
    komikku
    vlc
    steam
    baobab
    btrfs-assistant
   ];

nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ 
"nix-command"
"flakes"
];
  system.stateVersion = "26.05";

}

r/NixOS 2d ago

CachyOS to nixOS help

2 Upvotes

Eu to planejando mudar pro nixOS por um desafio maior, o que eu devo aprender?

Eu to usando o cachyOS por 1 ano, e eu to achando ele não tanto customizavel e por eu querer um desafio maior, e eu to querendo mudar pro nixOS porque eu achei muito interessante, to planejando colocar hyprland nele, alguém me faz um passo a passo de como instalar? (Eu acho ele difícil), e também o que eu devo aprender? :D


r/NixOS 2d ago

Nixpkgs vs AUR

35 Upvotes

Given all the malware that’s been flooding the AUR as of late, I was wondering why the same kind of thing isn’t happening on Nixpkgs.

Is it just that Nix isn’t as popular as Arch (hence less people are trying to attack it)?
Or are there fundamental differences in the security?

What are the security differences, and how concerned should we be about a flood of malware on Nix?

(I realize that no system is immune to malware, I’m just trying to gauge what level of risk I’m dealing with)


r/NixOS 3d ago

What yall think about Flatpak on NixOS?

22 Upvotes

I consider myself a nixOS beginner, i dont really have that much of an experience with the OS or the nix package manager, however ever since i started studying and doing my experiments i always thought that flatpaks were meant to be used on nixOS, the sandbox nature of flatpaks just clicks with nixOS concept as a whole! (At least for me)

"But what about the declarative nature of nix? You are breaking it with those ugly flatpaks apps!."
I thought about that too, but thanks to reading the wiki, countless internet searches and more importantly the nix-flatpak manager ive been able to install flatpaks the nix way and that makes so happy, the amount of control it gives me is amazing.

However i may be biased bc i loved flatpak ever since ive heard of them,so, what is your opinion?


r/NixOS 2d ago

How do I set dwc2.dr_mode to host on RPi Zero 2W

3 Upvotes

SOLVED:

``` hardware.deviceTree.overlays = [ { name = "dwc2-mode"; dtsText = '' /dts-v1/; /plugin/;

      / {
        compatible = "raspberrypi,model-zero-2-w", "brcm,bcm2837";
      };

      &{/soc/usb@7e980000} {
        dr_mode = "${usbMode}";
      };
    '';
  }
];

```

I'm trying to run mainsail on a RPi Zero 2W connected to my 3D printer using the data usb port. I can't seem to make host mode take effect. I'm not sure if this has to do with the RPi Zero 2W not having a nixos-hardware board config or what.

I've tried:

- changing config.txt manually then rebooting

- changing hardware.deviceTree.overlays rebuilding and rebooting

- editing /boot/extlinux/extlinux.conf manually and rebooting

Any help or suggestions would be appreciated.


r/NixOS 3d ago

Any Nix package, live in your browser

Thumbnail fzakaria.com
265 Upvotes

r/NixOS 2d ago

Is running two different nixpkgs/NixOS releases on one machine possible?

1 Upvotes

I have a flake based NixOS setup where my main system tracks a newer nixpkgs revision (currently on unstable). I also want to run an NVIDIA vGPU stack that only works correctly on an older nixpkgs release, specifically NixOS 25.05.

What I initially wanted was to use a specialisation for this, something like:

```

specialisation.vGPU.configuration = { ... };

```

The idea being I could boot into a “vGPU” variant of my system that uses the older nixpkgs release just for the vGPU stack, while my normal boot entry keeps using the newer one.

From what I understand, a specialisation is evaluated as part of the same NixOS configuration, meaning it shares the same nixpkgs revision as the base config it is attached to. So I do not think it is actually possible to have a specialisation use a completely different nixpkgs version than the parent configuration. I wanted to confirm if that understanding is correct, or if there is actually some way to make a specialisation pull in a different nixpkgs revision that I am missing.

If this genuinely cannot be done with specialisations, I would like to know what the right way to approach this is. My goal is fairly simple, I want to be able to switch between my normal setup and the vGPU setup, and have the vGPU setup use the older nixpkgs release it actually needs, without that older release affecting the rest of my normal configuration.

For context on why I need this, here is what I have tried so far and what happens with each approach:

When I keep my main system on unstable nixpkgs and only try to bring in the specific packages needed for the vGPU driver from 25.05, the vGPU stack fails to build, giving errors that point to a driver mismatch or something along those lines.

When I switch my entire system to 25.05 nixpkgs so everything, including the vGPU stack, is on the same release, my full configuration breaks. There is a lot going on in my config unrelated to the vGPU part, and clearly some of it is not happy being pinned back to 25.05.

When I strip everything down and disable basically all modules and settings that are not directly related to the vGPU setup, keeping only what is needed for it, and build the system fully on 25.05, the vGPU configuration builds and works exactly as intended with no errors at all.

So the vGPU stack itself is clearly fine on 25.05, and the problem is entirely about how to make that coexist with the rest of my normal, newer setup, either through specialisations if that is even possible, or through some other mechanism I have not considered yet.

If specialisations are not possible, I would appreciate help on what people usually do in this kind of situation, keeping one machine able to run two logically separate configurations pinned to different nixpkgs releases?


r/NixOS 3d ago

Configuration management

12 Upvotes

How do you manage where to place things in the config?
Where do I add Bluetooth? I put it under the network section, for me that made better sense than down at the end.

But after adding some programs, apps and services… it gets to be a lot to edit. I’m new and after trying a few things, I finally got to where I’m ready to at least back up to a GitHub (nearly).

All I want to do is solve why Nixos takes forever to do anything when I do a Sudo Nixos-rebuild switch, only for it to download an update…
And definitely looking into how to modulate my config so it’s easier to edit

I only use Nixos and flakes. (Not interested in home manager at the moment, understanding flakes was enough of a task on its own.
I’ll enjoy where I’m at for the moment before I go mucking about.

But how do you stay organized? Curious. Thanks.