mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2024-11-16 13:23:16 +00:00
20 lines
553 B
Nix
20 lines
553 B
Nix
|
{ config, lib, ... }:
|
||
|
let
|
||
|
inherit (import ./common.nix config) sp db-pass-filepath admin-pass-filepath;
|
||
|
in
|
||
|
# FIXME do we really want to delete passwords on module deactivation!?
|
||
|
{
|
||
|
config = lib.mkIf (!sp.modules.nextcloud.enable) {
|
||
|
system.activationScripts.nextcloudSecrets =
|
||
|
lib.trivial.warn
|
||
|
(
|
||
|
"nextcloud service is disabled, " +
|
||
|
"${db-pass-filepath} and ${admin-pass-filepath} will be removed!"
|
||
|
)
|
||
|
''
|
||
|
rm -f ${db-pass-filepath}
|
||
|
rm -f ${admin-pass-filepath}
|
||
|
'';
|
||
|
};
|
||
|
}
|