copy party wooo
Some checks failed
/ ci (push) Has been cancelled

This commit is contained in:
Callum Leslie 2025-08-05 10:36:07 +01:00
parent 09787eec8f
commit 5640ce5d13
Signed by: cleslie
GPG key ID: D382C4AFEECEAA90
6 changed files with 89 additions and 5 deletions

39
flake.lock generated
View file

@ -121,6 +121,27 @@
"type": "github" "type": "github"
} }
}, },
"copyparty": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"unstable"
]
},
"locked": {
"lastModified": 1754348197,
"narHash": "sha256-sVl/KDJR7X0bmRc/ccmuAy9HgcQXnnIaiOCWbSGvRPA=",
"owner": "9001",
"repo": "copyparty",
"rev": "b664ebb01f28094749e233ac70795ccd11fed253",
"type": "github"
},
"original": {
"owner": "9001",
"repo": "copyparty",
"type": "github"
}
},
"crane": { "crane": {
"locked": { "locked": {
"lastModified": 1731098351, "lastModified": 1731098351,
@ -475,6 +496,21 @@
} }
}, },
"flake-utils": { "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": { "inputs": {
"systems": "systems_2" "systems": "systems_2"
}, },
@ -1008,7 +1044,7 @@
"nvf_2": { "nvf_2": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_4", "flake-parts": "flake-parts_4",
"flake-utils": "flake-utils", "flake-utils": "flake-utils_2",
"mnw": "mnw", "mnw": "mnw",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"systems": "systems_3" "systems": "systems_3"
@ -1114,6 +1150,7 @@
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
"copyparty": "copyparty",
"devour-flake": "devour-flake", "devour-flake": "devour-flake",
"disko": "disko", "disko": "disko",
"firefox-addons": "firefox-addons", "firefox-addons": "firefox-addons",

View file

@ -9,7 +9,7 @@
} @ inputs: let } @ inputs: let
mods = import ./modules; mods = import ./modules;
cLib = import ./lib {inherit (nixpkgs) lib;}; cLib = import ./lib {inherit (nixpkgs) lib;};
mkLinuxSystem = mod: mkLinuxSystem = mod: ovl:
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs cLib;}; specialArgs = {inherit inputs cLib;};
modules = modules =
@ -19,7 +19,7 @@
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default
{ {
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [self.overlays.default]; nixpkgs.overlays = [self.overlays.default] ++ ovl;
} }
] ]
++ mod ++ mod
@ -39,8 +39,8 @@
inherit (mods) homeManagerModules nixosModules; inherit (mods) homeManagerModules nixosModules;
# TODO: use ./hosts/ # TODO: use ./hosts/
nixosConfigurations = { nixosConfigurations = {
artemis = mkLinuxSystem [./hosts/artemis inputs.lanzaboote.nixosModules.lanzaboote]; artemis = mkLinuxSystem [./hosts/artemis inputs.lanzaboote.nixosModules.lanzaboote] [];
hermes = mkLinuxSystem [./hosts/hermes]; hermes = mkLinuxSystem [./hosts/hermes inputs.copyparty.nixosModules.default] [inputs.copyparty.overlays.default];
}; };
diskoConfigurations = {}; # maybe? diskoConfigurations = {}; # maybe?
om.health.default = {nix-version.min-required = "2.18.5";}; om.health.default = {nix-version.min-required = "2.18.5";};
@ -178,5 +178,9 @@
systems.follows = "systems"; systems.follows = "systems";
}; };
}; };
copyparty = {
url = "github:9001/copyparty";
inputs.nixpkgs.follows = "unstable";
};
}; };
} }

View file

@ -0,0 +1,34 @@
{config, ...}: let
domain = "files.cleslie.uk";
in {
services = {
cloudflare-dyndns.domains = [domain];
copyparty = {
enable = true;
settings = {
i = "127.0.0.1";
p = [3210];
};
accounts = {
c.passwordFile = config.age.secrets.copyparty-c.path;
};
volumes = {
"/media" = {
path = "/var/lib/media/library";
access = {
r = "*";
rw = ["c"];
};
};
};
};
caddy.virtualHosts.${domain}.extraConfig = ''
reverse_proxy http://127.0.0.1:3210
'';
};
age.secrets."copyparty-c" = {
file = ../../secrets/copyparty-c.age;
mode = "400";
owner = "copyparty";
};
}

View file

@ -2,6 +2,7 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./configuration.nix ./configuration.nix
./copyparty.nix
./ddns.nix ./ddns.nix
./quassel.nix ./quassel.nix
./fail2ban.nix ./fail2ban.nix

7
secrets/copyparty-c.age Normal file
View file

@ -0,0 +1,7 @@
age-encryption.org/v1
-> ssh-ed25519 /RyXeg L3snhcjG3XkMDoehtE1UyJ32D8vzLE8+D7ZQp4m+S0w
FqrvB5ve6xLedf2N982uQB7FBRQinubVFSpJ1wj7fBw
-> ssh-ed25519 aSaoJQ AHhV+ob0AO5/jkoNy/138Qjpnq6bgQJOS7gu9NxPagg
5ie/QslRuqJBzOXHWulGIFnZXaPUHBbWhxKJnoCDsXg
--- vhZK1PYh5jncrrXGGWiE0mvDCN/O/Rvh2WGYBBimC8w
/NGëOtÏf¯Žm™ŒAx¨¼}šOñ¿£A±”´<14>Èiå2Øtˆº¼~Ýq ì]â

View file

@ -10,6 +10,7 @@ in {
"mesh-conf-infra.age".publicKeys = keys.c ++ allSystems; "mesh-conf-infra.age".publicKeys = keys.c ++ allSystems;
"mesh-conf-cleslie.age".publicKeys = keys.c ++ allSystems; "mesh-conf-cleslie.age".publicKeys = keys.c ++ allSystems;
"forgejo-password.age".publicKeys = keys.c ++ [systems.hermes]; "forgejo-password.age".publicKeys = keys.c ++ [systems.hermes];
"copyparty-c.age".publicKeys = keys.c ++ [systems.hermes];
"cloudflare-api.age".publicKeys = keys.c ++ [systems.hermes]; "cloudflare-api.age".publicKeys = keys.c ++ [systems.hermes];
"vaultwarden-env.age".publicKeys = keys.c ++ [systems.hermes]; "vaultwarden-env.age".publicKeys = keys.c ++ [systems.hermes];
} }