A complete reformatting to match nixpkgs-fmt
This commit is contained in:
+30
-29
@@ -1,33 +1,34 @@
|
||||
{ config, ... }:
|
||||
|
||||
let
|
||||
publicIp = (builtins.elemAt config.networking.interfaces.enp68s0.ipv4.addresses 0).address;
|
||||
sanIp = (builtins.elemAt config.networking.interfaces.enp67s0.ipv4.addresses 0).address;
|
||||
vip = (builtins.elemAt config.networking.interfaces.enp68s0.ipv4.addresses 1).address;
|
||||
hostname = config.networking.hostName;
|
||||
baseConfig = import ../../ceph/home.nix;
|
||||
in {
|
||||
services.ceph-benaco = baseConfig // {
|
||||
enable = false;
|
||||
monitor = {
|
||||
enable = false;
|
||||
initialKeyring = ../../secrets/home.mon.keyring;
|
||||
nodeName = hostname;
|
||||
bindAddr = publicIp;
|
||||
advertisedPublicAddr = vip;
|
||||
};
|
||||
osdBindAddr = publicIp;
|
||||
osdAdvertisedPublicAddr = publicIp;
|
||||
osds = {
|
||||
osd1 = {
|
||||
enable = false;
|
||||
bootstrapKeyring = ../../secrets/home.osd-bootstrap.keyring;
|
||||
id = 1;
|
||||
uuid = "c13bd2b1-cfc7-4966-8da5-d92356e87e06";
|
||||
blockDevice = "/dev/sda";
|
||||
blockDeviceUdevRuleMatcher = ''KERNEL=="sda"'';
|
||||
clusterAddress = sanIp;
|
||||
};
|
||||
};
|
||||
};
|
||||
publicIp = (builtins.elemAt config.networking.interfaces.enp68s0.ipv4.addresses 0).address;
|
||||
sanIp = (builtins.elemAt config.networking.interfaces.enp67s0.ipv4.addresses 0).address;
|
||||
vip = (builtins.elemAt config.networking.interfaces.enp68s0.ipv4.addresses 1).address;
|
||||
hostname = config.networking.hostName;
|
||||
baseConfig = import ../../ceph/home.nix;
|
||||
in
|
||||
{
|
||||
services.ceph-benaco = baseConfig // {
|
||||
enable = false;
|
||||
monitor = {
|
||||
enable = false;
|
||||
initialKeyring = ../../secrets/home.mon.keyring;
|
||||
nodeName = hostname;
|
||||
bindAddr = publicIp;
|
||||
advertisedPublicAddr = vip;
|
||||
};
|
||||
osdBindAddr = publicIp;
|
||||
osdAdvertisedPublicAddr = publicIp;
|
||||
osds = {
|
||||
osd1 = {
|
||||
enable = false;
|
||||
bootstrapKeyring = ../../secrets/home.osd-bootstrap.keyring;
|
||||
id = 1;
|
||||
uuid = "c13bd2b1-cfc7-4966-8da5-d92356e87e06";
|
||||
blockDevice = "/dev/sda";
|
||||
blockDeviceUdevRuleMatcher = ''KERNEL=="sda"'';
|
||||
clusterAddress = sanIp;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
+119
-117
@@ -5,125 +5,127 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./ceph.nix
|
||||
./hardware-configuration.nix
|
||||
./minio.nix
|
||||
];
|
||||
imports =
|
||||
[
|
||||
# Include the results of the hardware scan.
|
||||
./ceph.nix
|
||||
./hardware-configuration.nix
|
||||
./minio.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking = {
|
||||
hostName = "jeremiah"; # Define your hostname.
|
||||
useDHCP = false;
|
||||
defaultGateway = {
|
||||
address = " 10.42.1.1";
|
||||
interface = "enp68s0";
|
||||
};
|
||||
vlans = {
|
||||
san = {
|
||||
id = 616;
|
||||
interface = "enp67s0";
|
||||
};
|
||||
};
|
||||
interfaces = {
|
||||
enp68s0 = {
|
||||
ipv4.addresses = [ {
|
||||
address = "10.42.1.8";
|
||||
prefixLength = 16;
|
||||
} {
|
||||
address = "10.42.100.1";
|
||||
prefixLength = 16;
|
||||
} ];
|
||||
};
|
||||
san = {
|
||||
ipv4.addresses = [ {
|
||||
address = "10.201.1.2";
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
};
|
||||
};
|
||||
nameservers = [
|
||||
"10.42.1.5"
|
||||
];
|
||||
};
|
||||
greg = {
|
||||
home = true;
|
||||
tailscale.enable = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
curl
|
||||
gawk
|
||||
git
|
||||
unzip
|
||||
wget
|
||||
];
|
||||
|
||||
fileSystems = {
|
||||
"/nix" = {
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix" ];
|
||||
device = "/dev/nvme0n1p1";
|
||||
};
|
||||
"/var" = {
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=var" ];
|
||||
device = "/dev/nvme0n1p1";
|
||||
};
|
||||
};
|
||||
networking = {
|
||||
hostName = "jeremiah"; # Define your hostname.
|
||||
useDHCP = false;
|
||||
defaultGateway = {
|
||||
address = " 10.42.1.1";
|
||||
interface = "enp68s0";
|
||||
};
|
||||
vlans = {
|
||||
san = {
|
||||
id = 616;
|
||||
interface = "enp67s0";
|
||||
};
|
||||
};
|
||||
interfaces = {
|
||||
enp68s0 = {
|
||||
ipv4.addresses = [{
|
||||
address = "10.42.1.8";
|
||||
prefixLength = 16;
|
||||
}
|
||||
{
|
||||
address = "10.42.100.1";
|
||||
prefixLength = 16;
|
||||
}];
|
||||
};
|
||||
san = {
|
||||
ipv4.addresses = [{
|
||||
address = "10.201.1.2";
|
||||
prefixLength = 24;
|
||||
}];
|
||||
};
|
||||
};
|
||||
nameservers = [
|
||||
"10.42.1.5"
|
||||
];
|
||||
};
|
||||
greg = {
|
||||
home = true;
|
||||
tailscale.enable = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
curl
|
||||
gawk
|
||||
git
|
||||
unzip
|
||||
wget
|
||||
];
|
||||
|
||||
#####################################################################################
|
||||
#################### Virtualbox Runner ##############################################
|
||||
#####################################################################################
|
||||
services = {
|
||||
gitlab-runner = {
|
||||
enable = true;
|
||||
settings.concurrent = 7;
|
||||
services = {
|
||||
shell = {
|
||||
executor = "shell";
|
||||
limit = 5;
|
||||
authenticationTokenConfigFile = config.age.secrets.runner-reg.path;
|
||||
environmentVariables = {
|
||||
EFI_DIR = "${pkgs.OVMF.fd}/FV/";
|
||||
STORAGE_URL = "http://s3.thehellings.lan:9000";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
age.secrets.runner-reg.file = ../../secrets/gitlab/jeremiah-runner-reg.age;
|
||||
virtualisation.virtualbox.host = {
|
||||
enable = true;
|
||||
enableExtensionPack = true;
|
||||
enableHardening = false;
|
||||
headless = true;
|
||||
enableWebService = true;
|
||||
};
|
||||
fileSystems = {
|
||||
"/nix" = {
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix" ];
|
||||
device = "/dev/nvme0n1p1";
|
||||
};
|
||||
"/var" = {
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=var" ];
|
||||
device = "/dev/nvme0n1p1";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."gitlab-runner" = {
|
||||
after = [
|
||||
"network.target"
|
||||
"network-online.target"
|
||||
"systemd-resolved.service"
|
||||
];
|
||||
wants = [
|
||||
"network-online.target"
|
||||
"systemd-resolved.service"
|
||||
];
|
||||
preStart = builtins.concatStringsSep "\n" [
|
||||
"${pkgs.kmod}/bin/modprobe vboxdrv"
|
||||
"${pkgs.kmod}/bin/modprobe vboxnetadp"
|
||||
"${pkgs.kmod}/bin/modprobe vboxnetflt"
|
||||
];
|
||||
postStop = "${pkgs.kmod}/bin/rmmod vboxnetadp vboxnetflt vboxdrv";
|
||||
serviceConfig = {
|
||||
DevicePolicy = lib.mkForce "auto";
|
||||
User = "root";
|
||||
DynamicUser = lib.mkForce false;
|
||||
};
|
||||
};
|
||||
#####################################################################################
|
||||
#################### Virtualbox Runner ##############################################
|
||||
#####################################################################################
|
||||
services = {
|
||||
gitlab-runner = {
|
||||
enable = true;
|
||||
settings.concurrent = 7;
|
||||
services = {
|
||||
shell = {
|
||||
executor = "shell";
|
||||
limit = 5;
|
||||
authenticationTokenConfigFile = config.age.secrets.runner-reg.path;
|
||||
environmentVariables = {
|
||||
EFI_DIR = "${pkgs.OVMF.fd}/FV/";
|
||||
STORAGE_URL = "http://s3.thehellings.lan:9000";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
age.secrets.runner-reg.file = ../../secrets/gitlab/jeremiah-runner-reg.age;
|
||||
virtualisation.virtualbox.host = {
|
||||
enable = true;
|
||||
enableExtensionPack = true;
|
||||
enableHardening = false;
|
||||
headless = true;
|
||||
enableWebService = true;
|
||||
};
|
||||
|
||||
systemd.services."gitlab-runner" = {
|
||||
after = [
|
||||
"network.target"
|
||||
"network-online.target"
|
||||
"systemd-resolved.service"
|
||||
];
|
||||
wants = [
|
||||
"network-online.target"
|
||||
"systemd-resolved.service"
|
||||
];
|
||||
preStart = builtins.concatStringsSep "\n" [
|
||||
"${pkgs.kmod}/bin/modprobe vboxdrv"
|
||||
"${pkgs.kmod}/bin/modprobe vboxnetadp"
|
||||
"${pkgs.kmod}/bin/modprobe vboxnetflt"
|
||||
];
|
||||
postStop = "${pkgs.kmod}/bin/rmmod vboxnetadp vboxnetflt vboxdrv";
|
||||
serviceConfig = {
|
||||
DevicePolicy = lib.mkForce "auto";
|
||||
User = "root";
|
||||
DynamicUser = lib.mkForce false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "uas" "usbhid" "sd_mod" ];
|
||||
@@ -14,12 +15,14 @@
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/ffc167f5-d9e4-4b11-a5f1-f7da0550ad24";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/ffc167f5-d9e4-4b11-a5f1-f7da0550ad24";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/3047-870E";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/3047-870E";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
|
||||
+24
-23
@@ -1,32 +1,33 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
minioPort = 9000;
|
||||
minioConsolePort = 9001;
|
||||
in {
|
||||
environment.systemPackages = with pkgs; [
|
||||
minio-client
|
||||
xfsprogs
|
||||
];
|
||||
minioPort = 9000;
|
||||
minioConsolePort = 9001;
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
minio-client
|
||||
xfsprogs
|
||||
];
|
||||
|
||||
greg.proxies."minio-02.thehellings.lan".target = "http://localhost:9000";
|
||||
greg.proxies."minio-02.thehellings.lan".target = "http://localhost:9000";
|
||||
|
||||
fileSystems."/data/1" = {
|
||||
device = "/dev/disk/by-id/ata-ST12000NM0558_ZHZ5YSXW-part1";
|
||||
fsType = "xfs";
|
||||
};
|
||||
fileSystems."/data/1" = {
|
||||
device = "/dev/disk/by-id/ata-ST12000NM0558_ZHZ5YSXW-part1";
|
||||
fsType = "xfs";
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
minioPort
|
||||
minioConsolePort
|
||||
];
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
minioPort
|
||||
minioConsolePort
|
||||
];
|
||||
|
||||
age.secrets.minio.file = ../../secrets/minio.age;
|
||||
age.secrets.minio.file = ../../secrets/minio.age;
|
||||
|
||||
services.minio = {
|
||||
enable = true;
|
||||
dataDir = [ "/data/1/minio" ];
|
||||
rootCredentialsFile = config.age.secrets.minio.path;
|
||||
browser = true;
|
||||
};
|
||||
services.minio = {
|
||||
enable = true;
|
||||
dataDir = [ "/data/1/minio" ];
|
||||
rootCredentialsFile = config.age.secrets.minio.path;
|
||||
browser = true;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user