From b30e6e362d3706e4f824806cd6c3e4bf38aebd51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kha=C3=AFs=20COLIN?= Date: Thu, 29 Aug 2024 15:36:05 +0200 Subject: [PATCH] chore: remove unused docspell setup --- acme.nix | 1 - configuration.nix | 3 +- docspell-initdb.sql | 5 -- docspell.nix | 45 ---------------- flake.lock | 126 +------------------------------------------- flake.nix | 10 +--- nginx.nix | 7 --- 7 files changed, 3 insertions(+), 194 deletions(-) delete mode 100644 docspell-initdb.sql delete mode 100644 docspell.nix diff --git a/acme.nix b/acme.nix index 661a7de..832857b 100644 --- a/acme.nix +++ b/acme.nix @@ -6,7 +6,6 @@ "sourcehut.${base-domain}" "meta.sourcehut.${base-domain}" "git.sourcehut.${base-domain}" - "docspell.${base-domain}" "paperless.${base-domain}" ]; acceptTerms = true; diff --git a/configuration.nix b/configuration.nix index c042008..d6a73fb 100644 --- a/configuration.nix +++ b/configuration.nix @@ -2,7 +2,7 @@ let base-domain = "005540.xyz"; in -{ pkgs, docspell, ... }: { +{ pkgs, ... }: { imports = [ ./hardware-configuration.nix ./openssh.nix @@ -18,7 +18,6 @@ in (import ./sourcehut.nix { inherit base-domain; }) - (import ./docspell.nix { inherit base-domain docspell; }) (import ./paperless.nix { inherit base-domain; }) ./userprogs.nix diff --git a/docspell-initdb.sql b/docspell-initdb.sql deleted file mode 100644 index d59d0e8..0000000 --- a/docspell-initdb.sql +++ /dev/null @@ -1,5 +0,0 @@ -create user docspell with password 'docspell' login createdb; -create schema docspell; -grant all privileges on all tables in schema docspell to docspell; -grant all privileges on all sequences in schema docspell to docspell; -create database DOCSPELL owner docspell; diff --git a/docspell.nix b/docspell.nix deleted file mode 100644 index 1e72739..0000000 --- a/docspell.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ base-domain, docspell, ... }: -let - fqdn = "docspell.${base-domain}"; -in -{ - nixpkgs.overlays = [ docspell.overlays.default ]; - - services.docspell-joex = { - enable = true; - base-url = "http://localhost:7878"; - bind = { - address = "0.0.0.0"; - port = 7878; - }; - scheduler.pool-size = 1; - jdbc = { - url = "jdbc:postgresql://localhost:5432/docspell"; - user = "docspell"; - password = "docspell"; - }; - }; - services.docspell-restserver = { - enable = true; - base-url = "https://${fqdn}"; - bind = { - address = "0.0.0.0"; - port = 7879; - }; - auth = { - server-secret = "b64:lv56LIyZmaXTdlhvFBVpoNHt2BTQBgHpb7lwl1gyOG9MuvWKhSi91h84P15QIXirfYPSVV/R1aoTifSO688dWQ=="; - }; - backend = { - signup = { - mode = "invite"; - new-invite-password = "asunarovow"; - invite-time = "30 days"; - }; - jdbc = { - url = "jdbc:postgresql://localhost:5432/docspell"; - user = "docspell"; - password = "docspell"; - }; - }; - }; -} diff --git a/flake.lock b/flake.lock index 26d4997..3305ce1 100644 --- a/flake.lock +++ b/flake.lock @@ -1,99 +1,6 @@ { "nodes": { - "devshell-tools": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1723456550, - "narHash": "sha256-7QRLuQAtNpKqXdXZ6/cGdFU3yAyZkuXm3NBb0WRVvRc=", - "owner": "eikek", - "repo": "devshell-tools", - "rev": "09f6239a67b648a8b777ce4da6712d6600138f5e", - "type": "github" - }, - "original": { - "owner": "eikek", - "repo": "devshell-tools", - "type": "github" - } - }, - "docspell": { - "inputs": { - "devshell-tools": "devshell-tools", - "flake-utils": "flake-utils_2", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1724580695, - "narHash": "sha256-KKLSqkjqg63zGl1fsRC293A0FNhDdXgnde3h3VEE8WU=", - "owner": "eikek", - "repo": "docspell", - "rev": "02396d29e72e315d4743204470fe60b973860a6a", - "type": "github" - }, - "original": { - "owner": "eikek", - "repo": "docspell", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "nixpkgs": { - "locked": { - "lastModified": 1721548954, - "narHash": "sha256-7cCC8+Tdq1+3OPyc3+gVo9dzUNkNIQfwSDJ2HSi2u3o=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "63d37ccd2d178d54e7fb691d7ec76000740ea24a", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-24.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1724316499, "narHash": "sha256-Qb9MhKBUTCfWg/wqqaxt89Xfi6qTD3XpTzQ9eXi3JmE=", @@ -111,38 +18,7 @@ }, "root": { "inputs": { - "docspell": "docspell", - "nixpkgs": "nixpkgs_2" - } - }, - "systems": { - "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, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index 396a7ca..7bbadba 100644 --- a/flake.nix +++ b/flake.nix @@ -3,21 +3,13 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; - docspell = { - url = "github:eikek/docspell"; - inputs.nixpkgs.follows = "nixpkgs"; - }; }; - outputs = { self, nixpkgs, docspell, ... }: { + outputs = { self, nixpkgs, ... }: { nixosConfigurations.quasar = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./configuration.nix - docspell.nixosModules.default - { - _module.args = { inherit docspell; }; - } ]; }; }; diff --git a/nginx.nix b/nginx.nix index 465b543..31d5767 100644 --- a/nginx.nix +++ b/nginx.nix @@ -19,13 +19,6 @@ "git.sourcehut.${base-domain}" = { enableACME = true; }; - "docspell.${base-domain}" = { - enableACME = true; - forceSSL = true; - locations."/" = { - proxyPass = "http://localhost:7879"; - }; - }; "paperless.${base-domain}" = { enableACME = true; forceSSL = true;