ops/nixos: init blade-leader
This commit is contained in:
parent
c7df81d6a1
commit
ba65db5865
2 changed files with 68 additions and 1 deletions
56
ops/nixos/blade-leader/default.nix
Normal file
56
ops/nixos/blade-leader/default.nix
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
{ depot, lib, pkgs, rebuilder, config, ... }:
|
||||||
|
let
|
||||||
|
inherit (depot.ops) secrets;
|
||||||
|
in {
|
||||||
|
boot.initrd.availableKernelModules = [ "ahci" "ohci_pci" "ehci_pci" "pata_atiixp" "uhci_hcd" "be2iscsi" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.kernelParams = [ "mitigations=off" ];
|
||||||
|
|
||||||
|
fileSystems = let
|
||||||
|
btrfs = subvol: {
|
||||||
|
device = "/dev/sda1";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=${subvol}" ];
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
"/" = btrfs "nixos/local/root";
|
||||||
|
"/tmp" = btrfs "nixos/local/tmp";
|
||||||
|
"/nix" = btrfs "nixos/local/nix";
|
||||||
|
"/var" = btrfs "nixos/safe/var";
|
||||||
|
"/home" = btrfs "nixos/safe/home";
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.loader.grub.enable = true;
|
||||||
|
boot.loader.grub.version = 2;
|
||||||
|
boot.loader.grub.devices = [
|
||||||
|
"/dev/disk/by-id/ata-CT2000MX500SSD1_2052E4E1E43F"
|
||||||
|
"/dev/disk/by-id/ata-CT2000MX500SSD1_2052E4E1E45D"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Networking!
|
||||||
|
networking = {
|
||||||
|
hostName = "blade-leader";
|
||||||
|
domain = "house.as205479.net";
|
||||||
|
nameservers = ["8.8.8.8" "8.8.4.4"];
|
||||||
|
useDHCP = false;
|
||||||
|
interfaces.bond0.useDHCP = true;
|
||||||
|
bonds.bond0 = {
|
||||||
|
interfaces = [
|
||||||
|
"enp4s0f0" "enp4s0f1"
|
||||||
|
"enp5s0f0" "enp5s0f1"
|
||||||
|
];
|
||||||
|
driverOptions = {
|
||||||
|
mode = "802.3ad";
|
||||||
|
miimon = "1000";
|
||||||
|
lacp_rate = "fast";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
my.ip.tailscale = "100.87.45.114";
|
||||||
|
|
||||||
|
system.stateVersion = "21.05";
|
||||||
|
}
|
|
@ -15,7 +15,18 @@ let
|
||||||
system = builtins.currentSystem;
|
system = builtins.currentSystem;
|
||||||
modules = [ (baseModule systemName) (args: { imports = [ lib/common.nix config ]; }) ];
|
modules = [ (baseModule systemName) (args: { imports = [ lib/common.nix config ]; }) ];
|
||||||
});
|
});
|
||||||
systems = [ "porcorosso" "ixvm-fra01" "marukuru" "clouvider-fra01" "totoro" "kusakabe" "swann" "clouvider-lon01" "etheroute-lon01" ];
|
systems = [
|
||||||
|
"porcorosso"
|
||||||
|
"ixvm-fra01"
|
||||||
|
"marukuru"
|
||||||
|
"clouvider-fra01"
|
||||||
|
"totoro"
|
||||||
|
"kusakabe"
|
||||||
|
"swann"
|
||||||
|
"clouvider-lon01"
|
||||||
|
"etheroute-lon01"
|
||||||
|
"blade-leader"
|
||||||
|
];
|
||||||
rebuilder = system: (import ./lib/rebuilder.nix (args // { system = system; }));
|
rebuilder = system: (import ./lib/rebuilder.nix (args // { system = system; }));
|
||||||
systemCfgs = lib.genAttrs systems
|
systemCfgs = lib.genAttrs systems
|
||||||
(name: import (./. + "/${name}"));
|
(name: import (./. + "/${name}"));
|
||||||
|
|
Loading…
Reference in a new issue