feat(upstream): switch to remote git repository for engine
- Update installer to use git+https://git.bemagri.xyz/bernardo/Nomarchy.git - Remove redundant bundling/copying of the engine to /etc/nixos/nomarchy - Expose all themes via xdg.dataFile for script accessibility - Update theme scripts to resolve directories via local share instead of hardcoded system paths - Update documentation to reflect the new remote-first architecture
This commit is contained in:
@@ -25,7 +25,7 @@ The installer is designed to bootstrap a fresh system with this modular structur
|
||||
1. **Repo Detection:** Identifies the location of the Nomarchy source.
|
||||
2. **Scaffolding:** Creates a new downstream `flake.nix` that imports Nomarchy core modules.
|
||||
3. **User Files:** Generates skeleton `system.nix` and `home.nix` files for the user to customize.
|
||||
4. **Bundling:** Copies the entire Nomarchy source to `/etc/nixos/nomarchy` so the system can be rebuilt offline.
|
||||
4. **Flake Updates:** Uses the public Git repository as the upstream source, allowing users to update their system via `nix flake update`.
|
||||
|
||||
### 3. Home Manager Integration
|
||||
* **Hybrid Declarative State:** While the distro is declarative, it uses state files in `~/.config/home-manager/` (managed by the distro's scripts) to allow for instant UI feedback (theming, fonts, wallpapers) without needing a full system rebuild for every small tweak.
|
||||
|
||||
@@ -48,7 +48,7 @@ The wizard will guide you through:
|
||||
Nomarchy uses a "Downstream" model. After installation, your configuration lives in `/etc/nixos/` and is split into three main parts:
|
||||
|
||||
### 1. Distro Core (Upstream)
|
||||
Located in `/etc/nixos/nomarchy/`. This is the engine. You should generally not modify files here.
|
||||
Managed via the public Git repository. This is the engine. You should generally not modify files here.
|
||||
|
||||
### 2. Your System (`system.nix`)
|
||||
Add system-wide packages, services, and hardware tweaks here.
|
||||
|
||||
@@ -10,12 +10,11 @@ mkdir -p "$STATE_DIR"
|
||||
|
||||
THEME_NAME=$(jq -r '.theme // "nord"' "$STATE_FILE")
|
||||
|
||||
if [ -d "/etc/nixos/nomarchy/themes" ]; then
|
||||
THEMES_DIR="/etc/nixos/nomarchy/themes"
|
||||
elif [ -d "/etc/nomarchy/themes" ]; then
|
||||
THEMES_DIR="/etc/nomarchy/themes"
|
||||
# Resolve themes directory (Built-in from Nix store via Home Manager, or user extra)
|
||||
if [ -d "$HOME/.config/nomarchy/themes/$THEME_NAME" ]; then
|
||||
THEMES_DIR="$HOME/.config/nomarchy/themes"
|
||||
else
|
||||
THEMES_DIR="/etc/nixos/themes"
|
||||
THEMES_DIR="$HOME/.local/share/nomarchy/themes"
|
||||
fi
|
||||
|
||||
BG_DIR="$THEMES_DIR/$THEME_NAME/backgrounds"
|
||||
|
||||
@@ -13,13 +13,11 @@ fi
|
||||
STATE_DIR="$HOME/.config/home-manager"
|
||||
STATE_FILE="$STATE_DIR/state.json"
|
||||
|
||||
# Logic for finding themes
|
||||
if [ -d "/etc/nixos/nomarchy/themes" ]; then
|
||||
THEMES_DIR="/etc/nixos/nomarchy/themes"
|
||||
elif [ -d "/etc/nomarchy/themes" ]; then
|
||||
THEMES_DIR="/etc/nomarchy/themes"
|
||||
# Resolve themes directory (Built-in from Nix store via Home Manager, or user extra)
|
||||
if [ -d "$HOME/.config/nomarchy/themes/$THEME_NAME" ]; then
|
||||
THEMES_DIR="$HOME/.config/nomarchy/themes"
|
||||
else
|
||||
THEMES_DIR="/etc/nixos/themes"
|
||||
THEMES_DIR="$HOME/.local/share/nomarchy/themes"
|
||||
fi
|
||||
|
||||
mkdir -p "$STATE_DIR"
|
||||
|
||||
@@ -269,7 +269,7 @@ cat <<EOF > /mnt/etc/nixos/flake.nix
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
nomarchy.url = "path:./nomarchy"; # Offline bundled nomarchy
|
||||
nomarchy.url = "git+https://git.bemagri.xyz/bernardo/Nomarchy.git";
|
||||
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
home-manager = {
|
||||
@@ -318,11 +318,6 @@ cat <<EOF > /mnt/etc/nixos/flake.nix
|
||||
}
|
||||
EOF
|
||||
|
||||
# 7. Copy Bundled Flake
|
||||
echo "Copying bundled upstream Nomarchy flake from $NOMARCHY_REPO..."
|
||||
cp -rL "$NOMARCHY_REPO" /mnt/etc/nixos/nomarchy
|
||||
chmod -R u+w /mnt/etc/nixos/nomarchy
|
||||
|
||||
# 8. Version Control
|
||||
cd /mnt/etc/nixos/
|
||||
git init
|
||||
|
||||
@@ -7,4 +7,7 @@
|
||||
};
|
||||
|
||||
xdg.configFile."nomarchy/current/theme.name".text = config.nomarchy.theme;
|
||||
|
||||
# Expose all themes to the system via local share for script accessibility
|
||||
xdg.dataFile."nomarchy/themes".source = ../../themes;
|
||||
}
|
||||
|
||||
@@ -32,19 +32,17 @@ let
|
||||
nomarchy-wallpaper-selector = pkgs.writeShellScriptBin "nomarchy-wallpaper-selector" ''
|
||||
STATE_DIR="$HOME/.config/home-manager"
|
||||
STATE_FILE="$STATE_DIR/state.json"
|
||||
if [ -d "/etc/nixos/nomarchy/themes" ]; then
|
||||
THEMES_DIR="/etc/nixos/nomarchy/themes"
|
||||
elif [ -d "/etc/nomarchy/themes" ]; then
|
||||
THEMES_DIR="/etc/nomarchy/themes"
|
||||
else
|
||||
THEMES_DIR="/etc/nixos/themes"
|
||||
fi
|
||||
THEMES_DIR="$HOME/.local/share/nomarchy/themes"
|
||||
|
||||
mkdir -p "$STATE_DIR"
|
||||
[[ ! -f $STATE_FILE ]] && echo "{}" > "$STATE_FILE"
|
||||
|
||||
# List all images in all themes backgrounds
|
||||
WALLPAPERS=$(find "$THEMES_DIR" -type f \( -name "*.jpg" -o -name "*.png" \))
|
||||
# Include user themes if they exist
|
||||
if [ -d "$HOME/.config/nomarchy/themes" ]; then
|
||||
WALLPAPERS="$WALLPAPERS\n$(find "$HOME/.config/nomarchy/themes" -type f \( -name "*.jpg" -o -name "*.png" \))"
|
||||
fi
|
||||
SELECTED_WP=$(echo -e "$WALLPAPERS" | walker --dmenu)
|
||||
|
||||
if [ -n "$SELECTED_WP" ]; then
|
||||
|
||||
Reference in New Issue
Block a user