about summary refs log tree commit diff
path: root/lib/mk_home.nix
blob: e352f5f2909b7d579078a76509d9ae5c1ccd384c (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;
    };
  }