r/Nix

Ai rewrote my nixos config....
▲ 0 r/Nix+1 crossposts

Ai rewrote my nixos config....

Hello everyone, I started using nixos couple month ago. At that time i wrote the config what felt right to me at that time. however i recieved some suggestions such as move modules out of host to avoid duplication , I came across this repo which I really liked and took inspiration from it. his dotfiles ...

Since I am newbie to nix,I decided to vibecode a rewrite. would help me test how good AI can do it and if it is good,would save me some time.

this is dotfiles written by me
this is dotfiles written by AI

I would be really thankful if you could take a look and see how well/terrible it's done.

Thanks

EDIT -> I really appreciate people dm out of concern for private keys. Those are encrypted throught git crypt and no they are not added by AI, if you look at git history, it's been there since I installed nixos and wrote config on my own ... So yeah those keys are safe to publish . Again thanks for the all the folks who notified me out of concern

u/Leading-Toe3279 — 2 days ago
▲ 22 r/Nix

Is declarative MacOS with Nix a good idea?

I have been using NixOS on an old machine for a while and have been enjoying it thus far. However, I will soon have to upgrade to a newer laptop and a Macbook seems much more appealing than other options hardware-wise. I don't love MacOS but it's much more tolerable than Windows, though I have gotten way too used to declarative systems and would like to manage my MacOS the Nix way. I have some questions for people who use MacOS declaratively with Nix:

  1. Is declarative MacOS stable enough for daily use now?
  2. What do I need to replicate the Nix experience on MacOS? Nix-darwin + brew-nix? Anything else?
  3. Is brew-nix stable enough for use now? Do I have to manually update the hash for casks without hash everytime they update?
  4. Brew-nix vs Nix-darwin’s homebrew model?
  5. I am a bit concerned about this problem I read about brew-nix: “The only problem I faced right now is the application state that is refreshed/wiped after every update. For example, my Firefox browser does not remember my default profile after I update the app, so I have to relink my profile to be the default one every time after the update.” Is this fixable?

Much thanks in advance for answering!

reddit.com
u/dancerinthelimelight — 4 days ago
▲ 0 r/Nix

From Nix to Dagger

I think I will switch from Nix to Dagger.

I guess I will still use nix profile add nixpkgs#... sometimes in the future, but overall Dagger solves my issue in way that is easier to understand for me.

Feel free tell me why I am wrong.

I configured Dagger so that my local environment and the environment in CI use the same Dagger server.

When I run tests locally, then commit and push to PR, then the tests in CI dont get executed because they are a cache-hit (exactly same input, so no need to execute it). I love it.

reddit.com
u/guettli — 5 days ago
▲ 17 r/Nix+4 crossposts

IP Linux: I built a browser-based desktop environment with React, Vite and local-first apps

I built a browser-based desktop environment with React, Vite and local-first apps

I have been working on a project called IP Linux: a browser-based desktop environment that runs as a static web app.

Live site: https://ip-os-linux.vercel.app/
GitHub: https://github.com/ikerperez12/IP-OS-LINUX

It is not a real Linux distribution, and it does not run native binaries. The idea is different: I wanted to explore how far a polished desktop-like experience can go inside a normal browser tab.

The result is a small web OS-style environment with:

  • A splash / entry screen
  • A desktop with icons, folders and widgets
  • A top panel with system controls
  • A dock and app launcher
  • Resizable and draggable windows
  • Virtual workspaces
  • Snap assist
  • A global search / Spotlight-style command palette
  • Local-first apps
  • Reactive wallpapers
  • Glass UI and visual effects
  • A public GitHub repo and Vercel deployment

Why I built it

Most web demos are landing pages, dashboards or small single-purpose apps. I wanted to build something that feels more like an environment.

I was interested in questions like:

  • Can a web app feel physical and desktop-like?
  • How should windows behave inside a browser viewport?
  • How do you organize many small apps without making the UI messy?
  • How far can local-first storage go before a backend is actually needed?
  • How do you publish a visual project publicly without exposing secrets or overcomplicating the stack?

IP Linux became a way to test all of that in one project.

What is inside

The app includes a catalog of built-in apps and tools: Files, Terminal, Browser, Settings, App Store, Music Player, Matrix Rain, games, developer tools, productivity apps and visual utilities.

The apps are loaded lazily, so the initial shell does not need to download every app upfront. The virtual file system and user preferences are stored locally in the visitor's browser with IndexedDB/localStorage. There is no backend, no account system and no required environment variables for the public release.

