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
71 lines
2.3 KiB
Nix
71 lines
2.3 KiB
Nix
# Shared data for every aspect: who owns this flake and where the secrets are.
|
|
# Top-level flake-parts options, not a flake output. Read them in any module
|
|
# through the flake-parts `config`, bound in a `let` before any lower-level
|
|
# module so the NixOS/home-manager `config` cannot shadow it:
|
|
#
|
|
# { config, ... }:
|
|
# let
|
|
# inherit (config.meta) owner;
|
|
# in
|
|
# {
|
|
# flake.modules.nixos.foo = { pkgs, ... }: { users.users.${owner.name}.shell = pkgs.zsh; };
|
|
# flake.modules.homeManager.foo = { programs.git.settings.user.email = owner.email; };
|
|
# }
|
|
{ lib, ... }:
|
|
let
|
|
inherit (lib) mkOption types;
|
|
in
|
|
{
|
|
options.meta = {
|
|
owner = mkOption {
|
|
description = "The single interactive user of every host in this flake.";
|
|
type = types.submodule {
|
|
options = {
|
|
name = mkOption {
|
|
type = types.str;
|
|
description = "Login name.";
|
|
};
|
|
fullName = mkOption {
|
|
type = types.str;
|
|
description = "Display name (GECOS), also the git author name.";
|
|
};
|
|
email = mkOption {
|
|
type = types.str;
|
|
description = "E-mail address, used for git.";
|
|
};
|
|
uid = mkOption {
|
|
type = types.int;
|
|
default = 1000;
|
|
description = "Numeric user id.";
|
|
};
|
|
sshAuthorizedKeys = mkOption {
|
|
type = types.listOf types.str;
|
|
default = [ ];
|
|
description = "Public keys allowed to log in over SSH.";
|
|
};
|
|
sshKeys = mkOption {
|
|
type = types.listOf types.str;
|
|
default = [ "id_ed25519" ];
|
|
description = ''
|
|
Private SSH key names. Each one is installed as ~/.ssh/<name> when
|
|
secrets/ssh-<name>.age exists (and ~/.ssh/<name>.pub when
|
|
secrets/ssh-<name>.pub exists).
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
secretsDir = mkOption {
|
|
type = types.path;
|
|
default = ../../secrets;
|
|
defaultText = lib.literalExpression "./secrets";
|
|
description = ''
|
|
Directory with the agenix *.age files. A secret is declared only when its
|
|
file exists, so a fresh clone still evaluates. Flakes only see files that
|
|
git tracks: `git add` new secrets before building.
|
|
'';
|
|
};
|
|
};
|
|
}
|