refactor: major architectural restructure for theme-centric organization
Theme System: - Move all theme app configs to apps/ subdirectory (20 themes) - Add theme-loader.nix for dynamic theme config deployment - Simplify stylix.nix to focus on base theming only Override System: - Add overrides.nix for file-based config overrides - Add behavior-configs.nix for non-visual configuration - Split hypr/nomarchy.conf into behavior vs visual sections Module Improvements: - Add lib.mkDefault to all customizable settings - Add modules/lib/ with shared utilities and state schema - Update all home and system modules for downstream overridability Installer: - New minimal TTY installer (installer/install.sh) - Golden path: BTRFS + LUKS2 (disko-golden.nix) - New installer-iso.nix for TTY-only installation - Keep graphical installer as installerIsoGraphical option Cleanup: - Remove obsolete install.sh, disko-ext4.nix, install-nomarchy.sh - Update live-iso.nix references - Add .claude/ to .gitignore for local IDE settings Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
95
installer/disko-golden.nix
Normal file
95
installer/disko-golden.nix
Normal file
@@ -0,0 +1,95 @@
|
||||
# Nomarchy Golden Path Disk Configuration
|
||||
#
|
||||
# BTRFS + LUKS2 encryption with subvolumes optimized for:
|
||||
# - Compression (zstd)
|
||||
# - SSD optimization (noatime)
|
||||
# - Impermanence support (root-blank snapshot)
|
||||
# - Separate subvolumes for home, nix store, logs
|
||||
#
|
||||
# Replace @TARGET_DRIVE@ with the target device (e.g., /dev/nvme0n1)
|
||||
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
device = "@TARGET_DRIVE@";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
# EFI System Partition
|
||||
ESP = {
|
||||
priority = 1;
|
||||
name = "ESP";
|
||||
start = "1M";
|
||||
end = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
|
||||
# LUKS-encrypted root partition
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "crypted";
|
||||
# Password will be provided interactively or via stdin
|
||||
settings = {
|
||||
allowDiscards = true; # Enable TRIM for SSDs
|
||||
};
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ]; # Force creation
|
||||
subvolumes = {
|
||||
# Root filesystem
|
||||
"@" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
|
||||
# Persistent storage (for impermanence)
|
||||
"@persist" = {
|
||||
mountpoint = "/persist";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
|
||||
# User home directories
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
|
||||
# Nix store (separate for better deduplication)
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
|
||||
# System logs
|
||||
"@log" = {
|
||||
mountpoint = "/var/log";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Create a read-only snapshot of root for impermanence rollback
|
||||
postCreateHook = ''
|
||||
MNTPOINT=$(mktemp -d)
|
||||
mount -t btrfs /dev/mapper/crypted $MNTPOINT
|
||||
btrfs subvolume snapshot -r $MNTPOINT/@ $MNTPOINT/root-blank
|
||||
umount $MNTPOINT
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user