What I focused on

The main focus was the shell experience:

  • Window resizing and dragging
  • Dock behavior
  • Desktop icon grid
  • App launcher workflow
  • Keyboard shortcuts that do not interfere with inputs or the terminal
  • Responsive behavior for compact viewports
  • Wallpaper rendering that respects reduced motion and tab visibility
  • Public-safe security posture
  • A README that presents the project like a real product

There were also a few important constraints. For example, a full YouTube page cannot be embedded in an iframe because YouTube blocks that for security reasons. So IP Linux includes a YouTube Lite / embed-aware fallback instead of pretending that every website can load inside the internal browser.

Stack

The project is built with:

  • React
  • TypeScript
  • Vite
  • Tailwind CSS
  • Radix UI primitives
  • Lucide / React Icons
  • DOMPurify
  • IndexedDB via idb-keyval
  • Vercel static hosting
  • Vercel Web Analytics

The repo also includes a public release setup:

  • README with screenshots and GIF
  • MIT license
  • SECURITY.md
  • Vercel config
  • Security headers
  • Robots and sitemap
  • Manifest
  • GitHub Actions CI for audit, lint and build

What I learned

The biggest lesson was that a desktop UI is mostly about small interaction details.

A window that opens slightly too small feels broken.
A dock icon that scales inside a clipped container feels wrong.
Desktop icons that can overlap make the whole shell feel unfinished.
Keyboard shortcuts that steal Tab from the terminal are frustrating immediately.

Fixing those details made the project feel much more real than adding another decorative effect.

I also learned that public release work matters. A project can look good locally but still feel unfinished if the repo has a generic README, no security notes, no screenshots, no CI and no clear deploy story.

Feedback welcome

I am sharing it because I think browser-based desktop interfaces are a fun area for frontend experimentation.

I would especially appreciate feedback on:

  • Window management
  • Desktop organization
  • Accessibility
  • Performance
  • App ideas
  • Whether the repo presentation is useful for other developers

Live: https://ip-os-linux.vercel.app/
Code: https://github.com/ikerperez12/IP-OS-LINUX

u/Time-Willingness-360 — 6 days ago
▲ 15 r/Nix+1 crossposts

Full Time Nix | nix-effects with Mika Bohinen

Just published an episode about nix-effects: A pure Nix toolkit for effectful programs, typed validation, verified boundaries, and description-backed DSLs. If you were trying to understand what this means then we're on the same boat. during the episode I have asked the author of nix-effects, Mika Bohinen, all of the dumbest questions and, who knows, maybe even some good ones. To me it seems that nix-effects takes programming in Nix language to the next level and I'm looking forward for a good enough excuse to try it. It is already in use by several projects in the ecosystem. Listen in.

https://fulltimenix.com/episodes/nix-effects-with-mika-bohinen

u/mightyiam — 6 days ago
▲ 20 r/Nix+1 crossposts

nix-search: a simple Bash tool to search installed packages across all NixOS scopes

I built a small Bash utility to search installed packages across all NixOS scopes at once — user environment, system-wide, flake profiles, and Home Manager — with keyword filtering, duplicate detection, and package count.

A simple but powerful Bash utility to search and inspect installed packages across all scopes of a NixOS system.

nix-search -a global -k xfce
nix-search -a global,user --count
nix-search --duplicates

Why?

On NixOS, packages can live in several different places:

System-wide via configuration.nix
Per-user via nix-env or user profiles
Via Home Manager

There is no single command to see all of them at once, filter by keyword, or detect duplicates across scopes. nix-search solves that.

This tool is aimed at NixOS newcomers who are still getting familiar with the system and want a simple way to see what is installed and where.

Features

🔍 Search across all scopes at once or pick specific ones
🔑 Keyword filtering to find exactly what you are looking for
👥 Multi-user aware — scans all users and their Home Manager installations
🔁 Duplicate detection — find packages installed in more than one scope
📊 Package count per scope
⚡ Fast and lightweight — pure Bash, no dependencies

Installation

Option 1 — Nix Flake (recommended)

Add nix-search to your flake.nix:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    nix-search.url = "github:manelinux/nix-search";
  };

  outputs = { nixpkgs, nix-search, ... }: {
    nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        ./configuration.nix
        nix-search.nixosModules.default
      ];
    };
  };
}

Then rebuild:

sudo nixos-rebuild switch --flake /etc/nixos#myhost

Option 2 — nix-env (per-user, non-flake)

This option uses the included default.nix file, which tells Nix how to build and install nix-search without needing flakes.

