Save mongodb saved connections
diff --git a/modules/mongo.nix b/modules/mongo.nix
index 1b51547..4b3e26a 100644
--- a/modules/mongo.nix
+++ b/modules/mongo.nix
@@ -1,4 +1,4 @@
-{ pkgs, nixpkgs-unfree, system, lib, ... }: {
+{ pkgs, nixpkgs-unfree, system, username, lib, ... }: {
   config = {
     services.mongodb = {
       package = nixpkgs-unfree.legacyPackages.${system}.mongodb-6_0;
@@ -7,6 +7,9 @@
     };
     internal.allowUnfree = [ "mongodb" "mongodb-compass" ];
     systemd.services.mongod.wantedBy = lib.mkForce [];
+    environment.persistence."/nix/persist".users.${username}.directories = [
+      ".config/MongoDB\ Compass/Connections/"
+    ];
   };
 
   home.home.packages = [ pkgs.mongodb-compass ];