2024-03-12 00:24:28 +01:00
|
|
|
{ options, config, pkgs, lib, inputs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
2024-03-20 08:58:05 +01:00
|
|
|
with lib.metacfg;
|
2024-03-12 00:24:28 +01:00
|
|
|
let
|
2024-03-20 08:58:05 +01:00
|
|
|
cfg = config.metacfg.home;
|
2024-03-12 00:24:28 +01:00
|
|
|
in
|
|
|
|
{
|
|
|
|
# imports = with inputs; [
|
|
|
|
# home-manager.darwinModules.home-manager
|
|
|
|
# ];
|
|
|
|
|
2024-03-20 08:58:05 +01:00
|
|
|
options.metacfg.home = with types; {
|
2024-03-12 00:24:28 +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>.";
|
|
|
|
extraOptions = mkOpt attrs { } "Options to pass directly to home-manager.";
|
|
|
|
homeConfig = mkOpt attrs { } "Final config for home-manager.";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = {
|
2024-03-20 08:58:05 +01:00
|
|
|
metacfg.home.extraOptions = {
|
2024-03-12 00:24:28 +01:00
|
|
|
home.stateVersion = mkDefault "23.11";
|
2024-03-20 08:58:05 +01:00
|
|
|
home.file = mkAliasDefinitions options.metacfg.home.file;
|
2024-03-12 00:24:28 +01:00
|
|
|
xdg.enable = true;
|
2024-03-20 08:58:05 +01:00
|
|
|
xdg.configFile = mkAliasDefinitions options.metacfg.home.configFile;
|
2024-03-12 00:24:28 +01:00
|
|
|
};
|
|
|
|
|
2024-03-20 08:58:05 +01:00
|
|
|
snowfallorg.users.${config.metacfg.user.name}.home.config = mkAliasDefinitions options.metacfg.home.extraOptions;
|
2024-03-12 00:24:28 +01:00
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
useUserPackages = true;
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
|
2024-03-20 08:58:05 +01:00
|
|
|
# users.${config.metacfg.user.name} = args:
|
|
|
|
# mkAliasDefinitions options.metacfg.home.extraOptions;
|
2024-03-12 00:24:28 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|