wip: figuring out how to do multiple envs and stuff

This commit is contained in:
2024-10-14 07:51:07 +02:00
parent 768cb1ddef
commit 91b56423f2
10 changed files with 131 additions and 37 deletions
+40 -5
View File
@@ -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;
};
};