nixos-config/hosts/nostromo.nix

123 lines
2.3 KiB
Nix
Raw Normal View History

2020-02-03 20:51:49 -08:00
{ lib, config, pkgs, ... }:
2019-12-25 15:20:36 -08:00
let
2020-02-18 10:58:47 -08:00
hostname = "nostromo.sea.fudo.org";
2020-02-03 20:51:49 -08:00
inherit (lib.strings) concatStringsSep;
2019-12-25 15:20:36 -08:00
in {
boot.kernelModules = [ "kvm-amd" ];
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/sdb";
2020-02-18 10:58:47 -08:00
hardware.bluetooth.enable = false;
2019-12-25 15:20:36 -08:00
imports = [
../defaults.nix
../hardware-configuration.nix
];
2020-02-18 10:58:47 -08:00
fudo.common = {
profile = "server";
site = "seattle";
};
2019-12-25 15:20:36 -08:00
networking = {
hostName = hostname;
defaultGateway = "10.0.0.1";
nameservers = [ "10.0.0.1" ];
# Turn off for hypervisor: dhcp by default everywhere is a fuckin pain.
dhcpcd.enable = false;
# Create a bridge for VMs to use
macvlans.intlan0 = {
interface = "eno1";
mode = "bridge";
};
interfaces = {
intlan0 = {
macAddress = "46:54:76:06:f1:10";
ipv4.addresses = [
{
address = "10.0.0.2";
2020-02-03 20:51:49 -08:00
prefixLength = 22;
}
{
address = "10.0.10.2";
prefixLength = 24;
2019-12-25 15:20:36 -08:00
}
];
};
};
};
2020-02-18 10:58:47 -08:00
fudo = {
postgresql = {
enable = true;
ssl-private-key = "/srv/nostromo/certs/private/privkey.pem";
ssl-certificate = "/srv/nostromo/certs/cert.pem";
keytab = "/srv/nostromo/keytabs/postgres.keytab";
local-networks = [
"10.0.0.1/24"
"127.0.0.1/8"
];
};
};
2019-12-25 15:20:36 -08:00
environment.systemPackages = with pkgs; [
2020-02-18 10:58:47 -08:00
ceph
2019-12-25 15:20:36 -08:00
libguestfs-with-appliance
libvirt
virtmanager
];
virtualisation.libvirtd = {
enable = true;
qemuPackage = pkgs.qemu_kvm;
onShutdown = "shutdown";
};
2020-02-03 20:51:49 -08:00
services = {
# glusterfs = {
# enable = true;
# enableGlustereventsd = true;
# useRpcbind = true;
# };
2020-02-18 10:58:47 -08:00
ceph = {
enable = true;
2020-02-03 20:51:49 -08:00
2020-02-18 10:58:47 -08:00
global = {
clusterName = "sea-data";
clusterNetwork = "10.0.10.0/24";
fsid = "d443e192-896d-4102-a60f-f8f0777eb2a3";
monHost = "10.0.10.2";
monInitialMembers = "mon-1";
publicNetwork = "10.0.0.0/22";
};
2020-02-03 20:51:49 -08:00
2020-02-18 10:58:47 -08:00
mds = {
enable = true;
daemons = ["srv-2"];
};
2020-02-03 20:51:49 -08:00
2020-02-18 10:58:47 -08:00
mgr = {
enable = true;
daemons = ["srv-2"];
};
2020-02-03 20:51:49 -08:00
2020-02-18 10:58:47 -08:00
mon = {
enable = true;
daemons = ["srv-2"];
};
};
2020-02-03 20:51:49 -08:00
};
2019-12-25 15:20:36 -08:00
}