24 lines
536 B
Nix
24 lines
536 B
Nix
{ config, pkgs, ... }:
|
|
let
|
|
peerix_user = "peerix";
|
|
in
|
|
{
|
|
users.groups.${peerix_user} = { };
|
|
users.users.${peerix_user} = {
|
|
group = peerix_user;
|
|
isSystemUser = true;
|
|
};
|
|
|
|
age.secrets.binary-cache-secret = {
|
|
owner = peerix_user;
|
|
file = ../../secrets/binary-cache-secret.age;
|
|
};
|
|
|
|
services.peerix = {
|
|
enable = true;
|
|
package = pkgs.peerix;
|
|
user = peerix_user;
|
|
privateKeyFile = config.age.secrets.binary-cache-secret.path;
|
|
publicKey = (builtins.readFile ../../secrets/binary-cache-pub);
|
|
};
|
|
}
|