- Migrate VM and graphical ISO to home-manager.nixosModules.home-manager; drop the standalone-HM sudo-based activation script (ran HM against /root because HOME wasn't reset) in flake.nix, core/system/vm-guest.nix, hosts/live-iso.nix. - Run swaybg as nomarchy-wallpaper.service instead of a silent Hyprland exec-once so failures surface in systemctl. - Skip the battery monitor unit on hosts without /sys/class/power_supply/BAT* (VMs, desktops). - Don't wrap walker --dmenu in uwsm-app; redirect setsid background std-fds in nomarchy-launch-walker so $(menu ...) in nomarchy-menu doesn't hang. - Restart waybar/walker via systemctl --user rather than pkill + uwsm-app to stop the post-theme-switch color race. - Wire nomarchy-restart-walker/-waybar into nomarchy-theme-set so themes that only change the imported CSS reload correctly. - Waybar: pin #custom-nomarchy to the Nomarchy font and use the U+F000 codepoint so the logo shows across all themes. - Auto-install the correct icon-theme package per palette via a new nomarchyLib.iconThemePackage helper in lib/default.nix; Everforest now actually renders for summer-night. - Pre-cache every theme's HM generation: new packages.allThemeVariants flake output and nomarchy-themes-prebuild script so theme switches are cache-only (no Stylix rebuild, no downloads). - Add nomarchy-test-live-iso to boot the graphical ISO in QEMU the same way nomarchy-test-vm does, with virtio-gpu support added to live-iso.nix. - Installer-generated home.nix/system.nix now ship a curated, commented app menu (btop/fastfetch/chromium on by default) plus optional system services (Docker, libvirtd, Tailscale, Syncthing, Flatpak, Steam). - nomarchy-test-vm now wipes the stale nomarchy.qcow2 before launch. - Remove obsolete GEMINI.md and PLAN.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
198 lines
6.2 KiB
Nix
198 lines
6.2 KiB
Nix
{
|
|
description = "Nomarchy - A NixOS-based distribution with Omarchy flavour";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
|
|
|
disko = {
|
|
url = "github:nix-community/disko";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
impermanence = {
|
|
url = "github:nix-community/impermanence";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-25.11";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
nix-colors = {
|
|
url = "github:misterio77/nix-colors";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
stylix = {
|
|
url = "github:danth/stylix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
walker = {
|
|
url = "github:abenz1267/walker";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, nixos-hardware, disko, impermanence, home-manager, nix-colors, stylix, walker, ... } @ inputs: let
|
|
system = "x86_64-linux";
|
|
lib = nixpkgs.lib;
|
|
|
|
# Overlays
|
|
overlays = [
|
|
(final: prev: {
|
|
makima-bin = prev.makima;
|
|
nomarchy-system-scripts = final.callPackage ./core/system/scripts-derivation.nix { };
|
|
})
|
|
];
|
|
|
|
pkgs = import nixpkgs {
|
|
inherit system overlays;
|
|
config.allowUnfree = true;
|
|
};
|
|
|
|
# Helper to create standalone home configurations
|
|
mkHome = { username, modules ? [] }: home-manager.lib.homeManagerConfiguration {
|
|
inherit pkgs;
|
|
extraSpecialArgs = { inherit inputs; };
|
|
modules = [
|
|
./features
|
|
{
|
|
home.username = username;
|
|
home.homeDirectory = "/home/${username}";
|
|
home.stateVersion = "25.11";
|
|
}
|
|
] ++ modules;
|
|
};
|
|
|
|
homeConfigs = {
|
|
"nixos" = mkHome { username = "nixos"; };
|
|
"nomarchy" = mkHome { username = "nomarchy"; };
|
|
};
|
|
|
|
# Realise the full HM generation for every palette so theme switches hit
|
|
# the Nix cache instead of rebuilding Stylix outputs per swap. Each entry
|
|
# pins `nomarchy.theme` (and clears the wallpaper override so the theme's
|
|
# own default background is used) and exposes the generation's activation
|
|
# package under its theme name.
|
|
palettes = import ./themes/palettes;
|
|
themeNames = builtins.attrNames palettes;
|
|
themeVariantFor = themeName: (mkHome {
|
|
username = "nomarchy";
|
|
modules = [{
|
|
nomarchy.theme = lib.mkForce themeName;
|
|
nomarchy.wallpaper = lib.mkForce "";
|
|
}];
|
|
}).activationPackage;
|
|
allThemeVariants = pkgs.linkFarm "nomarchy-all-theme-variants"
|
|
(map (name: { inherit name; path = themeVariantFor name; }) themeNames);
|
|
in {
|
|
# Expose inputs for downstream use
|
|
inherit inputs;
|
|
|
|
nixosModules = {
|
|
system = import ./core;
|
|
home = import ./features;
|
|
};
|
|
|
|
nixosConfigurations = {
|
|
# Minimal TTY installer ISO (new golden path)
|
|
installerIso = nixpkgs.lib.nixosSystem {
|
|
specialArgs = { inherit inputs; };
|
|
modules = [
|
|
{
|
|
nixpkgs.hostPlatform = "x86_64-linux";
|
|
nixpkgs.overlays = overlays;
|
|
}
|
|
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
|
|
./hosts/installer-iso.nix
|
|
{
|
|
system.stateVersion = "25.11";
|
|
networking.hostName = "nomarchy-installer";
|
|
}
|
|
];
|
|
};
|
|
|
|
# Graphical installer ISO (legacy, for users who prefer GUI)
|
|
installerIsoGraphical = nixpkgs.lib.nixosSystem {
|
|
specialArgs = { inherit inputs; };
|
|
modules = [
|
|
{
|
|
nixpkgs.hostPlatform = "x86_64-linux";
|
|
nixpkgs.overlays = overlays;
|
|
}
|
|
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-base.nix"
|
|
home-manager.nixosModules.home-manager
|
|
./hosts/live-iso.nix
|
|
./core
|
|
{
|
|
system.stateVersion = "25.11";
|
|
services.displayManager.autoLogin.enable = true;
|
|
services.displayManager.autoLogin.user = "nixos";
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.backupFileExtension = "hm-bak";
|
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
|
home-manager.users.nixos = {
|
|
imports = [ ./features ];
|
|
home.stateVersion = "25.11";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
|
|
# Default configuration (VM and testing)
|
|
default = nixpkgs.lib.nixosSystem {
|
|
specialArgs = { inherit inputs; };
|
|
modules = [
|
|
{
|
|
nixpkgs.hostPlatform = "x86_64-linux";
|
|
nixpkgs.overlays = overlays;
|
|
}
|
|
home-manager.nixosModules.home-manager
|
|
./core/default.nix
|
|
./core/system/vm-guest.nix
|
|
{
|
|
system.stateVersion = "25.11";
|
|
networking.hostName = "nomarchy";
|
|
|
|
virtualisation.vmVariant.virtualisation.memorySize = 4096;
|
|
virtualisation.vmVariant.virtualisation.cores = 2;
|
|
|
|
# Setup default user for testing
|
|
users.users.nomarchy = {
|
|
isNormalUser = true;
|
|
extraGroups = [ "wheel" "video" "render" "networkmanager" ];
|
|
initialPassword = "nixos";
|
|
};
|
|
|
|
services.displayManager.autoLogin.enable = true;
|
|
services.displayManager.autoLogin.user = "nomarchy";
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.backupFileExtension = "hm-bak";
|
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
|
home-manager.users.nomarchy = {
|
|
imports = [ ./features ];
|
|
home.stateVersion = "25.11";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
|
|
homeConfigurations = homeConfigs;
|
|
|
|
packages.${system} = {
|
|
# Pre-cache every theme's Home Manager generation so subsequent
|
|
# `nomarchy-theme-set` swaps are cache hits (no Stylix rebuild, no
|
|
# downloads). Run once after install:
|
|
# nix build /etc/nomarchy#allThemeVariants --no-link
|
|
inherit allThemeVariants;
|
|
default = allThemeVariants;
|
|
};
|
|
};
|
|
}
|