r/NixOS • • 6h ago

Nixos, day 1

21 Upvotes

After I made the very smart decision to turn off my computer while the drive was expanding because my monitor wasn’t working, I bricked my cachyos drive, I was already eying nix, and this was the best time to switch, first impressions, the good: The amount of control you get is insane, I was the kind of person to have 300 packages installed, and use 10, nixos keeps things simple, and I have a lot less stuff, and deeper control of my system itself. The bad: definitely a learning curve, I found myself googling things on how to do x nixos all throughout the day, I think I will learn in time, but right now, I am back on Linux square one, the only other bad thing is a lack of support, I wanted to install discord, and I learned what would have been a pacman command on cachy, is a whole setup on nix, more support is needed to really make the experience seemless, I will post updates as the days go by, let’s hope I don’t break it tommorow


r/NixOS • • 3h ago

How do you Nixify your home?

11 Upvotes

Innovative or old-school, I don't mind.

Please show me.

As a courtesy I'll go first:
https://github.com/QuackHack-McBlindy/dotfiles/blob/main/modules/myHouse.nix


r/NixOS • • 49m ago

COSMIC DE in nixOS

• Upvotes

I was so miss COSMIC cause i use Pop_OS! for half year in my old broken laptop

I was wodering how can im install COSMIC DE by system76 in nixOS

but i see it was wayland no x11 also i worry the compositor will broken cause i use nvidia Sync Mode and i do not use Offload mode.

Also, i've install phanteon before i hve fresh reinstall of Nixos and it broke my Vulkan

my question:

-How to install it (Flakes)

-Is the Compositor Will broke in LightDM or need cosmic-greeter

