]> git.scottworley.com Git - syncthing-autoregister/blobdiff - README
Follow renames in test data
[syncthing-autoregister] / README
diff --git a/README b/README
index d462866dbfe67e31e2f79fa91d414b69a967d833..12e0d8f0024ba278c04de59a28eb09ed3798763d 100644 (file)
--- a/README
+++ b/README
@@ -2,6 +2,8 @@
 
 Modify in-place a nix module that configures syncthing device ids.  This file can used as a normal `include` in nixos configs.  This eliminates the need to copy-paste these device IDs around.
 
 
 Modify in-place a nix module that configures syncthing device ids.  This file can used as a normal `include` in nixos configs.  This eliminates the need to copy-paste these device IDs around.
 
+### Example
+
     desktop$ syncthing-set-id syncthing-devices.nix
     Creating /home/user/myNixOSConfigs/syncthing-devices.nix
 
     desktop$ syncthing-set-id syncthing-devices.nix
     Creating /home/user/myNixOSConfigs/syncthing-devices.nix
 
@@ -9,12 +11,10 @@ Modify in-place a nix module that configures syncthing device ids.  This file ca
     {
       "services" = {
         "syncthing" = {
     {
       "services" = {
         "syncthing" = {
-          "declarative" = {
-            "devices" = {
-              "desktop" = {
-                "id" =
-                  "1234567-89ABCDE-FGHIJKL-MNOPQRS-TUVWXYZ-0123456-789ABCD-EFGHIJK";
-              };
+          "devices" = {
+            "desktop" = {
+              "id" =
+                "1234567-89ABCDE-FGHIJKL-MNOPQRS-TUVWXYZ-0123456-789ABCD-EFGHIJK";
             };
           };
         };
             };
           };
         };
@@ -29,23 +29,22 @@ Then, later, on another machine:
     {
       "services" = {
         "syncthing" = {
     {
       "services" = {
         "syncthing" = {
-          "declarative" = {
-            "devices" = {
-              "desktop" = {
-                "id" =
-                  "1234567-89ABCDE-FGHIJKL-MNOPQRS-TUVWXYZ-0123456-789ABCD-EFGHIJK";
-              };
-              "laptop" = {
-                "id" =
-                  "1111111-2222222-3333333-4444444-5555555-6666666-7777777-8888888";
-              };
+          "devices" = {
+            "desktop" = {
+              "id" =
+                "1234567-89ABCDE-FGHIJKL-MNOPQRS-TUVWXYZ-0123456-789ABCD-EFGHIJK";
+            };
+            "laptop" = {
+              "id" =
+                "1111111-2222222-3333333-4444444-5555555-6666666-7777777-8888888";
             };
           };
         };
       };
     }
 
             };
           };
         };
       };
     }
 
-Usage
+
+### Usage
 
     $ syncthing-set-id
 
 
     $ syncthing-set-id
 
@@ -56,3 +55,23 @@ Usage
 
     If `name` is not specified, $HOSTNAME is used.
     If `id` is not specified, the ID of the current system instance is used.
 
     If `name` is not specified, $HOSTNAME is used.
     If `id` is not specified, the ID of the current system instance is used.
+
+
+### Installation
+
+You can use this repo as a channel.
+
+Or, you can use an overlay.  For example, you could create a `~/.config/nixpkgs/overlays/syncthing-set-id.nix` with this in it:
+
+    self: super:
+    let
+      syncthing-set-id-pkgs = import (builtins.fetchGit {
+        url = "https://scottworley.com/syncthing-set-id.git";
+        ref = "master";
+        rev = "0c29f01e83fdadd491b930a9108519be03c7937d";
+      }) { pkgs = self; };
+    in { inherit (syncthing-set-id-pkgs) syncthing-set-id; }
+
+And then
+
+    $ nix-env -iA nixos.syncthing-set-id