From 5f1943160e50d2922365cc85be4c7765090af039 Mon Sep 17 00:00:00 2001 From: alexion Date: Tue, 13 Oct 2026 11:49:09 -0400 Subject: [PATCH] refactor(copyparty): inline guest volume options --- configs/nixos/guests/copyparty.nix | 66 +++++++++++++++--------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/configs/nixos/guests/copyparty.nix b/configs/nixos/guests/copyparty.nix index ae38370..5a39a46 100644 --- a/configs/nixos/guests/copyparty.nix +++ b/configs/nixos/guests/copyparty.nix @@ -5,38 +5,6 @@ }: let cfg = config.guests.copyparty; # NOLINT(let_order) - - volumeType = lib.types.submodule { - options = { - hostPath = lib.mkOption { - type = lib.types.str; - description = "Host path bind-mounted into the Copyparty guest for this volume."; - }; - - path = lib.mkOption { - type = lib.types.str; - description = "Guest path served by this Copyparty volume."; - }; - - access = lib.mkOption { - type = lib.types.attrsOf (lib.types.listOf lib.types.str); - default = { }; - description = "Copyparty access map from permission string to account names."; - }; - - readOnly = lib.mkOption { - type = lib.types.bool; - default = false; - description = "Serve this Copyparty volume read-only."; - }; - - flags = lib.mkOption { - type = lib.types.attrs; - default = { }; - description = "Copyparty volume flags."; - }; - }; - }; stateDir = "/var/lib/copyparty"; in { @@ -61,7 +29,39 @@ in }; volumes = lib.mkOption { - type = lib.types.attrsOf volumeType; + type = lib.types.attrsOf ( + lib.types.submodule { + options = { + hostPath = lib.mkOption { + type = lib.types.str; + description = "Host path bind-mounted into the Copyparty guest for this volume."; + }; + + path = lib.mkOption { + type = lib.types.str; + description = "Guest path served by this Copyparty volume."; + }; + + access = lib.mkOption { + type = lib.types.attrsOf (lib.types.listOf lib.types.str); + default = { }; + description = "Copyparty access map from permission string to account names."; + }; + + readOnly = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Serve this Copyparty volume read-only."; + }; + + flags = lib.mkOption { + type = lib.types.attrs; + default = { }; + description = "Copyparty volume flags."; + }; + }; + } + ); default = { }; description = "Copyparty volumes keyed by their URL path."; };