rearrange secrets for backups-rpi4

This commit is contained in:
iFargle 2024-01-12 15:03:47 +09:00
parent 1d16ada87b
commit fa4861f980
3 changed files with 15 additions and 15 deletions

View file

@ -0,0 +1,13 @@
{ inputs, config, lib, pkgs, modulesPath, ... }: {
# Generic Tailscale configs are in /nixos/common/services/tailscale.nix
# Set up the secrets file:
sops.secrets."tailscale_key" = {
owner = "root";
sopsFile = ../../../secrets/hosts/${hostname}.yaml;
restartUnits = [
"tailscaled.service"
"tailscaled-autoconnect.service"
];
};
services.tailscale.authKeyFile = "/run/secrets/tailscale_key";
}

View file

@ -265,6 +265,6 @@ in
# Set up the secret for the password: # Set up the secret for the password:
sops.secrets."gotify_token" = { sops.secrets."gotify_token" = {
owner = "root"; owner = "root";
sopsFile = ../../../secrets/backups-rpi4.yaml; sopsFile = ../../../secrets/hosts/backups-rpi4.yaml;
}; };
} }

View file

@ -1,10 +1,8 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ inputs, config, lib, pkgs, modulesPath, ... }: { { inputs, config, lib, pkgs, modulesPath, ... }: {
imports = [ imports = [
inputs.nixos-hardware.nixosModules.raspberry-pi-4 inputs.nixos-hardware.nixosModules.raspberry-pi-4
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
../../common/services/tailscale-autoconnect.nix
./backup-script.nix ./backup-script.nix
./cron.nix ./cron.nix
]; ];
@ -55,17 +53,6 @@
# END hardware config # END hardware config
##################################################################################### #####################################################################################
# Generic Tailscale configs are in /nixos/common/services/tailscale.nix
# Set up the secrets file:
sops.secrets."tailscale_keys/backups-rpi4" = {
owner = "root";
sopsFile = ../../../secrets/tailscale.yaml;
restartUnits = [
"tailscaled.service"
"tailscaled-autoconnect.service"
];
};
services.tailscale.authKeyFile = "/run/secrets/tailscale_keys/backups-rpi4";
services.tailscale.extraUpFlags = [ "--advertise-exit-node" ]; services.tailscale.extraUpFlags = [ "--advertise-exit-node" ];
boot.kernel.sysctl = { "net.ipv4.ip_forward" = true; }; boot.kernel.sysctl = { "net.ipv4.ip_forward" = true; };
} }