From 77d36e4d8b7ac8748ed529d180af6796e357346e Mon Sep 17 00:00:00 2001 From: uttarayan21 Date: Tue, 6 May 2025 11:38:34 +0530 Subject: [PATCH] feat: Update zeronsd --- flake.lock | 146 ++++++++++++++++++++++++++++++-- flake.nix | 4 + nixos/ryu/configuration.nix | 6 ++ nixos/ryu/services/zerotier.nix | 19 +++-- overlays.nix | 9 +- 5 files changed, 161 insertions(+), 23 deletions(-) diff --git a/flake.lock b/flake.lock index 04c60783..255df08f 100644 --- a/flake.lock +++ b/flake.lock @@ -64,6 +64,22 @@ "type": "github" } }, + "advisory-db_5": { + "flake": false, + "locked": { + "lastModified": 1746469888, + "narHash": "sha256-4NK2CBYjXSMtq4t5wS9mhgIaLdKv+mtINX/nmX0LZTg=", + "owner": "rustsec", + "repo": "advisory-db", + "rev": "4f92672f2e11ca63e93a5437f3cd63443ee63595", + "type": "github" + }, + "original": { + "owner": "rustsec", + "repo": "advisory-db", + "type": "github" + } + }, "anyrun": { "inputs": { "flake-parts": "flake-parts", @@ -313,6 +329,21 @@ } }, "crane_7": { + "locked": { + "lastModified": 1746291859, + "narHash": "sha256-DdWJLA+D5tcmrRSg5Y7tp/qWaD05ATI4Z7h22gd1h7Q=", + "owner": "ipetkov", + "repo": "crane", + "rev": "dfd9a8dfd09db9aad544c4d3b6c47b12562544a5", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "crane_8": { "locked": { "lastModified": 1743700120, "narHash": "sha256-8BjG/P0xnuCyVOXlYRwdI1B8nVtyYLf3oDwPSimqREY=", @@ -774,6 +805,24 @@ "inputs": { "systems": "systems_16" }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_15": { + "inputs": { + "systems": "systems_17" + }, "locked": { "lastModified": 1731533236, "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", @@ -1731,6 +1780,27 @@ "type": "github" } }, + "nix-github-actions_4": { + "inputs": { + "nixpkgs": [ + "zeronsd", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1737420293, + "narHash": "sha256-F1G5ifvqTpJq7fdkT34e/Jy9VCyzd5XfJ9TO8fHhJWE=", + "owner": "nix-community", + "repo": "nix-github-actions", + "rev": "f4158fa080ef4503c8f4c820967d946c2af31ec9", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-github-actions", + "type": "github" + } + }, "nix-index-database": { "inputs": { "nixpkgs": "nixpkgs_3" @@ -2237,6 +2307,7 @@ "tree-sitter-slint": "tree-sitter-slint", "typr": "typr", "volt": "volt", + "zeronsd": "zeronsd", "zjstatus": "zjstatus" } }, @@ -2261,6 +2332,27 @@ "type": "github" } }, + "rust-overlay_10": { + "inputs": { + "nixpkgs": [ + "zjstatus", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1743682350, + "narHash": "sha256-S/MyKOFajCiBm5H5laoE59wB6w0NJ4wJG53iAPfYW3k=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "c4a8327b0f25d1d81edecbb6105f74d7cf9d7382", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "rust-overlay_2": { "inputs": { "flake-utils": "flake-utils_2", @@ -2414,16 +2506,16 @@ "rust-overlay_9": { "inputs": { "nixpkgs": [ - "zjstatus", + "zeronsd", "nixpkgs" ] }, "locked": { - "lastModified": 1743682350, - "narHash": "sha256-S/MyKOFajCiBm5H5laoE59wB6w0NJ4wJG53iAPfYW3k=", + "lastModified": 1728613723, + "narHash": "sha256-zVVj0PKguM8ZMdLE43YW7dzer3tl9e6i5Qs1fr878+c=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "c4a8327b0f25d1d81edecbb6105f74d7cf9d7382", + "rev": "ca93f28abd2147dd9997261dcaeacc5a30dba463", "type": "github" }, "original": { @@ -2572,6 +2664,21 @@ "type": "github" } }, + "systems_17": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "systems_2": { "locked": { "lastModified": 1681028828, @@ -2893,6 +3000,31 @@ "type": "github" } }, + "zeronsd": { + "inputs": { + "advisory-db": "advisory-db_5", + "crane": "crane_7", + "flake-utils": "flake-utils_14", + "nix-github-actions": "nix-github-actions_4", + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": "rust-overlay_9" + }, + "locked": { + "lastModified": 1746511194, + "narHash": "sha256-1Bo2FUIBIqWsRL384lNDOA3C0iAEHLcjTFwPNowt2qs=", + "owner": "uttarayan21", + "repo": "zeronsd", + "rev": "02b00d1ae243f0c5eeec6c120f9c0ee4c5c02754", + "type": "github" + }, + "original": { + "owner": "uttarayan21", + "repo": "zeronsd", + "type": "github" + } + }, "zig": { "inputs": { "flake-compat": [ @@ -2923,12 +3055,12 @@ }, "zjstatus": { "inputs": { - "crane": "crane_7", - "flake-utils": "flake-utils_14", + "crane": "crane_8", + "flake-utils": "flake-utils_15", "nixpkgs": [ "nixpkgs" ], - "rust-overlay": "rust-overlay_9" + "rust-overlay": "rust-overlay_10" }, "locked": { "lastModified": 1745230073, diff --git a/flake.nix b/flake.nix index 837a0553..78eea2ca 100644 --- a/flake.nix +++ b/flake.nix @@ -159,6 +159,10 @@ url = "github:hercules-ci/arion"; inputs.nixpkgs.follows = "nixpkgs"; }; + zeronsd = { + url = "github:uttarayan21/zeronsd"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { diff --git a/nixos/ryu/configuration.nix b/nixos/ryu/configuration.nix index c99ed0ef..87911a66 100644 --- a/nixos/ryu/configuration.nix +++ b/nixos/ryu/configuration.nix @@ -10,6 +10,12 @@ # ./vms ]; + sops = { + defaultSopsFile = ../../secrets/secrets.yaml; + defaultSopsFormat = "yaml"; + age.keyFile = "/home/servius/.config/sops/age/keys.txt"; + }; + programs = { localsend = { enable = true; diff --git a/nixos/ryu/services/zerotier.nix b/nixos/ryu/services/zerotier.nix index 3b96e9c5..1912d931 100644 --- a/nixos/ryu/services/zerotier.nix +++ b/nixos/ryu/services/zerotier.nix @@ -1,11 +1,12 @@ -{...}: { - services = { - zerotierone = { - enable = true; - port = 9994; - joinNetworks = [ - "abfd31bd4766754d" - ]; - }; +{config, ...}: { + sops = { + secrets."zerotier/api_key".owner = config.systemd.services.zeronsd-abfd31bd4766754d.serviceConfig.User; + }; + services .zerotierone = { + enable = true; + port = 9994; + joinNetworks = [ + "abfd31bd4766754d" + ]; }; } diff --git a/overlays.nix b/overlays.nix index 95158fe0..61478e66 100644 --- a/overlays.nix +++ b/overlays.nix @@ -136,17 +136,12 @@ }; }; zeronsd = let - src = final.pkgs.fetchFromGitHub { - owner = "uttarayan21"; - repo = "zeronsd"; - rev = "6690ef46ef3dc112ab2c378d96af717e850f699f"; - sha256 = "sha256-Vpz9iNsBvUFjmXgwbv0aGtG6dHWTtgIS8vrT9wHfZpA="; - }; + src = inputs.zeronsd; in final.rustPlatform.buildRustPackage { inherit src; pname = "zeronsd"; - version = "0.5.2"; + version = "0.6"; strictDeps = true; buildInputs = [final.pkgs.openssl];