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 0000000..a01e7f3 Binary files /dev/null and b/secrets/linkwarden-environment.age differ diff --git a/secrets/secrets.nix b/secrets/secrets.nix index bdbc2b9..3071fd2 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -38,6 +38,7 @@ with roles; # services "searx.age".publicKeys = nobody; "wolframalpha.age".publicKeys = dailybot; + "linkwarden-environment.age".publicKeys = linkwarden; # hostapd "hostapd-pw-experimental-tower.age".publicKeys = nobody;