sdrweb: refactor from radiobert

This commit is contained in:
Astro 2021-10-07 23:00:50 +02:00
parent e4b5ae2897
commit b3e5b24569
3 changed files with 40 additions and 33 deletions

View File

@ -390,6 +390,14 @@
system = "x86_64-linux";
};
sdrweb = nixosSystem' {
modules = [
./lib/lxc-container.nix
./hosts/containers/sdrweb
];
system = "x86_64-linux";
};
};
nixosModule = import ./lib;

View File

@ -0,0 +1,32 @@
{ hostRegistry, config, ... }:
{
networking.hostName = "sdrweb";
networking.useNetworkd = true;
networking.interfaces.eth0.ipv4.addresses = [{
address = hostRegistry.hosts.${config.networking.hostName}.ip4;
prefixLength = 26;
}];
networking.defaultGateway = "172.20.73.1";
# http https
networking.firewall.allowedTCPPorts = [ 80 443 ];
services.nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts."sdr.hq.c3d2.de" = {
default = true;
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:8073";
proxyWebsockets = true;
};
};
};
services.openwebrx.enable = true;
# noXlibs breaks cairo:
environment.noXlibs = false;
}

View File

@ -76,20 +76,10 @@
prefixLength = 26;
}];
defaultGateway = "172.20.73.1";
firewall.allowedTCPPorts = [
# SSH
22
# Web
80 443
# SoapySDRServer
55132
];
firewall.enable = false;
nameservers = [ "172.20.73.8" "9.9.9.9" ];
};
# services.openwebrx.enable = true;
users.users.soapysdr = {
isSystemUser = true;
group = "soapysdr";
@ -158,29 +148,6 @@
services.openssh = {
enable = true;
};
security.sudo = {
enable = true;
wheelNeedsPassword = false;
};
users.users.k-ot = {
isNormalUser = true;
extraGroups = [ "wheel" "audio" ];
};
services.nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts."sdr.hq.c3d2.de" = {
default = true;
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:8073";
proxyWebsockets = true;
};
};
};
# Allow access to USB
services.udev.extraRules = ''