32 lines
565 B
Nix
32 lines
565 B
Nix
|
|
{
|
||
|
|
lib,
|
||
|
|
config,
|
||
|
|
pkgs,
|
||
|
|
...
|
||
|
|
}:
|
||
|
|
with lib;
|
||
|
|
with lib.custom; let
|
||
|
|
cfg = config.services.crypto;
|
||
|
|
in {
|
||
|
|
options.services.crypto = with types; {
|
||
|
|
enable = mkBoolOpt false "Enable Monero";
|
||
|
|
};
|
||
|
|
config = mkIf cfg.enable {
|
||
|
|
services.wg-container.enable = true;
|
||
|
|
|
||
|
|
systemd.services.monero.vpnConfinement = {
|
||
|
|
enable = true;
|
||
|
|
vpnNamespace = "wg";
|
||
|
|
};
|
||
|
|
|
||
|
|
services.monero = {
|
||
|
|
enable = true;
|
||
|
|
mining.enable = false;
|
||
|
|
rpc = {address = "192.168.15.1";};
|
||
|
|
extraConfig = ''
|
||
|
|
confirm-external-bind=1
|
||
|
|
'';
|
||
|
|
};
|
||
|
|
};
|
||
|
|
}
|