Add capability to choose home-manager branch
This commit is contained in:
		@@ -44,4 +44,6 @@ in
 | 
			
		||||
      devVM = recursiveUpdate config.my.asDevVM.system.build.vm { meta.mainProgram = "run-${config.system.name}-vm"; };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  meta.buildDocsInSandbox = false;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,14 +1,19 @@
 | 
			
		||||
{ lib, pkgs, inputs, homeModules, config, options, ... }:
 | 
			
		||||
{ lib, pkgs, inputs, options, config, ... }:
 | 
			
		||||
let
 | 
			
		||||
  inherit (builtins) attrValues;
 | 
			
		||||
  inherit (lib) mkIf mkDefault mkAliasDefinitions;
 | 
			
		||||
  inherit (lib.my) mkOpt';
 | 
			
		||||
  inherit (lib.my) mkOpt' dummyOption;
 | 
			
		||||
in
 | 
			
		||||
{
 | 
			
		||||
  options.my = with lib.types; {
 | 
			
		||||
    # Pretty hacky but too lazy to figure out if there's a better way to alias the options
 | 
			
		||||
    user = mkOpt' (attrsOf anything) { } "User definition (as `users.users.*`).";
 | 
			
		||||
    homeConfig = mkOpt' anything {} "Home configuration (as `home-manager.users.*`)";
 | 
			
		||||
  options = with lib.types; {
 | 
			
		||||
    my = {
 | 
			
		||||
      # Pretty hacky but too lazy to figure out if there's a better way to alias the options
 | 
			
		||||
      user = mkOpt' (attrsOf anything) { } "User definition (as `users.users.*`).";
 | 
			
		||||
      homeConfig = mkOpt' anything { } "Home configuration (as `home-manager.users.*`)";
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    # Only present in >=22.05, so forward declare
 | 
			
		||||
    documentation.nixos.options.warningsAreErrors = dummyOption;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  config =
 | 
			
		||||
@@ -28,11 +33,8 @@ in
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      home-manager = {
 | 
			
		||||
        useGlobalPkgs = mkDefault true;
 | 
			
		||||
        # Installs packages in the system config instead of in the local profile on activation
 | 
			
		||||
        useUserPackages = mkDefault true;
 | 
			
		||||
        sharedModules = homeModules ++ [{
 | 
			
		||||
          _module.args = { inherit inputs; isStandalone = false; };
 | 
			
		||||
        }];
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      users = {
 | 
			
		||||
@@ -67,6 +69,13 @@ in
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      documentation = {
 | 
			
		||||
        nixos = {
 | 
			
		||||
          enable = mkDefault true;
 | 
			
		||||
          options.warningsAreErrors = mkDefault false;
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      time.timeZone = mkDefault "Europe/Dublin";
 | 
			
		||||
 | 
			
		||||
      boot = {
 | 
			
		||||
@@ -106,4 +115,6 @@ in
 | 
			
		||||
        configurationRevision = with inputs; mkIf (self ? rev) self.rev;
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
  meta.buildDocsInSandbox = false;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -22,4 +22,6 @@ in
 | 
			
		||||
        '';
 | 
			
		||||
    });
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  meta.buildDocsInSandbox = false;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -164,4 +164,6 @@ in
 | 
			
		||||
        '';
 | 
			
		||||
    })
 | 
			
		||||
  ]);
 | 
			
		||||
 | 
			
		||||
  meta.buildDocsInSandbox = false;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -10,4 +10,6 @@ in
 | 
			
		||||
  config = mkIf cfg.enable {
 | 
			
		||||
    services.getty.autologinUser = config.my.user.name;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  meta.buildDocsInSandbox = false;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -210,4 +210,6 @@ in
 | 
			
		||||
      })
 | 
			
		||||
    ]))
 | 
			
		||||
  ]);
 | 
			
		||||
 | 
			
		||||
  meta.buildDocsInSandbox = false;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user