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 { tree = (inputs.tree.tree {
inherit inputs; inherit inputs;
folder = ./.; folder = ./.;
@ -9,30 +9,46 @@
"default" "default"
]; ];
}; };
"home/*" = {
functor.enable = true;
};
}; };
}).impure; }).impure;
lib = inputs.nixpkgs.lib; lib = inputs.nixpkgs.lib;
inherit (lib.attrsets) mapAttrs; inherit (lib.attrsets) mapAttrs;
in { in {
inherit tree; inherit tree;
nixosConfigurations = mapAttrs (_: path: nixpkgs.lib.nixosSystem { nixosConfigurations = mapAttrs (name: path: nixpkgs.lib.nixosSystem {
specialArgs = { specialArgs = {
inherit inputs tree; inherit inputs tree;
machine = name; machine = name;
}; };
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
home-manager.nixosModules.home-manager
path path
]; ];
} ) tree.nixos.systems; } ) tree.nixos.systems;
darwinConfigurations = mapAttrs (_: path: darwin.lib.darwinSystem { darwinConfigurations = mapAttrs (name: path: darwin.lib.darwinSystem {
specialArgs = { specialArgs = {
inherit inputs tree; inherit inputs tree;
machine = name; machine = name;
}; };
system = "aarch64-darwin"; system = "aarch64-darwin";
modules = [ modules = [
home-manager.nixosModules.home-manager
path path
]; ];
} ) tree.darwin.systems; } ) 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;
} }

2
home/base/default.nix Normal file
View file

@ -0,0 +1,2 @@
{ config, ... }: {
}

7
home/common.nix Normal file
View file

@ -0,0 +1,7 @@
{ config, ... }: {
home = {
username = "kat";
stateVersion = "22.11";
homeDirectory = "/home/kat";
};
}