This commit is contained in:
parent
30f81b2b79
commit
d9d4e43c35
17 changed files with 310 additions and 276 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
inputs@{
|
||||
lib,
|
||||
options,
|
||||
machine,
|
||||
|
|
@ -9,24 +9,16 @@ 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 = _: { };
|
||||
};
|
||||
types.submodule (_: {
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = types.string;
|
||||
};
|
||||
config = if builtins.isNull machine.home-only then config.system-config else config.home-config;
|
||||
}
|
||||
)
|
||||
defered-config = mkOption {
|
||||
type = types.deferredModule;
|
||||
};
|
||||
};
|
||||
})
|
||||
);
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ in
|
|||
imports = (
|
||||
[
|
||||
]
|
||||
++ (map (program: program.home-config) programs)
|
||||
++ (map (program: program.defered-config) programs)
|
||||
);
|
||||
home = {
|
||||
inherit stateVersion;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue