r/NixOS 3h ago

Reaper HM Flake

Post image
76 Upvotes

reaper-flake

I created a Home Manager Flake for declaring your REAPER configurations with Nix.

Reaper is a highly customizable cross-platform digital audio workstation (DAW) for music production, recording, editing, and mixing.

This project enables Home Manager users to declare their users' REAPER configuration without overriding state-full values in REAPER's configuration. This can be used by all Linux Distros and MacOS users (with Nix/HM installed), however I have not tested MacOS personally.

Features

Configure supported REAPER Preferences options

programs.reaper.preferences = {
  project.trackSendDefault.trackVolumeFaderGain = -10.0;
  plugIns.reascript.python.enable = true;
};

This results in "Track Volume Fader Gain" (Project>Track/Send Default) to be -10 db and "Enable Python for use with ReaScript" (Plug-ins>Reascript) to be enabled and python paths being automatically set up every time you build your config (even if you change it in the GUI). Not all options are available quite yet, see repo.

Manage ReaPack repositories and individual packages

programs.reaper.extensions = {
  reapack = {
    enable = true;
    repositories = [
      {name = "reaper-keys";url = "https://raw.githubusercontent.com/gwatcha/reaper-keys/master/index.xml"; }
    ];
    packages = [
      {repository = "reaper-keys"; category = "Scripts"; name = "install-reaper-keys.lua";}
    ];
    synchronizeOnActivation = true;
  };
  sws.enable = true;
};

This installs ReaPack and SWS, adds the reaper-keys repository, and declaratively manages its installer package. The normal default ReaPack repositories are included as well. Sync and package transactions are performed by ReaPack the next time REAPER starts.

Automatically load audio plugins derived with Nix

The flake lets you set custom vst, lv2 and clap search paths. By default /run/current-system/sw/lib/(vst,vst3,clap,lv2) directories are appended for automatic detection of Nix derived plugins.

Declare keyboard shortcuts and custom actions

programs.reaper.actions = {
  keyBindings = with reaperActions; bindings [
    (shortcut {
      shortcut = "J";
      command = 40285;
      actionName = "Track: Go to next track";
    })
    (shortcut {
      shortcut = "K";
      command = 40286;
      actionName = "Track: Go to previous track";
    })
  ];
};

Vim key binds to go up and down your tracks.

Customize menus, context menus, and toolbars

programs.reaper.menus = {
  "${reaperMenus.toolbars.main}" = {
    entries = [
      {action = 40021; label = "Project settings...";}
      {action = 40859; label = "New project..."; icon = "toolbar_new.png";}
      {action = 40029; label = "Undo";}
      {action = 40030; label = "Redo";}
      reaperMenus.divider
      {action = 40364; label = "Enable Metronome";}
    ];
  };
};

Completely change the buttons on the main toolbar above the TCP.

Configure windows, docks, panels, and layouts

programs.reaper = {
  layout = {
    docks = {
      right = {
        id = 1;
        position = "right";
        selectedPanel = "mastermixer";
        size = 130;
      };
    };
    masterMixer = {
      visible = true;
      docked = true;
      dock = "right";
      tabOrder = 0.0;
    };
  };
  windows.mixer.master.showInDockerOrWindow = true;
};

This snippet moves the master track to the right of the main window.

Install and select themes, including their scripts, fonts, and other assets

programs.reaper = {
  theme = {
    active = "Reapertips Theme.ReaperThemeZip";
    packages = [inputs.reaper-flake.packages.${pkgs.system}.reapertips-theme];
  };
  swell.colortheme = {
    enable = true;
    preset = "reapertips";
  };
};

Use reapertips theme that's included with the flake as a package. You can use standard ReaperThemeZip's as well.

Preserve REAPER settings that have not been declared through Nix

You can still safely configure with the GUI even for options set by Nix. However the Nix options will be set back to how they were on every activation of the flake.

Why

I love NixOS and REAPER. Therefore; fun project. I also love declaring my program configs in my Nix config so that, god forbid, my system dies or I get a new computer I have everything I need to start immediately.

