From d7a19306505bf6c2d46401d705595db23e6b66f0 Mon Sep 17 00:00:00 2001 From: Emma Thorpe Date: Mon, 29 Jun 2026 13:02:34 +0100 Subject: [PATCH] refactor(home): move personal data out of the shared home modules The dockerpi ssh host shortcut (home/shell.nix) and the gammastep night-light coordinates (home/sway.nix) were hardcoded in shared modules, so every host inherited them. Move both into a per-user module (users/lyrathorpe/home.nix) imported on Lyra's hosts only, not the work box; the gammastep block is Linux-guarded so Darwin skips it. No build change on existing hosts: the generated configs are byte-identical (verified by drvPath), the data is simply no longer in shared modules. --- flake.nix | 9 ++++++++- home/shell.nix | 3 --- home/sway.nix | 7 +++---- users/lyrathorpe/home.nix | 17 +++++++++++++++++ 4 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 users/lyrathorpe/home.nix diff --git a/flake.nix b/flake.nix index ca17d82..2f6a4dd 100644 --- a/flake.nix +++ b/flake.nix @@ -224,6 +224,7 @@ ]; users.lyrathorpe.homeModules = [ ./home + ./users/lyrathorpe/home.nix ./home/desktop.nix ]; }; @@ -245,6 +246,7 @@ ]; users.lyrathorpe.homeModules = [ ./home + ./users/lyrathorpe/home.nix ./home/desktop.nix ]; }; @@ -262,6 +264,7 @@ ]; users.lyrathorpe.homeModules = [ ./home + ./users/lyrathorpe/home.nix ./home/desktop.nix ]; }; @@ -295,7 +298,10 @@ inputs.nixos-hardware.nixosModules.raspberry-pi-5 ./modules/ssh.nix ]; - users.lyrathorpe.homeModules = [ ./home ]; + users.lyrathorpe.homeModules = [ + ./home + ./users/lyrathorpe/home.nix + ]; }; }; @@ -311,6 +317,7 @@ ]; homeModules = [ ./home + ./users/lyrathorpe/home.nix ]; }; }; diff --git a/home/shell.nix b/home/shell.nix index ec6e421..c539dc2 100644 --- a/home/shell.nix +++ b/home/shell.nix @@ -341,9 +341,6 @@ in IdentityFile = "~/.ssh/code.emmathe.dev"; IdentitiesOnly = true; }; - "dockerpi.inf.cbg.emmaisvery.gay" = { - User = "emmathorpe"; - }; }; }; diff --git a/home/sway.nix b/home/sway.nix index b52f67a..6374608 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -334,13 +334,12 @@ in ]; }; - # Night light. Manual location (no geoclue dependency); adjust the coordinates - # to taste. Warmer at night, neutral by day. + # Night light. Manual location (no geoclue dependency); warmer at night, + # neutral by day. Coordinates come from the per-user module (e.g. + # users/lyrathorpe/home.nix), not this shared module. services.gammastep = { enable = true; provider = "manual"; - latitude = 51.5; - longitude = -0.13; # London-ish; set to your actual location temperature = { day = 6500; night = 3700; diff --git a/users/lyrathorpe/home.nix b/users/lyrathorpe/home.nix new file mode 100644 index 0000000..572da4f --- /dev/null +++ b/users/lyrathorpe/home.nix @@ -0,0 +1,17 @@ +# Lyra's personal home extras, imported on her hosts (not the work box). Keeps +# personal data out of the shared home/ modules. See README "Users". +{ pkgs, lib, ... }: +{ + # Personal ssh host shortcut. + programs.ssh.settings."dockerpi.inf.cbg.emmaisvery.gay" = { + User = "emmathorpe"; + }; + + # Night-light location for gammastep (the service itself is enabled by + # home/sway.nix on graphical hosts). Linux-guarded so Darwin, which imports + # this module but has no gammastep, skips it. + services.gammastep = lib.mkIf pkgs.stdenv.hostPlatform.isLinux { + latitude = 51.5; + longitude = -0.13; + }; +}