mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 01:29:24 +08:00
modules.services.xray.server: use separate secrets file
This commit is contained in:
@@ -128,12 +128,14 @@ inputs:
|
||||
};
|
||||
};
|
||||
};
|
||||
secrets = builtins.listToAttrs
|
||||
(builtins.map (n: inputs.lib.nameValuePair "xray-server/clients/${n}" {}) userList)
|
||||
// (builtins.listToAttrs (builtins.map
|
||||
(name: inputs.lib.nameValuePair "telegram/${name}" { group = "telegram"; mode = "0440"; })
|
||||
[ "token" "user/chn" ]))
|
||||
// { "xray-server/private-key" = {}; };
|
||||
secrets = inputs.lib.mergeAttrsList
|
||||
[
|
||||
(inputs.lib.genAttrs' userList
|
||||
(n: inputs.lib.nameValuePair "xray-server/clients/${n}" {}))
|
||||
{ "xray-server/private-key" = {}; }
|
||||
(inputs.lib.genAttrs' [ "token" "user/chn" ]
|
||||
(n: inputs.lib.nameValuePair "telegram/${n}" { group = "telegram"; mode = "0440"; }))
|
||||
];
|
||||
};
|
||||
services =
|
||||
{
|
||||
|
||||
@@ -80,8 +80,8 @@ inputs:
|
||||
(defaultSopsFile "${devicePath}/${model.cluster.clusterName}/${model.cluster.nodeName}")
|
||||
++ (defaultSopsFile "${devicePath}/${model.cluster.clusterName}")
|
||||
))
|
||||
++ (inputs.lib.optionals model.private [ "${devicePath}/cross/secrets/chn.yaml" ])
|
||||
++ (defaultSopsFile "${devicePath}/cross");
|
||||
++ (defaultSopsFile "${devicePath}/cross")
|
||||
++ [ "${devicePath}/cross/secrets/chn.yaml" "${devicePath}/cross/secrets/xray-server.yaml" ];
|
||||
};
|
||||
availableKeys = mkOption
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user