remove clanDir default

The default value for clanDir did not make sense, as it pointed to the directory of the module definition

Also, we should not have a default at this level as all.
This commit is contained in:
DavHau
2024-08-26 15:23:59 +02:00
parent f9c8dd1518
commit 61e1fd7f85
4 changed files with 95 additions and 92 deletions

View File

@@ -133,6 +133,7 @@
self.nixosModules.test-backup self.nixosModules.test-backup
]; ];
virtualisation.emptyDiskImages = [ 256 ]; virtualisation.emptyDiskImages = [ 256 ];
clan.core.clanDir = ./.;
}; };
testScript = '' testScript = ''

View File

@@ -13,6 +13,7 @@
clan.postgresql.databases.test.create.options.OWNER = "test"; clan.postgresql.databases.test.create.options.OWNER = "test";
clan.postgresql.databases.test.restore.stopOnRestore = [ "sample-service" ]; clan.postgresql.databases.test.restore.stopOnRestore = [ "sample-service" ];
clan.localbackup.targets.hdd.directory = "/mnt/external-disk"; clan.localbackup.targets.hdd.directory = "/mnt/external-disk";
clan.core.clanDir = ./.;
systemd.services.sample-service = { systemd.services.sample-service = {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];

View File

@@ -3,7 +3,9 @@ let
clanDir = config.clan.core.clanDir; clanDir = config.clan.core.clanDir;
machineDir = clanDir + "/machines/"; machineDir = clanDir + "/machines/";
in in
lib.warn "This module is deprecated use the service via the inventory interface instead." { lib.warn
"The borgbackup-static module is deprecated use the service via the inventory interface instead."
{
imports = [ ../borgbackup ]; imports = [ ../borgbackup ];
options.clan.borgbackup-static = { options.clan.borgbackup-static = {

View File

@@ -45,7 +45,6 @@
}; };
clanDir = lib.mkOption { clanDir = lib.mkOption {
type = lib.types.path; type = lib.types.path;
default = ./.;
description = '' description = ''
the location of the flake repo, used to calculate the location of facts and secrets the location of the flake repo, used to calculate the location of facts and secrets
''; '';