Download and install from GitHub:

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

tar -xzf nix-search.tar.gz

nix-env -i -f nix-search-main/

Or clone and install locally:
git clone https://github.com/manelinux/nix-search.git

nix-env -i -f nix-search/

Usage

nix-search [options]

Options:

-a, --scope <scope1,scope2,...> Scopes to search (default: all)
(Values: user, global, home-manager, all)
-k, --keyword <word> Filter results by keyword
-c, --count Show package count per scope
-d, --duplicates Show only packages found in more than one scope
-v, --version Show version
-h, --help Show help

Examples

# Show all packages across all scopes
nix-search

# Show user-installed packages
nix-search -a user

# Search for xfce packages in the global system scope
nix-search -a global -k xfce

# Search across multiple scopes
nix-search -a global,user -k python

# Show all packages with count per scope
nix-search --count

# Find packages duplicated across scopes
nix-search --duplicates

# Find xfce-related duplicates
nix-search --duplicates -k xfce

Example output

🔍 nix-search v2.2.0
Scope: global
Keyword: xfce
Count: no
Duplicates: no

══════════════════════════════════════════

🌐 GLOBAL SYSTEM PACKAGES (/run/current-system) (filtered by: 'xfce')

══════════════════════════════════════════

1c299vsynd0vpbjzflbm4ynvjczrlcm0-xfce4-screensaver-4.20.1
33bkjai3114vi9dkw4fb471w60hhkw4r-xfce4-pulseaudio-plugin-0.5.1
flh2qmmzircss6qf1babnqbp8l0a1q13-xfce4-terminal-1.1.5
fx0ffpy7258wlgqsc6a3cfmyh5y3w9bh-xfce4-panel-4.20.5
...

↳ Total: 17 package(s)

Scopes

Scope Description
user Packages installed via nix-env or user profiles, scans all users
global System-wide packages from /run/current-system
home-manager Packages managed by Home Manager, scans all users
all All of the above

Uninstall

If installed via flake, remove it from your flake.nix and rebuild.

If installed via nix-env:
nix-env -e nix-search

Requirements

NixOS
Bash 4+
Standard NixOS tools (nix-env, nix-store)

Contributing

Pull requests and issues are very welcome! Some ideas for future improvements:
JSON output with --json
--no-color flag for piping output
Show package versions alongside names

GitHub: https://github.com/manelinux/nix-search

Feedback and contributions are very welcome!

u/manelinux — 6 days ago
▲ 30 r/Nix+1 crossposts

A fully reproducible Markdown presentation environment

I often present technical topics at work, but I've never liked PowerPoint, Google Slides, and similar tools. As a Nix enthusiast and a Kubernetes/DevOps lead, it always feels clumsy to rely on WYSIWYG editors. It's not code, it’s not reproducible: it’s a liability.

I found Marp a few years back and immediately adopted it to write and generate my slides. But I found myself constantly copying assets, snippets, and themes back and forth between presentations. And ultimately, without a pinned toolchain, it still wasn't truly reproducible across machines and time.

To solve this once and for all, I put together Marp Deck Directory during my time off. It's a public template that combines Marp with the absolute guarantees of Nix flakes to store all your slide decks/assets and guarantee you can generate them identically 5 years from now.

GitHub Repo: nicolas-goudry/marp-deck-directory

Live Demo (built via GH Actions): nicolas-goudry.github.io/marp-deck-directory

A few Nix-specific technical details of how it works under the hood:

  • Dynamic Discovery & Path Rewriting: A single core derivation discovers decks under slides/ and builds HTML, PDFs, and PNG covers. It handles path rewriting dynamically so you can seamlessly mix global assets (/assets) and deck-specific local assets without breaking local dev previews.
  • Offline Emojis: Because Nix builds run without network access, I built a small derivation to vendor Twemoji assets locally during the build step.
  • The PDF Sandbox Hack: Normal Chromium sandboxing fails inside Nix builds. I created a wrapper around the Brave browser to pass --no-sandbox. Why Brave? Because standard Chromium isn't natively available on aarch64-darwin, and headless Firefox currently struggles on Darwin (plus it renders Marp differently than Chromium). Brave was the safest cross-platform bet.

Oh, one last thing! The template comes bundled with Catppuccin themes for Marp, which I built specifically for this project and is currently in the process of becoming an official Catppuccin port.

I'd love to get feedback from anyone else doing "presentations as code". Let me know what you think!

github.com
u/ngoudry — 9 days ago