feat: Nomarchy ground-up rewrite on NixOS 26.05

Full replacement of the previous iteration, rebuilt around three ideas:

- Pure evaluation: theme-state.json lives inside the flake and is read
  via the nomarchy.stateFile option — no --impure, ever.
- All-Home-Manager theming: `nomarchy-theme-sync apply` writes the JSON
  and runs `home-manager switch`; every theme change is one atomic,
  rollbackable generation. Wallpaper (swww) is the sole runtime piece.
- Flat, downstream-first layout: modules/{nixos,home} with one
  options.nix each, exported as nixosModules/homeModules + overlay +
  flake template; system (nixos-rebuild) and desktop (home-manager
  switch) rebuild paths are fully split.

Ships 21 themes imported from the previous iteration (palettes,
wallpapers, btop themes, six whole-swap Waybar identities), Stylix for
the GTK/Qt/cursor long tail, a live ISO target with offline theme
switching, and docs/TESTING.md with the QEMU verification workflow.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Bernardo Magri
2026-06-10 10:59:13 +01:00
commit f211ef0d09
131 changed files with 4844 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
# My Nomarchy machine
1. `nixos-generate-config --show-hardware-config > hardware-configuration.nix`
2. Edit `flake.nix` (Nomarchy repo URL, username), `system.nix` (hostname,
user), `home.nix` (your packages).
3. `git init && git add -A` — flakes only see tracked files, including
`theme-state.json`.
4. System: `sudo nixos-rebuild switch --flake .#default`
5. Desktop: `nix run home-manager -- switch --flake .#me`
(afterwards just `home-manager switch --flake .#me` — it's installed)
6. Clone/symlink this directory to `~/.nomarchy` (or export
`NOMARCHY_PATH`) so `nomarchy-theme-sync` knows where the state lives.
Day-to-day:
```sh
nomarchy-theme-sync list # 21 shipped presets
nomarchy-theme-sync apply gruvbox # writes state + home-manager switch
nomarchy-theme-sync bg next # cycle wallpapers (instant, no rebuild)
```
The system layer only needs `nixos-rebuild` when you change `system.nix`.

View File

@@ -0,0 +1,53 @@
{
description = "My Nomarchy machine";
inputs = {
# Pin Nomarchy; nixpkgs and home-manager follow whatever it ships.
nomarchy.url = "github:YOUR-USER/nomarchy"; # <- point at the distro repo
nixpkgs.follows = "nomarchy/nixpkgs";
home-manager.follows = "nomarchy/home-manager";
};
outputs = { self, nomarchy, nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
username = "me"; # <- your login name
pkgs = import nixpkgs {
inherit system;
overlays = [ nomarchy.overlays.default ];
};
in
{
# System layer — rebuilt rarely:
# sudo nixos-rebuild switch --flake .#default
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
nomarchy.nixosModules.nomarchy # the distro
./hardware-configuration.nix # from `nixos-generate-config`
./system.nix # your machine
];
};
# Desktop layer — rebuilt on every theme change, no sudo:
# home-manager switch --flake .#me
# (`nomarchy-theme-sync apply <theme>` runs this for you.)
homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
nomarchy.homeModules.nomarchy
./home.nix
{
# Your theme state — written by nomarchy-theme-sync, baked
# in on every switch. Keep it git-tracked.
nomarchy.stateFile = ./theme-state.json;
home = {
inherit username;
homeDirectory = "/home/${username}";
};
}
];
};
};
}

View File

@@ -0,0 +1,16 @@
# Your user environment. The Nomarchy desktop (Hyprland, Waybar,
# Ghostty, theming engine, Stylix) comes from homeModules.nomarchy;
# tune it via the nomarchy.* options, add your own packages and
# programs below.
{ pkgs, ... }:
{
# Examples:
# nomarchy.terminal = "kitty"; # swap the default terminal
# nomarchy.waybar.enable = false; # bring your own bar
# nomarchy.stylix.enable = false; # opt out of GTK/Qt theming
home.packages = with pkgs; [
# firefox
];
}

View File

@@ -0,0 +1,25 @@
# Your machine: bootloader, hostname, users, services.
# The distro itself comes from nomarchy.nixosModules.nomarchy — override
# any of its defaults here with plain NixOS options (they use mkDefault),
# or via the nomarchy.system.* toggles.
{ pkgs, ... }:
{
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "my-nomarchy";
time.timeZone = "UTC";
i18n.defaultLocale = "en_US.UTF-8";
users.users.me = { # <- keep in sync with `username` in flake.nix
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "video" "input" ];
};
# Examples:
# nomarchy.system.greeter.enable = false; # bring your own login manager
# environment.systemPackages = [ pkgs.htop ];
system.stateVersion = "26.05";
}

View File

@@ -0,0 +1,55 @@
{
"version": 1,
"name": "Tokyo Night",
"slug": "tokyo-night",
"mode": "dark",
"wallpaper": "",
"colors": {
"base": "#1a1b26",
"mantle": "#161720",
"surface": "#32344a",
"overlay": "#444b6a",
"text": "#a9b1d6",
"subtext": "#787c99",
"muted": "#444b6a",
"accent": "#7aa2f7",
"accentAlt": "#ad8ee6",
"good": "#9ece6a",
"warn": "#e0af68",
"bad": "#f7768e"
},
"ansi": [
"#32344a",
"#f7768e",
"#9ece6a",
"#e0af68",
"#7aa2f7",
"#ad8ee6",
"#449dab",
"#787c99",
"#444b6a",
"#ff7a93",
"#b9f27c",
"#ff9e64",
"#7da6ff",
"#bb9af7",
"#0db9d7",
"#acb0d0"
],
"fonts": {
"mono": "JetBrainsMono Nerd Font",
"ui": "Inter",
"size": 11
},
"ui": {
"gapsIn": 5,
"gapsOut": 12,
"borderSize": 2,
"rounding": 10,
"activeOpacity": 1.0,
"inactiveOpacity": 0.95,
"terminalOpacity": 0.96,
"blur": true,
"shadow": true
}
}