From c7afab9d925f2a474677bdd53d2cb6d83bba77cb Mon Sep 17 00:00:00 2001 From: pinpox Date: Thu, 26 Jun 2025 10:23:44 +0200 Subject: [PATCH] Add deprecation warnings to all clanModules --- clanModules/admin/roles/default.nix | 7 +++++++ clanModules/auto-upgrade/roles/default.nix | 5 ++++- clanModules/borgbackup/roles/client.nix | 6 ++++++ clanModules/data-mesher/roles/admin.nix | 7 +++++++ clanModules/deltachat/roles/default.nix | 4 +++- clanModules/disk-id/roles/default.nix | 6 ++++++ clanModules/ergochat/roles/default.nix | 4 +++- clanModules/garage/roles/default.nix | 7 +++++++ clanModules/heisenbridge/roles/default.nix | 4 +++- clanModules/localsend/roles/default.nix | 4 +++- clanModules/mumble/roles/server.nix | 5 ++++- clanModules/mycelium/roles/peer.nix | 6 ++++++ clanModules/packages/roles/default.nix | 6 ++++++ clanModules/root-password/roles/default.nix | 7 +++++++ clanModules/sshd/roles/server.nix | 7 +++++++ clanModules/state-version/roles/default.nix | 7 +++++++ clanModules/syncthing/roles/peer.nix | 1 + clanModules/user-password/roles/default.nix | 7 +++++++ clanModules/zerotier/roles/controller.nix | 7 +++++++ 19 files changed, 101 insertions(+), 6 deletions(-) diff --git a/clanModules/admin/roles/default.nix b/clanModules/admin/roles/default.nix index c799b6066..067d47c76 100644 --- a/clanModules/admin/roles/default.nix +++ b/clanModules/admin/roles/default.nix @@ -18,6 +18,13 @@ ../../root-password ]; config = { + + warnings = [ + "The clan.admin module is deprecated and will be removed on 2025-07-15. + Please migrate to user-maintained configuration or the new equivalent clan services + (https://docs.clan.lol/reference/clanServices)." + ]; + users.users.root.openssh.authorizedKeys.keys = builtins.attrValues config.clan.admin.allowedKeys; }; } diff --git a/clanModules/auto-upgrade/roles/default.nix b/clanModules/auto-upgrade/roles/default.nix index abe3f2597..898a358dc 100644 --- a/clanModules/auto-upgrade/roles/default.nix +++ b/clanModules/auto-upgrade/roles/default.nix @@ -15,8 +15,11 @@ in }; config = { + warnings = [ - "The clan.auto-upgrade module is deprecated and will be removed on 2025-07-15. Please migrate to using the system.autoUpgrade NixOS option directly." + "The clan.auto-upgrade module is deprecated and will be removed on 2025-07-15. + Please migrate to user-maintained configuration or the new equivalent clan services + (https://docs.clan.lol/reference/clanServices)." ]; system.autoUpgrade = { diff --git a/clanModules/borgbackup/roles/client.nix b/clanModules/borgbackup/roles/client.nix index 236b1ee29..35d6526c2 100644 --- a/clanModules/borgbackup/roles/client.nix +++ b/clanModules/borgbackup/roles/client.nix @@ -90,6 +90,12 @@ in config = { + warnings = [ + "The clan.borgbackup module is deprecated and will be removed on 2025-07-15. + Please migrate to user-maintained configuration or the new equivalent clan services + (https://docs.clan.lol/reference/clanServices)." + ]; + # Destinations clan.borgbackup.destinations = let diff --git a/clanModules/data-mesher/roles/admin.nix b/clanModules/data-mesher/roles/admin.nix index 93a4c2ff0..caf80d6f2 100644 --- a/clanModules/data-mesher/roles/admin.nix +++ b/clanModules/data-mesher/roles/admin.nix @@ -27,6 +27,13 @@ in }; config = { + + warnings = [ + "The clan.admin module is deprecated and will be removed on 2025-07-15. + Please migrate to user-maintained configuration or the new equivalent clan services + (https://docs.clan.lol/reference/clanServices)." + ]; + services.data-mesher.initNetwork = let # for a given machine, read it's public key and remove any new lines diff --git a/clanModules/deltachat/roles/default.nix b/clanModules/deltachat/roles/default.nix index c1640dcef..b48d60a8c 100644 --- a/clanModules/deltachat/roles/default.nix +++ b/clanModules/deltachat/roles/default.nix @@ -5,7 +5,9 @@ }: { warnings = [ - "The clan.deltachat module is deprecated and will be removed on 2025-07-15. Please migrate to user-maintained configuration." + "The clan.deltachat module is deprecated and will be removed on 2025-07-15. + Please migrate to user-maintained configuration or the new equivalent clan services + (https://docs.clan.lol/reference/clanServices)." ]; networking.firewall.interfaces."zt+".allowedTCPPorts = [ 25 ]; # smtp with other hosts diff --git a/clanModules/disk-id/roles/default.nix b/clanModules/disk-id/roles/default.nix index 330718aad..348eb5233 100644 --- a/clanModules/disk-id/roles/default.nix +++ b/clanModules/disk-id/roles/default.nix @@ -7,6 +7,12 @@ { config = { + + warnings = [ + "The clan.disk-id module is deprecated and will be removed on 2025-07-15. + Please migrate to user-maintained configuration or the new equivalent clan services + (https://docs.clan.lol/reference/clanServices)." + ]; clan.core.vars.generators.disk-id = { files.diskId.secret = false; runtimeInputs = [ diff --git a/clanModules/ergochat/roles/default.nix b/clanModules/ergochat/roles/default.nix index f86de524e..2aa240359 100644 --- a/clanModules/ergochat/roles/default.nix +++ b/clanModules/ergochat/roles/default.nix @@ -1,7 +1,9 @@ _: { warnings = [ - "The clan.ergochat module is deprecated and will be removed on 2025-07-15. Please migrate to user-maintained configuration." + "The clan.ergochat module is deprecated and will be removed on 2025-07-15. + Please migrate to user-maintained configuration or the new equivalent clan services + (https://docs.clan.lol/reference/clanServices)." ]; services.ergochat = { diff --git a/clanModules/garage/roles/default.nix b/clanModules/garage/roles/default.nix index 0d2afa903..0cb3a37dc 100644 --- a/clanModules/garage/roles/default.nix +++ b/clanModules/garage/roles/default.nix @@ -1,5 +1,12 @@ { config, pkgs, ... }: { + + warnings = [ + "The clan.ergochat module is deprecated and will be removed on 2025-07-15. + Please migrate to user-maintained configuration or the new equivalent clan services + (https://docs.clan.lol/reference/clanServices)." + ]; + systemd.services.garage.serviceConfig = { LoadCredential = [ "rpc_secret_path:${config.clan.core.vars.generators.garage-shared.files.rpc_secret.path}" diff --git a/clanModules/heisenbridge/roles/default.nix b/clanModules/heisenbridge/roles/default.nix index a1b1e6fd7..ffa59c056 100644 --- a/clanModules/heisenbridge/roles/default.nix +++ b/clanModules/heisenbridge/roles/default.nix @@ -12,7 +12,9 @@ ]; config = { warnings = [ - "The clan.heisenbridge module is deprecated and will be removed on 2025-07-15. Please migrate to user-maintained configuration." + "The clan.heisenbridge module is deprecated and will be removed on 2025-07-15. + Please migrate to user-maintained configuration or the new equivalent clan services + (https://docs.clan.lol/reference/clanServices)." ]; services.heisenbridge = { enable = true; diff --git a/clanModules/localsend/roles/default.nix b/clanModules/localsend/roles/default.nix index bb361da9b..1da449c90 100644 --- a/clanModules/localsend/roles/default.nix +++ b/clanModules/localsend/roles/default.nix @@ -39,7 +39,9 @@ in ]; config = { warnings = [ - "The clan.localsend module is deprecated and will be removed on 2025-07-15. Please migrate to user-maintained configuration." + "The clan.localsend module is deprecated and will be removed on 2025-07-15. + Please migrate to user-maintained configuration or the new equivalent clan services + (https://docs.clan.lol/reference/clanServices)." ]; clan.core.state.localsend.folders = [ diff --git a/clanModules/mumble/roles/server.nix b/clanModules/mumble/roles/server.nix index 44323f54f..704744eec 100644 --- a/clanModules/mumble/roles/server.nix +++ b/clanModules/mumble/roles/server.nix @@ -37,8 +37,11 @@ in }; config = { + warnings = [ - "The clan.mumble module is deprecated and will be removed on 2025-07-15. Please migrate to user-maintained configuration." + "The clan.mumble module is deprecated and will be removed on 2025-07-15. + Please migrate to user-maintained configuration or the new equivalent clan services + (https://docs.clan.lol/reference/clanServices)." ]; services.murmur = { diff --git a/clanModules/mycelium/roles/peer.nix b/clanModules/mycelium/roles/peer.nix index 7fb9aca54..693579576 100644 --- a/clanModules/mycelium/roles/peer.nix +++ b/clanModules/mycelium/roles/peer.nix @@ -19,6 +19,12 @@ }; }; + config.warnings = [ + "The clan.mycelium module is deprecated and will be removed on 2025-07-15. + Please migrate to user-maintained configuration or the new equivalent clan services + (https://docs.clan.lol/reference/clanServices)." + ]; + config.services.mycelium = { enable = true; addHostedPublicNodes = lib.mkDefault config.clan.mycelium.addHostedPublicNodes; diff --git a/clanModules/packages/roles/default.nix b/clanModules/packages/roles/default.nix index 1f5c323e8..9aa2864fe 100644 --- a/clanModules/packages/roles/default.nix +++ b/clanModules/packages/roles/default.nix @@ -12,6 +12,12 @@ }; }; config = { + + warnings = [ + "The clan.packages module is deprecated and will be removed on 2025-07-15. + Please migrate to user-maintained configuration or the new equivalent clan services + (https://docs.clan.lol/reference/clanServices)." + ]; environment.systemPackages = map ( pName: lib.getAttrFromPath (lib.splitString "." pName) pkgs ) config.clan.packages.packages; diff --git a/clanModules/root-password/roles/default.nix b/clanModules/root-password/roles/default.nix index b3bc0b86e..e9d921d39 100644 --- a/clanModules/root-password/roles/default.nix +++ b/clanModules/root-password/roles/default.nix @@ -6,6 +6,13 @@ ... }: { + + warnings = [ + "The clan.root-password module is deprecated and will be removed on 2025-07-15. + Please migrate to user-maintained configuration or the new equivalent clan services + (https://docs.clan.lol/reference/clanServices)." + ]; + users.mutableUsers = false; users.users.root.hashedPasswordFile = config.clan.core.vars.generators.root-password.files.password-hash.path; diff --git a/clanModules/sshd/roles/server.nix b/clanModules/sshd/roles/server.nix index 435eefcd3..8aa4d45f8 100644 --- a/clanModules/sshd/roles/server.nix +++ b/clanModules/sshd/roles/server.nix @@ -17,6 +17,13 @@ in clan.sshd.hostKeys.rsa.enable = lib.mkEnableOption "Generate RSA host key"; }; config = { + + warnings = [ + "The clan.sshd module is deprecated and will be removed on 2025-07-15. + Please migrate to user-maintained configuration or the new equivalent clan services + (https://docs.clan.lol/reference/clanServices)." + ]; + services.openssh = { enable = true; settings.PasswordAuthentication = false; diff --git a/clanModules/state-version/roles/default.nix b/clanModules/state-version/roles/default.nix index 4c87c044a..a136e8432 100644 --- a/clanModules/state-version/roles/default.nix +++ b/clanModules/state-version/roles/default.nix @@ -3,6 +3,13 @@ let var = config.clan.core.vars.generators.state-version.files.version or { }; in { + + warnings = [ + "The clan.state-version module is deprecated and will be removed on 2025-07-15. + Please migrate to user-maintained configuration or the new equivalent clan services + (https://docs.clan.lol/reference/clanServices)." + ]; + system.stateVersion = lib.mkDefault (lib.removeSuffix "\n" var.value); clan.core.vars.generators.state-version = { diff --git a/clanModules/syncthing/roles/peer.nix b/clanModules/syncthing/roles/peer.nix index 1b116428d..d8cf3448c 100644 --- a/clanModules/syncthing/roles/peer.nix +++ b/clanModules/syncthing/roles/peer.nix @@ -11,6 +11,7 @@ in imports = [ ../shared.nix ]; + clan.syncthing.introducer = lib.strings.removeSuffix "\n" ( if builtins.pathExists introducerId then builtins.readFile introducerId diff --git a/clanModules/user-password/roles/default.nix b/clanModules/user-password/roles/default.nix index 7724474b7..e0b20c8ce 100644 --- a/clanModules/user-password/roles/default.nix +++ b/clanModules/user-password/roles/default.nix @@ -26,6 +26,13 @@ in }; config = { + + warnings = [ + "The clan.user-password module is deprecated and will be removed on 2025-07-15. + Please migrate to user-maintained configuration or the new equivalent clan services + (https://docs.clan.lol/reference/clanServices)." + ]; + users.mutableUsers = false; users.users.${cfg.user} = { hashedPasswordFile = config.clan.core.vars.generators.user-password.files.user-password-hash.path; diff --git a/clanModules/zerotier/roles/controller.nix b/clanModules/zerotier/roles/controller.nix index c060c0f1d..f648e45cd 100644 --- a/clanModules/zerotier/roles/controller.nix +++ b/clanModules/zerotier/roles/controller.nix @@ -17,6 +17,13 @@ in ../shared.nix ]; config = { + + warnings = [ + "The clan.zerotier module is deprecated and will be removed on 2025-07-15. + Please migrate to user-maintained configuration or the new equivalent clan services + (https://docs.clan.lol/reference/clanServices)." + ]; + systemd.services.zerotier-inventory-autoaccept = let machines = uniqueStrings (roles.moon.machines ++ roles.controller.machines ++ roles.peer.machines);