server: rework service based media server
This commit is contained in:
parent
cf9a5b90bd
commit
eb1d01174d
10 changed files with 47 additions and 10 deletions
|
|
@ -1,18 +1,23 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (config.ooknet.server.media-server) ports transmission;
|
||||
inherit (config.age) secrets;
|
||||
inherit (builtins) attrValues;
|
||||
in {
|
||||
config = mkIf transmission.enable {
|
||||
environment.systemPackages = attrValues {
|
||||
inherit (pkgs) wireguard-tools dnsutils;
|
||||
};
|
||||
vpnNamespaces.wg = {
|
||||
enable = true;
|
||||
wireguardConfigFile = secrets.mullvad_wg.path;
|
||||
wireguardConfigFile = secrets."mullvad_wg.conf".path;
|
||||
accessibleFrom = [
|
||||
"192.168.0.1/24"
|
||||
"192.168.20.0/24"
|
||||
"127.0.0.1"
|
||||
"10.0.0.0/8"
|
||||
];
|
||||
|
|
@ -35,5 +40,12 @@ in {
|
|||
enable = true;
|
||||
vpnNamespace = "wg";
|
||||
};
|
||||
systemd.services.wg = {
|
||||
serviceConfig = {
|
||||
LogLevelMax = "debug";
|
||||
StandardOutput = "journal";
|
||||
StandardError = "journal";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue