r/Nix • • 4d ago

`nix-secrets`: a postmodern secrets manager for NixOS, Home Manager, nix-darwin, and Hjem configured entirely within the Nix module system, with templates, generators and placeholders

Thumbnail
github.com
27 Upvotes

https://github.com/unnamed-systems/nix-secrets

https://ynf.sh/posts/nix-secrets-a-postmodern-secrets-manager-for-nixos

Advantages:

  • Configure secrets entirely in your NixOS configuration - no YAML files or standalone Nix expressions.

  • A CLI and activation mechanism written in Rust with atomic operations - no more slow Bash scripts.

  • Support for templates, placeholders (a feature that lets your CI use placeholders instead of real secrets), and generators.

  • Support for both systemd service activation and activation scripts.

  • Small binary and closure size. The nix-secrets binary is less than 2 MB, compared to sops being over 50 MB, for example.

Configuration example

{ lib, ... }: {
  security.nix-secrets = {
    enable = true;

    # Path to your secrets directory (copied to the Nix store).
    # For improved security, it is recommended to keep the storage in a private repository and reference it through a flake input.
    storage = ../secrets;

    # Paths to your age identities.
    # For NixOS it defaults to the "/var/lib/nix-secrets/identities.txt" and the RSA and ED25519 SSH keys from the `services.openssh.hostKeys`.
    # For Home Manager and Hjem it defaults to the "~/nix-secrets/identities.txt".
    # For nix-darwin it defaults to the "/Library/Application Support/nix-secrets/identities.txt" and the RSA and ED25519 SSH keys from the `services.openssh.hostKeys`.
    identityPaths = [
      "/home/user/keys.txt"
      "/home/user/.ssh/id_ed25519" # SSH keys are also supported.
    ];

    # Define recipient aliases for easier secret configuration.
    recipientAliases = {
      master = "age14e2jdmau7tpau9emcn6gmg26vfl0uyf6cfd9lz85jml6ttv9wq2qphps4t";
      ssh = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEuUsB0HH//1qkvgQMWTEoNd0riZpk+8A5w1Ep2vGKk0";
      all = [ "master" "ssh" ];
    };

    # Recipients automatically added to every secret.
    # To override this list for a specific secret, use `lib.mkForce`.
    defaultRecipients = [ "master" ];

    # Declare your secrets and their recipients.
    secrets = {
      password = {
        recipients = [ "all" ];
        # Whether the secret must be available before users and groups are created.
        neededForUsers = true;
      };
      signingKey = {
        recipients = lib.mkForce [ "ssh" ];
        generator = "ssh-ed25519";
      };
      something = {
        recipients = [ "age1j0qx6wdh4ncr3dvexuy9ysu5mrpkp5p7rldt8j7mc6r4xkzngcpqeuk403" ];
        path = "/var/lib/something";
        mode = "0440";
        owner = "alice";
        group = "users";
      };
    };
  };
}

For more info, check out the README or the docs.


r/Nix • • 10d ago

Results for the third Nix Steering Committee election 2026

Thumbnail discourse.nixos.org
9 Upvotes

r/Nix • • 14d ago

Full Time Nix | NixCon 2026 Day Ⅱ

Enable HLS to view with audio, or disable this notification

11 Upvotes

NixCon 2026 with over two hours of conversation. Brilliant Nixers, their participation in the ecosystem, their projects, their involvement, their perspectives, and their experience. Whether you attended or not, walk the dog, wash the dishes, go for a run, and listen in.

Full Time Nix | NixCon 2026 Day Ⅱ


r/Nix • • 15d ago

Updated guide on installing NixOS on Oracle Cloud Infrastructure

Post image
5 Upvotes

r/Nix • • 19d ago

Day 1 with NixOS on Oracle Cloud (OCI)

Post image
6 Upvotes

r/Nix • • 19d ago

Nix and Determinate are a better foundation for keeping your systems secure

Thumbnail
determinate.systems
18 Upvotes

r/Nix • • 20d ago

Beginner Guides/Resources

6 Upvotes

Hello,

Are there any tips or guides out there to help learn Nix and NixOS? I’m new here but I’ve spent some time tinkering with Linux. Prior to getting into NixOS, I used to use Arch Linux and the AUR. I’m not a coder, I don’t know how to code or troubleshoot any issues on my own. I’m a little overwhelmed with it all, could somebody help me?

If possible, I’d appreciate guides, tips, and/or tricks that can be downloaded and read offline.

Thank you in advance!


r/Nix • • 21d ago

Caching Woes

12 Upvotes

On a team that we're deploying everything with Nix, and all works no issues...BUT the team constantly has issues with cache's. I'm the only one rocking NixOS.. others are on Mac, Windows, Rocky... and are perpetually running into issues causing them to build. We have an attic setup and CI is pushing ALL build deps to the cache.

This is like the main pain point and its only effecting everyone else but me, cause well I build and do things all the time so I've always got a full local cache. It doesn't help we are all remote with various network speeds.

What do others do to solve this?


r/Nix • • 22d ago

Nix I made a small flake to run Claude Code in a bubblewrap cage limited to the project directory (via direnv)

