helix: new deployment

This commit is contained in:
Anish Lakhwara 2023-05-30 22:22:21 +10:00
parent 984d29ee2b
commit a6980a1b74
2 changed files with 36 additions and 11 deletions

View file

@ -1,10 +1,10 @@
{ self, profiles, suites, ... }: { self, profiles, suites, pkgs, ... }:
{ {
imports = [ imports = [
./configuration.nix ./configuration.nix
../profiles/core ../profiles/core
../profiles/server ../profiles/server
../profiles/metrics # ../profiles/metrics
../profiles/gitea ../profiles/gitea
../profiles/woodpecker-server ../profiles/woodpecker-server
../profiles/rss-bridge ../profiles/rss-bridge
@ -19,10 +19,31 @@
extraGroups = [ "wheel" ]; extraGroups = [ "wheel" ];
}; };
age.secrets.helix-wg.file = "${self}/secrets/helix-wg.age";
age.secrets.helix-wg.owner = "anish";
mossnet.wg = { mossnet.wg = {
enable = true; enable = true;
ips = [ "10.0.69.5/24" ]; ips = [ "10.0.69.5/24" ];
privateKeyFile = "/home/anish/wg/wg-priv"; privateKeyFile = "/run/agenix/helix-wg";
}; };
services.postgresql.package = pkgs.postgresql_11;
services.postgresqlBackup = {
# TODO needs working wireguard to box
enable = false;
databases = [ "gitea" "freshrss" "woodpecker" ];
location = "/mnt/two/postgres";
};
mossnet.backup = {
enable = true;
name = "helix";
paths = [
"/var/lib/gitea"
"/var/lib/freshrss"
"/var/lib/woodpecker"
"/var/lib/microbin"
];
};
} }

View file

@ -5,23 +5,27 @@
{ {
imports = imports =
[ [ (modulesPath + "/profiles/qemu-guest.nix")
(modulesPath + "/profiles/qemu-guest.nix")
]; ];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ]; boot.initrd.availableKernelModules = [ "ata_piix" "virtio_pci" "floppy" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ]; boot.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ { device = "/dev/disk/by-uuid/7c560634-d545-41cc-b375-42ce3037fd73";
device = "/dev/disk/by-uuid/3b8b2c4b-835e-4822-8ac8-0effdc8270d6"; fsType = "ext4";
fsType = "btrfs";
}; };
swapDevices = [ ]; swapDevices = [ ];
nix.settings.max-jobs = lib.mkDefault 1; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
nixpkgs.hostPlatform = "x86_64-linux"; # (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;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }