rearrange secrets for backups-rpi4
This commit is contained in:
parent
1d16ada87b
commit
fa4861f980
3 changed files with 15 additions and 15 deletions
13
nixos/common/services/tailscale-autoconnect.nix
Normal file
13
nixos/common/services/tailscale-autoconnect.nix
Normal 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";
|
||||
}
|
|
@ -265,6 +265,6 @@ in
|
|||
# Set up the secret for the password:
|
||||
sops.secrets."gotify_token" = {
|
||||
owner = "root";
|
||||
sopsFile = ../../../secrets/backups-rpi4.yaml;
|
||||
sopsFile = ../../../secrets/hosts/backups-rpi4.yaml;
|
||||
};
|
||||
}
|
|
@ -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, ... }: {
|
||||
imports = [
|
||||
inputs.nixos-hardware.nixosModules.raspberry-pi-4
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
../../common/services/tailscale-autoconnect.nix
|
||||
./backup-script.nix
|
||||
./cron.nix
|
||||
];
|
||||
|
@ -55,17 +53,6 @@
|
|||
# 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" ];
|
||||
boot.kernel.sysctl = { "net.ipv4.ip_forward" = true; };
|
||||
}
|
Loading…
Reference in a new issue