reuse variable

This commit is contained in:
2025-10-08 21:32:35 +02:00
parent 91baaf07d7
commit a2cb841039

View File

@@ -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;
};
}
);