From de85f45840632c8c91a416a8663a924708e4e6cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey?= Date: Fri, 17 Apr 2026 11:12:55 -0700 Subject: [PATCH 01/12] feat: add lobtop darwin host Adds a new macOS host for the work laptop (LOB-MG2QJH49W7), configured under hosts/lobtop and registered as darwinConfigurations.lobtop. Also adds a configDir parameter to mkDarwinHost (and mkNixosHost for consistency) so the flake key and config directory can differ from the actual system hostname. Co-Authored-By: Claude Sonnet 4.6 --- flake.nix | 6 ++++++ hosts/lobtop/default.nix | 18 ++++++++++++++++++ hosts/lobtop/dock.nix | 17 +++++++++++++++++ hosts/lobtop/hardware.nix | 15 +++++++++++++++ hosts/lobtop/programs.nix | 18 ++++++++++++++++++ lib/hosts.nix | 13 ++++++++----- 6 files changed, 82 insertions(+), 5 deletions(-) create mode 100644 hosts/lobtop/default.nix create mode 100644 hosts/lobtop/dock.nix create mode 100644 hosts/lobtop/hardware.nix create mode 100644 hosts/lobtop/programs.nix diff --git a/flake.nix b/flake.nix index 2b597c93..b4f8d3a7 100644 --- a/flake.nix +++ b/flake.nix @@ -126,6 +126,12 @@ hostname = "Stroma"; username = "corey"; }; + + lobtop = mkDarwinHost { + hostname = "LOB-MG2QJH49W7"; + username = "corey"; + configDir = "lobtop"; + }; }; deploy = { diff --git a/hosts/lobtop/default.nix b/hosts/lobtop/default.nix new file mode 100644 index 00000000..3a33cae5 --- /dev/null +++ b/hosts/lobtop/default.nix @@ -0,0 +1,18 @@ +{ + config, + pkgs, + ... +}: { + imports = [ + ./dock.nix + ./hardware.nix + ./programs.nix + ]; + + rc.darwin.defaults = { + fonts = true; + homebrew = true; + security = true; + system = true; + }; +} diff --git a/hosts/lobtop/dock.nix b/hosts/lobtop/dock.nix new file mode 100644 index 00000000..52d5e741 --- /dev/null +++ b/hosts/lobtop/dock.nix @@ -0,0 +1,17 @@ +{ + config, + pkgs, + ... +}: { + system.defaults.dock = { + tilesize = 42; + largesize = 86; + persistent-apps = [ + "/System/Volumes/Preboot/Cryptexes/App/System/Applications/Safari.app" + "/System/Applications/Calendar.app" + "/System/Applications/Reminders.app" + "/System/Applications/Notes.app" + "/Applications/Slack.app" + ]; + }; +} diff --git a/hosts/lobtop/hardware.nix b/hosts/lobtop/hardware.nix new file mode 100644 index 00000000..676f530f --- /dev/null +++ b/hosts/lobtop/hardware.nix @@ -0,0 +1,15 @@ +{ + config, + pkgs, + ... +}: { + users.users.corey = { + home = "/Users/corey"; + }; + system.primaryUser = "corey"; + + networking.hostName = "LOB-MG2QJH49W7"; + + system.stateVersion = 5; + nixpkgs.hostPlatform = "aarch64-darwin"; +} diff --git a/hosts/lobtop/programs.nix b/hosts/lobtop/programs.nix new file mode 100644 index 00000000..74161448 --- /dev/null +++ b/hosts/lobtop/programs.nix @@ -0,0 +1,18 @@ +{ + config, + pkgs, + ... +}: { + environment.systemPackages = with pkgs; [ + m-cli + mas + the-unarchiver + ]; + + homebrew = { + enable = true; + # N.B.: Removed entries in `masApps` require manual uninstallation + masApps = { + }; + }; +} diff --git a/lib/hosts.nix b/lib/hosts.nix index 89e6940b..11259bb4 100644 --- a/lib/hosts.nix +++ b/lib/hosts.nix @@ -23,13 +23,14 @@ inputs @ { mkHomeManager = { username, hostname, + configDir, system, showBatteryStatus, lightweight ? false, }: let pkgs-stable-25-11 = import nixpkgs-stable-25-11 {inherit system;}; pkgs-stable-24-05 = import nixpkgs-stable-24-05 {inherit system;}; - hostHomePath = ./../hosts/${hostname}/home.nix; + hostHomePath = ./../hosts/${configDir}/home.nix; hostHomeConfig = if builtins.pathExists hostHomePath then hostHomePath @@ -57,6 +58,7 @@ inputs @ { system, username, lightweight ? false, + configDir ? hostname, }: nixpkgs.lib.nixosSystem { inherit system; @@ -70,11 +72,11 @@ inputs @ { disko.nixosModules.disko ./../modules/base ./../modules/nixos - ./../hosts/${hostname} + ./../hosts/${configDir} agenix.nixosModules.default home-manager.nixosModules.home-manager (mkHomeManager { - inherit username hostname system lightweight; + inherit username hostname system lightweight configDir; showBatteryStatus = false; }) { @@ -90,6 +92,7 @@ inputs @ { hostname, username, lightweight ? false, + configDir ? hostname, }: let system = "aarch64-darwin"; in @@ -105,10 +108,10 @@ inputs @ { nix-homebrew.darwinModules.nix-homebrew ./../modules/base ./../modules/darwin - ./../hosts/${hostname} + ./../hosts/${configDir} home-manager.darwinModules.home-manager (mkHomeManager { - inherit username hostname system lightweight; + inherit username hostname system lightweight configDir; showBatteryStatus = true; }) { From 2b52292b100e331bfc9243adc5256a76222eac3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey?= Date: Fri, 17 Apr 2026 11:18:11 -0700 Subject: [PATCH 02/12] feat: register lobtop SSH key Co-Authored-By: Claude Sonnet 4.6 --- hosts/lobtop/key.pub | 1 + lib/keys.nix | 1 + 2 files changed, 2 insertions(+) create mode 100644 hosts/lobtop/key.pub diff --git a/hosts/lobtop/key.pub b/hosts/lobtop/key.pub new file mode 100644 index 00000000..ce1a6e33 --- /dev/null +++ b/hosts/lobtop/key.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOXjSJpXPnmfSS87TTtN2a+VM/jBQav5JRe5GaBz75gC corey.johns@lobtop diff --git a/lib/keys.nix b/lib/keys.nix index 657ed7f7..2e24af77 100644 --- a/lib/keys.nix +++ b/lib/keys.nix @@ -8,6 +8,7 @@ let value = readKey h; }) [ "glyph" + "lobtop" "Rhizome" "spore" "Stroma" From a147531b168dcf12ec1393a93c104f54ef1d4cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey?= Date: Fri, 17 Apr 2026 11:30:55 -0700 Subject: [PATCH 03/12] feat: authorize lobtop key for mu SSH access Co-Authored-By: Claude Sonnet 4.6 --- modules/nixos/ssh.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/nixos/ssh.nix b/modules/nixos/ssh.nix index dac23282..71b745b4 100644 --- a/modules/nixos/ssh.nix +++ b/modules/nixos/ssh.nix @@ -16,6 +16,7 @@ keys.Rhizome keys.glyph keys.Stroma + keys.lobtop ]; security.pam.sshAgentAuth.authorizedKeysFiles = lib.mkForce ["/etc/ssh/authorized_keys.d/%u"]; From 86b8a625253dd6367d1b9219f4bfb0211ca37bf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey?= Date: Fri, 17 Apr 2026 11:37:56 -0700 Subject: [PATCH 04/12] chore: drop unused args in lobtop host files Co-Authored-By: Claude Sonnet 4.6 --- hosts/lobtop/default.nix | 6 +----- hosts/lobtop/dock.nix | 6 +----- hosts/lobtop/hardware.nix | 6 +----- hosts/lobtop/programs.nix | 6 +----- 4 files changed, 4 insertions(+), 20 deletions(-) diff --git a/hosts/lobtop/default.nix b/hosts/lobtop/default.nix index 3a33cae5..adce4393 100644 --- a/hosts/lobtop/default.nix +++ b/hosts/lobtop/default.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { imports = [ ./dock.nix ./hardware.nix diff --git a/hosts/lobtop/dock.nix b/hosts/lobtop/dock.nix index 52d5e741..16720519 100644 --- a/hosts/lobtop/dock.nix +++ b/hosts/lobtop/dock.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { system.defaults.dock = { tilesize = 42; largesize = 86; diff --git a/hosts/lobtop/hardware.nix b/hosts/lobtop/hardware.nix index 676f530f..6acb3fe5 100644 --- a/hosts/lobtop/hardware.nix +++ b/hosts/lobtop/hardware.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { users.users.corey = { home = "/Users/corey"; }; diff --git a/hosts/lobtop/programs.nix b/hosts/lobtop/programs.nix index 74161448..cd9df93b 100644 --- a/hosts/lobtop/programs.nix +++ b/hosts/lobtop/programs.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +{pkgs, ...}: { environment.systemPackages = with pkgs; [ m-cli mas From cf7d7346fcbfd026b89ddf5b06f1a4dff4a769dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey?= Date: Fri, 17 Apr 2026 12:18:06 -0700 Subject: [PATCH 05/12] feat: map LOB-* hostname to lobtop in prompt and justfile Co-Authored-By: Claude Sonnet 4.6 --- home/programs/starship.nix | 3 +++ justfile | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/home/programs/starship.nix b/home/programs/starship.nix index 72738fb7..076900c8 100644 --- a/home/programs/starship.nix +++ b/home/programs/starship.nix @@ -87,6 +87,9 @@ format = "[@$hostname ]($style)"; style = "bg:color_orange fg:color_fg0"; disabled = false; + aliases = { + "LOB-MG2QJH49W7" = "Lobtop"; + }; }; directory = { style = "fg:color_fg0 bg:color_yellow"; diff --git a/justfile b/justfile index b5d27bf0..fa2116b3 100644 --- a/justfile +++ b/justfile @@ -1,7 +1,8 @@ # Build the system config and switch to it when running `just` with no args default: switch -hostname := `hostname | cut -d "." -f 1` +# Substitute work laptop hostname if necessary +hostname := `h=$(hostname | cut -d "." -f 1); case "$h" in LOB-*) echo "lobtop";; *) echo "$h";; esac` [macos] switch host=hostname: From 9ced3669e0ee6af15dc9041a35013f825bedf1ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey=20=28they/them=29?= Date: Fri, 17 Apr 2026 12:35:55 -0700 Subject: [PATCH 06/12] feat: update dock items --- hosts/lobtop/dock.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hosts/lobtop/dock.nix b/hosts/lobtop/dock.nix index 16720519..e2f18a5b 100644 --- a/hosts/lobtop/dock.nix +++ b/hosts/lobtop/dock.nix @@ -4,9 +4,16 @@ _: { largesize = 86; persistent-apps = [ "/System/Volumes/Preboot/Cryptexes/App/System/Applications/Safari.app" + "/System/Applications/Mail.app" + "/Applications/Zed.app" + "/Applications/rootshell.app" + "/Applications/Reeder.app" "/System/Applications/Calendar.app" "/System/Applications/Reminders.app" "/System/Applications/Notes.app" + "/Applications/Things3.app" + "/Applications/Craft.app" + "/System/Applications/Messages.app" "/Applications/Slack.app" ]; }; From f507b5b9f283b03e0062d5a796e0ce93f50a2969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey=20=28they/them=29?= Date: Fri, 17 Apr 2026 12:36:18 -0700 Subject: [PATCH 07/12] chore: update primaryUser --- hosts/lobtop/hardware.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/lobtop/hardware.nix b/hosts/lobtop/hardware.nix index 6acb3fe5..15c4cb00 100644 --- a/hosts/lobtop/hardware.nix +++ b/hosts/lobtop/hardware.nix @@ -2,7 +2,7 @@ _: { users.users.corey = { home = "/Users/corey"; }; - system.primaryUser = "corey"; + system.primaryUser = "corey.johns"; networking.hostName = "LOB-MG2QJH49W7"; From 5c30e03b77c2063fa443c1b542ffccd15f0017d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey=20=28they/them=29?= Date: Fri, 17 Apr 2026 12:50:32 -0700 Subject: [PATCH 08/12] chore: update username --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index b4f8d3a7..9d5026d0 100644 --- a/flake.nix +++ b/flake.nix @@ -129,7 +129,7 @@ lobtop = mkDarwinHost { hostname = "LOB-MG2QJH49W7"; - username = "corey"; + username = "corey.johns"; configDir = "lobtop"; }; }; From 715e6ec3c65f05bb33276d9a269b0130d5d85108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey?= Date: Fri, 17 Apr 2026 13:03:05 -0700 Subject: [PATCH 09/12] fix: update primaryUser and home dir for corey.johns username Co-Authored-By: Claude Sonnet 4.6 --- hosts/lobtop/hardware.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/lobtop/hardware.nix b/hosts/lobtop/hardware.nix index 15c4cb00..0f78fc41 100644 --- a/hosts/lobtop/hardware.nix +++ b/hosts/lobtop/hardware.nix @@ -1,6 +1,6 @@ _: { - users.users.corey = { - home = "/Users/corey"; + users.users."corey.johns" = { + home = "/Users/corey.johns"; }; system.primaryUser = "corey.johns"; From cd2dc8c98dc4abf69d2346e136eaea0485a588f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey=20=28they/them=29?= Date: Fri, 17 Apr 2026 13:08:28 -0700 Subject: [PATCH 10/12] fix: update Things path --- hosts/lobtop/dock.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/lobtop/dock.nix b/hosts/lobtop/dock.nix index e2f18a5b..3cc17af7 100644 --- a/hosts/lobtop/dock.nix +++ b/hosts/lobtop/dock.nix @@ -11,7 +11,7 @@ _: { "/System/Applications/Calendar.app" "/System/Applications/Reminders.app" "/System/Applications/Notes.app" - "/Applications/Things3.app" + "/Applications/Things.app" "/Applications/Craft.app" "/System/Applications/Messages.app" "/Applications/Slack.app" From 1553d8126a37675a4b8bf730a6265af28021d608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey=20=28they/them=29?= Date: Fri, 17 Apr 2026 13:08:40 -0700 Subject: [PATCH 11/12] feat: enable Craft --- hosts/lobtop/programs.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hosts/lobtop/programs.nix b/hosts/lobtop/programs.nix index cd9df93b..75e8f9e7 100644 --- a/hosts/lobtop/programs.nix +++ b/hosts/lobtop/programs.nix @@ -11,4 +11,8 @@ masApps = { }; }; + + programs.craft = { + enable = true; + }; } From 648c17f1688a75c3b6bc9bdb3c7577ef09e3c76d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey=20=28they/them=29?= Date: Fri, 17 Apr 2026 13:09:58 -0700 Subject: [PATCH 12/12] fix: lowercase alias --- home/programs/starship.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/programs/starship.nix b/home/programs/starship.nix index 076900c8..59d5c89c 100644 --- a/home/programs/starship.nix +++ b/home/programs/starship.nix @@ -88,7 +88,7 @@ style = "bg:color_orange fg:color_fg0"; disabled = false; aliases = { - "LOB-MG2QJH49W7" = "Lobtop"; + "LOB-MG2QJH49W7" = "lobtop"; }; }; directory = {