Browse Source

sdrweb: refactor from radiobert

master
Astro 2 months ago
parent
commit
b3e5b24569
  1. 8
      flake.nix
  2. 32
      hosts/containers/sdrweb/default.nix
  3. 33
      hosts/radiobert/default.nix

8
flake.nix

@ -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;

32
hosts/containers/sdrweb/default.nix

@ -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;
}

33
hosts/radiobert/default.nix

@ -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 = ''

Loading…
Cancel
Save