From 5b6fae13fbdafac7fa724ddb1d3a699ec92e7194 Mon Sep 17 00:00:00 2001 From: Emma Thorpe Date: Tue, 2 Jun 2026 14:58:26 +0000 Subject: [PATCH 1/2] 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. --- emmathorpe/home/git.nix | 4 +-- emmathorpe/user.nix | 8 +++-- flake.nix | 66 +++++++++++++++++++++++++---------------- 3 files changed, 47 insertions(+), 31 deletions(-) diff --git a/emmathorpe/home/git.nix b/emmathorpe/home/git.nix index ded5a12..8aca636 100644 --- a/emmathorpe/home/git.nix +++ b/emmathorpe/home/git.nix @@ -1,6 +1,6 @@ # Version control: git + delta pager + commitizen. The work host layers # commit signing and an email override on top (see work/default.nix). -{ pkgs, ... }: +{ pkgs, fullName, ... }: { home.packages = [ pkgs.commitizen @@ -10,7 +10,7 @@ enable = true; package = pkgs.gitFull; settings = { - user.name = "Emma Thorpe"; + user.name = fullName; push = { autoSetupRemote = true; }; diff --git a/emmathorpe/user.nix b/emmathorpe/user.nix index 7cf249e..b8a677e 100644 --- a/emmathorpe/user.nix +++ b/emmathorpe/user.nix @@ -3,15 +3,17 @@ pkgs, inputs, lib, + username, + fullName, ... }: { programs.zsh.enable = true; - users.users.emmathorpe = { + users.users.${username} = { isNormalUser = true; - home = "/home/emmathorpe"; - description = "Emma Thorpe"; + home = "/home/${username}"; + description = fullName; extraGroups = [ "wheel" "docker" diff --git a/flake.nix b/flake.nix index 4196d87..d38585f 100644 --- a/flake.nix +++ b/flake.nix @@ -69,67 +69,81 @@ { home-manager.useGlobalPkgs = 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 - # baseModules. `inputs` is threaded into specialArgs so any module can - # reach the flake inputs (e.g. the work module uses inputs for claude-code). + # baseModules. The user identity (username/fullName) is threaded through + # specialArgs so user.nix and the home modules stay host-agnostic, and the + # home-manager profile is keyed by the host's username. mkHost = - { system, modules }: + { + system, + username, + fullName, + modules, + homeModules, + }: nixpkgs.lib.nixosSystem { inherit system; - specialArgs = { inherit inputs; }; - modules = baseModules ++ modules; + specialArgs = { inherit inputs username fullName; }; + 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: - # 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. hosts = { emmathorpe-mbp = { system = "aarch64-linux"; + username = "lyrathorpe"; + fullName = "Lyra Thorpe"; modules = [ ./system/machine/MBP-Asahi/configuration.nix nixos-apple-silicon.nixosModules.default ./emmathorpe/swaywm.nix - { - home-manager.users.emmathorpe.imports = [ - ./emmathorpe/home - ./emmathorpe/home/desktop.nix - ]; - } + ]; + homeModules = [ + ./emmathorpe/home + ./emmathorpe/home/desktop.nix ]; }; emmathorpe-x1c = { system = "x86_64-linux"; + username = "lyrathorpe"; + fullName = "Lyra Thorpe"; modules = [ ./system/machine/X1/configuration.nix ./emmathorpe/swaywm.nix - { - home-manager.users.emmathorpe.imports = [ - ./emmathorpe/home - ./emmathorpe/home/desktop.nix - ]; - } + ]; + homeModules = [ + ./emmathorpe/home + ./emmathorpe/home/desktop.nix ]; }; emmathorpe-edaas = { system = "x86_64-linux"; + username = "emmathorpe"; + fullName = "Emma Thorpe"; modules = [ ./system/machine/EDaaS/configuration.nix nixos-wsl.nixosModules.default ./emmathorpe/swaywm.nix - { - home-manager.users.emmathorpe.imports = [ - ./emmathorpe/home - ./system/modules/work/default.nix - ]; - } + ]; + homeModules = [ + ./emmathorpe/home + ./system/modules/work/default.nix ]; }; }; From 6ac2a80c8db0927142d660681de99a55ea62de81 Mon Sep 17 00:00:00 2001 From: Emma Thorpe Date: Tue, 2 Jun 2026 15:06:10 +0000 Subject: [PATCH 2/2] refactor: rename config dir to lyrathorpe and host labels Move ./emmathorpe -> ./lyrathorpe (git mv preserves history) and rename the MBP/X1 nixosConfiguration names to lyrathorpe-mbp / lyrathorpe-x1c. The EDaaS host keeps its emmathorpe-edaas name and Emma Thorpe identity; it still imports the shared (renamed) config dir. Derivation outputs are byte-identical to before; pure relabel. --- flake.nix | 22 ++++++++++----------- {emmathorpe => lyrathorpe}/home/default.nix | 0 {emmathorpe => lyrathorpe}/home/desktop.nix | 0 {emmathorpe => lyrathorpe}/home/editor.nix | 0 {emmathorpe => lyrathorpe}/home/git.nix | 0 {emmathorpe => lyrathorpe}/home/shell.nix | 0 {emmathorpe => lyrathorpe}/home/sway.nix | 0 {emmathorpe => lyrathorpe}/swaywm.nix | 0 {emmathorpe => lyrathorpe}/user.nix | 0 9 files changed, 11 insertions(+), 11 deletions(-) rename {emmathorpe => lyrathorpe}/home/default.nix (100%) rename {emmathorpe => lyrathorpe}/home/desktop.nix (100%) rename {emmathorpe => lyrathorpe}/home/editor.nix (100%) rename {emmathorpe => lyrathorpe}/home/git.nix (100%) rename {emmathorpe => lyrathorpe}/home/shell.nix (100%) rename {emmathorpe => lyrathorpe}/home/sway.nix (100%) rename {emmathorpe => lyrathorpe}/swaywm.nix (100%) rename {emmathorpe => lyrathorpe}/user.nix (100%) diff --git a/flake.nix b/flake.nix index d38585f..777636c 100644 --- a/flake.nix +++ b/flake.nix @@ -53,7 +53,7 @@ # Shared scaffolding for every host: common user, overlays, home-manager. baseModules = [ - ./emmathorpe/user.nix + ./lyrathorpe/user.nix { nixpkgs.overlays = overlays; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) unfreePackages; @@ -103,32 +103,32 @@ # 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. hosts = { - emmathorpe-mbp = { + lyrathorpe-mbp = { system = "aarch64-linux"; username = "lyrathorpe"; fullName = "Lyra Thorpe"; modules = [ ./system/machine/MBP-Asahi/configuration.nix nixos-apple-silicon.nixosModules.default - ./emmathorpe/swaywm.nix + ./lyrathorpe/swaywm.nix ]; homeModules = [ - ./emmathorpe/home - ./emmathorpe/home/desktop.nix + ./lyrathorpe/home + ./lyrathorpe/home/desktop.nix ]; }; - emmathorpe-x1c = { + lyrathorpe-x1c = { system = "x86_64-linux"; username = "lyrathorpe"; fullName = "Lyra Thorpe"; modules = [ ./system/machine/X1/configuration.nix - ./emmathorpe/swaywm.nix + ./lyrathorpe/swaywm.nix ]; homeModules = [ - ./emmathorpe/home - ./emmathorpe/home/desktop.nix + ./lyrathorpe/home + ./lyrathorpe/home/desktop.nix ]; }; @@ -139,10 +139,10 @@ modules = [ ./system/machine/EDaaS/configuration.nix nixos-wsl.nixosModules.default - ./emmathorpe/swaywm.nix + ./lyrathorpe/swaywm.nix ]; homeModules = [ - ./emmathorpe/home + ./lyrathorpe/home ./system/modules/work/default.nix ]; }; diff --git a/emmathorpe/home/default.nix b/lyrathorpe/home/default.nix similarity index 100% rename from emmathorpe/home/default.nix rename to lyrathorpe/home/default.nix diff --git a/emmathorpe/home/desktop.nix b/lyrathorpe/home/desktop.nix similarity index 100% rename from emmathorpe/home/desktop.nix rename to lyrathorpe/home/desktop.nix diff --git a/emmathorpe/home/editor.nix b/lyrathorpe/home/editor.nix similarity index 100% rename from emmathorpe/home/editor.nix rename to lyrathorpe/home/editor.nix diff --git a/emmathorpe/home/git.nix b/lyrathorpe/home/git.nix similarity index 100% rename from emmathorpe/home/git.nix rename to lyrathorpe/home/git.nix diff --git a/emmathorpe/home/shell.nix b/lyrathorpe/home/shell.nix similarity index 100% rename from emmathorpe/home/shell.nix rename to lyrathorpe/home/shell.nix diff --git a/emmathorpe/home/sway.nix b/lyrathorpe/home/sway.nix similarity index 100% rename from emmathorpe/home/sway.nix rename to lyrathorpe/home/sway.nix diff --git a/emmathorpe/swaywm.nix b/lyrathorpe/swaywm.nix similarity index 100% rename from emmathorpe/swaywm.nix rename to lyrathorpe/swaywm.nix diff --git a/emmathorpe/user.nix b/lyrathorpe/user.nix similarity index 100% rename from emmathorpe/user.nix rename to lyrathorpe/user.nix