flake: compileHomes
parent
e76608886c
commit
4edd18ad6c
43
flake.nix
43
flake.nix
|
@ -57,29 +57,24 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
homeConfigurations."zynh@msiserver" = inputs.home-manager.lib.homeManagerConfiguration {
|
homeConfigurations =
|
||||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
builders.compileHomes
|
||||||
extraSpecialArgs = { inherit inputs; };
|
[
|
||||||
|
{
|
||||||
modules = [
|
user = "zynh";
|
||||||
./hosts/msiserver/home.nix
|
hostname = "msiserver";
|
||||||
];
|
system = "x86_64-linux";
|
||||||
};
|
}
|
||||||
homeConfigurations."val@caveserver" = inputs.home-manager.lib.homeManagerConfiguration {
|
{
|
||||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
user = "val";
|
||||||
extraSpecialArgs = { inherit inputs; };
|
hostname = "caveserver";
|
||||||
|
system = "x86_64-linux";
|
||||||
modules = [
|
}
|
||||||
./hosts/caveserver/home.nix
|
{
|
||||||
];
|
user = "zynh";
|
||||||
};
|
hostname = "little-lightning";
|
||||||
homeConfigurations."zynh@little-lightning" = inputs.home-manager.lib.homeManagerConfiguration {
|
system = "aarch64-darwin";
|
||||||
pkgs = nixpkgs.legacyPackages."aarch64-darwin";
|
}
|
||||||
extraSpecialArgs = { inherit inputs; };
|
];
|
||||||
|
|
||||||
modules = [
|
|
||||||
./hosts/little-lightning/home.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,4 +24,28 @@ rec {
|
||||||
builtins.listToAttrs
|
builtins.listToAttrs
|
||||||
(map toPartialNixosConfig)
|
(map toPartialNixosConfig)
|
||||||
systems;
|
systems;
|
||||||
|
|
||||||
|
toPartialHomeManagerConfig =
|
||||||
|
{ user, system, hostname ? "", configHostname ? "" }:
|
||||||
|
let
|
||||||
|
configHost = if builtins.stringLength configHostname > 0 then configHostname else hostname;
|
||||||
|
hostStr = lib.strings.optionalString (builtins.stringLength hostname > 0) "@${hostname}";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
name = "${user}${hostStr}";
|
||||||
|
value = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = nixpkgs.legacyPackages."${system}";
|
||||||
|
extraSpecialArgs = { inherit inputs; };
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
../hosts/${configHost}/home.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
compileHomes =
|
||||||
|
systems:
|
||||||
|
lib.right
|
||||||
|
builtins.listToAttrs
|
||||||
|
(map toPartialHomeManagerConfig)
|
||||||
|
systems;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue