feat(user): switch primary identity to lyrathorpe / Lyra Thorpe

Thread username and fullName per host through the flake host table and specialArgs / home-manager.extraSpecialArgs, so user.nix and git.nix derive identity instead of hardcoding it.

MBP and X1 now provision user lyrathorpe (Lyra Thorpe). EDaaS retains emmathorpe (Emma Thorpe) and its wsl.defaultUser; work commit email is unchanged.
This commit is contained in:
Emma Thorpe
2026-06-02 14:58:26 +00:00
parent 74792f9e5b
commit 5b6fae13fb
3 changed files with 47 additions and 31 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
# Version control: git + delta pager + commitizen. The work host layers # Version control: git + delta pager + commitizen. The work host layers
# commit signing and an email override on top (see work/default.nix). # commit signing and an email override on top (see work/default.nix).
{ pkgs, ... }: { pkgs, fullName, ... }:
{ {
home.packages = [ home.packages = [
pkgs.commitizen pkgs.commitizen
@@ -10,7 +10,7 @@
enable = true; enable = true;
package = pkgs.gitFull; package = pkgs.gitFull;
settings = { settings = {
user.name = "Emma Thorpe"; user.name = fullName;
push = { push = {
autoSetupRemote = true; autoSetupRemote = true;
}; };
+5 -3
View File
@@ -3,15 +3,17 @@
pkgs, pkgs,
inputs, inputs,
lib, lib,
username,
fullName,
... ...
}: }:
{ {
programs.zsh.enable = true; programs.zsh.enable = true;
users.users.emmathorpe = { users.users.${username} = {
isNormalUser = true; isNormalUser = true;
home = "/home/emmathorpe"; home = "/home/${username}";
description = "Emma Thorpe"; description = fullName;
extraGroups = [ extraGroups = [
"wheel" "wheel"
"docker" "docker"
+34 -20
View File
@@ -69,68 +69,82 @@
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
} }
]; ];
# mkHost :: { system, modules } -> nixosSystem # mkHost :: { system, username, fullName, modules, homeModules } -> nixosSystem
# Builds one machine by appending its host-specific modules to the shared # Builds one machine by appending its host-specific modules to the shared
# baseModules. `inputs` is threaded into specialArgs so any module can # baseModules. The user identity (username/fullName) is threaded through
# reach the flake inputs (e.g. the work module uses inputs for claude-code). # specialArgs so user.nix and the home modules stay host-agnostic, and the
# home-manager profile is keyed by the host's username.
mkHost = mkHost =
{ system, modules }: {
system,
username,
fullName,
modules,
homeModules,
}:
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
inherit system; inherit system;
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs username fullName; };
modules = baseModules ++ modules; modules =
baseModules
++ modules
++ [
{
home-manager.extraSpecialArgs = { inherit inputs username fullName; };
home-manager.users.${username}.imports = homeModules;
}
];
}; };
# Host table — declarative registry of every machine. To add a host: # Host table — declarative registry of every machine. To add a host:
# give it a name, its `system`, and the list of machine-specific modules. # give it a name, its `system`, the owning user, and the module lists.
# mapAttrs below turns each entry into a nixosConfiguration of the same name. # mapAttrs below turns each entry into a nixosConfiguration of the same name.
hosts = { hosts = {
emmathorpe-mbp = { emmathorpe-mbp = {
system = "aarch64-linux"; system = "aarch64-linux";
username = "lyrathorpe";
fullName = "Lyra Thorpe";
modules = [ modules = [
./system/machine/MBP-Asahi/configuration.nix ./system/machine/MBP-Asahi/configuration.nix
nixos-apple-silicon.nixosModules.default nixos-apple-silicon.nixosModules.default
./emmathorpe/swaywm.nix ./emmathorpe/swaywm.nix
{ ];
home-manager.users.emmathorpe.imports = [ homeModules = [
./emmathorpe/home ./emmathorpe/home
./emmathorpe/home/desktop.nix ./emmathorpe/home/desktop.nix
]; ];
}
];
}; };
emmathorpe-x1c = { emmathorpe-x1c = {
system = "x86_64-linux"; system = "x86_64-linux";
username = "lyrathorpe";
fullName = "Lyra Thorpe";
modules = [ modules = [
./system/machine/X1/configuration.nix ./system/machine/X1/configuration.nix
./emmathorpe/swaywm.nix ./emmathorpe/swaywm.nix
{ ];
home-manager.users.emmathorpe.imports = [ homeModules = [
./emmathorpe/home ./emmathorpe/home
./emmathorpe/home/desktop.nix ./emmathorpe/home/desktop.nix
]; ];
}
];
}; };
emmathorpe-edaas = { emmathorpe-edaas = {
system = "x86_64-linux"; system = "x86_64-linux";
username = "emmathorpe";
fullName = "Emma Thorpe";
modules = [ modules = [
./system/machine/EDaaS/configuration.nix ./system/machine/EDaaS/configuration.nix
nixos-wsl.nixosModules.default nixos-wsl.nixosModules.default
./emmathorpe/swaywm.nix ./emmathorpe/swaywm.nix
{ ];
home-manager.users.emmathorpe.imports = [ homeModules = [
./emmathorpe/home ./emmathorpe/home
./system/modules/work/default.nix ./system/modules/work/default.nix
]; ];
}
];
}; };
}; };
in in