flake: system-specific 'homeConfigurations'

This commit is contained in:
Bruno BELANYI 2023-02-25 13:12:53 +00:00
parent 4a6677b024
commit 2a7e6197f5

View file

@ -158,26 +158,22 @@
finalPackages = filterPackages system flattenedPackages; finalPackages = filterPackages system flattenedPackages;
in in
finalPackages; finalPackages;
}) // {
overlays = import ./overlays // { # Work-around for https://github.com/nix-community/home-manager/issues/3075
lib = final: prev: { inherit lib; }; legacyPackages = {
pkgs = final: prev: { homeConfigurations = {
ambroisie = prev.recurseIntoAttrs (import ./pkgs { pkgs = prev; }); ambroisie = home-manager.lib.homeManagerConfiguration {
}; # Work-around for home-manager
}; # * not letting me set `lib` as an extraSpecialArgs
homeConfigurations = # * not respecting `nixpkgs.overlays` [1]
let # [1]: https://github.com/nix-community/home-manager/issues/2954
system = "x86_64-linux";
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
overlays = (lib.attrValues self.overlays) ++ [ overlays = (lib.attrValues self.overlays) ++ [
nur.overlay nur.overlay
]; ];
}; };
in
{
ambroisie = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ modules = [
./home ./home
@ -198,6 +194,14 @@
}; };
}; };
}; };
};
}) // {
overlays = import ./overlays // {
lib = final: prev: { inherit lib; };
pkgs = final: prev: {
ambroisie = prev.recurseIntoAttrs (import ./pkgs { pkgs = prev; });
};
};
nixosConfigurations = lib.mapAttrs buildHost { nixosConfigurations = lib.mapAttrs buildHost {
aramis = "x86_64-linux"; aramis = "x86_64-linux";