refactor: consolidate app configurations and utility scripts
- Move 32+ app-specific scripts from features/apps/scripts/ to features/scripts/utils/ for centralized packaging. - Create individual Nix modules for orphaned app configurations (btop, kitty, tmux, etc.) in features/apps/ using xdg.configFile. - Fix broken paths in core/system/makima.nix and features/apps/vscode.nix. - Update VSCode configuration to use the modern 'profiles.default.userSettings' API, resolving deprecation warnings. - Merge duplicate 'nomarchy-launch-walker' scripts into a single robust utility. - Remove stale root 'config/' directory. - Update README.md and docs/creating-themes.md to reflect the new architecture and keybindings. - Ensure all modules are correctly imported and verified via nix flake check.
This commit is contained in:
22
README.md
22
README.md
@@ -15,11 +15,14 @@
|
||||
|
||||
## 📂 Component-Based Architecture
|
||||
|
||||
Nomarchy uses a **Feature-Centric Directory Structure**. Instead of grouping files by type (e.g., all scripts in one folder, all configs in another), everything related to a specific component is colocated.
|
||||
Nomarchy uses a **Feature-Centric Directory Structure**. Configuration, modules, and utilities are strictly organized to maintain sanity as the system grows.
|
||||
|
||||
- **`core/`**: Foundational OS & User defaults (Bootloader, Audio, Bluetooth, basic shell).
|
||||
- **`features/`**: Isolated modules containing Nix logic, raw dotfiles, and scripts for a specific app or service (e.g., `features/desktop/waybar/`).
|
||||
- **`themes/`**: The global theming engine. It holds pure color data and logic. *Theme-specific app layouts* (like a custom Waybar layout for `summer-night`) are stored directly inside the app's feature folder (`features/desktop/waybar/themes/`), solving the matrix problem of theming.
|
||||
- **`core/`**: Foundational OS & User defaults (Bootloader, Audio, Bluetooth, core system features).
|
||||
- **`features/`**: Isolated modules containing Nix logic and raw dotfiles.
|
||||
- **`features/apps/`**: App-specific configs (e.g., `features/apps/btop/`, `features/apps/kitty/`), each containing their own `default.nix` and standalone `config/` directory mapped via Home Manager.
|
||||
- **`features/desktop/`**: Desktop environment components (e.g., Hyprland, Waybar).
|
||||
- **`features/scripts/utils/`**: Consolidated repository for all custom Nomarchy bash scripts, centrally packaged and injected into the user's `PATH` with correct dependencies.
|
||||
- **`themes/`**: The global theming engine. It holds pure color data and logic. *Theme-specific app layouts* (like a custom Waybar layout) are stored directly inside the app's feature folder, solving the matrix problem of theming.
|
||||
|
||||
---
|
||||
|
||||
@@ -89,18 +92,19 @@ env-update # Reloads your Home Manager environment (Runs: home-manager switch -
|
||||
|
||||
| Keybinding | Action |
|
||||
| :--- | :--- |
|
||||
| `Super + Alt + Space` | **Theme Selector** (Walker) |
|
||||
| `Super + Ctrl + Space` | **Font Selector** |
|
||||
| `Super + Shift + Space`| **Wallpaper Selector** |
|
||||
| `Super + Space` | **App Launcher** (Walker) |
|
||||
| `Super + Shift + Space` | **Nomarchy Menu** (Walker) |
|
||||
| `Super + Ctrl + Space` | **Background Selector** (Walker) |
|
||||
| `Super + Shift + Ctrl + Space` | **Theme Selector** (Walker) |
|
||||
| `Super + Alt + Space` | **Toggle Top Bar** (Waybar) |
|
||||
| `Super + Return` | Open Terminal |
|
||||
| `Super + Q` | Close Window |
|
||||
|
||||
### Utility Scripts
|
||||
Nomarchy includes 150+ productivity scripts available in your PATH:
|
||||
Nomarchy includes dozens of productivity scripts available in your PATH. Some highlights:
|
||||
- `nomarchy-sync push <repo>`: Backup your setup to Git.
|
||||
- `nomarchy-theme-bg-next`: Cycle to the next wallpaper in the current theme.
|
||||
- `nomarchy-doctor`: (Coming Soon) Diagnose system health and state.
|
||||
- `nomarchy-menu`: The central hub for all utilities and pickers.
|
||||
|
||||
---
|
||||
*Built with ❤️ using NixOS, Hyprland, Stylix, and the spirit of Omarchy.*
|
||||
|
||||
@@ -1,22 +1,5 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./system/options.nix
|
||||
./system/state.nix
|
||||
./system/systemd.nix
|
||||
./system/virtualization.nix
|
||||
./system/fonts.nix
|
||||
../themes/engine/plymouth.nix
|
||||
../themes/engine/sddm.nix
|
||||
./system/hardware.nix
|
||||
./system/audio.nix
|
||||
./system/bluetooth.nix
|
||||
./system/network.nix
|
||||
../features/apps/browser.nix
|
||||
./system/impermanence.nix
|
||||
../features/apps/makima.nix
|
||||
];
|
||||
|
||||
time.timeZone = lib.mkDefault config.nomarchy.system.timezone;
|
||||
imports = [ ./system ];
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
# Menus
|
||||
bindd = SUPER, SPACE, Launch apps, exec, nomarchy-menu
|
||||
bindd = SUPER, SPACE, Launch apps, exec, nomarchy-launch-walker
|
||||
bindd = SUPER CTRL, E, Emoji picker, exec, nomarchy-menu symbols
|
||||
bindd = SUPER CTRL, C, Capture menu, exec, nomarchy-menu capture
|
||||
bindd = SUPER CTRL, O, Toggle menu, exec, nomarchy-menu toggle
|
||||
bindd = SUPER ALT, SPACE, Nomarchy menu, exec, nomarchy-menu
|
||||
bindd = SUPER ALT, SPACE, Toggle top bar, exec, nomarchy-toggle-waybar
|
||||
bindd = SUPER, ESCAPE, System menu, exec, nomarchy-menu system
|
||||
bindld = , XF86PowerOff, Power menu, exec, nomarchy-menu system
|
||||
bindd = SUPER, K, Show key bindings, exec, nomarchy-menu-keybindings
|
||||
bindd = , XF86Calculator, Calculator, exec, gnome-calculator
|
||||
|
||||
# Aesthetics
|
||||
bindd = SUPER SHIFT, SPACE, Toggle top bar, exec, nomarchy-toggle-waybar
|
||||
bindd = SUPER SHIFT, SPACE, Nomarchy menu, exec, nomarchy-menu
|
||||
bindd = SUPER CTRL, SPACE, Theme background menu, exec, nomarchy-menu background
|
||||
bindd = SUPER SHIFT CTRL, SPACE, Theme menu, exec, nomarchy-menu theme
|
||||
bindd = SUPER, BACKSPACE, Toggle window transparency, exec, nomarchy-hyprland-active-window-transparency-toggle
|
||||
|
||||
14
core/home/default.nix
Normal file
14
core/home/default.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./options.nix
|
||||
./state.nix
|
||||
./overrides.nix
|
||||
./behavior.nix
|
||||
./fonts.nix
|
||||
./configs.nix
|
||||
./security.nix
|
||||
./bash.nix
|
||||
];
|
||||
}
|
||||
22
core/system/default.nix
Normal file
22
core/system/default.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./options.nix
|
||||
./state.nix
|
||||
./systemd.nix
|
||||
./virtualization.nix
|
||||
./fonts.nix
|
||||
./hardware.nix
|
||||
./audio.nix
|
||||
./bluetooth.nix
|
||||
./network.nix
|
||||
./impermanence.nix
|
||||
./browser.nix
|
||||
./makima.nix
|
||||
../../themes/engine/plymouth.nix
|
||||
../../themes/engine/sddm.nix
|
||||
];
|
||||
|
||||
time.timeZone = lib.mkDefault config.nomarchy.system.timezone;
|
||||
}
|
||||
@@ -9,7 +9,7 @@ in
|
||||
# this will install it. Otherwise, it will fail evaluation if not available in nixpkgs.
|
||||
environment.systemPackages = [ pkgs.makima-bin ];
|
||||
|
||||
environment.etc."makima/AT Translated Set 2 keyboard.toml".source = ../../assets/makima + "/AT Translated Set 2 keyboard.toml";
|
||||
environment.etc."makima/AT Translated Set 2 keyboard.toml".source = ../../features/apps/makima + "/AT Translated Set 2 keyboard.toml";
|
||||
|
||||
systemd.services.makima = {
|
||||
description = "Makima key remapping service";
|
||||
230
docs/creating-themes.md
Normal file
230
docs/creating-themes.md
Normal file
@@ -0,0 +1,230 @@
|
||||
# Creating a Nomarchy Theme
|
||||
|
||||
This guide walks through creating a new theme for Nomarchy from scratch.
|
||||
|
||||
## Theme Directory Structure
|
||||
|
||||
Each theme lives in `themes/palettes/<theme-name>/` with the following structure:
|
||||
|
||||
```
|
||||
themes/palettes/my-theme/
|
||||
├── colors.toml # REQUIRED - Color palette definition
|
||||
├── icons.theme # REQUIRED - GTK icon theme name (single line)
|
||||
├── light.mode # Optional - Empty marker file for light themes
|
||||
├── preview.png # Optional - Preview image for the theme selector
|
||||
├── backgrounds/ # Optional - Wallpaper images
|
||||
│ ├── 1-primary.jpg # Numbered prefix controls default order
|
||||
│ ├── 2-alternate.png
|
||||
│ └── ...
|
||||
└── apps/ # Optional - App-specific themed configs
|
||||
├── btop.theme # btop color theme
|
||||
├── neovim.lua # Neovim colorscheme plugin spec
|
||||
├── vscode.json # VS Code theme extension reference
|
||||
└── hyprland.conf # Hyprland visual overrides (colors, decorations, animations)
|
||||
```
|
||||
|
||||
## Step 1: Create the Color Palette
|
||||
|
||||
Create `colors.toml` with all 24 required color fields. Every color must be a hex value with a `#` prefix.
|
||||
|
||||
```toml
|
||||
# UI colors
|
||||
accent = "#83b6af"
|
||||
cursor = "#d3c6aa"
|
||||
foreground = "#d3c6aa"
|
||||
background = "#2d353b"
|
||||
selection_foreground = "#d3c6aa"
|
||||
selection_background = "#505a60"
|
||||
|
||||
# ANSI 16-color palette (color0-15)
|
||||
# Normal colors
|
||||
color0 = "#3c474d" # Black
|
||||
color1 = "#e68183" # Red
|
||||
color2 = "#a7c080" # Green
|
||||
color3 = "#d9bb80" # Yellow
|
||||
color4 = "#83b6af" # Blue
|
||||
color5 = "#d39bb6" # Magenta
|
||||
color6 = "#87c095" # Cyan
|
||||
color7 = "#868d80" # White
|
||||
|
||||
# Bright colors
|
||||
color8 = "#868d80" # Bright Black
|
||||
color9 = "#e68183" # Bright Red
|
||||
color10 = "#a7c080" # Bright Green
|
||||
color11 = "#d9bb80" # Bright Yellow
|
||||
color12 = "#83b6af" # Bright Blue
|
||||
color13 = "#d39bb6" # Bright Magenta
|
||||
color14 = "#87c095" # Bright Cyan
|
||||
color15 = "#868d80" # Bright White
|
||||
```
|
||||
|
||||
These colors are mapped to a Base16 palette automatically:
|
||||
|
||||
| Base16 Slot | Source Field | Typical Role |
|
||||
|-------------|---------------|----------------------------|
|
||||
| base00 | background | Default background |
|
||||
| base01 | color0 | Lighter background |
|
||||
| base02 | color8 | Selection background |
|
||||
| base03 | color8 | Comments, invisibles |
|
||||
| base04 | color7 | Dark foreground |
|
||||
| base05 | foreground | Default foreground |
|
||||
| base06 | color15 | Light foreground |
|
||||
| base07 | color15 | Lightest foreground |
|
||||
| base08 | color1 | Red (errors, deletions) |
|
||||
| base09 | color3 | Orange |
|
||||
| base0A | color3 | Yellow (warnings) |
|
||||
| base0B | color2 | Green (success, additions) |
|
||||
| base0C | color6 | Cyan (info) |
|
||||
| base0D | color4 | Blue (primary accent) |
|
||||
| base0E | color5 | Magenta (keywords) |
|
||||
| base0F | color1 | Brown (deprecated) |
|
||||
|
||||
## Step 2: Set the Icon Theme
|
||||
|
||||
Create `icons.theme` with a single line containing the GTK icon theme name:
|
||||
|
||||
```
|
||||
Yaru-blue
|
||||
```
|
||||
|
||||
Common options from the `yaru-theme` package: `Yaru-blue`, `Yaru-purple`, `Yaru-red`, `Yaru-sage`, `Yaru-olive`, `Yaru-magenta`, `Yaru-yellow`, `Yaru-gray`, `Yaru-grey`, `Yaru-wartybrown`.
|
||||
|
||||
## Step 3: Add Backgrounds (Optional)
|
||||
|
||||
Place wallpaper images in a `backgrounds/` directory. Use numbered prefixes to control the default selection order -- the first file alphabetically becomes the default wallpaper.
|
||||
|
||||
```
|
||||
backgrounds/
|
||||
├── 1-main-wallpaper.jpg # Default wallpaper (first alphabetically)
|
||||
├── 2-alternate.png # Additional option
|
||||
└── 3-minimal.jpg # Another option
|
||||
```
|
||||
|
||||
Supported formats: `.jpg`, `.png`, `.jpeg`.
|
||||
|
||||
If no backgrounds are provided, the system falls back to the catppuccin default wallpaper.
|
||||
|
||||
## Step 4: Light Theme (Optional)
|
||||
|
||||
For light themes, create an empty `light.mode` marker file:
|
||||
|
||||
```bash
|
||||
touch themes/palettes/my-theme/light.mode
|
||||
```
|
||||
|
||||
This controls Stylix polarity (`light` vs `dark`) and affects GTK theming, browser color scheme, and other system-wide dark/light detection.
|
||||
|
||||
### Step 5: App-Specific Configs (Optional)
|
||||
|
||||
These theme-specific files are automatically picked up by the respective application modules in `features/apps/<app>/default.nix` during theme switching.
|
||||
|
||||
### `apps/btop.theme`
|
||||
|
||||
A btop color theme file. See existing themes for the format, or generate one from your palette colors.
|
||||
|
||||
### `apps/neovim.lua`
|
||||
|
||||
A lazy.nvim plugin spec for the matching Neovim colorscheme:
|
||||
|
||||
```lua
|
||||
return {
|
||||
{ "sainnhe/everforest" },
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "everforest",
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
### `apps/vscode.json`
|
||||
|
||||
VS Code theme extension reference:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "Everforest Dark",
|
||||
"extension": "sainnhe.everforest"
|
||||
}
|
||||
```
|
||||
|
||||
### `apps/hyprland.conf`
|
||||
|
||||
Hyprland visual overrides for this theme. This can include custom border colors, gaps, decorations, blur, and animations. The file is sourced after the default settings, so values here override the defaults.
|
||||
|
||||
```conf
|
||||
$activeBorderColor = rgb(d3c6aa)
|
||||
|
||||
general {
|
||||
col.active_border = $activeBorderColor
|
||||
gaps_in = 6
|
||||
gaps_out = 12
|
||||
border_size = 3
|
||||
}
|
||||
|
||||
decoration {
|
||||
rounding = 10
|
||||
blur {
|
||||
enabled = true
|
||||
size = 5
|
||||
passes = 3
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Step 6: Template Variables
|
||||
|
||||
Nomarchy has a template system that generates app configs from your `colors.toml`. Templates in `themes/templates/*.tpl` use placeholder syntax:
|
||||
|
||||
| Syntax | Example Value | Description |
|
||||
|---------------------|---------------|--------------------------------|
|
||||
| `{{ background }}` | `#2d353b` | Color value as-is (with `#`) |
|
||||
| `{{ background_strip }}` | `2d353b` | Color value without `#` |
|
||||
| `{{ background_rgb }}` | `45,53,59` | Color as decimal RGB |
|
||||
|
||||
Every key from `colors.toml` is available as a template variable. Templates are processed automatically by `nomarchy-theme-set-templates` when switching themes.
|
||||
|
||||
To add custom templates, place `.tpl` files in `~/.config/nomarchy/themed/`. User templates take priority over built-in ones.
|
||||
|
||||
## Step 7: Preview Image (Optional)
|
||||
|
||||
Add a `preview.png` screenshot of the theme in action. This is displayed in the theme selector menu (`nomarchy-menu theme`).
|
||||
|
||||
## Applying Your Theme
|
||||
|
||||
### During development (runtime switch)
|
||||
|
||||
```bash
|
||||
nomarchy-theme-set my-theme
|
||||
```
|
||||
|
||||
This updates `~/.config/nomarchy/state.json`, processes templates, and triggers a Home Manager rebuild.
|
||||
|
||||
### Setting as default (Nix configuration)
|
||||
|
||||
In your `home.nix`:
|
||||
|
||||
```nix
|
||||
{
|
||||
nomarchy.theme = "my-theme";
|
||||
}
|
||||
```
|
||||
|
||||
Then rebuild: `env-update` (or `sys-update` for system-wide changes).
|
||||
|
||||
## Theme Discovery
|
||||
|
||||
The system automatically discovers themes by scanning `themes/palettes/` for directories containing a `colors.toml` file. No registration step is needed -- just create the directory with a valid `colors.toml` and the theme is available.
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] `colors.toml` with all 24 color fields
|
||||
- [ ] `icons.theme` with a valid GTK icon theme name
|
||||
- [ ] `backgrounds/` with at least one numbered wallpaper
|
||||
- [ ] `light.mode` if it's a light theme
|
||||
- [ ] `apps/neovim.lua` with colorscheme plugin spec
|
||||
- [ ] `apps/vscode.json` with theme extension reference
|
||||
- [ ] `apps/btop.theme` with terminal monitor colors
|
||||
- [ ] `apps/hyprland.conf` if custom decorations/animations are desired
|
||||
- [ ] `preview.png` for the theme selector
|
||||
5
features/apps/btop/default.nix
Normal file
5
features/apps/btop/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
xdg.configFile."btop".source = ./config;
|
||||
}
|
||||
5
features/apps/chromium/default.nix
Normal file
5
features/apps/chromium/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
xdg.configFile."chromium".source = ./config;
|
||||
}
|
||||
5
features/apps/elephant/default.nix
Normal file
5
features/apps/elephant/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
xdg.configFile."elephant".source = ./config;
|
||||
}
|
||||
5
features/apps/ghostty/default.nix
Normal file
5
features/apps/ghostty/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
xdg.configFile."ghostty".source = ./config;
|
||||
}
|
||||
5
features/apps/kitty/default.nix
Normal file
5
features/apps/kitty/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
xdg.configFile."kitty".source = ./config;
|
||||
}
|
||||
5
features/apps/lazygit/default.nix
Normal file
5
features/apps/lazygit/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
xdg.configFile."lazygit".source = ./config;
|
||||
}
|
||||
5
features/apps/opencode/default.nix
Normal file
5
features/apps/opencode/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
xdg.configFile."opencode".source = ./config;
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Launch the Walker application launcher while ensuring that it's data provider (called elephant) is running first.
|
||||
|
||||
# Ensure elephant is running before launching walker
|
||||
if ! pgrep -x elephant > /dev/null; then
|
||||
setsid uwsm-app -- elephant &
|
||||
fi
|
||||
|
||||
# Ensure walker service is running
|
||||
if ! pgrep -f "walker --gapplication-service" > /dev/null; then
|
||||
setsid uwsm-app -- walker --gapplication-service &
|
||||
fi
|
||||
|
||||
exec walker --width 644 --maxheight 300 --minheight 300 "$@"
|
||||
5
features/apps/tmux/default.nix
Normal file
5
features/apps/tmux/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
xdg.configFile."tmux".source = ./config;
|
||||
}
|
||||
@@ -1,7 +1,11 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
themeConfig = builtins.fromJSON (builtins.readFile (../../themes/palettes + "/${config.nomarchy.theme}/vscode.json"));
|
||||
themePath = ../../themes/palettes + "/${config.nomarchy.theme}/apps/vscode.json";
|
||||
themeConfig = if builtins.pathExists themePath then
|
||||
builtins.fromJSON (builtins.readFile themePath)
|
||||
else
|
||||
{ name = "Default Dark Modern"; };
|
||||
|
||||
# Development extensions that match the system theme
|
||||
devExtensions = with pkgs.vscode-extensions; [
|
||||
@@ -40,7 +44,7 @@ in
|
||||
programs.vscode = {
|
||||
enable = lib.mkDefault true;
|
||||
package = lib.mkDefault pkgs.vscode;
|
||||
userSettings = lib.mkDefault {
|
||||
profiles.default.userSettings = lib.mkDefault {
|
||||
"update.mode" = "none";
|
||||
"workbench.colorTheme" = themeConfig.name;
|
||||
"window.titleBarStyle" = "custom";
|
||||
|
||||
@@ -15,28 +15,30 @@ in
|
||||
imports = [
|
||||
inputs.nix-colors.homeManagerModules.default
|
||||
inputs.walker.homeManagerModules.default
|
||||
../core/home
|
||||
../themes/engine/stylix-compat.nix
|
||||
../core/home/options.nix
|
||||
../core/home/state.nix
|
||||
../core/home/overrides.nix
|
||||
../core/home/behavior.nix
|
||||
../themes/engine/loader.nix
|
||||
../themes/engine/files.nix
|
||||
../core/home/fonts.nix
|
||||
../themes/engine/stylix.nix
|
||||
../themes/engine/switcher.nix
|
||||
./apps/alacritty/default.nix
|
||||
./apps/btop/default.nix
|
||||
./apps/chromium/default.nix
|
||||
./apps/elephant/default.nix
|
||||
./apps/ghostty/default.nix
|
||||
./apps/kitty/default.nix
|
||||
./apps/lazygit/default.nix
|
||||
./apps/opencode/default.nix
|
||||
./apps/tmux/default.nix
|
||||
./apps/vscode.nix
|
||||
./apps/walker.nix
|
||||
./apps/swayosd.nix
|
||||
./desktop/nightlight.nix
|
||||
./desktop/idle.nix
|
||||
../themes/engine/stylix.nix
|
||||
./desktop/hyprland/default.nix
|
||||
./desktop/waybar/default.nix
|
||||
./apps/walker.nix
|
||||
../themes/engine/switcher.nix
|
||||
./scripts/default.nix
|
||||
../core/home/configs.nix
|
||||
./apps/swayosd.nix
|
||||
../core/home/security.nix
|
||||
./scripts/battery-monitor.nix
|
||||
../core/home/bash.nix
|
||||
];
|
||||
|
||||
|
||||
|
||||
@@ -29,6 +29,6 @@ bindd = SUPER SHIFT ALT, X, X Post, exec, nomarchy-launch-webapp "https://x.com/
|
||||
# Add extra bindings
|
||||
# bind = SUPER SHIFT, R, exec, alacritty -e ssh your-server
|
||||
|
||||
# Overwrite existing bindings, like putting Nomarchy Menu on Super + Space
|
||||
# Overwrite existing bindings, like putting Nomarchy Menu back on Super + Space
|
||||
# unbind = SUPER, SPACE
|
||||
# bindd = SUPER, SPACE, Nomarchy menu, exec, nomarchy-menu
|
||||
|
||||
@@ -3,10 +3,17 @@
|
||||
# Wrapper to launch walker with elephant provider, or fallback to rofi if walker is missing.
|
||||
|
||||
if command -v walker >/dev/null 2>&1; then
|
||||
# Ensure elephant is running before launching walker
|
||||
if ! pgrep -x elephant > /dev/null; then
|
||||
setsid uwsm-app -- elephant &
|
||||
fi
|
||||
exec uwsm-app -- walker "$@"
|
||||
|
||||
# Ensure walker service is running
|
||||
if ! pgrep -f "walker --gapplication-service" > /dev/null; then
|
||||
setsid uwsm-app -- walker --gapplication-service &
|
||||
fi
|
||||
|
||||
exec uwsm-app -- walker --width 644 --maxheight 300 --minheight 300 "$@"
|
||||
elif command -v rofi >/dev/null 2>&1; then
|
||||
# Convert walker arguments to rofi arguments if possible
|
||||
# This is a very basic mapping for --dmenu
|
||||
|
||||
@@ -348,8 +348,9 @@ show_main_menu() {
|
||||
|
||||
go_to_menu() {
|
||||
case "${1,,}" in
|
||||
*apps*) walker -p "Launch…" ;;
|
||||
*apps*) nomarchy-launch-walker ;;
|
||||
*learn*) show_learn_menu ;;
|
||||
*symbols*) nomarchy-launch-walker -m symbols ;;
|
||||
*trigger*) show_trigger_menu ;;
|
||||
*toggle*) show_toggle_menu ;;
|
||||
*share*) show_share_menu ;;
|
||||
|
||||
@@ -89,6 +89,13 @@
|
||||
# Ensure we have a proper shell environment
|
||||
programs.bash.completion.enable = true;
|
||||
|
||||
# Auto-launch installer on the main TTY (tty1)
|
||||
programs.bash.loginShellInit = ''
|
||||
if [ "$(tty)" = "/dev/tty1" ]; then
|
||||
nomarchy-install
|
||||
fi
|
||||
'';
|
||||
|
||||
# Include documentation
|
||||
documentation.enable = true;
|
||||
documentation.man.enable = true;
|
||||
|
||||
@@ -21,6 +21,7 @@ BOLD='\033[1m'
|
||||
NOMARCHY_REPO=""
|
||||
TARGET_DRIVE=""
|
||||
USERNAME=""
|
||||
LUKS_PASSWORD=""
|
||||
USER_PASSWORD=""
|
||||
TIMEZONE="UTC"
|
||||
HARDWARE_MODULES=""
|
||||
@@ -151,7 +152,7 @@ get_luks_passphrase() {
|
||||
pass2=$(gum input --password --placeholder "Confirm passphrase")
|
||||
|
||||
if [[ "$pass1" == "$pass2" ]]; then
|
||||
USER_PASSWORD="$pass1"
|
||||
LUKS_PASSWORD="$pass1"
|
||||
break
|
||||
else
|
||||
error "Passphrases do not match. Try again."
|
||||
@@ -331,15 +332,14 @@ execute_installation() {
|
||||
|
||||
# 9.1 Partition with disko
|
||||
info "Partitioning disk..."
|
||||
local escaped_drive disko_file tmp_disko
|
||||
escaped_drive=$(printf '%s\n' "$TARGET_DRIVE" | sed 's/[[\.*^$()+?{|]/\\&/g')
|
||||
local disko_file tmp_disko
|
||||
disko_file="$NOMARCHY_REPO/installer/disko-golden.nix"
|
||||
tmp_disko=$(mktemp --suffix=.nix)
|
||||
|
||||
sed "s|@TARGET_DRIVE@|$escaped_drive|g" "$disko_file" > "$tmp_disko"
|
||||
sed "s|@TARGET_DRIVE@|${TARGET_DRIVE}|g" "$disko_file" > "$tmp_disko"
|
||||
|
||||
# For LUKS, we need to provide the passphrase
|
||||
echo -n "$USER_PASSWORD" | disko --mode disko "$tmp_disko"
|
||||
# Provide the LUKS passphrase via stdin for disk encryption
|
||||
echo -n "$LUKS_PASSWORD" | disko --mode disko "$tmp_disko"
|
||||
success "Disk partitioned"
|
||||
|
||||
# 9.2 Generate hardware config
|
||||
|
||||
@@ -5,9 +5,16 @@ let
|
||||
themePath = ../palettes + "/${config.nomarchy.theme}";
|
||||
themeAppsPath = themePath + "/apps";
|
||||
nordAppsPath = ../../features/desktop/hyprland/themes/nord;
|
||||
hyprlandThemePath = ../../features/desktop/hyprland/themes + "/${config.nomarchy.theme}";
|
||||
|
||||
# Check if theme has apps/hyprland.conf
|
||||
# Check if theme has hyprland.conf in palette apps/ or feature themes/
|
||||
hasHyprlandConf = builtins.pathExists (themeAppsPath + "/hyprland.conf");
|
||||
hasHyprlandFeatureConf = builtins.pathExists (hyprlandThemePath + "/hyprland.conf");
|
||||
|
||||
hyprlandConfSource =
|
||||
if hasHyprlandConf then themeAppsPath + "/hyprland.conf"
|
||||
else if hasHyprlandFeatureConf then hyprlandThemePath + "/hyprland.conf"
|
||||
else nordAppsPath + "/hyprland.conf";
|
||||
|
||||
# Get palette for dynamic CSS generation
|
||||
palette = nomarchyLib.getPalette config.nomarchy.theme;
|
||||
@@ -26,18 +33,16 @@ in
|
||||
@define-color accent #${palette.base0D};
|
||||
'';
|
||||
|
||||
# Ensure theme-specific hyprland config exists, fallback to nord if not
|
||||
# Now checking in apps/ subdirectory
|
||||
# Ensure theme-specific hyprland config exists
|
||||
# Lookup priority: palette apps/ > feature themes/ > nord fallback
|
||||
xdg.configFile."nomarchy/current/theme/apps/hyprland.conf" = lib.mkIf (!hasHyprlandConf) {
|
||||
source = nordAppsPath + "/hyprland.conf";
|
||||
source = if hasHyprlandFeatureConf then hyprlandThemePath + "/hyprland.conf"
|
||||
else nordAppsPath + "/hyprland.conf";
|
||||
};
|
||||
|
||||
# Legacy compatibility: symlink apps/hyprland.conf to root for scripts expecting old path
|
||||
xdg.configFile."nomarchy/current/theme/hyprland.conf" = {
|
||||
source =
|
||||
if hasHyprlandConf
|
||||
then themeAppsPath + "/hyprland.conf"
|
||||
else nordAppsPath + "/hyprland.conf";
|
||||
source = hyprlandConfSource;
|
||||
};
|
||||
|
||||
xdg.configFile."nomarchy/current/theme.name".text = config.nomarchy.theme;
|
||||
|
||||
|
Before Width: | Height: | Size: 3.6 MiB After Width: | Height: | Size: 3.6 MiB |
|
Before Width: | Height: | Size: 4.8 MiB After Width: | Height: | Size: 4.8 MiB |
Reference in New Issue
Block a user