wip: home-manager support
This commit is contained in:
parent
4d6fdba390
commit
9e4d359699
3 changed files with 48 additions and 8 deletions
31
modules/darwin/home/default.nix
Normal file
31
modules/darwin/home/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, options, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) types mkOption mkIf mkMerge mkAliasDefinitions;
|
||||
|
||||
cfg = options.snowfallorg;
|
||||
in
|
||||
{
|
||||
options.snowfallorg = {
|
||||
home = mkOption {
|
||||
description = "Configuration for home-manager.";
|
||||
type = types.attrsOf (types.submodule ({ name, ... }: {
|
||||
options.config = {
|
||||
type = types.attrs;
|
||||
default = { };
|
||||
};
|
||||
}));
|
||||
};
|
||||
|
||||
resolvedHomes = mkOption {
|
||||
type = types.attrs;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge (builtins.map
|
||||
(name: {
|
||||
snowfallorg.resolvedHomes.${name} = mkAliasDefinitions options.snowfallorg.home.${name}.config;
|
||||
})
|
||||
(builtins.attrNames cfg.home));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue