feat(nixos): add copyparty opds volume
This commit is contained in:
@@ -57,5 +57,7 @@
|
||||
Use a sudo `nix-store --import` path for unsigned deploy closures.
|
||||
- Public DNS entries are not managed through the NixOS configuration.
|
||||
Do not describe NixOS route choices as public-DNS management.
|
||||
- The pinned `copyparty-min` package includes Copyparty's OPDS support.
|
||||
Enable OPDS with the `opds` volume flag or global Copyparty option; do not assume the minimal package removes it.
|
||||
- Do not hand-author `hardware-configuration.nix` for a host that has not been generated on that machine.
|
||||
Generate it on the target system or live ISO, then stage it before evaluating the flake.
|
||||
|
||||
@@ -6,6 +6,14 @@
|
||||
let
|
||||
cfg = config.guests.copyparty;
|
||||
|
||||
rootVolume = cfg.volumes."/" or null;
|
||||
|
||||
rootPlaceholderRules = lib.optionals (rootVolume != null) (
|
||||
lib.mapAttrsToList (urlPath: _volume: "d ${rootVolume.hostPath}${urlPath} 2770 root storage - -") (
|
||||
lib.filterAttrs (urlPath: _volume: urlPath != "/" && lib.hasPrefix "/" urlPath) cfg.volumes
|
||||
)
|
||||
);
|
||||
|
||||
volumeType = lib.types.submodule {
|
||||
options = {
|
||||
hostPath = lib.mkOption {
|
||||
@@ -99,6 +107,8 @@ in
|
||||
href = lib.mkIf cfg.reverseProxy.enable "https://${cfg.reverseProxy.route.domain}/?h";
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = rootPlaceholderRules;
|
||||
|
||||
guests.copyparty = {
|
||||
interior.modules.services.copyparty = {
|
||||
enable = true;
|
||||
|
||||
@@ -198,6 +198,13 @@
|
||||
"dthumb"
|
||||
];
|
||||
};
|
||||
"/opds" = {
|
||||
hostPath = "/pikachu/data/opds";
|
||||
path = "/pikachu/data/opds";
|
||||
access.r = [ "alexion" ];
|
||||
readOnly = true;
|
||||
flags = [ "opds" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user