-Do you recommend it? (I'll to respect all your opinion, just dont fighting okay?)


r/NixOS • • 25m ago

Sorry So much, NixOS!

Thumbnail
• Upvotes

r/NixOS • • 20h ago

Unnecessary attack surface in Agenix and Sops-Nix?

13 Upvotes

I recently encountered a possible security concern while using Agenix or Sops-Nix for handling user secrets. I would appreciate your feedback.

The issue arises when multiple machines host users who rely on different subsets of their secrets across those systems.  I include Agenix and Sops-Nix in the title because they should be similar for this topic (I only use Agenix currently).

Consider this simple example:

  • system_secret1 → machine1, machine2  
  • system_secret2 → machine1  
  • system_secret3 → machine2  
  • user_secret1 → user1  
  • user_secret2 → user1  
  • user_secret3 → user2  

These secrets are encrypted with machine private keys for system_secrets and user private keys for user_secrets.  

Now examine machine1, which features user1 but uses only user_secret1 in its configuration. If this machine is compromised, one might expect system_secret1, system_secret2, and user_secret1 to be exposed.  

Unfortunately, that is not the case:
Because the attacker has only machine1’s private key, system_secret3 remains protected. On the user side, the attacker holds user1’s private key; if they can reach the encrypted user_secret2, they can access it. Since only user_secret1 appears in the machine config, safety might seem assured. The unexpected problem is that ALL encrypted keys for user1—whether used or not—are included in the nix store (thanks to u/sighery for the hint) and are compromised by attack on any machine user1 exists.

This attack surface is unnecessary for key management and stems from NixOS architecture. For me, this risk was unknown.

Naturally, your specific key management use case determines whether you face this risk at all or find it tolerable. My question is about the general attack surface and possible mitigations.

Perhaps my assumptions are flawed or a workaround exists (beyond avoiding user-key secrets and relying only on the lower-risk system key portion).  

Thanks for your input.

--------------------------------------------------

SOLVED

Thanks everyone for the valuable feedback - never would have found the root cause myself !!!

TLDR for anyone else who stumbles on the same issue:
The root cause for this unexpected behavior is that I use a configuration which self references to the flake in several cases. This makes the repo itself a dependency and results in being copied into to nix store also in remote installed machines.


r/NixOS • • 1d ago

12 Tuxedo Laptops with impermanence, coming, disko automatically apply their configuration after I push it to git

950 Upvotes

We bought these laptops for workshops with schoolkids. The home directory gets automatically wiped after a reboot but can be restored via snapper/btrfs. The automatic update runs via comin.

In the video I changed the wallpaper for dramatic effect.

I use NixOS BTW 😊

Edit: Some more Infos

Setup using nixos-anywhere and disko. For root I've setup impermance, for the user directories I use a very simple script which triggers snapper to restore and create snapshots. Updates to the configuration are distributed via comin. For testing a use a VM.


r/NixOS • • 14h ago

BUG on spotify in niri

4 Upvotes

when I open spotify It just put in this state, Also I use niri


r/NixOS • • 1d ago

nixos birthday!

27 Upvotes

like the title says, its officially my first day using nixos! im really liking it so far, im coming from using arch and if theres any times i could know please tell me!! <3


r/NixOS • • 17h ago

please, nixOS

6 Upvotes

can someone helpme?

warning: Git tree '/etc/nixos' is dirty

error:

… while calling the 'seq' builtin

at «github:nixos/nixpkgs/da6dc0e7b26060f2f71ce3ef7088fb56ee44fa36?narHash=sha256-MlvRfa1O5Cqc2/a%2BgG%2Bl9TSuowEoCKCmrJ1d9oAVm0I%3D»/lib/modules.nix:402:18:

401| options = checked options;

402| config = checked (removeAttrs config [ "_module" ]);

| ^

403| _module = checked (config._module);

… while evaluating a branch condition

at «github:nixos/nixpkgs/da6dc0e7b26060f2f71ce3ef7088fb56ee44fa36?narHash=sha256-MlvRfa1O5Cqc2/a%2BgG%2Bl9TSuowEoCKCmrJ1d9oAVm0I%3D»/lib/modules.nix:305:9:

304| checkUnmatched =

305| if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [ ] then

| ^

306| let

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

error: syntax error, unexpected end of file, expecting ';'

at /etc/nixos/configuration.nix:259:1:

258|

259|

| ^

Command 'nix --extra-experimental-features 'nix-command flakes' build --print-out-paths '.#nixosConfigurations."undo".config.system.build.nixos-rebuild' --no-link' returned non-zero exit status 1.

[undo@nixos:/etc/nixos]$


r/NixOS • • 1d ago

Ephemeral root + dendritic NixOS rice

Post image
49 Upvotes

I have always liked minimal, not flashy not overanimated setups. After using arch(with ricing exp), void , and nixos I thought of ricing my nixsetup. and though it will be just few easy tweaks. But hell nah! to get actual satisfactory looks just for the color aspect is too much messy work compared to arch or other distros. Literally ricing puts me in a harder way nix could not. still it looks crappy in some aspect.

used in my setup

you can check out my configs

https://codeberg.org/lowwki/nixos

https://codeberg.org/lowwki/quickshell

currently this setup follows impermanence through btrfs wipe and preservation. Wrapped niri,kitty and other programmes. A lot of things copied from vimjoyer's github and voidarc's quickshell.

it might be my end-distro. its a pretty solid experience.

anybody please suggest me some minimal ricing (not over cooked rice) setup examples.


r/NixOS • • 1d ago

Why I cant see NixOS wiki?

Post image
38 Upvotes

r/NixOS • • 10h ago

I want to use NixOS but not without my microphone

0 Upvotes

I just started using Nixos and I really like it conceptually. My main reason for making the switch was to use flakes to have multiple profiles for different desktop environments. Pretty much everything here is an improvement except for my microphone. I cannot for the life of me get the thing working. I came from Fedora, where the mic worked, and if I boot into a Debian Live ISO it works too. Only now on NixOS does it stop working. It shows up in the settings, but attempting to record audio just produces silence. I have tried switching between HiFi and Pro audio using pavucontrol, and in alsamixer none of my captures are marked as muted, although some are set to zero. I am still a beginner on NixOS and I've never needed to mess with pipewire before now, so I would appreciate any assistance. Here is some relevant info about my system and the output of some diagnostics.

Thank you in advance to anyone willing to help.

Hardware: Dell latitude 7320 detachable

[jeremy@nixos:~]$ nix eval nixpkgs#sof-firmware.version
"2025.12.2"

[jeremy@nixos:~]$ uname -r
7.2.10

[jeremy@nixos:~]$ sudo dmesg | grep "loading topology"
[    6.210416] sof-audio-pci-intel-tgl 0000:00:1f.3: loading topology: intel/sof-tplg/sof-tgl-rt711-l0-rt1316-l1-mono-rt714-l3.tplg

[nix-shell:~]$ arecord -l
aplay -l
**** List of CAPTURE Hardware Devices ****
card 0: sofsoundwire [sof-soundwire], device 1: Jack In (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsoundwire [sof-soundwire], device 4: Microphone (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
**** List of PLAYBACK Hardware Devices ****
card 0: sofsoundwire [sof-soundwire], device 0: Jack Out (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsoundwire [sof-soundwire], device 2: Speaker (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsoundwire [sof-soundwire], device 5: HDMI 1 (*) [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsoundwire [sof-soundwire], device 6: HDMI 2 (*) [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsoundwire [sof-soundwire], device 7: HDMI 3 (*) [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsoundwire [sof-soundwire], device 31: Jack Out DeepBuffer (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

  # Enable sound with pipewire.
  services.pulseaudio.enable = false;
  security.rtkit.enable = true;
  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    pulse.enable = true;
    wireplumber.enable = true;
    # If you want to use JACK applications, uncomment this
    jack.enable = true;
  };



  hardware.enableAllFirmware = true;

  hardware.graphics.extraPackages = with pkgs; [
    intel-media-driver
    vpl-gpu-rt
    intel-compute-runtime
  ];

  environment.systemPackages = with pkgs; [
    alsa-ucm-conf
    sof-firmware
  ];

r/NixOS • • 1d ago

Endgame distro

Post image
90 Upvotes

As a developer nixos is by far the best distro


r/NixOS • • 1d ago

Nvidia-smi broken with seg fault after update.

6 Upvotes

After most recent updates nvidia-smi is borked. It seg faults the issue is it didn't break after first reboot but after using it for a few h. And broke on previous derivations aswell.

Managed to track the seg fault. To a part of the executable being read only when it expects write access.

Anyone happen to know what or how it could have broken or how to fix it. Or any other input.


r/NixOS • • 1d ago

Error during new nixos update (conflicting derivation v4l2loopback

3 Upvotes

As per title i get this error when running nixos update switch

error: Cannot build '/nix/store/7ha5r9l8nsf3vc7kzhkg4g2cp9jyn00z-linux-6.18.57-modules.drv'.
       Reason: builder failed with exit code 25.
       Output paths:
         /nix/store/w3axcpkvch8jfd65asqnb7mkamzakh0s-linux-6.18.57-modules
       Last 6 log lines:
       > structuredAttrs is enabled
       > pkgs.buildEnv error: two given paths contain a conflicting subpath:
       >   `/nix/store/k9aj8k0qgrs3m28iy483f379pmwgqck5-v4l2loopback-0.15.4/lib/modules/6.18.57/modules.symbols' and
       >   `/nix/store/cmp57lyyw6zpvhfm1nczpi3m7ki1pb1k-linux-6.18.57-modules/lib/modules/6.18.57/modules.symbols'
       > hint: this may be caused by two different versions of the same package in buildEnv's `paths` parameter
       > hint: `pkgs.nix-diff` can be used to compare derivations
       For full logs, run:
         nix log /nix/store/7ha5r9l8nsf3vc7kzhkg4g2cp9jyn00z-linux-6.18.57-modules.drv
error: Cannot build '/nix/store/mzf7masdf18zs9q0kjczn2xz5fi7vypg-nixos-system-*******-26.11.20261020.02c087f.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/1njpnb7rflwsz3zr7qph2kwgn42vfwkz-nixos-system-*********-26.11.20261020.02c087f
Command 'nix --extra-experimental-features 'nix-command flakes' build --print-out-paths '/etc/nixos#nixosConfigurations."********".config.system.build.toplevel' --no-link' returned non-zero exit status 1.

This is the file where v4l2loopback is installed:

{ config, pkgs, ... }:
let   minimalSddmTheme = pkgs.where-is-my-sddm-theme.override {
    themeConfig.General = {
      showUsersByDefault = true;
      usersFontSize = 48;
      showSessionsByDefault = true;
      sessionsFontSize = 24;
    };
  };
in {
wget
environment.systemPackages = with pkgs; [ grim
slurp
wl-clipboard
mako
weston
wlr-randr
river-bsp-layout
xdg-desktop-portal
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
xfce.thunar
(wrapOBS {
    plugins = with obs-studio-plugins; [
      wlrobs
      obs-pipewire-audio-capture
    ];
  })
minimalSddmTheme
];
services.gnome.gnome-keyring.enable = true;
programs.river-classic.enable = true;
programs.river-classic.xwayland.enable = true;
programs.sway = {
          enable = true;
          wrapperFeatures.gtk = true; };
services.dbus.enable = true;
environment.sessionVariables = {
XDG_CURRENT_DESKTOP = "river";
XDG_SESSION_DESKTOP = "river";
XDG_SESSION_TYPE = "wayland";
};
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
config = {
common.default = [ "wlr" "gtk" ];
river.default = [ "wlr" "gtk" ];
};
};

services.displayManager = {
enable = true;
sddm = {
enable = true;
wayland.enable = true;
wayland.compositor =  "weston";
        theme = "where_is_my_sddm_theme"; # underscores — this is the actual theme dir name, NOT the package name
                        extraPackages = [
minimalSddmTheme
                        ];
};
};
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
boot.kernelModules = [ "v4l2loopback" ];


services.xserver.enable = true;
services.xserver.videoDrivers = [ "nvidia" ];
services.xserver.desktopManager.xfce.enable = true;

boot.extraModprobeConfig = ''
  options v4l2loopback devices=1 video_nr=10 card_label="OBS Virtual Camera" exclusive_caps=1
'';
}

r/NixOS • • 1d ago

Nix package manager on KDE Linux tutorial

Thumbnail youtube.com
7 Upvotes

r/NixOS • • 2d ago

Keeping NixOS secrets, secret

Thumbnail sighery.com
60 Upvotes

Another short article on a bit less common setup, separating secrets and sensitive values into a separate private repository/flake that is fetched as needed. Sops-nix and agenix are not post-quantum safe by default, even if age now supports post-quantum encryption keys, which means having the secrets publicly listed is currently safe, but leaves you vulnerable to potential future "harvest now, decrypt later" attacks.

Nothing technically grounbreaking but I still think it's nice to write about the less common setups out there. Over the years I've learned plenty from sites writing about some niche concept or setup, so I am paying it forward.


r/NixOS • • 1d ago

Cloudflare-warp(one)

1 Upvotes

Has anyone successfully gotten Cloudflare warp or the newer Cloudflare one to work? I’ve tried just about everything and not talking about installing it but getting it connected to teams connecting to the remote sites though the service? TIA. this is probably the one piece of software holding me back from switching and sadly need it for work.


r/NixOS • • 1d ago

Where is the correct documentation for configuring hyprland in NixOS Home-Manager?

3 Upvotes

I'm a new nix user. I installed hyprland via my configuration.nix like the website suggested and I am now trying to configure it. I am using home-manager and am currently following this link.

https://wiki.hypr.land/nix/configuring-hyprland-with-home-manager/

I made a hyprland.nix file and made sure to import it to my home.nix

I followed the usage snippet and made 2 binds just to test it out.

{ config, pkgs, ... }: {
wayland.windowManager.hyprland = {
        enable = true;

        settings = {
          "$mod" = "SUPER";
        bind = [
          "$mod, Return, exec, kitty"
          "$mod, B, exec, firefox"
         ];
      };
    };
  }

I did git add . then I did my sudo nixos-rebuild switch --flake .#<mysystemnamehere> and it finished with no errors. (I have home-manager synced with my flake so I don't do home-manager switch --flake .#user to update it)

But now at the top of my monitor I have a banner that says,

"Your config has errors:
/home/user/.config/hyprland.lua:5: <name> expected near '$'

So something in my hyprland.nix isn't translating correctly to the hyprland.lua file it is generating in my .config folder.

So I'm not sure how to fix it. I don't know if it was me that did something wrong or if that usage snippet just isn't up to date. If someone could point me in the right direction I would appreciate it.

Thanks.


r/NixOS • • 2d ago

Update your system: eMudhra Intermediate CA Compromise

Thumbnail emudhra.we-have-a-problem.com
89 Upvotes

r/NixOS • • 2d ago

Why Version-Control hardware-configuration.nix?

17 Upvotes

I created a repository containing my NixOS modules and flake.nix, but I'm wondering why I should version-control hardware-configuration.nix instead of importing /etc/nixos/hardware-configuration.nix and using --impure.

This file contains machine-specific settings, such as filesystem UUIDs, that may change. For example, if I add a second SSD and change my storage layout during a reinstall, could the existing configuration cause issues?

I'm considering keeping hardware-configuration.nix out of the repository and importing the local copy instead, allowing me to reuse the rest of my configuration across different machines and VMs.

What do you think of this approach? Does using --impure to import the local file compromise the reproducibility of flakes, or is it an acceptable practice?


r/NixOS • • 2d ago

Nixos Cloud Images ready to use

8 Upvotes

Greetings folks,

I decided to share on github some tooling that I've been using for years now on both AWS and Proxmox, it's a simple set of basic configurations and CI actions that produce Nixos base images suitable for AWS, Proxmox LXC and Proxmox VM.

Pretty sure the cloud images would work also with other hypervisors but I haven't tested them on anything other than what I listed.

I provision my virtual machines and instances always from code and, I also manage the system configurations also from code, thanks to the declarative nature of Nixos I can provision and deploy everything I need.

Here is a link to the repository in case you're interested: https://github.com/bartei/nixos-cloud-images

If there is any interest in the fully declarative IaC approach I've taken in managing my systems let me know, perhaps it's worth a blog post or a youtube video, I've been using this approach for years now and it's in production in many locations. Happy to share the journey and learn something from your feedback.


r/NixOS • • 2d ago

Rotated NixOS logo for the start menu from blue to green via GIMP, so that it better fits the WinXP theme:

Post image
24 Upvotes

r/NixOS • • 2d ago

patch the planet

Thumbnail ghuntley.com
27 Upvotes

r/NixOS • • 2d ago

How much storage is a safe margin for NixOS?

3 Upvotes

I have been using NixOS for over a month and I loved the declarative approach alongside safe and stable updates.

Having a configuration backup is always great. Having the ability to tinker your entire system without breaking anything is a life changer in the Linux world.

While I came across some NixOS specific issues, I learnt many are minor or easily fixable. However, running out of major has turned out to be a major issue for me. `128 GB SSD` is enough but it falls a bit short when there is a major update like a kernel update. I have tried cleaning up stuff, moving files, added swap storage to root. Still failed updates due to storage lacking.

I was thinking on moving to a larger SSD. I am currently planning on 200 GB for the OS. But I fear even this may fall short.

Q. How much would storage would provide a safe margin for updates on NixOS?

If it turns out that NixOS takes a large amount of space, I might look into other distros.

Edit: I also used gc and nix store optimise in my attempts.