mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat: init paperless for winters
This commit is contained in:
parent
a0a0f6e537
commit
3a56b30a91
6 changed files with 114 additions and 13 deletions
|
|
@ -6639,6 +6639,7 @@ Also, the system state version is set here. No need to touch it.
|
||||||
./matrix.nix
|
./matrix.nix
|
||||||
./nextcloud.nix
|
./nextcloud.nix
|
||||||
./immich.nix
|
./immich.nix
|
||||||
|
./paperless.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nix =
|
nix =
|
||||||
|
|
@ -6730,7 +6731,7 @@ Also, the system state version is set here. No need to touch it.
|
||||||
|
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
settingssys.Eternor = {
|
settings.Eternor = {
|
||||||
browseable = "yes";
|
browseable = "yes";
|
||||||
"read only" = "no";
|
"read only" = "no";
|
||||||
"guest ok" = "no";
|
"guest ok" = "no";
|
||||||
|
|
@ -7424,7 +7425,7 @@ Also, the system state version is set here. No need to touch it.
|
||||||
|
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
packages = pkgs.nextcloud30;
|
package = pkgs.nextcloud30;
|
||||||
hostName = "stash.swarsel.win";
|
hostName = "stash.swarsel.win";
|
||||||
home = "/Vault/apps/nextcloud";
|
home = "/Vault/apps/nextcloud";
|
||||||
datadir = "/Vault/data/nextcloud";
|
datadir = "/Vault/data/nextcloud";
|
||||||
|
|
@ -7472,10 +7473,9 @@ Also, the system state version is set here. No need to touch it.
|
||||||
|
|
||||||
services.immich = {
|
services.immich = {
|
||||||
enable = true;
|
enable = true;
|
||||||
port = 3001
|
port = 3001;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
mediaLocation = "/Vault/Eternor/Bilder";
|
mediaLocation = "/Vault/Eternor/Immich";
|
||||||
home = "/Vault/apps/nextcloud";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -7487,7 +7487,7 @@ Also, the system state version is set here. No need to touch it.
|
||||||
acmeRoot = null;
|
acmeRoot = null;
|
||||||
locations = {
|
locations = {
|
||||||
"/" = {
|
"/" = {
|
||||||
proxyPass = "http://192.168.1.2:3001";
|
proxyPass = "http://[::1]:3001";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
client_max_body_size 0;
|
client_max_body_size 0;
|
||||||
'';
|
'';
|
||||||
|
|
@ -7501,6 +7501,59 @@ Also, the system state version is set here. No need to touch it.
|
||||||
}
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
**** paperless
|
||||||
|
|
||||||
|
#+begin_src nix :tangle profiles/server/common/paperless.nix
|
||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
{
|
||||||
|
config = lib.mkIf config.swarselsystems.server.immich {
|
||||||
|
|
||||||
|
users.users.paperless = {
|
||||||
|
extraGroups = [ "users" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
sops.secrets.paperless_admin = { owner = "paperless"; };
|
||||||
|
|
||||||
|
services.paperless = {
|
||||||
|
enable = true;
|
||||||
|
mediaDir = "/Vault/Eternor/Dokumente";
|
||||||
|
user = "paperless";
|
||||||
|
port = 28981;
|
||||||
|
passwordFile = config.sops.secrets.paperless_admin.path;
|
||||||
|
address = "0.0.0.0";
|
||||||
|
extraConfig = {
|
||||||
|
PAPERLESS_OCR_LANGUAGE = "deu+eng";
|
||||||
|
PAPERLESS_URL = "scan.swarsel.win";
|
||||||
|
PAPERLESS_OCR_USER_ARGS = builtins.toJSON {
|
||||||
|
optimize = 1;
|
||||||
|
pdfa_image_compression = "lossless";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx = {
|
||||||
|
virtualHosts = {
|
||||||
|
"scan.swarsel.win" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
acmeRoot = null;
|
||||||
|
locations = {
|
||||||
|
"/" = {
|
||||||
|
proxyPass = "http://192.168.1.2:28981";
|
||||||
|
extraConfig = ''
|
||||||
|
client_max_body_size 0;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
*** Optional
|
*** Optional
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
./matrix.nix
|
./matrix.nix
|
||||||
./nextcloud.nix
|
./nextcloud.nix
|
||||||
./immich.nix
|
./immich.nix
|
||||||
|
./paperless.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nix =
|
nix =
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,9 @@
|
||||||
|
|
||||||
services.immich = {
|
services.immich = {
|
||||||
enable = true;
|
enable = true;
|
||||||
port = 3001
|
port = 3001;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
mediaLocation = "/Vault/Eternor/Bilder";
|
mediaLocation = "/Vault/Eternor/Immich";
|
||||||
home = "/Vault/apps/nextcloud";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -25,7 +24,7 @@
|
||||||
acmeRoot = null;
|
acmeRoot = null;
|
||||||
locations = {
|
locations = {
|
||||||
"/" = {
|
"/" = {
|
||||||
proxyPass = "http://192.168.1.2:3001";
|
proxyPass = "http://[::1]:3001";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
client_max_body_size 0;
|
client_max_body_size 0;
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
packages = pkgs.nextcloud30;
|
package = pkgs.nextcloud30;
|
||||||
hostName = "stash.swarsel.win";
|
hostName = "stash.swarsel.win";
|
||||||
home = "/Vault/apps/nextcloud";
|
home = "/Vault/apps/nextcloud";
|
||||||
datadir = "/Vault/data/nextcloud";
|
datadir = "/Vault/data/nextcloud";
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
settingssys.Eternor = {
|
settings.Eternor = {
|
||||||
browseable = "yes";
|
browseable = "yes";
|
||||||
"read only" = "no";
|
"read only" = "no";
|
||||||
"guest ok" = "no";
|
"guest ok" = "no";
|
||||||
|
|
|
||||||
48
profiles/server/common/paperless.nix
Normal file
48
profiles/server/common/paperless.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
{
|
||||||
|
config = lib.mkIf config.swarselsystems.server.immich {
|
||||||
|
|
||||||
|
users.users.paperless = {
|
||||||
|
extraGroups = [ "users" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
sops.secrets.paperless_admin = { owner = "paperless"; };
|
||||||
|
|
||||||
|
services.paperless = {
|
||||||
|
enable = true;
|
||||||
|
mediaDir = "/Vault/Eternor/Dokumente";
|
||||||
|
user = "paperless";
|
||||||
|
port = 28981;
|
||||||
|
passwordFile = config.sops.secrets.paperless_admin.path;
|
||||||
|
address = "0.0.0.0";
|
||||||
|
extraConfig = {
|
||||||
|
PAPERLESS_OCR_LANGUAGE = "deu+eng";
|
||||||
|
PAPERLESS_URL = "scan.swarsel.win";
|
||||||
|
PAPERLESS_OCR_USER_ARGS = builtins.toJSON {
|
||||||
|
optimize = 1;
|
||||||
|
pdfa_image_compression = "lossless";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx = {
|
||||||
|
virtualHosts = {
|
||||||
|
"scan.swarsel.win" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
acmeRoot = null;
|
||||||
|
locations = {
|
||||||
|
"/" = {
|
||||||
|
proxyPass = "http://192.168.1.2:28981";
|
||||||
|
extraConfig = ''
|
||||||
|
client_max_body_size 0;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue