Move homelab modules
This commit is contained in:
parent
2af364ef96
commit
42b70676bc
10 changed files with 6 additions and 20 deletions
30
hosts/nixedo/modules/paperless.nix
Normal file
30
hosts/nixedo/modules/paperless.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
url = "paperless.oliverdavies.uk";
|
||||
in
|
||||
{
|
||||
options.nixosModules.paperless.enable = mkEnableOption "Enable paperless";
|
||||
|
||||
config = mkIf config.nixosModules.paperless.enable {
|
||||
services = {
|
||||
paperless = {
|
||||
enable = true;
|
||||
|
||||
dataDir = "/mnt/media/paperless";
|
||||
|
||||
settings = {
|
||||
PAPERLESS_URL = "https://${url}";
|
||||
};
|
||||
};
|
||||
|
||||
caddy.virtualHosts."${url}" = {
|
||||
useACMEHost = "oliverdavies.uk";
|
||||
|
||||
extraConfig = "reverse_proxy localhost:28981";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue