From a2cb84103986d76552382a7de97b48e297866879 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 8 Oct 2025 21:32:35 +0200 Subject: [PATCH] reuse variable --- flake.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 4b6ba6a..84d60f3 100644 --- a/flake.nix +++ b/flake.nix @@ -22,7 +22,8 @@ homeConfigurations = nixpkgs.lib.genAttrs (builtins.map (p: p.name) profiles) ( profile: let - system = (nixpkgs.lib.findFirst (p: p.name == profile) null profiles).architecture; + p = (nixpkgs.lib.findFirst (p: p.name == profile) null profiles); + system = p.architecture; pkgs = nixpkgs.legacyPackages.${system}; in home-manager.lib.homeManagerConfiguration { @@ -31,8 +32,8 @@ modules = [ ./home.nix ]; extraSpecialArgs = { - username = (nixpkgs.lib.findFirst (p: p.name == profile) null profiles).username; - homeDirectory = (nixpkgs.lib.findFirst (p: p.name == profile) null profiles).homeDirectory; + username = p.username; + homeDirectory = p.homeDirectory; }; } );