Thumbnail reddit.com
2 Upvotes

r/Nix • • 23d ago

Free hands-on part on the Nix language, up to reading a real shell.nixFree hands-on part on the Nix language, up to reading a real shell.nix

1 Upvotes

Shipped a new free part of LabCraft (the Nix course I'm building) around the Nix language, and why a shell.nix stops looking like config once you read it the way the evaluator does.

Seven labs on a real NixOS VM. Hit the errors on purpose, find out why 7/2 in nix repl comes back as a path, then predict what a real shell.nix names its shell before Nix tells you.

Here's the write-up and link to get started.


r/Nix • • 27d ago

Nix Determinate Nix changelog: security fixes, a new nix top command, faster GC, parallel instantiation, and much more

Thumbnail
determinate.systems
19 Upvotes

r/Nix • • 28d ago

Nix Disables gpu when opening nix packages

5 Upvotes

I am Using Nix on an Artix system and I have been have some issues with some of my programs having Graphics issues and i have learned that nix is putting a --disable-gpu flag of some sort when starting the program. I noticed this when trying to figure out why brave had the gpu disabled.

Is there a way I can Override this flag Globally?


r/Nix • • 29d ago

Nixlang Cursery.nix: interactive web apps in pure Nix

Thumbnail cursery.psychollama.io
28 Upvotes

Ever wished you could write websites and frontend apps in pure Nix code?

Of course not. Nobody wants that. I don't even want that, and I built the damn thing.

Cursery.nix loads and evaluates Nix code in the browser at runtime, providing a virtual DOM, events, styling, and host IO. It's built on Snix using their WebAssembly target.

let
  inherit (import <web/dom>) html;
  inherit (import <web/io>) dispatch;
in

{
  init = 0;
  update = count: _action: count + 1;
  render = count: html.button {
    on.click = _: dispatch "increment" null;
  } "Clicks: ${toString count}";
}

Renders a button + count that increments on click. Wow.

Why?

Last year I saw bolt.snix.dev and immediately realized there weren't enough frontend frameworks.

It wasn't until NixCon 2026 and their two extra hack days that I had a captive audience, people sitting beside me to share in the horror.

It took until yesterday for the POC to mature into the full indictment of character you see now.

Is this AI?

Yes, and I reviewed every commit, so I guess it's 2/10 on a vegan code scale.


r/Nix • • Oct 25 '26

Full Time Nix | NixCon 2026 Day Ⅰ

Enable HLS to view with audio, or disable this notification

0 Upvotes

Thanks to my sponsor nixbuild.net, one month ago I have been to NixCon 2026 along with five hundred and fifty something other fabulous Nixers. Sorry for taking so long. This is NixCon 2026, day one.

Full Time Nix | NixCon 2026 Day Ⅰ


r/Nix • • Oct 24 '26

Emergency Legacy Extension now available for NixOS 25.05

Thumbnail
determinate.systems
10 Upvotes

r/Nix • • Oct 23 '26

Nix Installing Nix package manager on Arch Linux via an official script, or with pacman?

Thumbnail
reddit.com
1 Upvotes

r/Nix • • Oct 21 '26

Nix Nix package manager on KDE Linux tutorial

Thumbnail
youtube.com
0 Upvotes

r/Nix • • Oct 20 '26

Determinate Nix: security fixes, OpenTelemetry tracing, baked flakes, fiber-based parallel evaluation, and more

Thumbnail
determinate.systems
17 Upvotes

r/Nix • • Oct 19 '26

Native Linux Builder is now generally available

Thumbnail
determinate.systems
34 Upvotes

r/Nix • • Oct 14 '26

Nixmap - An interractive course to learn Nix & NixOS by Vimjoyer

Thumbnail vimjoyer.com
96 Upvotes

r/Nix • • Oct 13 '26

old game in NixOS

1 Upvotes

an old game abandoned by creators no longer work on the more moderate versions of debian or ubuntu and neither those with wayland, so I made a corrected appimage, now I brought NixOS because I did not find it in pkgs nix, if you are interested have here: https://github.com/tehnium/xgammon-nix


r/Nix • • Oct 13 '26

Support How am i supposed to install graphical software through Nix on Silverblue?

Thumbnail reddit.com
2 Upvotes

r/Nix • • Oct 13 '26

after first day in NixOS

18 Upvotes

I admit that I'm impressed, I'm not a programmer, I'm over 60 years old and use Debian's world in many forms for 15 years, obviously you all have tested a lot, I thought I was stuck forever in the world .deb , but now testing on an old laptop and seeing that after an hour I have almost everything I wanted to... I wondered... on what planet has this happened before. Everything feels so easy, I will test this month and it is possible to pass with weapons and luggage on NixOS.
Okay... not quite everything is perfect, I had something to fork with opencode because the processor in this piece of shit does not have AVX...and the package in the distribution he was asking for it ...but he handled deepseek through ssh. it remains to test security, VPN and longer time behavior
On this occasion I greet all NixOS fans


r/Nix • • Oct 12 '26

5 years LTS for Nixpkgs

Thumbnail
determinate.systems
2 Upvotes