From 7494fd7efd185d22bb09415493c9631b9e34c970 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@hoyer.xyz>
Date: Tue, 25 Feb 2025 08:56:02 +0100
Subject: [PATCH] refactor: improve formatting and update dependencies

Reformatted configuration files for better readability and consistency. Updated lock file dependencies to the latest revisions, ensuring compatibility and performance improvements.
---
 flake.lock                              | 18 ++++----
 systems/x86_64-linux/mx/rustdesk.nix    | 60 ++++++++++++-------------
 systems/x86_64-linux/sgx/fileserver.nix | 50 ++++++++++++---------
 3 files changed, 69 insertions(+), 59 deletions(-)

diff --git a/flake.lock b/flake.lock
index 2d50c4b..1ee75e0 100644
--- a/flake.lock
+++ b/flake.lock
@@ -348,11 +348,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1736373539,
-        "narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
+        "lastModified": 1739757849,
+        "narHash": "sha256-Gs076ot1YuAAsYVcyidLKUMIc4ooOaRGO0PqTY7sBzA=",
         "owner": "nix-community",
         "repo": "home-manager",
-        "rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
+        "rev": "9d3d080aec2a35e05a15cedd281c2384767c2cfe",
         "type": "github"
       },
       "original": {
@@ -759,11 +759,11 @@
     },
     "nixpkgs_4": {
       "locked": {
-        "lastModified": 1736916166,
-        "narHash": "sha256-puPDoVKxkuNmYIGMpMQiK8bEjaACcCksolsG36gdaNQ=",
+        "lastModified": 1740339700,
+        "narHash": "sha256-cbrw7EgQhcdFnu6iS3vane53bEagZQy/xyIkDWpCgVE=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "e24b4c09e963677b1beea49d411cd315a024ad3a",
+        "rev": "04ef94c4c1582fd485bbfdb8c4a8ba250e359195",
         "type": "github"
       },
       "original": {
@@ -2763,11 +2763,11 @@
     },
     "unstable": {
       "locked": {
-        "lastModified": 1736883708,
-        "narHash": "sha256-uQ+NQ0/xYU0N1CnXsa2zghgNaOPxWpMJXSUJJ9W7140=",
+        "lastModified": 1740367490,
+        "narHash": "sha256-WGaHVAjcrv+Cun7zPlI41SerRtfknGQap281+AakSAw=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "eb62e6aa39ea67e0b8018ba8ea077efe65807dc8",
+        "rev": "0196c0175e9191c474c26ab5548db27ef5d34b05",
         "type": "github"
       },
       "original": {
diff --git a/systems/x86_64-linux/mx/rustdesk.nix b/systems/x86_64-linux/mx/rustdesk.nix
index 83e4932..0fe5e04 100644
--- a/systems/x86_64-linux/mx/rustdesk.nix
+++ b/systems/x86_64-linux/mx/rustdesk.nix
@@ -9,36 +9,36 @@
   services.rustdesk-server.signal.relayHosts = [ "rustdesk.hoyer.world" ];
   services.rustdesk-server.openFirewall = true;
   /*
-  services.nginx.virtualHosts."rustdesk.hoyer.world" = {
-    enableACME = false;
-    useACMEHost = "hoyer.world";
-    forceSSL = true;
-    locations = {
-      "/ws/id" = {
-        extraConfig = ''
-          proxy_pass http://localhost:21118;
-          proxy_http_version 1.1;
-          proxy_set_header Upgrade $http_upgrade;
-          proxy_set_header Connection "Upgrade";
-          proxy_set_header Host $host;
-          proxy_set_header X-Real-IP $remote_addr;
-          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-          proxy_set_header X-Forwarded-Proto $scheme;
-        '';
-      };
-      "/ws/relay" = {
-        extraConfig = ''
-          proxy_pass http://localhost:21119;
-          proxy_http_version 1.1;
-          proxy_set_header Upgrade $http_upgrade;
-          proxy_set_header Connection "Upgrade";
-          proxy_set_header Host $host;
-          proxy_set_header X-Real-IP $remote_addr;
-          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-          proxy_set_header X-Forwarded-Proto $scheme;
-        '';
+    services.nginx.virtualHosts."rustdesk.hoyer.world" = {
+      enableACME = false;
+      useACMEHost = "hoyer.world";
+      forceSSL = true;
+      locations = {
+        "/ws/id" = {
+          extraConfig = ''
+            proxy_pass http://localhost:21118;
+            proxy_http_version 1.1;
+            proxy_set_header Upgrade $http_upgrade;
+            proxy_set_header Connection "Upgrade";
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+            proxy_set_header X-Forwarded-Proto $scheme;
+          '';
+        };
+        "/ws/relay" = {
+          extraConfig = ''
+            proxy_pass http://localhost:21119;
+            proxy_http_version 1.1;
+            proxy_set_header Upgrade $http_upgrade;
+            proxy_set_header Connection "Upgrade";
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+            proxy_set_header X-Forwarded-Proto $scheme;
+          '';
+        };
       };
     };
-  };
-    */
+  */
 }
diff --git a/systems/x86_64-linux/sgx/fileserver.nix b/systems/x86_64-linux/sgx/fileserver.nix
index f3e3b8c..54c5b08 100644
--- a/systems/x86_64-linux/sgx/fileserver.nix
+++ b/systems/x86_64-linux/sgx/fileserver.nix
@@ -71,25 +71,35 @@
   };
 
   services.syncthing = {
-      enable = true;
-      user = "harald";
-      dataDir = "/mnt/raid/Qmultimedia/syncthing"; # Default folder for new synced folders
-      configDir = "/mnt/raid/Qmultimedia/syncthing/.config/syncthing"; # Folder for Syncthing's settings and keys
-      guiAddress = "127.0.0.1:8384";
-      settings.gui.insecureSkipHostcheck = true;
-       devices = {
-            "sgx" = { id = "2AAVSVQ-PK66I2B-2B4KWAU-TF674DG-IXNEKLF-CIWK7HG-7MUC7OW-DQQNAQM"; };
-            "S25" = { id = "7Q7XQXG-VF7QM6Y-HJST4V2-RWOPB3M-GHXQDLL-SRRN3IL-3PHKNOZ-D2IFIQV"; };
-          };
-          folders = {
-            "qibxq-03l4j" = {
-              path = "~/logseq";
-              devices = [ "sgx" "S25" ];
-            };
-            "sm-s931b_hjcb-Bilder" = {
-              path = "/mnt/raid/Qmultimedia/S25-Kamera";
-              devices = [ "sgx" "S25" ];
-            };
-          };
+    enable = true;
+    user = "harald";
+    dataDir = "/mnt/raid/Qmultimedia/syncthing"; # Default folder for new synced folders
+    configDir = "/mnt/raid/Qmultimedia/syncthing/.config/syncthing"; # Folder for Syncthing's settings and keys
+    guiAddress = "127.0.0.1:8384";
+    settings.gui.insecureSkipHostcheck = true;
+    devices = {
+      "sgx" = {
+        id = "2AAVSVQ-PK66I2B-2B4KWAU-TF674DG-IXNEKLF-CIWK7HG-7MUC7OW-DQQNAQM";
+      };
+      "S25" = {
+        id = "7Q7XQXG-VF7QM6Y-HJST4V2-RWOPB3M-GHXQDLL-SRRN3IL-3PHKNOZ-D2IFIQV";
+      };
+    };
+    folders = {
+      "qibxq-03l4j" = {
+        path = "~/logseq";
+        devices = [
+          "sgx"
+          "S25"
+        ];
+      };
+      "sm-s931b_hjcb-Bilder" = {
+        path = "/mnt/raid/Qmultimedia/S25-Kamera";
+        devices = [
+          "sgx"
+          "S25"
+        ];
+      };
+    };
   };
 }