From ee5f31908f8f06d8c81a4551fc4b055e3e36f030 Mon Sep 17 00:00:00 2001 From: Nora Struck Date: Sat, 13 Sep 2025 23:37:13 +0200 Subject: [PATCH] Add groups to nix config --- contrib/nixos/modules/copyparty.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/contrib/nixos/modules/copyparty.nix b/contrib/nixos/modules/copyparty.nix index 1f8242df..2a553003 100644 --- a/contrib/nixos/modules/copyparty.nix +++ b/contrib/nixos/modules/copyparty.nix @@ -52,6 +52,7 @@ let ${mkSection "global" cfg.settings} ${cfg.globalExtraConfig} ${mkSection "accounts" (accountsWithPlaceholders cfg.accounts)} + ${mkSection "groups" cfg.groups} ${concatStringsSep "\n" (mapAttrsToList mkVolume cfg.volumes)} ''; @@ -167,6 +168,19 @@ in ''; }; + groups = mkOption { + type = types.attrsOf (types.listOf types.str); + description = '' + A set of copyparty groups to create and the users that should be part of each group. + ''; + default = { }; + example = literalExpression '' + { + group_name = [ "user1" "user2" ]; + }; + ''; + }; + volumes = mkOption { type = types.attrsOf ( types.submodule (