fix: Do not write Roundcube userdata in a migration

This commit is contained in:
Inex Code 2024-07-23 20:08:33 +03:00
parent 0d69ba2656
commit 9fefb984be

View file

@ -17,9 +17,6 @@ class AddRoundcube(Migration):
with FlakeServiceManager() as manager: with FlakeServiceManager() as manager:
if "roundcube" not in manager.services: if "roundcube" not in manager.services:
return True return True
with ReadUserData() as data:
if "roundcube" not in data["modules"]:
return True
return False return False
def migrate(self) -> None: def migrate(self) -> None:
@ -28,9 +25,3 @@ class AddRoundcube(Migration):
manager.services[ manager.services[
"roundcube" "roundcube"
] = "git+https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git?ref=flakes&dir=sp-modules/roundcube" ] = "git+https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git?ref=flakes&dir=sp-modules/roundcube"
with WriteUserData() as data:
if "roundcube" not in data["modules"]:
data["modules"]["roundcube"] = {
"enable": False,
"subdomain": "roundcube",
}