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