chore: dynamic hosts, builder targets
buildbot/nix-eval Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-exodus Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-isaiah Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-linode Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-zeke Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-jeremiah Build done.
buildbot/nix-build gitea:greg/nixos#checks.aarch64-linux.nixos-nixos Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-gitlab Build done.
buildbot/nix-build Build done.
buildbot/nix-eval Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-exodus Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-isaiah Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-linode Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-zeke Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-jeremiah Build done.
buildbot/nix-build gitea:greg/nixos#checks.aarch64-linux.nixos-nixos Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-gitlab Build done.
buildbot/nix-build Build done.
Make hosts read from directories, to limit manual changes Rename vm-gitlab -> gitlab A few reformatting and lint changes due to altered files Create builder targets for Darwin builders
This commit is contained in:
@@ -0,0 +1,171 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{
|
||||
config,
|
||||
metadata,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
wanInterface = "enp2s0";
|
||||
lanInterface = "enp1s0";
|
||||
lanIpAddress = metadata.hosts.${config.networking.hostName}.ip;
|
||||
in
|
||||
|
||||
{
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Bootloader
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot/";
|
||||
};
|
||||
};
|
||||
extraModprobeConfig = "vboxdrv";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
clinfo
|
||||
jellyfin-ffmpeg
|
||||
libva-utils
|
||||
mesa-demos
|
||||
radeontop
|
||||
vulkan-tools
|
||||
];
|
||||
|
||||
greg = {
|
||||
home = true;
|
||||
proxies = {
|
||||
"jellyfin.home".target = "http://localhost:8096/";
|
||||
"jellyfin.thehellings.lan".target = "http://localhost:8096/";
|
||||
};
|
||||
tailscale = {
|
||||
enable = true;
|
||||
tags = [ "home" ];
|
||||
};
|
||||
};
|
||||
|
||||
hardware = {
|
||||
enableAllFirmware = true;
|
||||
enableRedistributableFirmware = true;
|
||||
graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver
|
||||
intel-vaapi-driver
|
||||
libva-vdpau-driver
|
||||
#intel-media-sdk
|
||||
intel-compute-runtime
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "hosea";
|
||||
nameservers = [ metadata.infra.dns ];
|
||||
defaultGateway = metadata.infra.gw;
|
||||
interfaces = {
|
||||
"${wanInterface}".useDHCP = true;
|
||||
"${lanInterface}" = {
|
||||
useDHCP = false;
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = lanIpAddress;
|
||||
prefixLength = 16;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
albyhub = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
workDir = "/chain/alby";
|
||||
};
|
||||
};
|
||||
jellyfin = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
grafana = {
|
||||
enable = true;
|
||||
provision = {
|
||||
enable = true;
|
||||
dashboards.settings.providers = [
|
||||
{
|
||||
name = "Dashboards";
|
||||
disableDeletion = true;
|
||||
options = {
|
||||
path = "/etc/grafana-dashboards";
|
||||
foldersFromFilesStructure = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
datasources.settings.datasources = [
|
||||
{
|
||||
name = "Prometheus";
|
||||
type = "prometheus";
|
||||
url = "https://prometheus.shire-zebra.ts.net";
|
||||
isDefault = true;
|
||||
editable = false;
|
||||
}
|
||||
];
|
||||
};
|
||||
settings = {
|
||||
server = {
|
||||
domain = "${config.networking.hostName}.shire-zebra.ts.net";
|
||||
enforce_domain = true;
|
||||
http_addr = "0.0.0.0";
|
||||
enable_gzip = true;
|
||||
http_port = 3001;
|
||||
};
|
||||
analytics.reporting_enabled = false;
|
||||
};
|
||||
};
|
||||
prometheus.exporters.graphite.enable = true;
|
||||
# Configure keymap
|
||||
xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.mounts =
|
||||
let
|
||||
nfs = name: {
|
||||
what = "nas1.shire-zebra.ts.net:/mnt/all/${name}";
|
||||
type = "nfs";
|
||||
name = "${name}.mount";
|
||||
where = "/${name}";
|
||||
requires = [ "tailscaled-autoconnect.service" ];
|
||||
after = [ "tailscaled-autoconnect.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
mountConfig.Options = "_netdev,noexec,ro,timeo=50,retrans=5,soft";
|
||||
};
|
||||
in
|
||||
[
|
||||
(nfs "music")
|
||||
(nfs "photos")
|
||||
(nfs "video")
|
||||
];
|
||||
|
||||
users.users = {
|
||||
greg.extraGroups = [ "vboxusers" ];
|
||||
|
||||
jellyfin.extraGroups = [
|
||||
"video"
|
||||
"render"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"usbhid"
|
||||
"uas"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/d4ac74f7-62bb-421a-aad8-566277c9d8ba";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/1F51-B638";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/chain" = {
|
||||
device = "/dev/sda1";
|
||||
fsType = "xfs";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (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.enp0s20f0u4u4u2.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
Reference in New Issue
Block a user