Refactor/rename config dir to lyrathorpe #1
@@ -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;
|
||||
};
|
||||
|
||||
+5
-3
@@ -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"
|
||||
|
||||
@@ -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
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user