From b7c23bd7a95d2fd9d84147cd7364c087892930e0 Mon Sep 17 00:00:00 2001 From: Toast <39011842+toast003@users.noreply.github.com> Date: Sun, 11 Jan 2026 23:12:00 +0100 Subject: [PATCH 1/4] nixos: use mkPackageOption instead of mkOption for the package option This gets rid of a warning when trying to build a system with documentation.nixos.includeAllModules enabled --- contrib/nixos/modules/copyparty.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/contrib/nixos/modules/copyparty.nix b/contrib/nixos/modules/copyparty.nix index 6bb51b68..612672ee 100644 --- a/contrib/nixos/modules/copyparty.nix +++ b/contrib/nixos/modules/copyparty.nix @@ -69,11 +69,8 @@ in options.services.copyparty = { enable = mkEnableOption "web-based file manager"; - package = mkOption { - type = types.package; - default = pkgs.copyparty; - defaultText = "pkgs.copyparty"; - description = '' + package = mkPackageOption pkgs "copyparty" { + extraDescription = '' Package of the application to run, exposed for overriding purposes. ''; }; From dfff1d4e9569032fdf2a1eaa0ef59ad743656090 Mon Sep 17 00:00:00 2001 From: Toast <39011842+toast003@users.noreply.github.com> Date: Mon, 12 Jan 2026 00:47:00 +0100 Subject: [PATCH 2/4] nixos: don't include package path in option descriptions See https://github.com/9001/copyparty/pull/1193, this actually fixes the issue --- contrib/nixos/modules/copyparty.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/nixos/modules/copyparty.nix b/contrib/nixos/modules/copyparty.nix index 612672ee..a2dd2968 100644 --- a/contrib/nixos/modules/copyparty.nix +++ b/contrib/nixos/modules/copyparty.nix @@ -116,7 +116,7 @@ in Global settings to apply. Directly maps to values in the [global] section of the copyparty config. Cannot set "c" or "hist", those are set by this module. - See `${getExe cfg.package} --help` for more details. + See `copyparty --help` for more details. ''; default = { i = "127.0.0.1"; @@ -227,7 +227,7 @@ in type = types.attrs; description = '' Attribute list of volume flags to apply. - See `${getExe cfg.package} --help-flags` for more details. + See `copyparty --help-flags` for more details. ''; example = literalExpression '' { From 2e6b0159434271f5fb597e0238218b09ffefc6fc Mon Sep 17 00:00:00 2001 From: Toast <39011842+toast003@users.noreply.github.com> Date: Mon, 12 Jan 2026 02:00:35 +0100 Subject: [PATCH 3/4] nixos: fix formatting of services.copyparty.volumes..access List will now show up properly on the nixos manual! --- contrib/nixos/modules/copyparty.nix | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/contrib/nixos/modules/copyparty.nix b/contrib/nixos/modules/copyparty.nix index a2dd2968..d3289a93 100644 --- a/contrib/nixos/modules/copyparty.nix +++ b/contrib/nixos/modules/copyparty.nix @@ -198,21 +198,21 @@ in Attribute list of permissions and the users to apply them to. The key must be a string containing any combination of allowed permission: - "r" (read): list folder contents, download files - "w" (write): upload files; need "r" to see the uploads - "m" (move): move files and folders; need "w" at destination - "d" (delete): permanently delete files and folders - "g" (get): download files, but cannot see folder contents - "G" (upget): "get", but can see filekeys of their own uploads - "h" (html): "get", but folders return their index.html - "a" (admin): can see uploader IPs, config-reload + * "r" (read): list folder contents, download files + * "w" (write): upload files; need "r" to see the uploads + * "m" (move): move files and folders; need "w" at destination + * "d" (delete): permanently delete files and folders + * "g" (get): download files, but cannot see folder contents + * "G" (upget): "get", but can see filekeys of their own uploads + * "h" (html): "get", but folders return their index.html + * "a" (admin): can see uploader IPs, config-reload For example: "rwmd" The value must be one of: - an account name, defined in `accounts` - a list of account names - "*", which means "any account" + * an account name, defined in `accounts` + * a list of account names + * "*", which means "any account" ''; example = literalExpression '' { From 982d3aa00918fee48a04e2133c4a19d69533a1ad Mon Sep 17 00:00:00 2001 From: Toast <39011842+toast003@users.noreply.github.com> Date: Mon, 12 Jan 2026 02:21:05 +0100 Subject: [PATCH 4/4] nixos: add or improve inline code blocks in option descriptions --- contrib/nixos/modules/copyparty.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/nixos/modules/copyparty.nix b/contrib/nixos/modules/copyparty.nix index d3289a93..13a8c21c 100644 --- a/contrib/nixos/modules/copyparty.nix +++ b/contrib/nixos/modules/copyparty.nix @@ -79,7 +79,7 @@ in type = types.bool; default = true; description = '' - Make a shell script wrapper called 'copyparty-hash' with all options set here, + Make a shell script wrapper called {command}`copyparty-hash` with all options set here, that launches the hashing cli. ''; }; @@ -114,9 +114,9 @@ in type = types.attrs; description = '' Global settings to apply. - Directly maps to values in the [global] section of the copyparty config. + Directly maps to values in the `[global]` section of the copyparty config. Cannot set "c" or "hist", those are set by this module. - See `copyparty --help` for more details. + See {command}`copyparty --help` for more details. ''; default = { i = "127.0.0.1"; @@ -135,7 +135,7 @@ in globalExtraConfig = mkOption { type = types.str; default = ""; - description = "Appended to the end of the [global] section verbatim. This is useful for flags which are used in a repeating manner (e.g. ipu: 255.255.255.1=user) which can't be repeated in the settings = {} attribute set."; + description = "Appended to the end of the `[global]` section verbatim. This is useful for flags which are used in a repeating manner (e.g. `ipu: 255.255.255.1=user`) which can't be repeated in the settings = {} attribute set."; }; accounts = mkOption { @@ -227,7 +227,7 @@ in type = types.attrs; description = '' Attribute list of volume flags to apply. - See `copyparty --help-flags` for more details. + See {command}`copyparty --help-flags` for more details. ''; example = literalExpression '' {