paperless
This commit is contained in:
parent
9898c6fd26
commit
081bfa7fff
@ -657,7 +657,7 @@ xdg = {
|
||||
enable = true;
|
||||
userDirs = {
|
||||
enable = true;
|
||||
# createDirectories = true;
|
||||
createDirectories = false;
|
||||
desktop = "${config.home.homeDirectory}";
|
||||
documents = "${config.home.homeDirectory}/Documents";
|
||||
download = "${config.home.homeDirectory}/Downloads";
|
||||
@ -893,11 +893,6 @@ services = {
|
||||
}
|
||||
];
|
||||
};
|
||||
emacs = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
package = pkgs.emacs;
|
||||
};
|
||||
};
|
||||
#+end_src
|
||||
|
||||
|
||||
10
nginx.nix
10
nginx.nix
@ -7,18 +7,18 @@
|
||||
let
|
||||
localhost = "127.0.0.1";
|
||||
jellyfinPort = "8096";
|
||||
radarrPort = 7878;
|
||||
nextcloudPort = 80;
|
||||
searxPort = 8080;
|
||||
newflixPort = 8897;
|
||||
shioriPort = 9001;
|
||||
flamePort = 5005;
|
||||
secretFlamePort = 5007;
|
||||
lidarrPort = 8686;
|
||||
bazarrPort = 6767;
|
||||
sonarrPort = 8989;
|
||||
prowlarrPort = 9696;
|
||||
searxPort = 8080;
|
||||
kavitaPort = 5000;
|
||||
nextcloudPort = 80;
|
||||
radarrPort = 7878;
|
||||
bazarrPort = config.services.bazarr.listenPort;
|
||||
kavitaPort = config.services.kavita.port;
|
||||
vaultPort = config.services.vaultwarden.config.ROCKET_PORT;
|
||||
in {
|
||||
services.nginx = {
|
||||
|
||||
50
servers.nix
50
servers.nix
@ -1,30 +1,19 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
let
|
||||
localhost = "127.0.0.1";
|
||||
postgresPort = toString (config.services.postgresql.port);
|
||||
unstable = import
|
||||
(builtins.fetchTarball "https://github.com/nixos/nixpkgs/tarball/master") {
|
||||
config = config.nixpkgs.config;
|
||||
};
|
||||
in {
|
||||
imports = [ ./nginx.nix ];
|
||||
users.groups = {
|
||||
nextcloud.gid = 990;
|
||||
piracy.gid = 985;
|
||||
kavita.gid = 982;
|
||||
};
|
||||
users.users = let
|
||||
base = uid: {
|
||||
uid = uid;
|
||||
group = "piracy";
|
||||
isSystemUser = true;
|
||||
};
|
||||
users.groups = { piracy.gid = 985; };
|
||||
users.users = let base = { isSystemUser = true; };
|
||||
in {
|
||||
prowlarr = base 987 // { };
|
||||
sonarr = base 274 // { };
|
||||
radarr = base 275 // { };
|
||||
nextcloud = {
|
||||
isSystemUser = true;
|
||||
uid = 990;
|
||||
group = "nextcloud";
|
||||
prowlarr = base // { group = "piracy"; };
|
||||
paperless = base // { };
|
||||
nextcloud = base // {
|
||||
extraGroups = [ "render" ];
|
||||
packages = (with pkgs; [
|
||||
nodejs_14
|
||||
@ -51,18 +40,37 @@ in {
|
||||
bazarr = base // { };
|
||||
jellyfin = base // { };
|
||||
prowlarr.enable = true;
|
||||
paperless = {
|
||||
enable = true;
|
||||
consumptionDirIsPublic = true;
|
||||
extraConfig = {
|
||||
PAPERLESS_DBENGINE = "postgress";
|
||||
PAPERLESS_DBHOST = "${localhost}";
|
||||
PAPERLESS_DBNAME = "paperless";
|
||||
PAPERLESS_DBUSER = "paperless";
|
||||
PAPERLESS_DBPASS = "sopacerias";
|
||||
PAPERLESS_DBPORT = "${postgresPort}";
|
||||
PAPERLESS_CONSUMER_IGNORE_PATTERN =
|
||||
builtins.toJSON [ ".DS_STORE/*" "desktop.ini" ];
|
||||
PAPERLESS_TIME_ZONE = "America/Mexico_City";
|
||||
PAPERLESS_OCR_USER_ARGS = builtins.toJSON {
|
||||
optimize = 1;
|
||||
pdfa_image_compression = "lossless";
|
||||
};
|
||||
};
|
||||
};
|
||||
vaultwarden = {
|
||||
enable = true;
|
||||
dbBackend = "postgresql";
|
||||
package = unstable.pkgs.vaultwarden;
|
||||
config = {
|
||||
ROCKET_ADDRESS = "127.0.0.1";
|
||||
ROCKET_ADDRESS = "${localhost}";
|
||||
ROCKET_PORT = 8222;
|
||||
WEBSOCKET_PORT = 8333;
|
||||
ADMIN_TOKEN =
|
||||
"x9BLqz2QmnU5RmrMLt2kPpoPBTNPZxNFw/b8XrPgpQML2/01+MYENl87dmhDX+Jm";
|
||||
DATABASE_URL =
|
||||
"postgresql://vaultwarden:sopacerias@127.0.0.1:5432/vaultwarden";
|
||||
"postgresql://vaultwarden:sopacerias@${localhost}:${postgresPort}/vaultwarden";
|
||||
ENABLE_DB_WAL = false;
|
||||
WEBSOCKET_ENABLED = true;
|
||||
SHOW_PASSWORD_HINT = false;
|
||||
@ -157,7 +165,7 @@ in {
|
||||
];
|
||||
authentication = pkgs.lib.mkOverride 10 ''
|
||||
local all all trust
|
||||
host all all 127.0.0.1/32 trust
|
||||
host all all ${localhost}/32 trust
|
||||
host all all ::1/128 trust
|
||||
'';
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user