nixos-config/machines/drop/config.nix
makefu 1e2e2bdd35
clan: add secrets
grep -- '- &' .sops.yaml  | cut -d'&' -f2 | grep _host | sed 's/_host//' | xargs -n2 clan secrets machines add
for i in secrets/*.yaml; do host=$(basename $i .yaml); clan secrets import-sops $i --machine $host --user makefu --prefix ${host}-;done
for i in secrets/*.yaml; do host=$(basename $i .yaml) ;clan secrets groups add-machine common "$host";done
2023-10-01 22:58:15 +02:00

41 lines
1,004 B
Nix

{ config, pkgs, ... }:
let
external-ip = "45.55.145.62";
default-gw = "45.55.128.1";
prefixLength = 18;
in {
imports = [
<stockholm/makefu>
<stockholm/makefu/2configs/hw/CAC.nix>
<stockholm/makefu/2configs/save-diskspace.nix>
<stockholm/makefu/2configs/torrent.nix>
];
krebs = {
enable = true;
tinc.retiolum.enable = true;
build.host = config.krebs.hosts.drop;
};
boot.loader.grub.device = "/dev/vda";
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "ehci_pci" "virtio_pci" "virtio_blk" "virtio_net" "virtio_scsi" ];
fileSystems."/" = {
device = "/dev/vda1";
fsType = "ext4";
};
networking = {
firewall = {
allowPing = true;
logRefusedConnections = false;
allowedTCPPorts = [ ];
allowedUDPPorts = [ 655 ];
};
interfaces.enp0s3.ipv4.addresses = [{
address = external-ip;
inherit prefixLength;
}];
defaultGateway = default-gw;
nameservers = [ "8.8.8.8" ];
};
}