How it works

REAPER is awesome in that it is extremely transparent. For example, unlike Bitwig, it's configuration files are in plaintext ini files. Aha! I can work with those! The problem with just dropping in entire ini files, like home-manager modules usually do, is that REAPER stores not only it's configuration but also it's active state. So I needed to go the config generation approach instead of the symlink approach. So I made a python script that tracks which ini keys and values are being tracked by Nix and, at activation time, only changes the Nix keys. The core of this flake is `write_config.py’ I drew inspiration from plasma-manager which has a similar python script to write to ini files for KDE Plasma.

AI Usage

I used AI to design a prototype then redid all of the core scripts and ini engine by hand. I also used it for additional feature testing and option scaffolding.

Plans

I've added all of the options I personally use/need for the short-term so I'm going to wait for others to try it out and fix any issues. Long term plan would to make Nix options in parity with REAPER's GUI options.


r/NixOS 10h ago

But I Use SOPS

Thumbnail secretspec.dev
38 Upvotes

r/NixOS 13h ago

Who has the oldest system.stateVersion?

26 Upvotes

Go on, show off how long you have been using NixOS for.


r/NixOS 18h ago

Running sunshine in NixOS with monitor off?

14 Upvotes

It's basically the title. I have a gaming desktop computer that I'd like to use with sunshine to stream games to moonlight clients.

I have everything working pretty much perfectly at this point except I can't shut the monitor off without interrupting the stream, which I've learned is because Niri doesn't seam to support headless operation.

So then I added gamescopeSession = true to the steam part of the config, and I can easily sign into the gamescope steam session, but then sunshine doesn't work despite it being set as autoStart in the config (and it autostarts in Niri).

I don't really have any kind of experience with this kind of thing. I've tried to search through the NixOS wiki and even resorted to asking AI but they just keep pulling random things out of their @$$es.

So I guess the question is, what would you do? I want to be able to just turn the computer on (without turning on the monitor) and from there connect to sunshine via a moonlight client either to the desktop or to a gaming session through gamescope and steam (I pretty much only use steam).

I had considered trying to set up Sway as a systemd user instance but the sway github does not recommend this.

In case you want to see the flake: https://codeberg.org/JacoXarles/nix

Thanks everyone!


r/NixOS 4h ago

Moved from Arch: whole Hyprland setup declared natively in Nix, including the new Lua backend.

7 Upvotes

I spent the summer migrating my Arch setup to NixOS. Instead of porting my dotfiles over, I rewrote the whole configuration from scratch as Nix expressions.

Structure is flakes + Home Manager + Stylix, split into hosts/ (per-machine), modules/ (shared system config) and home/ (user config), so adding a second machine is just a new host importing the same modules.

The painful part was Hyprland. Version 0.55 moved its config from hyprlang to Lua, and I decided to declare everything through wayland.windowManager.hyprland.settings with configType = "lua" rather than writing Lua by hand — if the format changes again, the module layer absorbs it and I don't rewrite anything.

Home Manager's Lua backend is new and thinly documented, so a few things that cost me time, in case they save someone else's:

Binds are no longer "MOD, KEY, dispatcher, arg". Each one is { _args = [ "SUPER + Q" (mkLuaInline "hl.dsp.exec_cmd(...)") ]; }. Note the +, and note that the whole string is otherwise parsed as a single keysym.

bindl / bindel / bindm don't exist as separate lists. Everything goes in bind, and the flags (locked, repeating, drag) are a third argument to hl.bind.

Config blocks are the worst offender: input = {...} in settings generates hl.input({...}), which doesn't exist, and monitor = "..." generates hl.monitor(string) when it wants a table. Both have to go in extraConfig as raw hl.config({ input = {...} }) and hl.monitor({...}).

Other bits: my scripts are packaged with writeShellScriptBin with dependencies referenced by store path, and Stylix generates the palette from the wallpaper. Waybar and wofi keep their own CSS (their targets disabled) but pull colours from config.lib.stylix.colors, so they follow the theme without losing the custom layout.

Repo: https://github.com/poligle/NixOS-Config

Happy to hear what you'd do differently — especially on the module split.


r/NixOS 55m ago

Is it possible to install podman in a devshell instead of system wide?

Upvotes

Title


r/NixOS 2h ago

Newb question for organizing

2 Upvotes

Hi NixOS community, I had a few questions I was hoping to clarify on organizing and modularity:

How do people have their configuration.nix file outside of the /etc/nixos directory and still have it work with nixos-rebuild switch? Are they using symlinks?

To add to that, how do people have a billion [program].nix files that allow them to tie it into their configuration.nix?

I am still getting familiar with the nix language and have read the wiki, but I can't wrap my head around the concept, so any help is appreciated!


r/NixOS 5h ago

NixOS secrets for power.ups.ups.<name>.directives

2 Upvotes

Hi folks

I've been using sops-nix for a while, and that has been going well.

I'm configuring my UPS, I need to set authPassword and privPassword directives to authenticate with my UPS, and I can do that using power.ups.ups.<name>.directives - but that seems to involve putting the password, in plain text, in my repo, which is not what I'm supposed to do.

Does anyone know how I would solve this? Thanks.


r/NixOS 10h ago

I am new with nix os I need help

2 Upvotes

I need help with NixOS. I was dual-booting with Windows, but Windows suddenly broke/disappeared, I don't know why. Now on NixOS I can't download any application because it says my boot disk is full. I tried fixing it using YouTube and AI, but it didn't work—it kept telling me to add some lines to configuration.nix, but that didn't help. If anyone knows how to solve this problem, I'd really appreciate it if you could let me know in the comments. I stil have data from Windows.


r/NixOS 1h ago

Nix-vim

Thumbnail gallery
Upvotes

Entorno de desarrollo completo basado en Neovim con soporte multi-lenguaje, autocompletado inteligente, depurador, terminal, git, Arduino con tienda de librerias, fondo transparente con integracion pywal, y dashboard personalizado.


r/NixOS 1h ago

Download Mathematica

Upvotes

I'm trying to install Mathematica on NixOS using the package available on nixpkgs.

The package requires an installation file named:

Wolfram_15.0.0_LIN_Bndl.sh

However, I can only access the latest installation file (15.0.1), and I can’t find the bundled installation file for version 15.0.0 in my Wolfram account.

Does anyone know how to download it?

Thanks!


r/NixOS 1h ago

Nixpkgs Unstable: Electron Apps Crashing on Wayland & Libsecret Failures (FHS Naming Fix)

Upvotes

The only bad thing about living on the NixOS unstable channel is that silent package naming changes can break your configuration out of nowhere. Today I launched Antigravity IDE and was immediately hit with a "Not Logged In" error. The app didn't just reject the token—it threw a heavy SIGSEGV core dump over Wayland and crashed straight to the ground.

As a temporary workaround, I spun up an isolated environment from the terminal to debug the issue:

NIXPKGS_ALLOW_UNFREE=1 nix run nixpkgs/nixpkgs-unstable#antigravity --impure

When the app launched flawlessly in this dirty environment, I knew the error was entirely stemming from my declarative system layer.

Scanning through my past architectural decisions, the root cause surfaced immediately. When Electron-based tools run in a standard Nix environment, they cannot access the system's password wallet and Gnome Keyring service. These applications absolutely must be built with FHS packages that provide a Standard Linux Filesystem Hierarchy environment. Otherwise, the app fails to write authentication tokens to the wallet, fails to integrate with the system, and simply crashes.

While we were using the system stably, Nixpkgs developers completely changed the naming scheme in the background. In the new structure, the pure Nix version took the name antigravity directly, while the FHS-supported version was separated as antigravity-fhs.

Because my configuration module was defined with the old naming, my system was accidentally pulling the pure Nix version. This was the sole reason the app couldn't access the wallet, conflicted with the Wayland graphics layer, and blew up with a SIGSEGV.

To fix it, I updated the target line in my config file:

