From bd0a03e7b88e1cd837bb21d3f2dd7605c86078a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20M=C3=BChl?= Date: Fri, 30 Jan 2026 11:14:58 +0100 Subject: [PATCH] Re-enable darwin builds home-manager only for now --- flake.lock | 6 +++--- .../{ => by-host/endurance}/communication.nix | 0 home/{ => by-host/endurance}/config.nix | 0 .../endurance}/config/appearance.nix | 0 home/{ => by-host/endurance}/config/bin.nix | 0 home/{ => by-host/endurance}/config/cron.nix | 0 home/{ => by-host/endurance}/config/dev.nix | 0 home/{ => by-host/endurance}/config/fonts.nix | 0 home/{ => by-host/endurance}/config/git.nix | 0 .../endurance}/config/radicle.nix | 0 .../endurance}/default-applications.nix | 0 home/{ => by-host/endurance}/default.nix | 0 home/{ => by-host/endurance}/gaming.nix | 0 home/{ => by-host/endurance}/gpg/default.nix | 0 home/{ => by-host/endurance}/misc/browser.nix | 0 .../endurance}/misc/creativity.nix | 0 .../endurance}/misc/everything.nix | 0 .../{ => by-host/endurance}/misc/launcher.nix | 0 .../{ => by-host/endurance}/misc/onedrive.nix | 0 .../endurance}/misc/recording.nix | 0 .../endurance}/niri/autostart.nix | 0 home/{ => by-host/endurance}/niri/default.nix | 0 .../{ => by-host/endurance}/niri/keybinds.nix | 0 .../{ => by-host/endurance}/niri/settings.nix | 0 home/{ => by-host/endurance}/niri/shell.nix | 0 .../endurance}/niri/window-rules.nix | 0 .../endurance}/per-host/aepplet/default.nix | 0 .../{ => by-host/endurance}/per-host/fram.nix | 0 .../{ => by-host/endurance}/per-host/vasa.nix | 0 home/{ => by-host/endurance}/ssh.nix | 0 home/{ => by-host/endurance}/stylix.nix | 0 .../alex_rainer-8UkwQR4tw_o-unsplash.jpg | Bin .../g-dochev-g-a_5TJlwMI-unsplash.jpg | Bin .../lukasz-szmigiel-8AdYB7M4OHY-unsplash.jpg | Bin .../richard-horvath-_nWaeTF6qo0-unsplash.jpg | Bin .../zhen-yao-wZJWdra-6Q4-unsplash.jpg | Bin home/by-host/vasa/default.nix | 16 +++++++++++++++ hosts/vasa/default.nix | 11 ++++------ modules/darwin/default.nix | 5 +++++ modules/darwin/secrets.nix | 8 ++++++++ modules/flake/homes.nix | 19 ++++++++++-------- modules/generic/default.nix | 8 ++------ modules/generic/nix.nix | 4 +++- modules/generic/secrets.nix | 5 ----- modules/nixos/default.nix | 7 +++++++ modules/nixos/secrets.nix | 16 +++++++++++++++ modules/{generic => nixos}/ssh.nix | 0 47 files changed, 75 insertions(+), 30 deletions(-) rename home/{ => by-host/endurance}/communication.nix (100%) rename home/{ => by-host/endurance}/config.nix (100%) rename home/{ => by-host/endurance}/config/appearance.nix (100%) rename home/{ => by-host/endurance}/config/bin.nix (100%) rename home/{ => by-host/endurance}/config/cron.nix (100%) rename home/{ => by-host/endurance}/config/dev.nix (100%) rename home/{ => by-host/endurance}/config/fonts.nix (100%) rename home/{ => by-host/endurance}/config/git.nix (100%) rename home/{ => by-host/endurance}/config/radicle.nix (100%) rename home/{ => by-host/endurance}/default-applications.nix (100%) rename home/{ => by-host/endurance}/default.nix (100%) rename home/{ => by-host/endurance}/gaming.nix (100%) rename home/{ => by-host/endurance}/gpg/default.nix (100%) rename home/{ => by-host/endurance}/misc/browser.nix (100%) rename home/{ => by-host/endurance}/misc/creativity.nix (100%) rename home/{ => by-host/endurance}/misc/everything.nix (100%) rename home/{ => by-host/endurance}/misc/launcher.nix (100%) rename home/{ => by-host/endurance}/misc/onedrive.nix (100%) rename home/{ => by-host/endurance}/misc/recording.nix (100%) rename home/{ => by-host/endurance}/niri/autostart.nix (100%) rename home/{ => by-host/endurance}/niri/default.nix (100%) rename home/{ => by-host/endurance}/niri/keybinds.nix (100%) rename home/{ => by-host/endurance}/niri/settings.nix (100%) rename home/{ => by-host/endurance}/niri/shell.nix (100%) rename home/{ => by-host/endurance}/niri/window-rules.nix (100%) rename home/{ => by-host/endurance}/per-host/aepplet/default.nix (100%) rename home/{ => by-host/endurance}/per-host/fram.nix (100%) rename home/{ => by-host/endurance}/per-host/vasa.nix (100%) rename home/{ => by-host/endurance}/ssh.nix (100%) rename home/{ => by-host/endurance}/stylix.nix (100%) rename home/{ => by-host/endurance}/wallpapers/alex_rainer-8UkwQR4tw_o-unsplash.jpg (100%) rename home/{ => by-host/endurance}/wallpapers/g-dochev-g-a_5TJlwMI-unsplash.jpg (100%) rename home/{ => by-host/endurance}/wallpapers/lukasz-szmigiel-8AdYB7M4OHY-unsplash.jpg (100%) rename home/{ => by-host/endurance}/wallpapers/richard-horvath-_nWaeTF6qo0-unsplash.jpg (100%) rename home/{ => by-host/endurance}/wallpapers/zhen-yao-wZJWdra-6Q4-unsplash.jpg (100%) create mode 100644 home/by-host/vasa/default.nix create mode 100644 modules/darwin/default.nix create mode 100644 modules/darwin/secrets.nix create mode 100644 modules/nixos/secrets.nix rename modules/{generic => nixos}/ssh.nix (100%) diff --git a/flake.lock b/flake.lock index be70a40..11641bf 100644 --- a/flake.lock +++ b/flake.lock @@ -556,11 +556,11 @@ ] }, "locked": { - "lastModified": 1765480374, - "narHash": "sha256-HlbvQAqLx7WqZFFQZ8nu5UUJAVlXiV/kqKbyueA8srw=", + "lastModified": 1769723138, + "narHash": "sha256-kgkwjs33YfJasADIrHjHcTIDs3wNX0xzJhnUP+oldEw=", "owner": "nix-community", "repo": "home-manager", - "rev": "39cb677ed9e908e90478aa9fe5f3383dfc1a63f3", + "rev": "175532b6275b34598a0ceb1aef4b9b4006dd4073", "type": "github" }, "original": { diff --git a/home/communication.nix b/home/by-host/endurance/communication.nix similarity index 100% rename from home/communication.nix rename to home/by-host/endurance/communication.nix diff --git a/home/config.nix b/home/by-host/endurance/config.nix similarity index 100% rename from home/config.nix rename to home/by-host/endurance/config.nix diff --git a/home/config/appearance.nix b/home/by-host/endurance/config/appearance.nix similarity index 100% rename from home/config/appearance.nix rename to home/by-host/endurance/config/appearance.nix diff --git a/home/config/bin.nix b/home/by-host/endurance/config/bin.nix similarity index 100% rename from home/config/bin.nix rename to home/by-host/endurance/config/bin.nix diff --git a/home/config/cron.nix b/home/by-host/endurance/config/cron.nix similarity index 100% rename from home/config/cron.nix rename to home/by-host/endurance/config/cron.nix diff --git a/home/config/dev.nix b/home/by-host/endurance/config/dev.nix similarity index 100% rename from home/config/dev.nix rename to home/by-host/endurance/config/dev.nix diff --git a/home/config/fonts.nix b/home/by-host/endurance/config/fonts.nix similarity index 100% rename from home/config/fonts.nix rename to home/by-host/endurance/config/fonts.nix diff --git a/home/config/git.nix b/home/by-host/endurance/config/git.nix similarity index 100% rename from home/config/git.nix rename to home/by-host/endurance/config/git.nix diff --git a/home/config/radicle.nix b/home/by-host/endurance/config/radicle.nix similarity index 100% rename from home/config/radicle.nix rename to home/by-host/endurance/config/radicle.nix diff --git a/home/default-applications.nix b/home/by-host/endurance/default-applications.nix similarity index 100% rename from home/default-applications.nix rename to home/by-host/endurance/default-applications.nix diff --git a/home/default.nix b/home/by-host/endurance/default.nix similarity index 100% rename from home/default.nix rename to home/by-host/endurance/default.nix diff --git a/home/gaming.nix b/home/by-host/endurance/gaming.nix similarity index 100% rename from home/gaming.nix rename to home/by-host/endurance/gaming.nix diff --git a/home/gpg/default.nix b/home/by-host/endurance/gpg/default.nix similarity index 100% rename from home/gpg/default.nix rename to home/by-host/endurance/gpg/default.nix diff --git a/home/misc/browser.nix b/home/by-host/endurance/misc/browser.nix similarity index 100% rename from home/misc/browser.nix rename to home/by-host/endurance/misc/browser.nix diff --git a/home/misc/creativity.nix b/home/by-host/endurance/misc/creativity.nix similarity index 100% rename from home/misc/creativity.nix rename to home/by-host/endurance/misc/creativity.nix diff --git a/home/misc/everything.nix b/home/by-host/endurance/misc/everything.nix similarity index 100% rename from home/misc/everything.nix rename to home/by-host/endurance/misc/everything.nix diff --git a/home/misc/launcher.nix b/home/by-host/endurance/misc/launcher.nix similarity index 100% rename from home/misc/launcher.nix rename to home/by-host/endurance/misc/launcher.nix diff --git a/home/misc/onedrive.nix b/home/by-host/endurance/misc/onedrive.nix similarity index 100% rename from home/misc/onedrive.nix rename to home/by-host/endurance/misc/onedrive.nix diff --git a/home/misc/recording.nix b/home/by-host/endurance/misc/recording.nix similarity index 100% rename from home/misc/recording.nix rename to home/by-host/endurance/misc/recording.nix diff --git a/home/niri/autostart.nix b/home/by-host/endurance/niri/autostart.nix similarity index 100% rename from home/niri/autostart.nix rename to home/by-host/endurance/niri/autostart.nix diff --git a/home/niri/default.nix b/home/by-host/endurance/niri/default.nix similarity index 100% rename from home/niri/default.nix rename to home/by-host/endurance/niri/default.nix diff --git a/home/niri/keybinds.nix b/home/by-host/endurance/niri/keybinds.nix similarity index 100% rename from home/niri/keybinds.nix rename to home/by-host/endurance/niri/keybinds.nix diff --git a/home/niri/settings.nix b/home/by-host/endurance/niri/settings.nix similarity index 100% rename from home/niri/settings.nix rename to home/by-host/endurance/niri/settings.nix diff --git a/home/niri/shell.nix b/home/by-host/endurance/niri/shell.nix similarity index 100% rename from home/niri/shell.nix rename to home/by-host/endurance/niri/shell.nix diff --git a/home/niri/window-rules.nix b/home/by-host/endurance/niri/window-rules.nix similarity index 100% rename from home/niri/window-rules.nix rename to home/by-host/endurance/niri/window-rules.nix diff --git a/home/per-host/aepplet/default.nix b/home/by-host/endurance/per-host/aepplet/default.nix similarity index 100% rename from home/per-host/aepplet/default.nix rename to home/by-host/endurance/per-host/aepplet/default.nix diff --git a/home/per-host/fram.nix b/home/by-host/endurance/per-host/fram.nix similarity index 100% rename from home/per-host/fram.nix rename to home/by-host/endurance/per-host/fram.nix diff --git a/home/per-host/vasa.nix b/home/by-host/endurance/per-host/vasa.nix similarity index 100% rename from home/per-host/vasa.nix rename to home/by-host/endurance/per-host/vasa.nix diff --git a/home/ssh.nix b/home/by-host/endurance/ssh.nix similarity index 100% rename from home/ssh.nix rename to home/by-host/endurance/ssh.nix diff --git a/home/stylix.nix b/home/by-host/endurance/stylix.nix similarity index 100% rename from home/stylix.nix rename to home/by-host/endurance/stylix.nix diff --git a/home/wallpapers/alex_rainer-8UkwQR4tw_o-unsplash.jpg b/home/by-host/endurance/wallpapers/alex_rainer-8UkwQR4tw_o-unsplash.jpg similarity index 100% rename from home/wallpapers/alex_rainer-8UkwQR4tw_o-unsplash.jpg rename to home/by-host/endurance/wallpapers/alex_rainer-8UkwQR4tw_o-unsplash.jpg diff --git a/home/wallpapers/g-dochev-g-a_5TJlwMI-unsplash.jpg b/home/by-host/endurance/wallpapers/g-dochev-g-a_5TJlwMI-unsplash.jpg similarity index 100% rename from home/wallpapers/g-dochev-g-a_5TJlwMI-unsplash.jpg rename to home/by-host/endurance/wallpapers/g-dochev-g-a_5TJlwMI-unsplash.jpg diff --git a/home/wallpapers/lukasz-szmigiel-8AdYB7M4OHY-unsplash.jpg b/home/by-host/endurance/wallpapers/lukasz-szmigiel-8AdYB7M4OHY-unsplash.jpg similarity index 100% rename from home/wallpapers/lukasz-szmigiel-8AdYB7M4OHY-unsplash.jpg rename to home/by-host/endurance/wallpapers/lukasz-szmigiel-8AdYB7M4OHY-unsplash.jpg diff --git a/home/wallpapers/richard-horvath-_nWaeTF6qo0-unsplash.jpg b/home/by-host/endurance/wallpapers/richard-horvath-_nWaeTF6qo0-unsplash.jpg similarity index 100% rename from home/wallpapers/richard-horvath-_nWaeTF6qo0-unsplash.jpg rename to home/by-host/endurance/wallpapers/richard-horvath-_nWaeTF6qo0-unsplash.jpg diff --git a/home/wallpapers/zhen-yao-wZJWdra-6Q4-unsplash.jpg b/home/by-host/endurance/wallpapers/zhen-yao-wZJWdra-6Q4-unsplash.jpg similarity index 100% rename from home/wallpapers/zhen-yao-wZJWdra-6Q4-unsplash.jpg rename to home/by-host/endurance/wallpapers/zhen-yao-wZJWdra-6Q4-unsplash.jpg diff --git a/home/by-host/vasa/default.nix b/home/by-host/vasa/default.nix new file mode 100644 index 0000000..f32f0a3 --- /dev/null +++ b/home/by-host/vasa/default.nix @@ -0,0 +1,16 @@ +{ + pkgs, + config, + ... +} @ all: { + bosun.key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHl33DPxxzxrNNjM8rL4ktAj4ExzCyGiU8rKog0csxNA"; + + imports = + [ + ]; + + home.username = "christopher"; + home.homeDirectory = "/Users/christopher"; + + elements.kitty.enable = true; +} diff --git a/hosts/vasa/default.nix b/hosts/vasa/default.nix index ad9d8c3..85f35a1 100644 --- a/hosts/vasa/default.nix +++ b/hosts/vasa/default.nix @@ -1,13 +1,10 @@ {...}: { system.stateVersion = 5; - elements = { - hostname = "molybdenum"; - secrets = { - key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPjqieS4GkYAa1WRYZpxjgYsj7VGZ9U+rTFCkX8M0umD"; - }; - }; + # bosun = { + # key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPjqieS4GkYAa1WRYZpxjgYsj7VGZ9U+rTFCkX8M0umD"; + # }; # For some reason this is required for hm to work with nix-darwin - users.users.christopher = {}; + # users.users.christopher = {}; } diff --git a/modules/darwin/default.nix b/modules/darwin/default.nix new file mode 100644 index 0000000..18a6af3 --- /dev/null +++ b/modules/darwin/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./secrets.nix + ]; +} diff --git a/modules/darwin/secrets.nix b/modules/darwin/secrets.nix new file mode 100644 index 0000000..346d3b6 --- /dev/null +++ b/modules/darwin/secrets.nix @@ -0,0 +1,8 @@ +{ + inputs, + ... +}: { + imports = [ +# inputs.agenix.darwinModules.default + ]; +} diff --git a/modules/flake/homes.nix b/modules/flake/homes.nix index 145ddb4..24f8fc2 100644 --- a/modules/flake/homes.nix +++ b/modules/flake/homes.nix @@ -1,12 +1,16 @@ {inputs, ...}: let inherit (inputs) self; - mkHome = user: host: { - imports = [ - (self + "/home") - # TODO: Import this conditionally! - # (self + "/home/by-host/${host}") + mkHome = user: host: system: inputs.home-manager.lib.homeManagerConfiguration { + pkgs = inputs.nixpkgs.legacyPackages.${system}; + extraSpecialArgs = { + inherit inputs; + hostname = host; + }; + + modules = [ (self + "/modules/home") + (self + "/home/by-host/${host}") ]; }; in { @@ -15,8 +19,7 @@ in { ]; flake.homeConfigurations = { - "toph@endurance" = mkHome "toph" "endurance"; - "toph@vasa" = mkHome "toph" "vasa"; - "toph@aepplet" = mkHome "toph" "aepplet"; + "toph@endurance" = mkHome "toph" "endurance" "x86_64-linux"; + "toph@vasa" = mkHome "toph" "vasa" "x86_64-darwin"; }; } diff --git a/modules/generic/default.nix b/modules/generic/default.nix index e8e6fd6..1e6b198 100644 --- a/modules/generic/default.nix +++ b/modules/generic/default.nix @@ -9,22 +9,18 @@ ./nix.nix ./profiles.nix ./secrets.nix - ./ssh.nix ]; # TODO: Move all of these into their own modules? - console = { - font = "Lat2-Terminus16"; - useXkbConfig = true; # use xkbOptions in tty. - }; - networking.hostName = hostname; environment.systemPackages = with pkgs; [ pre-commit git gitleaks + helix + fish just nh age diff --git a/modules/generic/nix.nix b/modules/generic/nix.nix index 53f44a0..3357937 100644 --- a/modules/generic/nix.nix +++ b/modules/generic/nix.nix @@ -2,6 +2,7 @@ pkgs, lib, inputs, + hostname, ... }: { nix = { @@ -15,7 +16,8 @@ # automatic cleanup gc = { automatic = true; - dates = "weekly"; + # TODO: nix-darwin uses "interval" as a key + dates = lib.mkIf (hostname != "vasa") "weekly"; options = "--delete-older-than 21d"; }; diff --git a/modules/generic/secrets.nix b/modules/generic/secrets.nix index d8f7da8..00c3aca 100644 --- a/modules/generic/secrets.nix +++ b/modules/generic/secrets.nix @@ -11,11 +11,6 @@ with lib; let cfg = config.bosun; in { - imports = [ - inputs.agenix.nixosModules.default - inputs.agenix-rekey.nixosModules.default - ]; - options.bosun = { rekeyPath = mkOption { type = types.str; diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 130486d..252106f 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -5,5 +5,12 @@ ./system.nix ./users.nix ./nix-ld.nix + ./ssh.nix + ./secrets.nix ]; + + console = { + font = "Lat2-Terminus16"; + useXkbConfig = true; # use xkbOptions in tty. + }; } diff --git a/modules/nixos/secrets.nix b/modules/nixos/secrets.nix new file mode 100644 index 0000000..f0b46f0 --- /dev/null +++ b/modules/nixos/secrets.nix @@ -0,0 +1,16 @@ +{ + config, + inputs', + inputs, + hostname, + pkgs, + lib, + self, + ... +}: { + imports = [ + inputs.agenix.nixosModules.default + inputs.agenix-rekey.nixosModules.default + ../generic/secrets.nix + ]; +} diff --git a/modules/generic/ssh.nix b/modules/nixos/ssh.nix similarity index 100% rename from modules/generic/ssh.nix rename to modules/nixos/ssh.nix