Add groups to nix config

This commit is contained in:
Nora Struck 2025-09-13 23:37:13 +02:00 committed by ed
parent 35326a6fb8
commit ee5f31908f

View file

@ -52,6 +52,7 @@ let
${mkSection "global" cfg.settings} ${mkSection "global" cfg.settings}
${cfg.globalExtraConfig} ${cfg.globalExtraConfig}
${mkSection "accounts" (accountsWithPlaceholders cfg.accounts)} ${mkSection "accounts" (accountsWithPlaceholders cfg.accounts)}
${mkSection "groups" cfg.groups}
${concatStringsSep "\n" (mapAttrsToList mkVolume cfg.volumes)} ${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 { volumes = mkOption {
type = types.attrsOf ( type = types.attrsOf (
types.submodule ( types.submodule (