move bitwarden to SP module
This commit is contained in:

committed by
Alexander Tomokhov

parent
ade4dc08b1
commit
c0aa73ca1b
17
sp-modules/bitwarden/cleanup-module.nix
Normal file
17
sp-modules/bitwarden/cleanup-module.nix
Normal 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}
|
||||
'';
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user