rename ddvbDeployment -> deployment-dvb
This commit is contained in:
parent
6ff46285e8
commit
09fcf5658f
|
@ -58,7 +58,6 @@
|
|||
|
||||
sops.defaultSopsFile = self + /secrets/data-hoarder-staging/secrets.yaml;
|
||||
|
||||
ddvbDeployment.domain = "staging.dvb.solutions";
|
||||
networking.wg-quick.interfaces.wg-dvb = {
|
||||
address = [ "10.13.37.5/32" ];
|
||||
privateKeyFile = config.sops.secrets.wg-seckey.path;
|
||||
|
@ -73,6 +72,7 @@
|
|||
];
|
||||
};
|
||||
|
||||
deployment-dvb.domain = "staging.dvb.solutions";
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{
|
||||
boot.tmpOnTmpfs = true;
|
||||
|
||||
networking.hostName = "traffic-stop-box-${toString config.ddvbDeployment.systemNumber}"; # Define your hostname.
|
||||
networking.hostName = "traffic-stop-box-${toString config.deployment-dvb.systemNumber}"; # Define your hostname.
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ config, lib, self, ... }:
|
||||
let
|
||||
|
||||
file = "${self}/configs/config_${toString config.ddvbDeployment.systemNumber}.json";
|
||||
file = "${self}/configs/config_${toString config.deployment-dvb.systemNumber}.json";
|
||||
receiver_configs = [
|
||||
{ frequency = 170795000; offset = 19550; device = "hackrf=0"; RF = 14; IF = 8; BB = 42; } # dresden - barkhausen
|
||||
{ frequency = 170795000; offset = 19400; device = "hackrf=0"; RF = 14; IF = 8; BB = 42; } # dresden - zentralwerk
|
||||
|
@ -13,7 +13,7 @@ let
|
|||
{ frequency = 150827500; offset = 19550; device = ""; RF = 14; IF = 32; BB = 42; } # drehturm aachen
|
||||
];
|
||||
|
||||
receiver_config = lib.elemAt receiver_configs config.ddvbDeployment.systemNumber;
|
||||
receiver_config = lib.elemAt receiver_configs config.deployment-dvb.systemNumber;
|
||||
in
|
||||
{
|
||||
dump-dvb.gnuradio = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ config, self, ... }:
|
||||
{
|
||||
sops.defaultSopsFile = self + /secrets/traffic-stop-box-${toString config.ddvbDeployment.systemNumber}/secrets.yaml;
|
||||
sops.defaultSopsFile = self + /secrets/traffic-stop-box-${toString config.deployment-dvb.systemNumber}/secrets.yaml;
|
||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
|
||||
sops.secrets.wg-seckey = { };
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{
|
||||
networking.wg-quick.interfaces.wg-dvb = {
|
||||
address = [ "10.13.37.${toString (config.ddvbDeployment.systemNumber + 100)}/32" ];
|
||||
address = [ "10.13.37.${toString (config.deployment-dvb.systemNumber + 100)}/32" ];
|
||||
privateKeyFile = config.sops.secrets.wg-seckey.path;
|
||||
postUp = ''
|
||||
${pkgs.iputils}/bin/ping -c 10 10.13.37.1 || true
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ pkgs, config, ... }: {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."click.${config.ddvbDeployment.domain}" = {
|
||||
virtualHosts."click.${config.deployment-dvb.domain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts = {
|
||||
"management-backend.${config.ddvbDeployment.domain}" = {
|
||||
"management-backend.${config.deployment-dvb.domain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations = {
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts = {
|
||||
"dump.${config.ddvbDeployment.domain}" = {
|
||||
"dump.${config.deployment-dvb.domain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations = {
|
||||
|
|
|
@ -8,7 +8,7 @@ in
|
|||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts = {
|
||||
"docs.${config.ddvbDeployment.domain}" = {
|
||||
"docs.${config.deployment-dvb.domain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations = {
|
||||
|
|
|
@ -20,7 +20,7 @@ in
|
|||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts = {
|
||||
"api.${config.ddvbDeployment.domain}" = {
|
||||
"api.${config.deployment-dvb.domain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations = {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts = {
|
||||
"files.${config.ddvbDeployment.domain}" = {
|
||||
"files.${config.deployment-dvb.domain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = "/var/lib/pub-files/";
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
params = { module = [ "http_2xx" ]; };
|
||||
static_configs = [{
|
||||
targets = [
|
||||
"api.${config.ddvbDeployment.domain}"
|
||||
"api.${config.deployment-dvb.domain}"
|
||||
];
|
||||
}];
|
||||
relabel_configs = [
|
||||
|
@ -82,7 +82,7 @@
|
|||
# visualizer
|
||||
grafana = {
|
||||
enable = true;
|
||||
domain = "monitoring.${config.ddvbDeployment.domain}";
|
||||
domain = "monitoring.${config.deployment-dvb.domain}";
|
||||
port = 2342;
|
||||
addr = "127.0.0.1";
|
||||
};
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts = {
|
||||
"map.${config.ddvbDeployment.domain}" = {
|
||||
"map.${config.deployment-dvb.domain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
extraConfig = ''
|
||||
|
@ -13,7 +13,7 @@
|
|||
|
||||
locations = {
|
||||
"/" = {
|
||||
root = if (config.ddvbDeployment.domain == "dvb.solutions") then "${pkgs.windshield}/bin/" else "${pkgs.windshield-staging}/bin/";
|
||||
root = if (config.deployment-dvb.domain == "dvb.solutions") then "${pkgs.windshield}/bin/" else "${pkgs.windshield-staging}/bin/";
|
||||
index = "index.html";
|
||||
};
|
||||
"~ \.(json)" = {
|
||||
|
|
|
@ -19,7 +19,7 @@ in
|
|||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts = {
|
||||
"socket.${config.ddvbDeployment.domain}" = {
|
||||
"socket.${config.deployment-dvb.domain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations = {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
"${config.ddvbDeployment.domain}" = {
|
||||
"${config.deployment-dvb.domain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations = {
|
||||
|
|
|
@ -27,7 +27,7 @@ in
|
|||
autoOptimiseStore = true;
|
||||
};
|
||||
|
||||
#networking.useNetworkd = true;
|
||||
networking.useNetworkd = true;
|
||||
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
|
@ -65,6 +65,7 @@ in
|
|||
];
|
||||
|
||||
networking.firewall.enable = lib.mkDefault true;
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
users.users.root = {
|
||||
openssh.authorizedKeys.keyFiles = [
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
./general-options.nix
|
||||
./net.nix
|
||||
./base.nix
|
||||
./wg.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{ lib, ... }:
|
||||
with lib; {
|
||||
options = {
|
||||
ddvbDeployment.systemNumber = mkOption {
|
||||
deployment-dvb.systemNumber = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
description = "number of the system";
|
||||
};
|
||||
|
||||
ddvbDeployment.domain = mkOption {
|
||||
deployment-dvb.domain = mkOption {
|
||||
type = types.str;
|
||||
default = "dvb.solutions";
|
||||
description = "domain the server is running on";
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
let
|
||||
|
||||
installScript = (system:
|
||||
let ip = "10.13.37.${toString (system.config.ddvbDeployment.systemNumber + 100)}";
|
||||
let ip = "10.13.37.${toString (system.config.deployment-dvb.systemNumber + 100)}";
|
||||
in
|
||||
(pkgs.writeScriptBin "deploy" ''
|
||||
#!${pkgs.runtimeShell}
|
||||
|
|
Loading…
Reference in New Issue