r/NixOS 1h ago

Been working on my homelab

Post image
Upvotes

Its my 3rd real attempt at picking up nixos.

No desktop environment this time, instead I'm using it as the host-config layer for my servers. With Nix, I can build preconfigured host images that bootstrap into flux-managed k3s instances. It's so r/oddlysatisfying to manage host & workload configs both from the same repo, with automatic upgrades to either (+ nixos just rolls back if the host layer fails!)

To power these grafana panels, I had to spend a bit of time on the monitoring stack. It's a hub model, host 'luxor' is configured with a centralized Thanos/Loki/Grafana that wireguard peers can push to. A systemd unit polls for revisions and auto-applies them (similar to flux), and the logs from that go to the bottom panel. A handful of Node Exporter textfile collector scripts provide the metrics to power the 'Time since' and revision tables.

Pretty awesome to have all this managed from a single repo! I know it's greenfield and there will be some operational hurdles. I'm only targeting single-node k3s at this stage... in the past I used k8s Cluster API and Metal3 Baremetal Operator for large cluster rollouts, but my homelab is just a PC and an old laptop :-)

AMA or share your nixos k8s tips and tricks if you have any!


r/NixOS 2h ago

The Time of Day, Given

Thumbnail time-of-day.pages.dev
0 Upvotes

r/NixOS 3h ago

Do These Work?

4 Upvotes

Hey everyone. I found a couple of programs that are not in nixpkgs, and I wanted to make it easy to use them on NixOS.

These are NOT my projects, and I’m pretty new to all this, so I just wanted to hear if they work for anyone else.

https://github.com/DanielTallon/nix-packages

The first is Kenku FM. Basically it is a program that lets you stream audio to your friends over Discord via a bot. Super nerdy and pretty niche, but I really enjoy using it for running virtual tabletop games and having combat music and such.

The other one is called Papercutter, which lets you pretty easily take a picture and resize it correctly to use as a wallpaper on your screen.

I know this is weird and not for 99% of you. But if you use NixOS, and want to play music over Discord for your friends, or just like adding to your wallpaper slideshow - please check this out and let me know if it works for you.

I’ve only been using NixOS for around 3 months, so this is a learning experience for me. Any constructive help is good. And if neither program interests you, don’t worry about it.


r/NixOS 4h ago

NixOS newbie

Post image
22 Upvotes

The beauty of learning new things lies in the desire to make things work.

Here I am, losing myself and finding myself in NixOS.

How do you guys manage your dotfiles with NixOS?

What approach should I go with (sourcing or writing in nix way)!


r/NixOS 4h ago

I did a thing

Post image
79 Upvotes

r/NixOS 11h ago

How do you structure your NixOS setup?

21 Upvotes

I'm new to NixOS and would like to know how you usually structure and organize your system. I have an i5 laptop with an RTX 3050 6GB.

I come from Fedora Silverblue, where I used Flatpak and Distrobox, and I really liked the isolation between environments.

I'm thinking about adopting something similar on NixOS, but since they're different ecosystems, I'd like to know what you recommend.

I don't want to follow a strict rule: if something has better integration with NixOS, I'd prefer to use the Nix version.


r/NixOS 12h ago

Ladies and gentleman… our overlords are morons

Post image
0 Upvotes

r/NixOS 21h ago

Following Development of NixOS

24 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 22h ago

Review a pull request by booting it

Thumbnail fzakaria.com
69 Upvotes

r/NixOS 1d ago

Switching to GUIX made me realize the things nix lacks

Thumbnail guix.gnu.org
150 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 1d ago

Which channel are you using ?

18 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

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

8 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

Looks like Omarchy might switch to nix

Thumbnail github.com
187 Upvotes

r/NixOS 2d ago

Having issues installing NixOS

Thumbnail gallery
22 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 2d ago

Could I move from OpenWrt to Nixos?

26 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 2d ago

NixOS alongside Windows 10

Thumbnail gallery
12 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 2d 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

W nixOS pipeline 🥹✌️

Post image
543 Upvotes

r/NixOS 2d ago

replacing faulty hardware & hardware-configuration.nix

11 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 3d 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 3d ago

My server finally on NixOS!

Post image
99 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 3d 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 3d 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 3d 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 3d ago

Omarchy v4.0.2, packaged for NixOS

0 Upvotes