replace webdav with copyparty
This commit is contained in:
parent
f7464a6dff
commit
4363c64619
8 changed files with 143 additions and 55 deletions
|
|
@ -5,6 +5,7 @@ in
|
|||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
# couchdb.enable = true;
|
||||
copyparty.enable = true;
|
||||
flaresolverr.enable = true;
|
||||
homepage-dashboard.enable = true;
|
||||
immich.enable = true;
|
||||
|
|
@ -20,7 +21,6 @@ in
|
|||
qbittorrent.enable = true;
|
||||
vaultwarden.enable = true;
|
||||
vscode-server.enable = true;
|
||||
webdav.enable = true;
|
||||
|
||||
users.groups.media = {};
|
||||
};
|
||||
|
|
|
|||
68
modules/nixos/features/copyparty.nix
Normal file
68
modules/nixos/features/copyparty.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "copyparty";
|
||||
port = "5000";
|
||||
in
|
||||
{
|
||||
imports = [ inputs.copyparty.nixosModules.default ];
|
||||
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
environment.systemPackages = [ pkgs.copyparty ];
|
||||
nixpkgs.overlays = [ inputs.copyparty.overlays.default ];
|
||||
|
||||
age.secrets."copyparty-will" = {
|
||||
file = ../../../secrets/copyparty-will.age;
|
||||
owner = "copyparty";
|
||||
};
|
||||
|
||||
services = {
|
||||
# service
|
||||
${feature} = {
|
||||
enable = true;
|
||||
settings = {
|
||||
z = true;
|
||||
e2dsa = true;
|
||||
e2ts = true;
|
||||
e2vu = true;
|
||||
p = lib.toInt port;
|
||||
};
|
||||
|
||||
accounts = {
|
||||
will = {
|
||||
passwordFile = config.age.secrets.copyparty-will.path;
|
||||
};
|
||||
};
|
||||
|
||||
volumes = {
|
||||
"/" = {
|
||||
path = "/srv/copyparty";
|
||||
access = {
|
||||
r = "*";
|
||||
A = [ "will" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# reverse proxy
|
||||
nginx = {
|
||||
virtualHosts."${feature}.fi33.buzz" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${port}";
|
||||
# proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
}
|
||||
|
|
@ -165,6 +165,13 @@ in
|
|||
}
|
||||
{
|
||||
"Cloud Services" = [
|
||||
{
|
||||
"copyparty" = {
|
||||
"description" = "Cloud file manager";
|
||||
"icon" = "sh-copyparty.png";
|
||||
"href" = "https://copyparty.fi33.buzz/";
|
||||
};
|
||||
}
|
||||
{
|
||||
"CouchDB" = {
|
||||
"description" = "Obsidian sync database";
|
||||
|
|
|
|||
|
|
@ -1,47 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "webdav";
|
||||
port = "5000";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
services = {
|
||||
# service
|
||||
${feature} = {
|
||||
enable = true;
|
||||
settings = {
|
||||
address = "127.0.0.1";
|
||||
port = lib.toInt port;
|
||||
permissions = "R";
|
||||
directory = "/srv/webdav";
|
||||
modify = true;
|
||||
users = [
|
||||
{
|
||||
username = "admin";
|
||||
password = "{bcrypt}$2a$10$Buai6WtOhE7NoSNKNzcJ1OEJNFWyUzp6Y6b8i9pvdvIFNw8OaxCGm";
|
||||
permissions = "CRUD";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# reverse proxy
|
||||
nginx = {
|
||||
virtualHosts."${feature}.fi33.buzz" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${port}";
|
||||
# proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue