add profile name

This commit is contained in:
2025-10-08 21:28:56 +02:00
parent 01898ecafc
commit 91baaf07d7
2 changed files with 13 additions and 9 deletions

View File

@@ -19,10 +19,10 @@
profiles = import ./profiles.nix;
in
{
homeConfigurations = nixpkgs.lib.genAttrs (builtins.map (user: user.username) profiles) (
user:
homeConfigurations = nixpkgs.lib.genAttrs (builtins.map (p: p.name) profiles) (
profile:
let
system = (nixpkgs.lib.findFirst (u: u.username == user) null profiles).architecture;
system = (nixpkgs.lib.findFirst (p: p.name == profile) null profiles).architecture;
pkgs = nixpkgs.legacyPackages.${system};
in
home-manager.lib.homeManagerConfiguration {
@@ -31,8 +31,8 @@
modules = [ ./home.nix ];
extraSpecialArgs = {
username = user;
homeDirectory = (nixpkgs.lib.findFirst (u: u.username == user) null profiles).homeDirectory;
username = (nixpkgs.lib.findFirst (p: p.name == profile) null profiles).username;
homeDirectory = (nixpkgs.lib.findFirst (p: p.name == profile) null profiles).homeDirectory;
};
}
);