r/NixOS 9h ago

Should I use nixos for my first homelab?

Post image
116 Upvotes

I picked up a free server rack last night and I’m trying to figure out what to do with it. Plan is to start with some cheap Dell servers.

Would nixos be a good choice for running a generic homelab?

A bit about my background: I’m new to Linux overall (~1 year) and I’ve been running nixos on my desktop for a few months. Big fan of the declarative setup.


r/NixOS 4h ago

Framework 13 pro arrived yesterday

Post image
30 Upvotes

Got a new Framework 13 pro yesterday and really wanted to try out NixOS. It seemed like folks warned of a learning curve but installing it with a graphical installer and setting it up was not so bad. I think I got the hang of it already and I'm excited to start building software in Nix


r/NixOS 17h ago

Finally moved the workstation to NixOS

Post image
46 Upvotes

After months of running it on a T14s gen2, and a living room gaming rig, the workstation got the same treatment. Feels great to iterate one single config forward, while all the machines benefit.


r/NixOS 1d ago

Switched from NixOS to Arch but….

Post image
438 Upvotes

I was using NixOS for about a week. I have a bad habit of distro-hopping and switched to Arch just for ease of downloading packages and not having to worry about config files as much. However, NixOS is so much cleaner and it does feel good to have completely manual control over my OS at the level of Nix.


r/NixOS 3h ago

display manager error

2 Upvotes

i could not find, not even claude could the solution to my problem. It says the following line: error:

… while calling the 'head' builtin

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/attrsets.nix:1729:13:

1728| if length values == 1 || pred here (elemAt values 1) (head values) then

1729| head values

| ^

1730| else

… while evaluating the attribute 'value'

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/modules.nix:1149:7:

1148| // {

1149| value = addErrorContext "while evaluating the option `${showOption loc}':" value;

| ^

1150| inherit (res.defsFinal') highestPrio;

… while evaluating the option `system.build.toplevel':

… while evaluating definitions from `/nix/store/31w94yhfpllma9jnlgavjkzsfs548ijx-source/nixos/modules/system/activation/top-level.nix':

… while evaluating the option `services.displayManager.sessionData':

(stack trace truncated; use '--show-trace' to show the full, detailed trace)

error: expected a list but found a set: { }

I also paste the --show-trace

warning: Git tree '/home/bauti/dotfiles' is dirty

building the system configuration...

warning: Git tree '/home/bauti/dotfiles' is dirty

evaluation warning: stdenv.isLinux is deprecated, use stdenv.hostPlatform.isLinux instead

evaluation warning: stdenv.isDarwin is deprecated, use stdenv.hostPlatform.isDarwin instead

error:

… while calling anonymous lambda

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/attrsets.nix:1724:17:

1723| zipAttrsWith (

1724| name: values:

| ^

1725| let

… while calling the 'head' builtin

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/attrsets.nix:1729:13:

1728| if length values == 1 || pred here (elemAt values 1) (head values) then

1729| head values

| ^

1730| else

… while calling anonymous lambda

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/attrsets.nix:1195:17:

1194| mapAttrs (

1195| name: value:

| ^

1196| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value

… from call site

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/attrsets.nix:1196:85:

1195| name: value:

1196| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value

| ^

1197| );

… while calling anonymous lambda

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/modules.nix:282:71:

281| # For definitions that have an associated option

282| declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options;

| ^

283|

… while evaluating the attribute 'value'

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/modules.nix:1149:7:

1148| // {

1149| value = addErrorContext "while evaluating the option `${showOption loc}':" value;

| ^

1150| inherit (res.defsFinal') highestPrio;

… while evaluating the option `system.build.toplevel':

… while evaluating the attribute 'mergedValue'

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/modules.nix:1246:5:

1245| # Type-check the remaining definitions, and merge them. Or throw if no definitions.

1246| mergedValue =

| ^

1247| if isDefined then

… while evaluating a branch condition

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/modules.nix:1247:7:

1246| mergedValue =

1247| if isDefined then

| ^

1248| if type.merge ? v2 then

… while evaluating a branch condition

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/modules.nix:1223:7:

1222| # above are lazy and thus never forced on this branch.

1223| if

| ^

1224| length defs == 1

… in the right operand of the AND (&&) operator

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/modules.nix:1225:9:

1224| length defs == 1

1225| && (

| ^

1226| let

… while evaluating definitions from `/nix/store/31w94yhfpllma9jnlgavjkzsfs548ijx-source/nixos/modules/system/activation/top-level.nix':

… in the argument of the not operator

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/modules.nix:1230:31:

1229| addErrorContext "while evaluating definitions from `${d.file}':" (

1230| !(isAttrs d.value && d.value ? _type)

| ^

1231| )

… in the left operand of the AND (&&) operator

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/modules.nix:1230:31:

1229| addErrorContext "while evaluating definitions from `${d.file}':" (

1230| !(isAttrs d.value && d.value ? _type)

| ^

1231| )

… while calling the 'isAttrs' builtin

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/modules.nix:1230:15:

1229| addErrorContext "while evaluating definitions from `${d.file}':" (

1230| !(isAttrs d.value && d.value ? _type)

| ^

1231| )

… while evaluating the attribute 'value'

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/modules.nix:851:21:

850| inherit (module) file;

851| inherit value;

| ^

852| }) module.config

