wip: figuring out how to do multiple envs and stuff
This commit is contained in:
+40
-5
@@ -1,6 +1,41 @@
|
||||
{ lib, ... }:
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.apps;
|
||||
in
|
||||
{
|
||||
imports = [ ];
|
||||
imports = [];
|
||||
|
||||
options.apps = with lib; {
|
||||
env = mkOption {
|
||||
type = types.string;
|
||||
default = "prod";
|
||||
description = "Enable";
|
||||
};
|
||||
|
||||
autoSync = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Auto sync";
|
||||
};
|
||||
|
||||
prune = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Prune";
|
||||
};
|
||||
|
||||
selfHeal = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Self-heal";
|
||||
};
|
||||
|
||||
serverSideDiff = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Enable server-side diffing";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
nixidy = {
|
||||
@@ -20,9 +55,9 @@
|
||||
defaults = {
|
||||
syncPolicy = {
|
||||
autoSync = {
|
||||
enabled = true;
|
||||
prune = false;
|
||||
selfHeal = false;
|
||||
enabled = cfg.autoSync;
|
||||
prune = cfg.prune;
|
||||
selfHeal = cfg.selfHeal;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user