From 1a5bf5fb239a88c313ed319734cecec7242d9175 Mon Sep 17 00:00:00 2001 From: Lilac Date: Sun, 30 Aug 2026 19:44:35 -0400 Subject: [PATCH] backup node fully integrated --- flake.nix | 4 ++-- hosts/backup/default.nix | 14 ++++++++++++++ hosts/backup/hardware-configuration.nix | 3 +++ hosts/vps/default.nix | 4 ++++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 25b065d..7989b5c 100644 --- a/flake.nix +++ b/flake.nix @@ -74,13 +74,13 @@ }; }; backup = { - hostname = "192.168.100.193"; + hostname = "10.0.0.4"; sshUser = "root"; magicRollbackTimeout = 120; profiles.system = { user = "root"; remoteBuild = false; - path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.desktop; + path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.backup; }; }; }; diff --git a/hosts/backup/default.nix b/hosts/backup/default.nix index e97350c..e29d007 100644 --- a/hosts/backup/default.nix +++ b/hosts/backup/default.nix @@ -1,6 +1,8 @@ { config, lib, pkgs, ... }: { + imports = [ ./hardware-configuration.nix ../../modules/ssh.nix ]; + networking.hostName = "backup"; users.users.lilac = { @@ -21,6 +23,13 @@ time.timeZone = "America/Winnipeg"; + systemd.sleep.settings.Sleep = { + AllowSuspend = "no"; + AllowHibernation = "no"; + AllowHybridSleep = "no"; + AllowSuspendThenHibernate = "no"; + }; + i18n.defaultLocale = "en_US.UTF-8"; i18n.extraLocaleSettings = { LC_ADDRESS = "en_US.UTF-8"; @@ -57,6 +66,11 @@ tor-browser ]; + networking.wireless.enable = true; + networking.networkmanager.enable = true; + + services.timesyncd.enable = true; # optional + networking = { firewall = { enable = true; diff --git a/hosts/backup/hardware-configuration.nix b/hosts/backup/hardware-configuration.nix index 86f9e7f..9bee810 100644 --- a/hosts/backup/hardware-configuration.nix +++ b/hosts/backup/hardware-configuration.nix @@ -10,6 +10,9 @@ boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.kernelPackages = pkgs.linuxPackages_latest; fileSystems."/" = { device = "/dev/disk/by-uuid/61b493e0-8c91-b7d1-4e336da06ff0"; diff --git a/hosts/vps/default.nix b/hosts/vps/default.nix index ae17a83..1b94704 100644 --- a/hosts/vps/default.nix +++ b/hosts/vps/default.nix @@ -46,6 +46,10 @@ allowedIPs = [ "10.0.0.2/32" ]; publicKey = "7BcwtszpzS4ABDwKwMaiJ7F35sJRa89fBbuh80Sk8Uk="; } + { + allowedIPs = [ "10.0.0.4/32" ]; + publicKey = "XjuV3wzkP03UUjYSJfY3OG3WWLRtoQBN7GokDEWhdhQ="; + } ]; }; nftables = {