aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md104
1 files changed, 69 insertions, 35 deletions
diff --git a/README.md b/README.md
index 91cc1f0..97498d1 100644
--- a/README.md
+++ b/README.md
@@ -42,19 +42,19 @@ system/ # System-wide base config
├─ packages.nix, programs.nix, services.nix
└─ users.nix, nix.nix
-home/rices/{rice}/system.nix # Rice system config
- ├─ Desktop (X11 + i3wm)
- └─ Stylix (theming)
+home/rices/{rice}/ # Rice configs (self-contained)
+ ├─ default.nix # Exports {system, home}
+ ├─ system.nix # NixOS: Desktop + Stylix
+ └─ home.nix # HM: imports program configs
home/mun/ # User "mun" config
└─ default.nix # User orchestrator
- ├─ programs/ # git, ssh, zsh
- └─ (imports rice via specialArgs)
+ └─ programs/ # git, ssh, zsh
-home/rices/ # Desktop rices (home-manager)
- ├─ nord-blue/ # Complete rice
- ├─ original/ # Complete rice
- └─ cosmic/ # WIP rice
+home/rices/ # Desktop rices
+ ├─ nord-blue/ # Complete rice (i3wm)
+ ├─ original/ # Complete rice (i3wm)
+ └─ plasma6/ # Complete rice (KDE Plasma)
```
## Directory Structure
@@ -100,9 +100,10 @@ home/rices/ # Desktop rices (home-manager)
│ └── zsh.nix
└── rices/ # Desktop themes
- ├── nord-blue/ # Complete rice
- │ ├── system.nix # Desktop + stylix config
- │ ├── default.nix # Home-manager modules
+ ├── nord-blue/ # Complete rice (i3wm)
+ │ ├── default.nix # Exports {system, home}
+ │ ├── system.nix # NixOS: Desktop + stylix
+ │ ├── home.nix # HM: imports all configs
│ ├── i3.nix
│ ├── alacritty.nix
│ ├── nvim.nix
@@ -110,9 +111,10 @@ home/rices/ # Desktop rices (home-manager)
│ ├── picom.nix
│ └── fastfetch.nix
- ├── original/ # Complete rice
- │ ├── system.nix # Desktop + stylix config
- │ ├── default.nix # Home-manager modules
+ ├── original/ # Complete rice (i3wm)
+ │ ├── default.nix # Exports {system, home}
+ │ ├── system.nix # NixOS: Desktop + stylix
+ │ ├── home.nix # HM: imports all configs
│ ├── variables.nix # Color definitions
│ ├── i3.nix
│ ├── kitty.nix
@@ -125,10 +127,11 @@ home/rices/ # Desktop rices (home-manager)
│ ├── scripts.nix
│ └── xdg.nix
- └── cosmic/ # WIP rice
- ├── system.nix # Desktop + stylix config
- ├── default.nix # Home-manager modules
- └── fluxbox.nix
+ └── plasma6/ # Complete rice (KDE Plasma)
+ ├── default.nix # Exports {system, home}
+ ├── system.nix # NixOS: Plasma + stylix
+ ├── home.nix # HM: Plasma configs
+ └── variables.nix # Wallpaper path
```
## Configuration Layers
@@ -139,14 +142,14 @@ Base system config applied to all machines: boot, networking, audio, graphics, p
### 2. Machine Layer (`hosts/`)
Per-machine identity (hostname), hardware configuration, and optional machine-specific overrides (e.g., herra uses Zen kernel).
-### 3. Rice System Layer (`home/rices/*/system.nix`)
-Desktop environment (X11 + i3wm) and stylix theming (colors, fonts, cursor). Imported at system level in flake.
+### 3. Rice Layer (`home/rices/*/`)
+Self-contained desktop environment configs. Each rice exports `{system, home}`:
+- **system.nix**: NixOS-level (desktop environment, system packages, stylix theming)
+- **home.nix**: Home-manager level (imports program configs like i3, terminal, editor)
+- **default.nix**: Exports both modules for flake consumption
### 4. User Layer (`home/mun/`)
-User-specific programs: git, ssh, zsh config. Imports the active rice via specialArgs.
-
-### 5. Rice Home Layer (`home/rices/*/`)
-Desktop application configs: window manager, terminal, editor, compositor. Imported at home-manager level.
+User-specific shared programs: git, ssh, zsh config. Only contains configs shared across all rices.
## Adding Configurations
@@ -168,7 +171,7 @@ environment.systemPackages = with pkgs; [
**New rice module:**
1. Create file in target rice directory (e.g., `home/rices/nord-blue/mymodule.nix`)
-2. Add to that rice's `default.nix` imports
+2. Add to that rice's `home.nix` imports
## Switching Rices
@@ -177,25 +180,56 @@ Rices are assigned per-host in `flake.nix`. Edit the `nixosConfigurations` secti
```nix
nixosConfigurations = {
kronos = mkSystem "kronos" "nord-blue"; # Laptop uses nord-blue
- herra = mkSystem "herra" "cosmic"; # Desktop uses cosmic
+ herra = mkSystem "herra" "plasma6"; # Desktop uses plasma6
mystra = mkSystem "mystra" "nord-blue"; # Another machine uses nord-blue
};
```
Then rebuild: `sudo nixos-rebuild switch`
-Each rice is imported twice:
-1. **System-level**: `home/rices/${rice}/system.nix` (desktop + stylix)
-2. **Home-level**: `home/rices/${rice}` (app configs via specialArgs)
+Each rice exports `{system, home}` from its `default.nix`:
+1. **system**: Imported by `mkSystem` (NixOS modules - desktop, stylix)
+2. **home**: Imported by `mkHomeManagerModule` (HM modules - program configs)
## Creating a New Rice
1. Create directory: `home/rices/my-rice/`
-2. Create `system.nix` with desktop environment and stylix config
-3. Create `default.nix` orchestrator (imports home-manager modules)
-4. Add application configs (i3.nix, terminal, editor, etc.)
-5. Optional: Create `variables.nix` for shared color variables
-6. Assign to host in `flake.nix`: `myhost = mkSystem "myhost" "my-rice";`
+2. Create `system.nix` with NixOS-level configs:
+ ```nix
+ {pkgs, ...}: {
+ services.xserver = {
+ enable = true;
+ windowManager.i3.enable = true;
+ # ... desktop environment config
+ };
+
+ stylix = {
+ enable = true;
+ # ... theming config
+ };
+ }
+ ```
+3. Create `home.nix` with home-manager imports:
+ ```nix
+ {...}: {
+ imports = [
+ ./i3.nix
+ ./terminal.nix
+ ./editor.nix
+ # ... program configs
+ ];
+ }
+ ```
+4. Create `default.nix` to export both modules:
+ ```nix
+ {
+ system = import ./system.nix;
+ home = import ./home.nix;
+ }
+ ```
+5. Add application configs (i3.nix, terminal, editor, etc.)
+6. Optional: Create `variables.nix` for shared variables
+7. Assign to host in `flake.nix`: `myhost = mkSystem "myhost" "my-rice";`
## Machine-Specific Config