2024-11-19 10:31:29 +01:00
|
|
|
{
|
|
|
|
options,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
inputs,
|
|
|
|
...
|
|
|
|
}:
|
2024-03-21 15:00:36 +01:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
with lib.metacfg;
|
|
|
|
let
|
|
|
|
cfg = config.metacfg.home;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
# imports = with inputs; [
|
|
|
|
# home-manager.darwinModules.home-manager
|
|
|
|
# ];
|
|
|
|
|
|
|
|
options.metacfg.home = with types; {
|
2024-11-19 10:31:29 +01:00
|
|
|
file = mkOpt attrs { } "A set of files to be managed by home-manager's <option>home.file</option>.";
|
|
|
|
configFile =
|
|
|
|
mkOpt attrs { }
|
|
|
|
"A set of files to be managed by home-manager's <option>xdg.configFile</option>.";
|
2024-03-21 15:00:36 +01:00
|
|
|
extraOptions = mkOpt attrs { } "Options to pass directly to home-manager.";
|
|
|
|
homeConfig = mkOpt attrs { } "Final config for home-manager.";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = {
|
|
|
|
metacfg.home.extraOptions = {
|
|
|
|
home.stateVersion = mkDefault "23.11";
|
|
|
|
home.file = mkAliasDefinitions options.metacfg.home.file;
|
|
|
|
xdg.enable = true;
|
|
|
|
xdg.configFile = mkAliasDefinitions options.metacfg.home.configFile;
|
|
|
|
};
|
|
|
|
|
2024-12-13 09:19:09 +01:00
|
|
|
snowfallorg.users.${config.metacfg.user.name}.home.config =
|
|
|
|
mkAliasDefinitions options.metacfg.home.extraOptions;
|
2024-03-21 15:00:36 +01:00
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
useUserPackages = true;
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
|
|
|
|
# users.${config.metacfg.user.name} = args:
|
|
|
|
# mkAliasDefinitions options.metacfg.home.extraOptions;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|