mirror of
https://github.com/cupcakearmy/nix-cli.git
synced 2025-12-07 14:25:03 +00:00
reuse variable
This commit is contained in:
@@ -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;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user