replace webdav with copyparty

This commit is contained in:
wi11-holdsworth 2025-07-29 12:04:26 +10:00
parent f7464a6dff
commit 4363c64619
8 changed files with 143 additions and 55 deletions

62
flake.lock generated
View file

@ -23,6 +23,25 @@
"type": "github"
}
},
"copyparty": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1753748190,
"narHash": "sha256-uHWUCf/2BAv0SOvgD4UnQhSMnEX3PV4m/aB07Tj5IU4=",
"owner": "9001",
"repo": "copyparty",
"rev": "4915b14be191bca9a91f942073650fee27b3231b",
"type": "github"
},
"original": {
"owner": "9001",
"repo": "copyparty",
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
@ -67,6 +86,21 @@
}
},
"flake-utils": {
"locked": {
"lastModified": 1678901627,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
@ -84,7 +118,7 @@
"type": "github"
}
},
"flake-utils_2": {
"flake-utils_3": {
"inputs": {
"systems": "systems_4"
},
@ -172,6 +206,21 @@
}
},
"nixpkgs": {
"locked": {
"lastModified": 1748162331,
"narHash": "sha256-rqc2RKYTxP3tbjA+PB3VMRQNnjesrT0pEofXQTrMsS8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-25.05",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1753250450,
"narHash": "sha256-i+CQV2rPmP8wHxj0aq4siYyohHwVlsh40kV89f3nw1s=",
@ -187,7 +236,7 @@
"type": "github"
}
},
"nixpkgs_2": {
"nixpkgs_3": {
"locked": {
"lastModified": 1682134069,
"narHash": "sha256-TnI/ZXSmRxQDt2sjRYK/8j8iha4B4zP2cnQCZZ3vp7k=",
@ -226,7 +275,7 @@
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils",
"flake-utils": "flake-utils_2",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
@ -250,8 +299,9 @@
"root": {
"inputs": {
"agenix": "agenix",
"copyparty": "copyparty",
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"nixvim": "nixvim",
"vscode-server": "vscode-server"
}
@ -318,8 +368,8 @@
},
"vscode-server": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1750353031,

View file

@ -15,11 +15,12 @@
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
copyparty.url = "github:9001/copyparty";
vscode-server.url = "github:nix-community/nixos-vscode-server";
};
outputs =
{ nixpkgs, agenix, ... }@inputs:
{ nixpkgs, ... }@inputs:
let
commonSystem =
{

View file

@ -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 = {};
};

View 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}";
}

View file

@ -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";

View file

@ -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}";
}

View file

@ -0,0 +1,8 @@
age-encryption.org/v1
-> ssh-ed25519 LtK9yQ 4SIjyFmoPbalDVHZclX9MlACFNRC+f9GL6e3azRSj10
vphCAvstVLmZibay6gXI1PZETwbtOkp/UcAj6ZWH+ig
-> ssh-ed25519 qLT+DQ DTtgAHqjF/Gal2vV003rD6b7QPhjVq6/7q0U5DhyBnY
r6an9YBH19zbO4Ihfj2rWkU4fkMAXJ1IQwvUJtyHEHg
--- f6vF7n2zj3SVt7xDmglO6J1uPYDN4FRO8OcPpODo6ko
•|Ù¨Qºƒã9´¨£!ÞTÝ÷¸W+t¾‰[
h2b#ì]³æˆBIŽ$K~cQ}Ùgê"¾ÑÅêeÐ<19>û °g¤Òxì!BÞh°¬2`ê

View file

@ -10,6 +10,7 @@ in
"api-miniflux.age".publicKeys = users;
"borgbackup-server-offsite.age".publicKeys = users;
"borgbackup-server-onsite.age".publicKeys = users;
"copyparty-will.age".publicKeys = users;
"immich.age".publicKeys = users;
"jellyfin.age".publicKeys = users;
"jellyseerr.age".publicKeys = users;