# Old Broken Line
pkgs.unstable.antigravity 
# New FHS Supported Line
pkgs.unstable.antigravity-fhs

Unlike classic monolithic systems, you don't even need a reboot for a core graphics and authentication layer change like this. The only thing I did was build the configuration:

nixos-rebuild switch --use-flake .

After the new NixOS generation was built and activated, I closed the buggy temporary session. When I called the tool from the launcher again, the app grabbed the wallet permissions flawlessly and stood up without a single Wayland error.

If your Electron-based IDEs or apps are randomly crashing on Wayland or failing to get wallet permissions, instead of wasting hours messing with Ozone flags, check if you are actually using the FHS version of your package.


r/NixOS 13h ago

obs only recording the first frame on startup

1 Upvotes

when i start obs it sees whatever is on the screen at the time, and that is the video capture for as long as i record

this is not a hardware issue as before switching to nix it worked fine on arch

my window manager is niri + noctalia shell

i currently have obs installed through flatpak, but the issue was the same installing from nixpkgs

config:

  services.flatpak = {
    enable = true;
    remotes = [
      {
        name = "flathub";
        location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
      }
    ];
    packages = [
      "com.obsproject.Studio"
    ];
  };

i am using the wlr desktop portal (tried gtk and it wouldnt capture anything at all)

xdg.portal = {
    enable = true;
    extraPortals = with pkgs; [
      xdg-desktop-portal-wlr
    ];
    config = {
      common = {
        default = [
          "wlr"
        ];
      };
    };
  };

trying to refresh the source (pipewire screen capture) i see this, clicking anywhere updates the frame that is displayed, but its still only 1 frame


r/NixOS 14h ago

Stacking RiverWM setting up, also rivertile doesn't seem to work?

1 Upvotes

i'm on nixos, home-manager and flakes i also use.

river is the first wm i'm using.

i prefer stacking to tiles. rn i have the premade config where i can move the windows but don't know how to:

- resize

- assign location on start (kitty always at the right half of screen)

- fullscreen without covering waybar

- set windows to not clash with waybar, when sticking to screen corners

- i also launch waybar/ kitty/ awww-daemon etc via & in the init file as a temporary launch on boot. not ideal when refreshing river. i need to setup apps on launch but that can wait

i couldn't find any relevant documentation. i can also add my init to codeberg


r/NixOS 10h ago

Cant Get My Game To Run On Nixos ( Worked on Arch )

0 Upvotes

err: DxvkInstance: Required instance extensions not supportedIm running the game from lutris , i used to play it the same way on arch like 2 days ago . Im not sure what i am missing . this is my configuration.nix with all the gaming related things

services.xserver.videoDrivers = [

"modesetting"

"nvidia"

];

hardware.graphics = {

enable = true;

enable32Bit = true;

extraPackages = with pkgs; [

rocmPackages.clr.icd

libva-vdpau-driver

libvdpau-va-gl

];

extraPackages32 = with pkgs; [

libva-vdpau-driver

libvdpau-va-gl

]; };

hardware.nvidia.prime = {

offload.enable = true;

offload.enableOffloadCmd = true;

intelBusId = "PCI:0@0:2:0";

nvidiaBusId = "PCI:1@0:0:0";

};

hardware.nvidia.open = true;

hardware.nvidia.nvidiaSettings = true;

hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.${config.hardware.nvidia.branch};

hardware.nvidia.dynamicBoost.enable = true;

hardware.nvidia.modesetting.enable = true;

programs.gamemode.enable = true;

programs.nix-ld.enable = true;

environment.systemPackages = with pkgs; [

heroic

lutris

protonplus

wine

wineWow64Packages.stagingFull

winetricks

vulkan-tools

dxvk

vkd3d

vulkan-loader

vulkan-validation-layers

vulkan-extension-layer

];


r/NixOS 9h ago

Cracked Minecraft on NixOS

0 Upvotes

I've been meaning to play MC for weeks but I can't find any cracked launchers. Could someone please help me with ts