remove hel1-a
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
authorizedKeys =
|
||||
(builtins.attrValues myData.people_pubkeys)
|
||||
++ [
|
||||
myData.hosts."hel1-a.servers.jakst".publicKey
|
||||
myData.hosts."vno1-oh2.servers.jakst".publicKey
|
||||
];
|
||||
};
|
||||
|
||||
@@ -1,144 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
agenix,
|
||||
myData,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./zfs.nix
|
||||
];
|
||||
|
||||
mj = {
|
||||
stateVersion = "22.11";
|
||||
timeZone = "UTC";
|
||||
|
||||
base = {
|
||||
zfs.enable = true;
|
||||
|
||||
users.passwd = {
|
||||
root.passwordFile = config.age.secrets.root-passwd-hash.path;
|
||||
motiejus.passwordFile = config.age.secrets.motiejus-passwd-hash.path;
|
||||
};
|
||||
|
||||
initrd = {
|
||||
enable = true;
|
||||
authorizedKeys =
|
||||
(builtins.attrValues myData.people_pubkeys)
|
||||
++ [myData.hosts."vno1-oh2.servers.jakst".publicKey];
|
||||
hostKeys = ["/etc/secrets/initrd/ssh_host_ed25519_key"];
|
||||
};
|
||||
snapshot = {
|
||||
enable = true;
|
||||
mountpoints = ["/var/lib" "/var/log"];
|
||||
};
|
||||
|
||||
zfsborg = {
|
||||
enable = true;
|
||||
passwordPath = config.age.secrets.borgbackup-password.path;
|
||||
mountpoints = {
|
||||
"/var/lib" = {
|
||||
repo = "zh2769@zh2769.rsync.net:hel1-a.servers.jakst-var_lib";
|
||||
paths = [
|
||||
"/var/lib/.snapshot-latest/headscale"
|
||||
];
|
||||
backup_at = "*-*-* 00:05:00";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
unitstatus = {
|
||||
enable = true;
|
||||
email = "motiejus+alerts@jakstys.lt";
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
node_exporter.enable = true;
|
||||
|
||||
headscale = {
|
||||
enable = false;
|
||||
clientOidcPath = config.age.secrets.headscale-client-oidc.path;
|
||||
subnetCIDR = myData.tailscale_subnet.cidr;
|
||||
};
|
||||
deployerbot = {
|
||||
follower = {
|
||||
enable = true;
|
||||
uidgid = myData.uidgid.updaterbot-deployee;
|
||||
publicKey = myData.hosts."vno1-oh2.servers.jakst".publicKey;
|
||||
};
|
||||
};
|
||||
postfix = {
|
||||
enable = true;
|
||||
saslPasswdPath = config.age.secrets.sasl-passwd.path;
|
||||
};
|
||||
|
||||
zfsunlock = {
|
||||
enable = true;
|
||||
targets."vno1-oh2.servers.jakst" = let
|
||||
host = myData.hosts."vno1-oh2.servers.jakst";
|
||||
in {
|
||||
sshEndpoint = host.publicIP;
|
||||
pingEndpoint = host.jakstIP;
|
||||
remotePubkey = host.initrdPubKey;
|
||||
pwFile = config.age.secrets.zfs-passphrase-vno1-oh2.path;
|
||||
startAt = "*-*-* *:00/5:00";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nixos-option
|
||||
graphicsmagick
|
||||
];
|
||||
|
||||
services = {
|
||||
tailscale.enable = true;
|
||||
|
||||
nsd = {
|
||||
enable = true;
|
||||
interfaces = ["0.0.0.0" "::"];
|
||||
zones = {
|
||||
"jakstys.lt.".data = myData.jakstysLTZone;
|
||||
};
|
||||
};
|
||||
|
||||
logrotate = {
|
||||
settings = {
|
||||
"/var/log/caddy/access-jakstys.lt.log" = {
|
||||
rotate = -1;
|
||||
frequency = "daily";
|
||||
dateext = true;
|
||||
dateyesterday = true;
|
||||
compress = true;
|
||||
compresscmd = "${pkgs.zstd}/bin/zstd";
|
||||
compressext = ".zst";
|
||||
compressoptions = "--long -19";
|
||||
uncompresscmd = "${pkgs.zstd}/bin/unzstd";
|
||||
postrotate = "${pkgs.systemd}/bin/systemctl restart caddy";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "hel1-a";
|
||||
domain = "servers.jakst";
|
||||
firewall = {
|
||||
allowedTCPPorts = [
|
||||
53
|
||||
80
|
||||
443
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
53
|
||||
443
|
||||
41641 # tailscale
|
||||
];
|
||||
checkReversePath = "loose"; # for tailscale
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
# 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 + "/profiles/qemu-guest.nix")];
|
||||
boot.initrd.availableKernelModules = ["ata_piix" "virtio_pci" "virtio_scsi" "xhci_pci" "sd_mod" "sr_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "rpool/nixos/root";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "rpool/nixos/home";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
};
|
||||
|
||||
fileSystems."/var/lib" = {
|
||||
device = "rpool/nixos/var/lib";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
};
|
||||
|
||||
fileSystems."/var/log" = {
|
||||
device = "rpool/nixos/var/log";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "bpool/nixos/root";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
};
|
||||
|
||||
fileSystems."/boot/efis/scsi-0QEMU_QEMU_HARDDISK_9233346-part1" = {
|
||||
device = "/dev/disk/by-uuid/B6D7-D52E";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
#fileSystems."/boot/efi" =
|
||||
# { device = "/boot/efis/scsi-0QEMU_QEMU_HARDDISK_9233346-part1";
|
||||
# fsType = "none";
|
||||
# options = [ "bind" ];
|
||||
# };
|
||||
|
||||
swapDevices = [{device = "/dev/disk/by-uuid/03ebe703-aa24-4ee5-a7c3-f8614ee779b0";}];
|
||||
|
||||
# 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.ens3.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
boot.supportedFilesystems = ["zfs"];
|
||||
networking.hostId = "cd1a441c";
|
||||
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
boot.loader.generationsDir.copyKernels = true;
|
||||
boot.loader.grub.efiInstallAsRemovable = true;
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.copyKernels = true;
|
||||
boot.loader.grub.efiSupport = true;
|
||||
boot.loader.grub.zfsSupport = true;
|
||||
#boot.loader.grub.extraPrepareConfig = ''
|
||||
# mkdir -p /boot/efis
|
||||
# for i in /boot/efis/*; do mount $i ; done
|
||||
#
|
||||
# mkdir -p /boot/efi
|
||||
# mount /boot/efi
|
||||
#'';
|
||||
#boot.loader.grub.extraInstallCommands = ''
|
||||
#ESP_MIRROR=$(mktemp -d)
|
||||
#cp -r /boot/efi/EFI $ESP_MIRROR
|
||||
#for i in /boot/efis/*; do
|
||||
# cp -r $ESP_MIRROR/EFI $i
|
||||
#done
|
||||
#rm -rf $ESP_MIRROR
|
||||
#'';
|
||||
boot.loader.grub.devices = [
|
||||
"/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_9233346"
|
||||
];
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
enable = true;
|
||||
authorizedKeys =
|
||||
(builtins.attrValues myData.people_pubkeys)
|
||||
++ [myData.hosts."hel1-a.servers.jakst".publicKey];
|
||||
++ [myData.hosts."fra1-a.servers.jakst".publicKey];
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -125,7 +125,6 @@
|
||||
repo = "git@git.jakstys.lt:motiejus/config";
|
||||
deployDerivations = [
|
||||
".#vno1-oh2"
|
||||
".#hel1-a"
|
||||
".#vno1-rp3b"
|
||||
".#fra1-a"
|
||||
];
|
||||
@@ -159,15 +158,6 @@
|
||||
|
||||
zfsunlock = {
|
||||
enable = true;
|
||||
targets."hel1-a.servers.jakst" = let
|
||||
host = myData.hosts."hel1-a.servers.jakst";
|
||||
in {
|
||||
sshEndpoint = host.publicIP;
|
||||
pingEndpoint = host.jakstIP;
|
||||
remotePubkey = host.initrdPubKey;
|
||||
pwFile = config.age.secrets.zfs-passphrase-hel1-a.path;
|
||||
startAt = "*-*-* *:00/5:00";
|
||||
};
|
||||
targets."fra1-a.servers.jakst" = let
|
||||
host = myData.hosts."fra1-a.servers.jakst";
|
||||
in {
|
||||
@@ -312,10 +302,6 @@
|
||||
job_name = "fra1-a.servers.jakst";
|
||||
static_configs = [{targets = ["${myData.hosts."fra1-a.servers.jakst".jakstIP}:${port}"];}];
|
||||
}
|
||||
{
|
||||
job_name = "hel1-a.servers.jakst";
|
||||
static_configs = [{targets = ["${myData.hosts."hel1-a.servers.jakst".jakstIP}:${port}"];}];
|
||||
}
|
||||
{
|
||||
job_name = "vno1-rp3b.servers.jakst";
|
||||
static_configs = [{targets = ["${myData.hosts."vno1-rp3b.servers.jakst".jakstIP}:${port}"];}];
|
||||
|
||||
Reference in New Issue
Block a user