Ben Ford b51d8f632b Add custom theme support with wallpaper-based color extraction (#6)
* Add custom theme support with wallpaper-based color extraction

- Extended theme option to accept "custom" value
- Added customTheme configuration with wallpaperPath and variant options
- Integrated nix-colors colorSchemeFromPicture for dynamic color generation
- Updated wallpaper selection to handle custom paths
- Added VSCode theme fallback for custom color schemes
- Fixed nix-colors contrib function call (requires pkgs argument)
- Maintains full backward compatibility with existing themes

Users can now generate themes from their own wallpapers:
  omarchy = {
    theme = "custom";
    customTheme = {
      wallpaperPath = ./wallpapers/my-image.png;
      variant = "dark"; # or "light"
    };
  };

* Fix: Screen sharing broken due to Qt library version mismatch

  File changed: modules/nixos/hyprland.nix

  Problem:
  The omarchy-nix configuration was using xdg-desktop-portal-hyprland from the hyprland flake input, which had a Qt library version mismatch (6.9.1 vs 6.9.0). This caused the
   hyprland-share-picker to crash with "Cannot mix incompatible Qt library" errors, preventing screen sharing from working.

  Solution:
  Changed the portalPackage from the hyprland flake version to the stable nixpkgs version:

  - portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
  + portalPackage = pkgs.xdg-desktop-portal-hyprland; # Use stable nixpkgs version to fix Qt version mismatch

  Why this works:
  - The stable nixpkgs version of xdg-desktop-portal-hyprland has consistent Qt library versions
  - This matches the working configuration used on other NixOS Hyprland setups
  - Maintains all screen sharing functionality while avoiding the Qt version conflict
2025-07-28 08:57:58 -05:00
2025-07-08 20:48:24 -05:00

Omarchy Nix

Omarchy-nix (Omanix?) is an opinionated NixOS flake to help you get started as fast as possible with NixOS and Hyprland. It is primarily a reimplementation of DHH's Omarchy project - an opinionated Arch/Hyprland setup for modern web development.

This was mostly spun up in a weekend so if you have any issues please let me know, my goal is to eventually make this as seamless an install experience as Omarchy itself!

Quick Start

To get started you'll first need to set up a fresh NixOS install. Just download and create a bootable USB and you should be good to go.

Once ready, add this flake to your system configuration, you'll also need home-manager as well: (You can find my personal nix setup here too if you need a reference.)

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
    omarchy-nix = {
        url = "github:henrysipp/omarchy-nix";
        inputs.nixpkgs.follows = "nixpkgs";
        inputs.home-manager.follows = "home-manager";
    };
    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { nixpkgs, omarchy-nix, home-manager, ... }: {
    nixosConfigurations.your-hostname = nixpkgs.lib.nixosSystem {
      modules = [
        omarchy-nix.nixosModules.default
        home-manager.nixosModules.home-manager #Add this import
        {
          # Configure omarchy
          omarchy = {
            full_name = "Your Name";
            email_address = "your.email@example.com";
            theme = "tokyo-night";
          };
          
          home-manager = {
            users.your-username = {
              imports = [ omarchy-nix.homeManagerModules.default ]; # And this one
            };
          };
        }
      ];
    };
  };
}

Configuration Options

I've specified some basic configuration options to help you get started with initial setup, as well as some simple overrides for common configuration settings I found I was modifying often. These are likely subject to change with future versions as I iron things out.

Refer to the root configuration file for more information on what options are available.

Themes

Omarchy-nix includes several predefined themes:

  • tokyo-night (default)
  • kanagawa
  • everforest
  • catppuccin
  • nord
  • gruvbox
  • gruvbox-light

You can also generate a custom theme from any wallpaper image:

{
  omarchy = {
    theme = "custom";
    customTheme = {
      wallpaperPath = ./path/to/your/wallpaper.png;
      variant = "dark"; # or "light" for light themes
    };
  };
}

This will automatically extract colors from your wallpaper and generate a matching color scheme for all Omarchy applications (terminal, editor, launcher, etc.).

License

This project is released under the MIT License, same as the original Omarchy.

S
Description
An opinionated NixOS config based on DHH's Omarchy
Readme 33 MiB
Languages
Nix 95.4%
Shell 3.4%
CSS 1.2%