about summary refs log tree commit diff
path: root/lib/mk_home.nix
blob: 7abe42acd43dcb93236a82d7077bf73196e336dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ self, home-manager, ... } @ inputs:

username: hostname: system: nixpkgs: version:
let
  args = inputs;
  entrypoint = "${self}/home/configurations/${username}@${hostname}.nix";
in
home-manager.lib.homeManagerConfiguration {
  inherit username system;
  homeDirectory = "/home/${username}";
  stateVersion = version;
  pkgs = nixpkgs.legacyPackages.${system};

  configuration = { lib, ... }: {
    _module = { inherit args; };
    imports = [
      entrypoint
    ] ++ __attrValues self.homeModules;
  };
}