From 7ad8ea057b22bccac78de57fb13bf1bd22d10692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Numbus?= Date: Fri, 9 Jan 2026 23:02:52 +0100 Subject: [PATCH] Get sed working --- deploy.sh | 11 ++++++----- templates/nix-config/misc/mail.nix | 8 ++++---- templates/nix-config/misc/networking.nix | 8 ++++---- templates/nix-config/podman/traefik.nix | 4 ++-- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/deploy.sh b/deploy.sh index a35bf2a..7bb93da 100644 --- a/deploy.sh +++ b/deploy.sh @@ -609,11 +609,12 @@ nix_generation() { sed -i "s|HOME_SERVER_IP|${HOME_SERVER_IP}|g" final-nix-config/etc/nixos/misc/networking.nix sed -i "s|HOME_ROUTER_IP|${HOME_ROUTER_IP}|g" final-nix-config/etc/nixos/misc/networking.nix sed -i "s|TARGET_INTERFACE|${TARGET_INTERFACE}|g" final-nix-config/etc/nixos/misc/networking.nix - sed -i "s|DOMAIN_NAME|${DOMAIN_NAME}|g" final-nix-config/etc/nixos/misc/mail.nix - sed -i "s|EMAIL_ADDRESS|${EMAIL_ADDRESS}|g" final-nix-config/etc/nixos/misc/mail.nix - sed -i "s|SENDER_MAIL_DOMAIN|${SENDER_EMAIL_DOMAIN}|g" final-nix-config/etc/nixos/misc/mail.nix - sed -i "s|SENDER_MAIL_ADDRESS|${SENDER_EMAIL_ADDRESS}|g" final-nix-config/etc/nixos/misc/mail.nix - sed -i "s*PODMAN_NETWORKS*${PODMAN_NETWORKS//$'\n'/\\n}*" final-nix-config/etc/nixos/misc/activation.nix sed -i "s|TRAEFIK_NETWORKS|${TRAEFIK_NETWORKS//$'\n'/\\n}|" final-nix-config/etc/nixos/podman/traefik.nix + sed -i "s|DOMAIN_NAME|${DOMAIN_NAME}|" final-nix-config/etc/nixos/misc/mail.nix + sed -i "s|EMAIL_ADDRESS|${EMAIL_ADDRESS}|" final-nix-config/etc/nixos/misc/mail.nix + sed -i "s|SENDER_MAIL_DOMAIN|${SENDER_EMAIL_DOMAIN}|" final-nix-config/etc/nixos/misc/mail.nix + sed -i "s|SENDER_MAIL_ADDRESS|${SENDER_EMAIL_ADDRESS}|" final-nix-config/etc/nixos/misc/mail.nix + sed -i "s*PODMAN_NETWORKS*${PODMAN_NETWORKS//$'\n'/\\n}*" final-nix-config/etc/nixos/misc/activation.nix + sed -i "s|TRAEFIK_NETWORKS|${TRAEFIK_NETWORKS//$'\n'/\\n}|" final-nix-config/etc/nixos/podman/traefik.nix sed -i "s|TRAEFIK_REF_NETWORKS|${TRAEFIK_REF_NETWORKS//$'\n'/\\n}|" final-nix-config/etc/nixos/podman/traefik.nix if [[ "${TARGET_TPM}" == "true" ]]; then sed -i "s|# boot.initrd.systemd.tpm2.enable = true;| boot.initrd.systemd.tpm2.enable = true;|" final-nix-config/etc/nixos/configuration.nix diff --git a/templates/nix-config/misc/mail.nix b/templates/nix-config/misc/mail.nix index d23e13f..46f7357 100644 --- a/templates/nix-config/misc/mail.nix +++ b/templates/nix-config/misc/mail.nix @@ -11,22 +11,22 @@ in fromAddress = lib.mkOption { description = "The 'from' address"; type = lib.types.str; - default = "no-reply@$DOMAIN_NAME"; + default = "no-reply@DOMAIN_NAME"; }; toAddress = lib.mkOption { description = "The 'to' address"; type = lib.types.str; - default = "$EMAIL_ADDRESS"; + default = "EMAIL_ADDRESS"; }; smtpServer = lib.mkOption { description = "The SMTP server address"; type = lib.types.str; - default = "$SENDER_EMAIL_DOMAIN"; + default = "SENDER_EMAIL_DOMAIN"; }; smtpUsername = lib.mkOption { description = "The SMTP username"; type = lib.types.str; - default = "$SENDER_EMAIL_ADDRESS"; + default = "SENDER_EMAIL_ADDRESS"; }; smtpPasswordPath = lib.mkOption { description = "Path to the secret containing SMTP password"; diff --git a/templates/nix-config/misc/networking.nix b/templates/nix-config/misc/networking.nix index c7575ff..5e510fe 100644 --- a/templates/nix-config/misc/networking.nix +++ b/templates/nix-config/misc/networking.nix @@ -11,15 +11,15 @@ networking.firewall.enable = true; # Bridge configuration for VMs - networking.bridges.br0.interfaces = [ "$TARGET_INTERFACE" ]; + networking.bridges.br0.interfaces = [ "TARGET_INTERFACE" ]; networking.interfaces.br0.useDHCP = false; - networking.nameservers = [ "$HOME_SERVER_IP" "9.9.9.9" ]; + networking.nameservers = [ "HOME_SERVER_IP" "9.9.9.9" ]; networking.interfaces.br0.ipv4.addresses = [{ - address = "$HOME_SERVER_IP"; + address = "HOME_SERVER_IP"; prefixLength = 24; }]; networking.defaultGateway = { - address = "$HOME_ROUTER_IP"; + address = "HOME_ROUTER_IP"; interface = "br0"; }; diff --git a/templates/nix-config/podman/traefik.nix b/templates/nix-config/podman/traefik.nix index 74d933d..db1a0e8 100644 --- a/templates/nix-config/podman/traefik.nix +++ b/templates/nix-config/podman/traefik.nix @@ -18,7 +18,7 @@ in image: docker.io/library/traefik:latest container_name: traefik networks: -$TRAEFIK_NETWORKS +TRAEFIK_NETWORKS ports: - 8080:80 - 8443:443 @@ -39,7 +39,7 @@ $TRAEFIK_NETWORKS - traefik.http.routers.traefik-https.tls.certresolver=cloudflare restart: always networks: -$TRAEFIK_REF_NETWORKS +TRAEFIK_REF_NETWORKS ''; systemd.services.traefik = {