make home configs work
This commit is contained in:
parent
f0c21b2e79
commit
30f81b2b79
29 changed files with 2131 additions and 2033 deletions
33
;
Normal file
33
;
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
lib,
|
||||
options,
|
||||
machine,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
options = {
|
||||
custom.program = mkOption {
|
||||
type = types.attrsOf (
|
||||
types.submodule (
|
||||
{ config, ... }:
|
||||
{
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = types.string;
|
||||
};
|
||||
home-config = mkOption {
|
||||
type = types.deferredModule;
|
||||
};
|
||||
system-config = mkOption {
|
||||
type = types.deferredModule;
|
||||
default = _: { };
|
||||
};
|
||||
};
|
||||
config = if builtins.isNull machine.home-only then config.system-config else config.home-config;
|
||||
}
|
||||
)
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue