New service: linkding

linkding
Tudor Roman 2023-09-14 19:49:38 +02:00
parent 5cf923b209
commit 3ac191c2fa
Signed by: tudor
SSH Key Fingerprint: SHA256:3CwS9plgXBecpXImPGxDIaSktUXBejbV/zerZMqzzBk
6 changed files with 38 additions and 9 deletions

View File

@ -182,6 +182,7 @@
profiles.system = {
sshUser = "root";
path = x64DeployPkgs.deploy-rs.lib.activate.nixos self.nixosConfigurations."ceres";
autoRollback = false;
};
};

View File

@ -7,12 +7,13 @@
ssh.enable = true;
ssh.enableMosh = true;
web = {
nginx.enable = true;
cgit.enable = false;
gitea.enable = true;
linkding.enable = true;
miniflux.enable = true;
nginx.enable = true;
site.enable = true;
vaultwarden.enable = true;
miniflux.enable = true;
};
ipforward.enable = true;
tailscale.enable = true;
@ -44,12 +45,9 @@
};
age.secrets = {
tudor-password = {
file = ../../secrets/ceres/tudor-password.age;
};
miniflux-credentials = {
file = ../../secrets/ceres/miniflux-credentials.age;
};
tudor-password.file = ../../secrets/ceres/tudor-password.age;
miniflux-credentials.file = ../../secrets/ceres/miniflux-credentials.age;
linkding-credentials.file = ../../secrets/ceres/linkding-credentials.age;
};
users.users.${vars.username} = {

View File

@ -3,9 +3,10 @@
imports = [
./cgit
./gitea.nix
./linkding.nix
./miniflux.nix
./nginx.nix
./site.nix
./vaultwarden.nix
./miniflux.nix
];
}

View File

@ -0,0 +1,28 @@
{ config, lib, pkgs, ... }:
let
cfg = config.systemModules.services.web.linkding;
version = "1.21.0";
in
with lib; {
options.systemModules.services.web.linkding.enable = mkEnableOption "Enable linkding";
config = mkIf cfg.enable {
virtualisation.oci-containers.containers.linkding = {
image = "docker.io/sissbruecker/linkding:${version}";
ports = [ "127.0.0.1:8316:9090" ];
volumes = [ "linkding_data:/etc/linkding/data" ];
environmentFiles = [ config.age.secrets.linkding-credentials.path ];
environment = {
LD_CSRF_TRUSTED_ORIGINS = "https://links.tudorr.ro";
};
};
services.nginx.virtualHosts."links.tudorr.ro" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:8316/";
};
};
};
}

Binary file not shown.

View File

@ -6,4 +6,5 @@ in
{
"tudor-password.age".publicKeys = keys;
"miniflux-credentials.age".publicKeys = keys;
"linkding-credentials.age".publicKeys = keys;
}