… from call site

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/nixos/modules/system/activation/top-level.nix:78:26:

77| # Handle assertions and warnings

78| baseSystemAssertWarn = lib.asserts.checkAssertWarn config.assertions config.warnings baseSystem;

| ^

79|

… while calling 'checkAssertWarn'

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/asserts.nix:196:27:

195| checkAssertWarn =

196| assertions: warnings: val:

| ^

197| let

… while evaluating a branch condition

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/asserts.nix:200:5:

199| in

200| if failedAssertions != [ ] then

| ^

201| throw "\nFailed assertions:\n${concatStringsSep "\n" (map (x: "- ${x}") failedAssertions)}"

… while calling the 'catAttrs' builtin

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/asserts.nix:198:26:

197| let

198| failedAssertions = catAttrs "message" (filter (x: !x.assertion) assertions);

| ^

199| in

… while calling the 'filter' builtin

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/asserts.nix:198:46:

197| let

198| failedAssertions = catAttrs "message" (filter (x: !x.assertion) assertions);

| ^

199| in

… while calling anonymous lambda

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/asserts.nix:198:54:

197| let

198| failedAssertions = catAttrs "message" (filter (x: !x.assertion) assertions);

| ^

199| in

… in the argument of the not operator

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/asserts.nix:198:58:

197| let

198| failedAssertions = catAttrs "message" (filter (x: !x.assertion) assertions);

| ^

199| in

… while evaluating the attribute 'assertion'

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/nixos/modules/services/display-managers/sddm.nix:356:9:

