Switch to the dendritic flake-parts layout, with stubs for phase 2

flake.nix now only declares inputs and calls flake-parts with import-tree
over ./modules: every .nix file under modules/ is a flake-parts module.
Features are aspects (flake.modules.nixos.<name> and
flake.modules.homeManager.<name>); importing an aspect enables it, so the
my.* option modules and their enable flags are gone.

- Add the flake-parts glue: modules/flake/ (systems, shared meta data,
  host construction through configurations.nixos, overlays, packages,
  apps, dev shell, formatter, checks), modules/users/faumaray.nix
  (meta.owner) and modules/core/{nixpkgs,home-manager,install-facts}.nix.
  config.my is kept as one read-only derived option so install-system
  keeps working unchanged.
- Add the aspects that are already final: secrets, ssh, hyprland,
  wezterm, git, stylix, proxy-suite, gitea-runner and claude-code, and
  the desktop host (modules/hosts/desktop/{host,hardware,disks}.nix).
- Port the always-on basics to the `core` aspect (nix, boot, locale,
  networking, users), lanzaboote and plain systemd-boot to the
  `secure-boot` and `systemd-boot` aspects, and the installer ISO to
  modules/installer/iso.nix. Behaviour is unchanged; the time zone,
  default locale, XKB layouts and the firewall setting now live in
  modules/hosts/desktop/host.nix.
- Move the Lua files (Hyprland settings, binds, rules; Neovim init.lua)
  with git mv, byte-identical.
- Add bare stubs, marked STUB, for the aspects that the next phase
  ports: amd, rocm, gaming, vpn, docker, noctalia, audio, fonts, xdg,
  apps, shell and neovim. The host evaluates with them, but those
  features are not configured until they are ported.
- Remove lib/, overlays/, apps/, modules/nixos/, modules/home/,
  modules/installer/default.nix and hosts/desktop/{default,disks,home}.nix.
- flake.lock: add flake-parts, import-tree, stylix and serena with their
  transitive inputs (22 new nodes); every existing pin is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZ16yf4acmaSiHq81vyQ6Z
This commit is contained in:
Claude committed 2026-10-12 20:55:34 +00:00
1 parent 7dd6853124
commit af18420fd3
84 files changed
+2121 -1928

No files matched your search

-45
View File
@@ -1,45 +0,0 @@
# desktop: AMD CPU + AMD GPU workstation/gaming PC.
# System on the NVMe, part of /home on the SATA SSD (see disko.nix / my.disks).
{ inputs, ... }:
{
imports = [
./hardware-configuration.nix
./disks.nix
inputs.nixos-hardware.nixosModules.common-cpu-amd
inputs.nixos-hardware.nixosModules.common-cpu-amd-pstate
inputs.nixos-hardware.nixosModules.common-gpu-amd
inputs.nixos-hardware.nixosModules.common-pc-ssd
];
my = {
user = {
name = "faumaray";
fullName = "faumaray";
email = "faumaray@gmail.com";
};
locale = {
timeZone = "Europe/Moscow";
defaultLocale = "en_US.UTF-8";
keyboardLayouts = [
"us"
"ru"
];
keyboardOptions = [ "grp:alt_shift_toggle" ];
};
boot.secureBoot.enable = true;
hardware.amd.enable = true;
desktop.hyprland.enable = true;
gaming.enable = true;
secrets.enable = true;
};
home-manager.users.faumaray = ./home.nix;
# Set once at install time; do not change on upgrades.
system.stateVersion = "26.05";
}
-33
View File
@@ -1,33 +0,0 @@
# Disk layout of `desktop`; the generic logic lives in modules/nixos/hardware/disks.nix.
# The device paths come from disk-ids.json, which `nix run .#install` rewrites
# after you pick the disks (list them with `ls -l /dev/disk/by-id`).
{ lib, ... }:
let
ids = lib.importJSON ./disk-ids.json;
in
{
my.disks = {
enable = true;
system.device = ids.system;
data = {
enable = true;
device = ids.data;
# Each entry becomes a btrfs subvolume on the data disk, mounted at
# ~/<Name>. To add a folder later, add `Name = { };` here, create the
# subvolume (`btrfs subvolume create /mnt/data/@name`, with the data
# disk's top level mounted), then rebuild. Storage is a free-form folder
# to organise yourself; Steam's library goes in ~/Games/SteamLibrary.
homeFolders = {
Games = { };
Downloads = { };
Documents = { };
Music = { };
Pictures = { };
Videos = { };
Storage = { };
};
};
};
}
-28
View File
@@ -1,28 +0,0 @@
# home-manager config for the desktop's user (wired up in ./default.nix).
# The modules live in modules/home; this file only turns them on.
{ osConfig, ... }:
let
name = osConfig.my.user.name;
in
{
home = {
username = name;
homeDirectory = "/home/${name}";
# Set once at install time; do not change on upgrades.
stateVersion = "26.05";
};
my.home = {
hyprland.enable = true;
noctalia.enable = true;
wezterm.enable = true;
neovim.enable = true;
shell.enable = true;
git.enable = true;
ssh.enable = true;
xdg.enable = true;
theming.enable = true;
apps.enable = true;
};
}