remove some references to config in options

This commit is contained in:
DavHau
2025-04-03 17:22:03 +07:00
parent e897399e34
commit a88167f456
11 changed files with 28 additions and 6 deletions

View File

@@ -9,7 +9,7 @@ in
options.clan.borgbackup-static = {
excludeMachines = lib.mkOption {
type = lib.types.listOf lib.types.str;
example = [ config.clan.core.settings.machine.name ];
example = lib.literalExpression "[ config.clan.core.settings.machine.name ]";
default = [ ];
description = ''
Machines that should not be backuped.
@@ -20,7 +20,7 @@ in
};
includeMachines = lib.mkOption {
type = lib.types.listOf lib.types.str;
example = [ config.clan.core.settings.machine.name ];
example = lib.literalExpression "[ config.clan.core.settings.machine.name ]";
default = [ ];
description = ''
Machines that should be backuped.

View File

@@ -8,6 +8,12 @@
[ ]
else
[ config.clan.core.settings.machine.name ];
defaultText = lib.literalExpression ''
if config.clan.static-hosts.topLevelDomain != "" then
[ ]
else
[ config.clan.core.settings.machine.name ];
'';
description = "Hosts that should be excluded";
};
topLevelDomain = lib.mkOption {

View File

@@ -48,7 +48,7 @@ in
options.clan.syncthing-static-peers = {
excludeMachines = lib.mkOption {
type = lib.types.listOf lib.types.str;
example = [ config.clan.core.settings.machine.name ];
example = lib.literalExpression "[ config.clan.core.settings.machine.name ]";
default = [ ];
description = ''
Machines that should not be added.

View File

@@ -28,6 +28,7 @@ in
excludeHosts = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ config.clan.core.settings.machine.name ];
defaultText = lib.literalExpression "[ config.clan.core.settings.machine.name ]";
description = "Hosts that should be excluded";
};
networkIps = lib.mkOption {

View File

@@ -35,6 +35,7 @@ in
excludeHosts = lib.mkOption {
type = listOf str;
default = [ config.clan.core.settings.machine.name ];
defaultText = lib.literalExpression "[ config.clan.core.settings.machine.name ]";
description = "Hosts that should be excluded";
};
networkIps = lib.mkOption {