sdrweb: refactor from radiobert
This commit is contained in:
parent
e4b5ae2897
commit
b3e5b24569
|
@ -390,6 +390,14 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sdrweb = nixosSystem' {
|
||||||
|
modules = [
|
||||||
|
./lib/lxc-container.nix
|
||||||
|
./hosts/containers/sdrweb
|
||||||
|
];
|
||||||
|
system = "x86_64-linux";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosModule = import ./lib;
|
nixosModule = import ./lib;
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
|
@ -76,20 +76,10 @@
|
||||||
prefixLength = 26;
|
prefixLength = 26;
|
||||||
}];
|
}];
|
||||||
defaultGateway = "172.20.73.1";
|
defaultGateway = "172.20.73.1";
|
||||||
firewall.allowedTCPPorts = [
|
|
||||||
# SSH
|
|
||||||
22
|
|
||||||
# Web
|
|
||||||
80 443
|
|
||||||
# SoapySDRServer
|
|
||||||
55132
|
|
||||||
];
|
|
||||||
firewall.enable = false;
|
firewall.enable = false;
|
||||||
nameservers = [ "172.20.73.8" "9.9.9.9" ];
|
nameservers = [ "172.20.73.8" "9.9.9.9" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# services.openwebrx.enable = true;
|
|
||||||
|
|
||||||
users.users.soapysdr = {
|
users.users.soapysdr = {
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
group = "soapysdr";
|
group = "soapysdr";
|
||||||
|
@ -158,29 +148,6 @@
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
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
|
# Allow access to USB
|
||||||
services.udev.extraRules = ''
|
services.udev.extraRules = ''
|
||||||
|
|
Loading…
Reference in New Issue