feat: home manager configurations basis

This commit is contained in:
Kat Inskip 2022-12-01 22:32:06 +01:00
parent d273b25fb5
commit ae7d7de111
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
3 changed files with 28 additions and 3 deletions

View file

@ -1,4 +1,4 @@
{ nixpkgs, darwin, ... }@inputs: let
{ nixpkgs, darwin, home-manager, ... }@inputs: let
tree = (inputs.tree.tree {
inherit inputs;
folder = ./.;
@ -9,30 +9,46 @@
"default"
];
};
"home/*" = {
functor.enable = true;
};
};
}).impure;
lib = inputs.nixpkgs.lib;
inherit (lib.attrsets) mapAttrs;
in {
inherit tree;
nixosConfigurations = mapAttrs (_: path: nixpkgs.lib.nixosSystem {
nixosConfigurations = mapAttrs (name: path: nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs tree;
machine = name;
};
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
path
];
} ) tree.nixos.systems;
darwinConfigurations = mapAttrs (_: path: darwin.lib.darwinSystem {
darwinConfigurations = mapAttrs (name: path: darwin.lib.darwinSystem {
specialArgs = {
inherit inputs tree;
machine = name;
};
system = "aarch64-darwin";
modules = [
home-manager.nixosModules.home-manager
path
];
} ) tree.darwin.systems;
homeManagerConfigurations = mapAttrs (name: path: home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {
inherit inputs tree;
machine = name;
};
modules = [
tree.home.common
path
];
}) tree.home;
}