move bitwarden to SP module

This commit is contained in:
Alexander Tomokhov
2023-12-03 12:29:01 +04:00
committed by Alexander Tomokhov
parent ade4dc08b1
commit c0aa73ca1b
10 changed files with 103 additions and 60 deletions

View File

@@ -0,0 +1,17 @@
{ config, lib, ... }:
let
inherit (import ./common.nix config) bitwarden-env sp;
in
# FIXME do we really want to delete passwords on module deactivation!?
{
config = lib.mkIf (!sp.modules.bitwarden.enable) {
system.activationScripts.bitwarden =
lib.trivial.warn
(
"bitwarden service is disabled, ${bitwarden-env} will be removed!"
)
''
rm -f -v ${bitwarden-env}
'';
};
}