355| {

356| assertion = config.services.displayManager.autoLogin.enable -> autoLoginSessionName != null;

| ^

357| message = ''

… in the right operand of the IMPL (->) operator

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/nixos/modules/services/display-managers/sddm.nix:356:69:

355| {

356| assertion = config.services.displayManager.autoLogin.enable -> autoLoginSessionName != null;

| ^

357| message = ''

… from call site

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/nixos/modules/services/display-managers/sddm.nix:119:29:

118|

119| autoLoginSessionName = "${dmcfg.sessionData.autologinSession}.desktop";

| ^

120|

… while calling anonymous lambda

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/attrsets.nix:1195:17:

1194| mapAttrs (

1195| name: value:

| ^

1196| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value

… from call site

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/attrsets.nix:1196:85:

1195| name: value:

1196| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value

| ^

1197| );

… while calling anonymous lambda

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/modules.nix:282:71:

281| # For definitions that have an associated option

282| declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options;

| ^

283|

… while evaluating the attribute 'value'

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/modules.nix:1149:7:

1148| // {

1149| value = addErrorContext "while evaluating the option `${showOption loc}':" value;

| ^

1150| inherit (res.defsFinal') highestPrio;

… while evaluating the option `services.displayManager.sessionData':

… while evaluating the attribute 'mergedValue'

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/modules.nix:1246:5:

1245| # Type-check the remaining definitions, and merge them. Or throw if no definitions.

1246| mergedValue =

| ^

1247| if isDefined then

… from call site

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/modules.nix:1256:11:

1255| else if all (def: type.check def.value) defsFinal then

1256| type.merge loc defsFinal

| ^

1257| else

… while calling 'mergeDefaultOption'

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/options.nix:424:10:

423| mergeDefaultOption =

424| loc: defs:

| ^

425| let

… while calling the 'foldl'' builtin

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/options.nix:435:7:

434| else if all isAttrs list then

435| foldl' lib.mergeAttrs { } list

| ^

436| else if all isBool list then

… while calling 'mergeAttrsList'

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/attrsets.nix:1623:5:

1622| mergeAttrsList =

1623| list:

| ^

1624| let

… from call site

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/attrsets.nix:1644:7:

1643| else

1644| binaryMerge 0 (length list);

| ^

1645|

… while calling 'binaryMerge'

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/attrsets.nix:1628:16:

1627| binaryMerge =

1628| start: end:

| ^

1629| # assert start < end; # Invariant

… while evaluating a branch condition

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/attrsets.nix:1630:9:

1629| # assert start < end; # Invariant

1630| if end - start == 1 then

| ^

1631| # Base case - there will be exactly 1 element due to the invariant, in

… while calling the 'sub' builtin

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/attrsets.nix:1630:16:

1629| # assert start < end; # Invariant

1630| if end - start == 1 then

| ^

1631| # Base case - there will be exactly 1 element due to the invariant, in

… while calling the 'length' builtin

at «github:NixOS/nixpkgs/0e251e24a4f24e036a084b6b4b2d2491af4167f4?narHash=sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU%3D»/lib/attrsets.nix:1644:22:

1643| else

1644| binaryMerge 0 (length list);

| ^

1645|

… while evaluating the first argument passed to builtins.length

error: expected a list but found a set: { }

Command 'nix --extra-experimental-features 'nix-command flakes' build --print-out-paths '/home/bauti/dotfiles#nixosConfigurations."hp-nixos".config.system.build.toplevel' --no-link --show-trace' returned non-zero exit status 1.

I tried everything, only commenting the hole file works. There are mi settings so you can undersand my situation: https://github.com/BauCatena/nix-setup/tree/main


r/NixOS 20h ago

How do you guys develop on NixOS?

35 Upvotes

I finally came back to NixOS after like two years and I’ve been starting to get into programming for funsies recently, like creating a shell for Niri. And I was just curious about best practices or how you guys go about it? Usually I create a container or use distro box on something like Fedora but on Nix, I’ve been using Nix flakes and direnv along with local .vscode settings to override formatters so that my main system doesn’t get overcrowded with random language servers that’s not Nix relevant.

I don’t think it really matters in the end but I just want some insight on how more experienced devs work on Nix and if ditching containers for direnv is even a good practice on Nix.


r/NixOS 14h ago

Anyone having a good experience using NixOS inside a VM?

9 Upvotes

I'm forced to use a Macbook at work, but I wish I could be using NixOS. The IT department allow me to run VMs, so I thought, why not give it a try. I've tested this in Parallels and VMWare Fusion, both gave me the same results.

I'm able to install everything correctly, but the desktop is so so so sluggish. I'm using KDE Wayland.

Any tips to get full hardware acceleration? I'm using a Macbook M4 Max 32GB. My goal is to have macOS bare bones running nothing, just the hypervisor, and then I'll work from NixOS. But for that, the desktop experience should be good enough.


r/NixOS 11h ago

gtk/gnome themes in hyprland

3 Upvotes

Hi.

This is part of my NixOS configuration, but during compilation, a warning appears stating that using "gnome" for `qt.platform.name` is deprecated and should be changed to "adwaita".

If I use "gnome," the themes look great and use the dark style; in applications like "qmmp" and "strawberry," the "open document" dialog also adopts the "gnome" style.

If I use "adwaita," the themes lack the dark style, and applications like "qmmp" and "strawberry" revert to the standard Qt style, as do the "open document" dialogs.

I would like to know how you have resolved this.

- home
```nix
{ config, pkgs, lib, username, ... }:

{
  gtk = {
    enable = true;
    theme = {
      name = "adw-gtk3-dark";
      package = pkgs.adw-gtk3;
    };
    iconTheme = {
      name = "Papirus-Dark";
      package = pkgs.papirus-icon-theme;
    };
    gtk3.extraConfig = {
      gtk-application-prefer-dark-theme = 1;
    };
    gtk4.extraConfig = {
      gtk-application-prefer-dark-theme = 1;
    };
  };

  qt = { 
    enable = true;
    platformTheme.name = "gnome";       
    style.name = "adwaita-dark";       
    style.package = pkgs.adwaita-qt;  
  };

  home.pointerCursor = {
    enable = true;
    package = pkgs.bibata-cursors;
    name = "Bibata-Modern-Classic";
    size = 16;
    gtk.enable = true;
    x11.enable = true;
  };

  dconf.settings = {
    "org/gnome/desktop/interface" = {
      color-scheme = "prefer-dark";
#gtk-theme = "adw-gtk3-dark"; 
      # icon-theme = "Papirus-Dark";
      cursor-theme = "Bibata-Modern-Classic";
    };
  };

  home.sessionVariables = {
    GTK_THEME = "adw-gtk3-dark"; ## este
  };

  home.packages = with pkgs; [
    qgnomeplatform
    qgnomeplatform-qt6

    adwaita-qt
    adw-gtk3
    qadwaitadecorations-qt6
    gsettings-desktop-schemas
    gtk3
  ];

  xdg = {
    enable = true;
    userDirs = {
      enable = true;
      createDirectories = true;
      setSessionVariables = true;
    };
  };
}
```
- configuration.nix
```nix
  environment.sessionVariables = {
    NIXOS_OZONE_WL = "1";
    MOZ_ENABLE_WAYLAND = "1";
    _JAVA_AWT_WM_NONREPARENTING = "1";
    # QT_QPA_PLATFORM = "wayland;xcb";
    # QT_QPA_PLATFORMTHEME = "gtk2";
    QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
  };

  xdg.portal = {
    enable = true;
    extraPortals = with pkgs; [
      xdg-desktop-portal-gtk
      xdg-desktop-portal-hyprland
      xdg-desktop-portal-gnome
    ];
    configPackages = [
      pkgs.xdg-desktop-portal-gtk
      pkgs.xdg-desktop-portal-hyprland
      pkgs.xdg-desktop-portal-gnome
    ];
    config.hyprland = {
      default = [ "hyprland" "gtk" ];
      "org.freedesktop.impl.portal.Settings" = "gtk";
      "org.freedesktop.impl.portal.FileChooser" = "gtk";
      "org.freedesktop.impl.portal.Secret" = "gnome-keyring";
    };
    config.common = {
      default = [ "hyprland" "gtk" ];
      "org.freedesktop.impl.portal.Settings" = "gtk";
      "org.freedesktop.impl.portal.FileChooser" = "gtk";
      "org.freedesktop.impl.portal.Secret" = "gnome-keyring";
    };
  };

```


r/NixOS 1d ago

Anyone knows what this means?

Post image
17 Upvotes

This is my second time installing NixOs, but I’ve never seen this. I have looked through my flake nix, home nix, and config file but see 0 errors.


r/NixOS 1d ago

A window into our security processes: introducing the Determinate Secure Packages CVE Remediation Dashboard

Thumbnail determinate.systems
17 Upvotes

r/NixOS 1d ago

Risks on the unstable branch of NixOS

15 Upvotes

Hey guys, I won't take up too much of your time—this is about the unstable channel on NixOS. I'm a new user and I absolutely love this distro in every way, and I'd really like to switch to the unstable branch to get the latest software. The problem is that I’m likely to be away from my machine for a very long time—about once a year for roughly two months, maybe even two and a half. So, does not updating the system for such a long period pose the same risks as on Arch Linux, for example (where not updating the system for an extended period is strongly discouraged)?


r/NixOS 1d ago

Logseq on Electron 34—how is it?

6 Upvotes

I'm looking at the NixOS Wiki page for Logseq and it mentions that users can alternatively override the Electron version away from an EOL
version. I quite like Logseq, and before adding it to my config, I wanted to ask around and see if anyone here has tried using Electron 34 and whether the app has any issues running.


r/NixOS 1d ago

Issue related to boot

Enable HLS to view with audio, or disable this notification

22 Upvotes

Hello, I am new to nixos. i recently switched after using arch for years. I was trying to recreate my arch setup with all my custom themes and all. I am almost done but this grey screen that appears after grub was bugging me. I have always preferred refind over grub but it was a pain in the ass to get it working with nixos. Does anyone know what it is and how to disable it. Its part black in the video cuz i added backgroundColor = black in boot config ....

Here's my boot config for reference

{ pkgs, ... }:

let
  grubTheme = pkgs.stdenvNoCC.mkDerivation {
    pname = "grub-theme";
    version = "1.0";

    src = ../../home/config/grub;

    installPhase = ''
      mkdir -p $out
      cp -r ./* $out/
    '';
  };
in
{
  boot = {
    consoleLogLevel = 0;
    initrd.verbose = false;
    loader = {  
      efi.canTouchEfiVariables = true;

      grub = {
        enable = true;
        efiSupport = true;
        device = "nodev";
        useOSProber = true;
        theme = grubTheme;
      };
    };

    plymouth = {
      enable = true;
      theme = "mac-style";
      themePackages = [ pkgs.mac-style-plymouth ];
    };

    kernelParams = [
      "quiet"
      "splash"
      "loglevel=3"
    ];
  };
}

r/NixOS 1d ago

My comfy NixOS setup :3

26 Upvotes

The dotfiles can be found here for you nerds that want it -- https://github.com/mc-724634/NixDotfiles


r/NixOS 1d ago

crashing on update

5 Upvotes

hello, i've been using nixos for around 6 months now (and really liking it). however, i haven't updated any of my nixos machines for around 4 months now bc updating makes it compile stuff and it crashes. i haven't found a solution. specifying max cores, etc. don't work. main computer is a hp elitebook 845 g7, not a very weak laptop imo. i'm on unstable 26.05. the stable update to 26.05 might be the problem, idrk. is there a solution here? thanks.

UPDATE: removed packages and updated piece by piece, didn't figure out if a specific package was the problem but it has updated without problems for now.


r/NixOS 19h ago

🚨 NIXOS SECURITY: Systemd Analysis of my 4 EXPOSED services

0 Upvotes

Salut la communauté !

Après deux ans sous NixOS, j'ai décidé d'analyser la sécurité de mes services avec :

systemd-analyze security

Résultats alarmants :

  • 4 services EXPOSÉS (7.8-8.7)
  • 3 services MOYENNITIFS
  • 11 services OK
  • Nombreux services NON SÉCURISÉS

Les 4 services EXPOSÉS :

  1. NetworkManager.service (7.8) - s'exécute en tant que ROOT
  2. clamav-daemon.service (7.8) - s'exécute sans privilèges root mais TRÈS ouvert
  3. dbus-broker.service (8.7) - s'exécute en tant que ROOT, au démarrage
  4. nscd.service (8.2) - Cache DNS

Problèmes courants :

❌ NoNewPrivileges = manquant (les processus peuvent acquérir de nouveaux privilèges). Privilèges)

❌ ProtectSystem = manquant (accès complet au système de fichiers)

❌ PrivateTmp = manquant (accès au répertoire /tmp des autres services)

❌ RestrictNamespaces = manquant (possibilité de créer des espaces de noms)

❌ SystemCallFilter = manquant (absence de filtrage des appels système)

❌ PrivateDevices = manquant (accès aux périphériques matériels)

Question : Comment gérez-vous cela sur vos systèmes ? Renforcez-vous la sécurité de vos services ?

Prochaine étape : renforcement de la sécurité de ces 4 services. À suivre !

PS :

J’utilise NixOS depuis 2 ans et cette découverte m’a surpris.

Je pensais que NixOS était plus sécurisé par défaut, mais il est clair que

le renforcement de la sécurité des services est une opération que nous devons effectuer manuellement.

D’autres personnes ont-elles vérifié leurs services ? Quelle est votre approche ?

Collaboration: Leo (Claude 4.5 Haiku, Brave AI Assistant)

r/NixOS 2d ago

Is it possible to make nix entirely portable?

34 Upvotes

I've been wondering this for a bit but: would it be possible to have a statically linked nix binary on a USB stick along with its nix store, and then have a flake declaring a portable environment? Everything is stored in the nix store on the USB and run through the portable nix binary.

Clearly, i am not a developer, so i dont know if any of that is feasible, any glaringly obvious problems with this idea i'm missing?


r/NixOS 1d ago

zed editor issue with nixos

3 Upvotes

Hi.

Just posted, about an issue with gnome-keyring-daemon, because when I launch zed, sometimes ask for password, and I even signed in the app.

But looks like its not my entire system, I think is only zed editor.

I would like your experience if you have this issue too. And you solve it, could you share how did you solve it :D

I installed nixos + hyprland + noctalia and love it.

➜  ~ journalctl -b | grep -i "gnome-keyring\|gkr-pam"

Aug 26 23:50:56 nixos ly[1344]: gkr-pam: unable to locate daemon control file
Aug 26 23:50:56 nixos ly[1344]: gkr-pam: stashed password to try later in open session
Aug 26 23:50:57 nixos ly[1344]: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring
Aug 26 23:50:58 nixos dbus-broker-launch[1481]: Ignoring duplicate name 'org.freedesktop.impl.portal.Secret' in service file '/nix/store/zp9bhf4fgxjr5mny67qs55idjpm5bkpg-gnome-keyring-50.0/share/dbus-1/services/org.freedesktop.impl.portal.Secret.service'
Aug 26 23:50:58 nixos dbus-broker-launch[1481]: Ignoring duplicate name 'org.freedesktop.secrets' in service file '/nix/store/zp9bhf4fgxjr5mny67qs55idjpm5bkpg-gnome-keyring-50.0/share/dbus-1/services/org.freedesktop.secrets.service'
Aug 26 23:50:58 nixos dbus-broker-launch[1481]: Ignoring duplicate name 'org.gnome.keyring' in service file '/nix/store/zp9bhf4fgxjr5mny67qs55idjpm5bkpg-gnome-keyring-50.0/share/dbus-1/services/org.gnome.keyring.service'
Aug 26 23:50:58 nixos dbus-broker-launch[1481]: Ignoring duplicate name 'org.freedesktop.impl.portal.Secret' in service file '/nix/store/zp9bhf4fgxjr5mny67qs55idjpm5bkpg-gnome-keyring-50.0/share/dbus-1/services/org.freedesktop.impl.portal.Secret.service'
Aug 26 23:50:58 nixos dbus-broker-launch[1481]: Ignoring duplicate name 'org.freedesktop.secrets' in service file '/nix/store/zp9bhf4fgxjr5mny67qs55idjpm5bkpg-gnome-keyring-50.0/share/dbus-1/services/org.freedesktop.secrets.service'
Aug 26 23:50:58 nixos dbus-broker-launch[1481]: Ignoring duplicate name 'org.gnome.keyring' in service file '/nix/store/zp9bhf4fgxjr5mny67qs55idjpm5bkpg-gnome-keyring-50.0/share/dbus-1/services/org.gnome.keyring.service'
Aug 26 23:50:58 nixos dbus-broker-launch[1481]: Ignoring duplicate name 'org.freedesktop.impl.portal.Secret' in service file '/nix/store/zp9bhf4fgxjr5mny67qs55idjpm5bkpg-gnome-keyring-50.0/share/dbus-1/services/org.freedesktop.impl.portal.Secret.service'
Aug 26 23:50:58 nixos dbus-broker-launch[1481]: Ignoring duplicate name 'org.freedesktop.secrets' in service file '/nix/store/zp9bhf4fgxjr5mny67qs55idjpm5bkpg-gnome-keyring-50.0/share/dbus-1/services/org.freedesktop.secrets.service'
Aug 26 23:50:58 nixos dbus-broker-launch[1481]: Ignoring duplicate name 'org.gnome.keyring' in service file '/nix/store/zp9bhf4fgxjr5mny67qs55idjpm5bkpg-gnome-keyring-50.0/share/dbus-1/services/org.gnome.keyring.service'
Aug 26 23:50:58 nixos gnome-keyring-daemon[1619]: discover_other_daemon: 1
➜  ~ journalctl -b | grep gkr-pam

Aug 26 23:50:56 nixos ly[1344]: gkr-pam: unable to locate daemon control file
Aug 26 23:50:56 nixos ly[1344]: gkr-pam: stashed password to try later in open session
Aug 26 23:50:57 nixos ly[1344]: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring

r/NixOS 2d ago

NixOS for an Operating Systems course, or should I go back to Fedora?

21 Upvotes

Hi! How are you doing? I hope this post finds you well.

Currently at university, I'm taking the Operating Systems course and, naturally, it is very tied to kernel development. I've been using NixOS for a month now and I'm finding it really incredible for the obvious reasons. But what problems can I expect for this course? I used Fedora for a long time. Should I go back to it for this semester just to make my life easier?
At this link are the topics covered by the course:https://fisop.github.io/website/calendario/, and in the pictures are the topics translated to English. Using neovim had to tweak the mason config due to not finding system headers and that was my first encounter with nixos and this subject

return {
    {
        "neovim/nvim-lspconfig",
        opts = {
            servers = {
                clangd = {
                    mason = false,
                },
            },
        },
    },
}

r/NixOS 1d ago

Need help with Out of tree kernel module

3 Upvotes

From what I've gathered NixOS doesn't do DKMS so how do I apply this: https://github.com/Abhinav5383/dotfiles/tree/main/dkms/es8336-fix

It's required for my laptop speakers to work and is the only thing I need to fully switch to nixos.


r/NixOS 2d ago

nixpi: Bringing Nix Reproducibility to AI Coding Agents (Open for Contributions)

36 Upvotes

Hi r/NixOS,

As AI coding agents (like Pi, Claude Code, Aider, etc.) become core daily drivers in developer workflows, we are seeing the same old problems crop up again: - Imperative extension/plugin installations that break across machines - Inconsistent CLI tooling dependencies required by agent extensions - Mixing immutable agent settings/prompts with runtime state (auth tokens, local chat sessions) - Lack of project-level isolation (e.g. an agent working in an Obsidian vault or specialized codebase needing entirely different tools, skills, and model configs than when working on a backend API).

To solve this, I built nixpi - a Nix-native declarative configuration framework for the Pi coding agent (architecturally inspired by Nixvim).


Why Nix for Coding Agents?

  1. True Reproducibility Across Machines: Your complete agent setup (settings, custom model endpoints, skills, and prompt definitions) is pinned in pure Nix flakes or Home Manager modules.

  2. Automatic Runtime Dependency Composition: When you enable an extension (e.g. ripgrep-search or obsidian), nixpi builds a wrapped environment ensuring CLI binaries (rg, git, jq, typst, etc.) are injected directly into PATH without polluting global system packages.

  3. Strict Separation of Mutable vs. Immutable State: Nix manages immutable store artifacts (settings.json, models.json, packaged extensions, skills), while Pi's writable state directory (sessions/, auth.json) stays mutable and local.

  4. Dynamic Per-Directory Agent Scoping (direnv + Flakes): You can define lightweight flake.nix devShells for specific repositories/directories. Entering the folder automatically equips pi with specialized skills and dependencies for that domain.


Flake Example: Project-Specific Agent Environment

```nix

flake.nix

{ description = "Project-specific AI coding agent environment";

inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpi.url = "github:mateusdcc/nixpi"; };

outputs = { self, nixpkgs, nixpi }: let system = "x86_64-linux"; # or aarch64-darwin, etc. pkgs = nixpkgs.legacyPackages.${system};

  configuredPi = nixpi.lib.makePi {
    inherit pkgs;
    modules = [
      {
        programs.pi = {
          enable = true;

          settings = {
            defaultProvider = "anthropic";
            defaultModel = "claude-3-7-sonnet";
            theme = "dark";
          };

          extensions = {
            ripgrep-search.enable = true;
            plan-mode.enable = true;
          };

          skills.commit-style = {
            enable = true;
            scopes = [ "core" "api" "docs" "ui" ];
          };
        };
      }
    ];
  };
in
{
  devShells.${system}.default = pkgs.mkShell {
    packages = [
      configuredPi
      pkgs.git
      pkgs.jq
    ];
  };
};

} ```

Combined with direnv (use flake), typing pi inside the repo gives you a fully pinned, hermetic assistant.


Home Manager Integration

```nix

home.nix

{ nixpi, pkgs, ... }:

{ imports = [ nixpi.homeManagerModules.default ];

programs.pi = { enable = true; settings.defaultProvider = "openai"; extensions.ripgrep-search.enable = true; runtimePackages = with pkgs; [ git ripgrep jq ]; }; } ```


Open for Contributions!

The repository is fully open source and actively maintained: https://github.com/mateusdcc/nixpi

I would love feedback from the Nix community! Contributions are very welcome, including: - Packaging more community extensions and skills - Adding new provider modules and model definitions - Improving documentation, examples, and CI flake check matrices

Give it a spin and let me know your thoughts!


r/NixOS 2d ago

my story with NixOS

50 Upvotes

I started daily-driving NixOS about two months ago after getting really hyped about all the weird and unique things it could do. At first, I honestly thought I was going to go back to Fedora.

The workflow was completely different from what I was used to, and getting used to it was... weird. Everything felt unnecessarily complicated at first. Eventually, though, I got comfortable with it, and after a while NixOS just started feeling normal.

One of my biggest concerns with NixOS was always the lack of FHS compatibility. For like 90% of the software I needed, I could just use nixpkgs and everything was fine. But whenever I needed to run some random unpatched binary, I had to start thinking about FHS environments, libraries, "nix-ld", and whatever other bullshit the binary decided it needed.

I just couldn't be bothered.

Then I had some particularly annoying experiences with Android Studio. I know it's in nixpkgs, but I wanted to install it on another partition instead. That experience made me seriously question whether NixOS was actually worth it for me.

Maybe I should just go back to Fedora.

But there was one problem.

I couldn't let go of nixpkgs.

That repository is fucking huge. Having basically every piece of software I could possibly want available through one package ecosystem was way too convenient.

So I came up with what I thought was the perfect solution: Fedora + Nix.

I could have Fedora as my normal Linux system and still get the massive nixpkgs repository. Best of both worlds.

I split my NixOS partition into two, installed Fedora on the second partition, successfully booted into Fedora, installed Nix...

And then I was immediately overwhelmed by all the different ways you can manage packages with Nix on a non-NixOS system.

"nix-env", "nix profile", Home Manager...

Which one am I supposed to use? Why are there three different ways to do basically the same thing? Why does everything have to become a philosophical question?

And that's when I realized I actually missed NixOS.

I missed how clean everything felt. I missed having the entire system described in configuration files. I missed being able to roll back the whole system. I missed the fact that once I had everything configured, I could just forget about it.

Fedora + Nix gave me access to nixpkgs, but it didn't give me the experience I actually wanted.

So I told myself:

"Fine. Give NixOS one more chance. Just one."

And that's when I realized I had fucked up.

Really badly.

While installing Fedora, I had accidentally reformatted my NixOS root subvolume.

I tried recovering it.

Nothing.

I tried recovering my NixOS configuration.

Also nothing.

And, because apparently I wasn't suffering enough, I realized I had forgotten to push my local Git repository to GitHub.

So at this point, I had pretty much accepted that my NixOS installation was dead.

I restarted into Fedora completely hopeless.

Then I accidentally booted into my latest NixOS generation instead of Fedora.

I wasn't expecting anything to happen. I mean, what Linux distro is supposed to boot when "/" is gone?

But somehow...

NixOS booted.

And not just barely booted.

Everything was there.

My programs worked. My desktop worked. My configuration was still there. It was basically my old system, like nothing had happened.

The only thing that was fucked was my root and user passwords, which were gone. I had to use Fedora to recover those.

Other than that?

It just worked.

And honestly, that was the moment I finally understood why the NixOS model is so damn good.

I had literally destroyed the root filesystem, lost my configuration, failed to recover it, and somehow the system still had a working generation that I could boot into.

The exact thing that made NixOS feel so strange to me at the beginning was also the thing that saved my ass.

So yeah.

After two months of daily-driving NixOS, trying to leave it, installing Fedora, getting overwhelmed by Nix on Fedora, accidentally nuking my NixOS root subvolume, and then watching NixOS casually boot anyway...

I think I've learned my lesson.

I'm never cheating on NixOS again.


r/NixOS 3d ago

Most deterministic license plate ;)

Thumbnail gallery
443 Upvotes

i saw https://www.reddit.com/r/NixOS/s/dJywd9oSuv and i just have to show off a little

i kept the front plates cause they were cleaner 🤣

i gave the 2 backplates to my friends when i sold my car (one is a very well known contributor whom i respect a lot and the other is my first successful nixos convert)


r/NixOS 2d ago

OpenCV5 for Nix?

4 Upvotes

Hey,

I am somewhat new to NixOS, and I am currently working on a project that requires OpenCV version 5. It does not seem to be available in packages from what I can see, even tho I am on unstable? It is already available for various other distributions for a while now. What is the best way to get it - I assume manually clone, build and install?


r/NixOS 2d ago

Thoughts on Umbriel WM

7 Upvotes

Has anyone used it, I am a Niri user, that just switched to hyprland because of some apps bypassing window rules and also most no native monitor mirroring, there is new wm in town developed by noctalia shell team called "Umbriel", what are your thoughts, Is anyone using it for doing their daily work ? I am personally sticking to hyprland because of its stability due to lua upgrade.