backups: got the backup configed, but fecked up the networking
This commit is contained in:
parent
ccf78c06a4
commit
0e9a44f67c
4 changed files with 58 additions and 4 deletions
|
@ -39,7 +39,7 @@
|
||||||
{
|
{
|
||||||
name = value.config.services.skynet_backup.host.name;
|
name = value.config.services.skynet_backup.host.name;
|
||||||
value = base // {
|
value = base // {
|
||||||
repositoryFile = "${destination}/${value.config.services.skynet_backup.host.name}";
|
repositoryFile = "/etc/skynet/restic/${value.config.services.skynet_backup.host.name}";
|
||||||
|
|
||||||
backupPrepareCommand = ''
|
backupPrepareCommand = ''
|
||||||
#!${pkgs.stdenv.shell}
|
#!${pkgs.stdenv.shell}
|
||||||
|
|
|
@ -50,7 +50,7 @@ in {
|
||||||
eno1 = {
|
eno1 = {
|
||||||
ipv4.addresses = [
|
ipv4.addresses = [
|
||||||
{
|
{
|
||||||
address = "193.1.99.72";
|
address = ip_pub;
|
||||||
prefixLength = 26;
|
prefixLength = 26;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -60,7 +60,7 @@ in {
|
||||||
ipv4.addresses = [
|
ipv4.addresses = [
|
||||||
{
|
{
|
||||||
# internal address
|
# internal address
|
||||||
address = "193.1.99.125";
|
address = ip_priv;
|
||||||
prefixLength = 26;
|
prefixLength = 26;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
40
machines/hardware/RM007.nix
Normal file
40
machines/hardware/RM007.nix
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
# 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.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sr_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/c48817e1-036f-49a7-adae-f63fc6c03cd5";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/76CE-C65E";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/eced30bd-b785-43e0-a202-cdaee7e0f4f7"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.eno2.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
|
@ -20,9 +20,21 @@ let
|
||||||
|
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
|
./hardware/RM007.nix
|
||||||
../applications/restic.nix
|
../applications/restic.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
networking.hostName = name;
|
||||||
|
# this has to be defined for any physical servers
|
||||||
|
# vms are defined by teh vm host
|
||||||
|
networking.interfaces.eno1.ipv4.addresses = [
|
||||||
|
{
|
||||||
|
address = ip_pub;
|
||||||
|
prefixLength = 26;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
deployment = {
|
deployment = {
|
||||||
targetHost = hostname;
|
targetHost = hostname;
|
||||||
targetPort = 22;
|
targetPort = 22;
|
||||||
|
@ -42,7 +54,9 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
services.skynet_backup = {
|
services.skynet_backup = {
|
||||||
normal.backups = ["/etc/skynet"];
|
normal.backups = [
|
||||||
|
#"/etc/skynet"
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
host = {
|
host = {
|
||||||
|
|
Loading…
Reference in a new issue