use ${self} absolute paths instead of relative paths

This commit is contained in:
oxapentane - 2022-09-26 16:44:09 +02:00
parent a0aba161d5
commit 75c6e76944
Signed by: oxapentane
GPG Key ID: 91FA5E5BF9AA901C
6 changed files with 21 additions and 31 deletions

View File

@ -1,7 +1,4 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ self, ... }:
{
microvm = {
hypervisor = "cloud-hypervisor";
@ -54,7 +51,7 @@
networking.defaultGateway = "172.20.73.1";
networking.nameservers = [ "172.20.73.8" "9.9.9.9" ];
sops.defaultSopsFile = ../../secrets/data-hoarder/secrets.yaml;
sops.defaultSopsFile = self + /secrets/data-hoarder/secrets.yaml;
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 80 443 22 51820 ];

View File

@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{ config, pkgs, self, ... }:
{
microvm = {
@ -56,9 +56,7 @@
networking.defaultGateway = "172.20.73.1";
networking.nameservers = [ "172.20.73.8" "9.9.9.9" ];
sops.defaultSopsFile = ../../secrets/data-hoarder-staging/secrets.yaml;
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
sops.defaultSopsFile = self + /secrets/data-hoarder-staging/secrets.yaml;
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 80 443 22 51820 ];

View File

@ -1,7 +1,7 @@
{ config, lib, ... }:
{ config, lib, self, ... }:
let
file = ../../configs/config_${toString config.ddvbDeployment.systemNumber}.json;
file = "${self}/configs/config_${toString config.ddvbDeployment.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

View File

@ -1,6 +1,6 @@
{ config, ... }:
{ config, self, ... }:
{
sops.defaultSopsFile = ../../secrets/traffic-stop-box-${toString config.ddvbDeployment.systemNumber}/secrets.yaml;
sops.defaultSopsFile = self + /secrets/traffic-stop-box-${toString config.ddvbDeployment.systemNumber}/secrets.yaml;
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
sops.secrets.wg-seckey = { };

View File

@ -1,4 +1,4 @@
{ pkgs, config, ... }:
{ pkgs, config, self, ... }:
let
regMotd = ''
_._ _,-'""`-._
@ -27,6 +27,8 @@ in
autoOptimiseStore = true;
};
#networking.useNetworkd = true;
console = {
font = "Lat2-Terminus16";
keyMap = "uk";
@ -64,12 +66,12 @@ in
users.users.root = {
openssh.authorizedKeys.keyFiles = [
../keys/ssh/revol-xut
../keys/ssh/oxa
../keys/ssh/oxa1
../keys/ssh/marenz1
../keys/ssh/marenz2
../keys/ssh/astro
"${self}/keys/ssh/revol-xut"
"${self}/keys/ssh/oxa"
"${self}/keys/ssh/oxa1"
"${self}/keys/ssh/marenz1"
"${self}/keys/ssh/marenz2"
"${self}/keys/ssh/astro"
];
};
services.openssh = {

View File

@ -1,4 +1,4 @@
{ config, lib, ... }: {
{ config, lib, self, ... }: {
services = {
# metrics collector
@ -14,7 +14,7 @@
port = 9502;
};
# used for pinging services and checking their healthiness
# used for pinging services and checking their health
blackbox = {
enable = true;
configFile = ../../services/blackbox.yaml;
@ -69,14 +69,14 @@
promtail = {
enable = true;
# doesn't have a configFile option so this has to do
configuration = builtins.fromJSON (lib.readFile ../../services/promtail.json);
configuration = builtins.fromJSON (lib.readFile "${self}/services/promtail.json");
};
# exports systemd logs and other
loki = {
enable = true;
configFile = ../../services/loki.yaml;
configFile = self + /services/loki.yaml;
};
# visualizer
@ -85,13 +85,6 @@
domain = "monitoring.${config.ddvbDeployment.domain}";
port = 2342;
addr = "127.0.0.1";
#provision = {
# enable = true;
#dashboards = [
# { options.path = "${../../services/dashboards}"; }
#];
#};
};
# reverse proxy for grafana