copyparty configs!
This commit is contained in:
parent
bcab2b8307
commit
0f05d21280
6 changed files with 102 additions and 82 deletions
89
hosts/cirrostratus/copyparty.nix
Normal file
89
hosts/cirrostratus/copyparty.nix
Normal file
|
@ -0,0 +1,89 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
port = "3923";
|
||||
defaultvolflags = {
|
||||
scan = 60;
|
||||
grid = true;
|
||||
nsort = true;
|
||||
fk = 8;
|
||||
};
|
||||
in {
|
||||
nixpkgs.overlays = [inputs.copyparty.overlays.default];
|
||||
environment.systemPackages = with pkgs; [copyparty];
|
||||
services.copyparty = {
|
||||
enable = true;
|
||||
user = config.host.details.user;
|
||||
group = "users";
|
||||
# directly maps to values in the [global] section of the copyparty config.
|
||||
# see `copyparty --help` for available options
|
||||
settings = {
|
||||
# i = "127.0.0.1";
|
||||
p = port;
|
||||
ed = true;
|
||||
e2dsa = true;
|
||||
forget-ip = 1440;
|
||||
e2ts = true;
|
||||
shr = "/share";
|
||||
shr-adm = "gabe";
|
||||
u2abort = 3;
|
||||
magic = true;
|
||||
df = 5;
|
||||
u2j = 16;
|
||||
ls = "**,*,ln,p,r";
|
||||
xvol = true;
|
||||
xdev = true;
|
||||
no-logues = true;
|
||||
no-robots = true;
|
||||
md-hist = "v";
|
||||
nsort = true;
|
||||
log-utc = true;
|
||||
ah-alg = "argon2";
|
||||
ah-salt = "ImSaltyAboutNonPersistentSalts";
|
||||
};
|
||||
accounts = lib.mkIf (inputs ? nix-secrets) (
|
||||
builtins.mapAttrs (name: value: {passwordFile = "${inputs.nix-secrets}/copyparty/${name}";})
|
||||
(builtins.readDir "${inputs.nix-secrets}/copyparty")
|
||||
);
|
||||
volumes = {
|
||||
"/" = {
|
||||
path = "/storage/syncthing/family";
|
||||
access = {
|
||||
rwmd = ["gabe" "erica"];
|
||||
A = ["gabe"];
|
||||
};
|
||||
flags = defaultvolflags;
|
||||
};
|
||||
"/gabe" = {
|
||||
path = "/storage/syncthing/gabe";
|
||||
access = {
|
||||
rwmd = "gabe";
|
||||
A = ["gabe"];
|
||||
};
|
||||
flags = defaultvolflags;
|
||||
};
|
||||
"/erica" = {
|
||||
path = "/storage/syncthing/erica";
|
||||
access = {
|
||||
rwmd = "erica";
|
||||
A = ["erica"];
|
||||
};
|
||||
flags = defaultvolflags;
|
||||
};
|
||||
};
|
||||
# you may increase the open file limit for the process
|
||||
openFilesLimit = 8192;
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."files.venberg.xyz" = {
|
||||
enableACME = true;
|
||||
forceSSL=true;
|
||||
locations."/" = {
|
||||
proxyPass= "http://localhost:${port}";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -16,6 +16,7 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||
./hardware-configuration.nix
|
||||
./restic.nix
|
||||
./nginx.nix
|
||||
./copyparty.nix
|
||||
../../configs/nixos/common.nix
|
||||
../../configs/nixos/tailscale.nix
|
||||
../../configs/nixos/sshd.nix
|
||||
|
@ -29,7 +30,6 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||
../../configs/nixos/miniserve-tmp-upload.nix
|
||||
../../configs/nixos/minecraft-docker.nix
|
||||
../../configs/nixos/nginx-static.nix
|
||||
../../configs/nixos/copyparty.nix
|
||||
({
|
||||
config,
|
||||
pkgs,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue