summary refs log tree commit diff
diff options
context:
space:
mode:
authortzlil <tzlils@protonmail.com>2023-05-18 19:40:01 +0300
committertzlil <tzlils@protonmail.com>2023-05-18 19:40:01 +0300
commit959dfaaeb7ae01a77f9e2c3c17bac1b7e23d8ea1 (patch)
treea169856c7c33530aa1b3b7482fe6c8bc4685f456
parent57cbc3ac65272242bfee162b916d9675935e9c2e (diff)
add keepassxc to laptop, setup syncthing
-rw-r--r--hosts/laptop/cfg.nix5
-rw-r--r--mixins/syncthing.nix38
-rw-r--r--profiles/network.nix2
3 files changed, 41 insertions, 4 deletions
diff --git a/hosts/laptop/cfg.nix b/hosts/laptop/cfg.nix
index 8cf17d6..f766e0a 100644
--- a/hosts/laptop/cfg.nix
+++ b/hosts/laptop/cfg.nix
@@ -20,6 +20,7 @@
     ../../mixins/pipewire.nix
     ../../mixins/multimedia.nix
     # ../../mixins/emacs
+    ../../mixins/syncthing.nix
   ];
 
   config = {
@@ -88,7 +89,6 @@
 
     networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
 
-
     # # iwd networking stuffs
     # networking.networkmanager.enable = lib.mkForce false;
     # networking.wireless.iwd.enable = true;
@@ -102,7 +102,6 @@
     # networking.wireless.enable = true;
     # services.connman.enable = true;
 
-
     environment.persistence."/nix/persist".directories = [
       "/etc/NetworkManager/system-connections"
       {
@@ -112,7 +111,7 @@
       }
     ];
 
-    home-manager.users.tzlil.home.packages = [pkgs.schildichat-desktop pkgs.qutebrowser];
+    home-manager.users.tzlil.home.packages = [pkgs.schildichat-desktop pkgs.qutebrowser pkgs.keepassxc];
 
     nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
     powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
diff --git a/mixins/syncthing.nix b/mixins/syncthing.nix
new file mode 100644
index 0000000..3e219ae
--- /dev/null
+++ b/mixins/syncthing.nix
@@ -0,0 +1,38 @@
+{
+  pkgs,
+  config,
+  ...
+}: {
+  config = {
+    services.syncthing = {
+      enable = true;
+      user = "tzlil";
+      dataDir = "/home/tzlil/sync";
+      configDir = "/home/tzlil/.config/syncthing";
+      overrideDevices = true;
+      overrideFolders = true;
+      devices = {
+        "phone" = {id = "UHWVTEZ-BERNFCH-3ZXQHNE-ZRBHLU6-MBAVEHB-TKLQJM7-ZGHLJ4R-6E4SAA7";};
+      };
+      folders = {
+        "passwords" = {
+          path = "/home/tzlil/sync/passwords";
+          devices = ["phone"];
+        };
+      };
+    };
+
+    environment.persistence."/nix/persist".directories = [
+      {
+        directory = "/home/tzlil/sync";
+        user = "tzlil";
+        group = "users";
+      }
+      {
+        directory = "/home/tzlil/.config/syncthing";
+        user = "tzlil";
+        group = "users";
+      }
+    ];
+  };
+}
diff --git a/profiles/network.nix b/profiles/network.nix
index 90c5d47..c959824 100644
--- a/profiles/network.nix
+++ b/profiles/network.nix
@@ -49,7 +49,7 @@
         };
 
         # You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md
-        server_names = [ ]; # tailscale magicdns
+        server_names = []; # tailscale magicdns
       };
     };