From 8ff07c6d47ab1f072ba2cb411977befa25c3ac46 Mon Sep 17 00:00:00 2001 From: Alex Davies Date: Fri, 16 Aug 2024 15:28:03 +0000 Subject: [PATCH] Added support for foreign deployments --- flake.nix | 7 +++++-- home-manager/traverseda/home.nix | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index b11bbc0..807d4f6 100644 --- a/flake.nix +++ b/flake.nix @@ -179,9 +179,12 @@ ./home-manager/traverseda/home.nix ]; }; - "traverseda@aarch64" = home-manager.lib.homeManagerConfiguration { + "spiri@generic" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.aarch64-linux; # Home-manager requires 'pkgs' instance - extraSpecialArgs = {inherit inputs outputs;}; + extraSpecialArgs = {inherit inputs outputs; + homeUser = "spiri"; + homeDir = "/home/spiri"; + }; modules = [ ./home-manager/traverseda/home.nix ]; diff --git a/home-manager/traverseda/home.nix b/home-manager/traverseda/home.nix index a150b90..2d3273b 100644 --- a/home-manager/traverseda/home.nix +++ b/home-manager/traverseda/home.nix @@ -6,6 +6,7 @@ # lib, config, pkgs, + specialArgs, ... }: { # You can import other home-manager modules here @@ -42,8 +43,8 @@ }; home = { - username = "traverseda"; - homeDirectory = "/home/traverseda"; + username = specialArgs.homeUser or "traverseda"; + homeDirectory = specialArgs.homeDir or "/home/traverseda"; }; programs.git = {