From dbde2a40f20b4ca835f8bdba90187384f6e0f1f0 Mon Sep 17 00:00:00 2001 From: Zuckerberg Date: Tue, 5 Aug 2025 19:42:29 -0700 Subject: [PATCH] Add linkwarden --- flake.lock | 13 +++++++++++++ flake.nix | 5 +++++ machines/storage/s0/default.nix | 14 ++++++++++++++ machines/storage/s0/properties.nix | 1 + secrets/linkwarden-environment.age | Bin 0 -> 903 bytes secrets/secrets.nix | 1 + 6 files changed, 34 insertions(+) create mode 100644 secrets/linkwarden-environment.age diff --git a/flake.lock b/flake.lock index 49ffa6c..6365ce8 100644 --- a/flake.lock +++ b/flake.lock @@ -271,6 +271,18 @@ "type": "github" } }, + "nixpkgs-linkwarden": { + "flake": false, + "locked": { + "narHash": "sha256-wW3F+iRM/ATWkyq8+Romal8oFmsM/p98V96d5G0tasA=", + "type": "file", + "url": "https://github.com/NixOS/nixpkgs/pull/347353.diff" + }, + "original": { + "type": "file", + "url": "https://github.com/NixOS/nixpkgs/pull/347353.diff" + } + }, "root": { "inputs": { "agenix": "agenix", @@ -282,6 +294,7 @@ "nix-index-database": "nix-index-database", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", + "nixpkgs-linkwarden": "nixpkgs-linkwarden", "simple-nixos-mailserver": "simple-nixos-mailserver", "systems": "systems" } diff --git a/flake.nix b/flake.nix index 8c11ffe..6e6f6cb 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,10 @@ inputs = { # nixpkgs nixpkgs.url = "github:NixOS/nixpkgs/release-25.05"; + nixpkgs-linkwarden = { + url = "https://github.com/NixOS/nixpkgs/pull/347353.diff"; + flake = false; + }; # Common Utils Among flake inputs systems.url = "github:nix-systems/default"; @@ -124,6 +128,7 @@ # I tried to use an overlay but my attempts to override the rust package did not work out # despite me following guides and examples specific to rust packages. ./patches/librespot-pin.patch + inputs.nixpkgs-linkwarden ]; }; patchedNixpkgs = nixpkgs.lib.fix (self: (import "${patchedNixpkgsSrc}/flake.nix").outputs { self = nixpkgs; }); diff --git a/machines/storage/s0/default.nix b/machines/storage/s0/default.nix index 6245a21..519b3dd 100644 --- a/machines/storage/s0/default.nix +++ b/machines/storage/s0/default.nix @@ -251,6 +251,7 @@ (mkVirtualHost "sandman.s0.neet.dev" "http://192.168.9.14:3000") # es (mkVirtualHost "todo.s0.neet.dev" "http://localhost:${toString config.services.vikunja.port}") (mkVirtualHost "budget.s0.neet.dev" "http://localhost:${toString config.services.actual.settings.port}") # actual budget + (mkVirtualHost "linkwarden.s0.neet.dev" "http://localhost:${toString config.services.linkwarden.port}") ]; tailscaleAuth = { @@ -314,5 +315,18 @@ services.actual.enable = true; + services.linkwarden = { + enable = true; + enableRegistration = true; + port = 41709; + environment.NEXTAUTH_URL = "https://linkwarden.s0.neet.dev/api/v1/auth"; + environmentFile = "/run/agenix/linkwarden-environment"; + }; + age.secrets.linkwarden-environment.file = ../../../secrets/linkwarden-environment.age; + services.meilisearch = { + enable = true; + package = pkgs.meilisearch; + }; + boot.binfmt.emulatedSystems = [ "aarch64-linux" "armv7l-linux" ]; } diff --git a/machines/storage/s0/properties.nix b/machines/storage/s0/properties.nix index c177035..f58f391 100644 --- a/machines/storage/s0/properties.nix +++ b/machines/storage/s0/properties.nix @@ -15,6 +15,7 @@ "frigate" "zigbee" "media-server" + "linkwarden" ]; hostKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAwiXcUFtAvZCayhu4+AIcF+Ktrdgv9ee/mXSIhJbp4q"; diff --git a/secrets/linkwarden-environment.age b/secrets/linkwarden-environment.age new file mode 100644 index 0000000000000000000000000000000000000000..a01e7f309d0e3003b49134f24f71961fc0defa13 GIT binary patch literal 903 zcmYdHPt{G$OD?J`D9Oyv)5|YP*Do{V(zR14F3!+RO))YxHMCU72q-YjD_3wgaP%uM z4-CyV^>lP8&kGAGiFEQ!$qqHi&daq-4hoAZFOTxc3N@{)GT=(iHw$;PO!D+I33u`_ zbj!93De+3p%QSMYa5i_%4|WX=Gbu7CEly1_NJqD=+&Hh)B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