mirror of
https://github.com/cupcakearmy/nix-cli.git
synced 2025-12-07 22:35:03 +00:00
reuse variable
This commit is contained in:
@@ -22,7 +22,8 @@
|
|||||||
homeConfigurations = nixpkgs.lib.genAttrs (builtins.map (p: p.name) profiles) (
|
homeConfigurations = nixpkgs.lib.genAttrs (builtins.map (p: p.name) profiles) (
|
||||||
profile:
|
profile:
|
||||||
let
|
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};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in
|
in
|
||||||
home-manager.lib.homeManagerConfiguration {
|
home-manager.lib.homeManagerConfiguration {
|
||||||
@@ -31,8 +32,8 @@
|
|||||||
modules = [ ./home.nix ];
|
modules = [ ./home.nix ];
|
||||||
|
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
username = (nixpkgs.lib.findFirst (p: p.name == profile) null profiles).username;
|
username = p.username;
|
||||||
homeDirectory = (nixpkgs.lib.findFirst (p: p.name == profile) null profiles).homeDirectory;
|
homeDirectory = p.homeDirectory;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user