dns refactor

This commit is contained in:
ari committed 2026-09-26 02:41:43 -04:00
1 parent 09e2e03423
commit 045702e909
19 files changed
+118 -385

No files matched your search

@@ -1,46 +0,0 @@
# 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, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/6302dadf-57b7-4213-a7a5-2ba97f941e49";
fsType = "ext4";
};
fileSystems."/mnt/Data" =
{
device = "/dev/disk/by-uuid/b1c83d70-4d81-4d0f-a61a-38a78b943bd8";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/BBF9-1744";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [{
device = "/var/lib/swapfile";
size = 32 * 1024;
}];
boot.kernel.sysctl =
{
"kernel.unprivileged_userns_clone" = 1;
};
zramSwap.enable = true;
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
+4 -1
View File
@@ -27,7 +27,10 @@
};
networkDrives.enable = true;
};
skyg.nixos.common.containers.networks.ipvlanLab = {
enable = true;
parent = "enp6s0";
};
services.displayManager.defaultSession = "gnome";
services.displayManager.autoLogin = {
enable = true;
+12 -1
View File
@@ -1,8 +1,14 @@
{ ... }:
{ config, ... }:
let
app = config.skyg.internalNetworkingMap.apps.jellyfin;
in
{
skyg.nixos.common.container-services.jellyfin = {
enable = true;
autoUpdate.enable = true;
# networks = {
# lan = config.skyg.nixos.common.containers.networks.ipvlanLab.compose;
# };
services.jellyfin = {
image = "jellyfin/jellyfin";
deploy.resources.reservations.devices = [
@@ -17,6 +23,11 @@
"torrents:/torrents"
"family-videos:/family-videos"
];
# networks = {
# lan = {
# ipv4_address = app.ip;
# };
# };
devices = [ "/dev/dri:/dev/dri" ];
restart = "always";
healthcheck = {
@@ -1,64 +0,0 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "ohci_pci" "ehci_pci" "pata_atiixp" "xhci_pci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.loader.grub = {
enable = true;
device = "/dev/sda"; # install GRUB to MBR
efiSupport = false;
};
fileSystems."/" =
{
device = "/dev/disk/by-uuid/5bf4a352-412f-47e1-9455-68f3aa629722";
fsType = "btrfs";
options = [ "subvol=@root" "compress=zstd" "noatime" ];
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/ccc80fd2-b38b-412b-9988-12a3194a5b57";
fsType = "ext4";
};
fileSystems."/var" =
{
device = "/dev/disk/by-uuid/5bf4a352-412f-47e1-9455-68f3aa629722";
fsType = "btrfs";
options = [ "compress=zstd" "subvol=@var" "noatime" ];
};
fileSystems."/nix" =
{
device = "/dev/disk/by-uuid/8cd6e560-4db9-4cf1-8048-27a7c6308965";
fsType = "btrfs";
options = [ "compress=zstd" "subvol=@nix" "noatime" ];
};
fileSystems."/home" =
{
device = "/dev/disk/by-uuid/6f4b2adc-5818-41ea-a4ba-720fb96b8f98";
fsType = "btrfs";
options = [ "compress=zstd" "subvol=@home" "noatime" ];
};
fileSystems."/data/fourTerra" =
{
device = "/dev/sde1";
fsType = "btrfs";
options = [ "compress=zstd" "subvol=@data" "noatime" ];
};
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
@@ -1,62 +0,0 @@
# 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, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/e903eb56-160d-4b77-ba66-ef54a18207f2";
fsType = "btrfs";
options = [ "subvol=root" ];
};
fileSystems."/home" =
{
device = "/dev/disk/by-uuid/e903eb56-160d-4b77-ba66-ef54a18207f2";
fsType = "btrfs";
options = [ "subvol=home" ];
};
fileSystems."/nix" =
{
device = "/dev/disk/by-uuid/e903eb56-160d-4b77-ba66-ef54a18207f2";
fsType = "btrfs";
options = [ "subvol=nix" ];
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/1D9A-20EC";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/data" =
{
device = "/dev/disk/by-uuid/f241ec6e-939c-4f10-bc72-3094b99de4eb";
fsType = "btrfs";
options = [ "subvol=data" ];
};
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.enp191s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp192s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
@@ -1,36 +0,0 @@
# 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") ];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.availableKernelModules =
[ "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/142c88f4-b1bc-4ed9-92ee-2c52cdfa4274";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/01FE-EDCC";
fsType = "vfat";
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/ee4a60a8-b0d1-4f5c-a554-1d1d84c89e34";
fsType = "ext4";
neededForBoot = true;
options = [ "noatime" ];
};
swapDevices = [ ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}
-1
View File
@@ -48,7 +48,6 @@ in
skyg.nixos.common.containers.networks.ipvlanLab = {
enable = true;
parent = "eno1";
ipRange = "10.0.101.16/28";
};
skyg.server.admin.enable = true;
skyg.server.exporters.enable = true;
@@ -1,31 +0,0 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/2c1a9e86-5b82-4545-bea1-c1b6b688fdf8";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/6583-1C43";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
+4 -5
View File
@@ -14,16 +14,15 @@ in
skyg.user.enable = true;
skyg.nixos.common.ssh-server.enable = true;
skyg.nixos.common.containers.networks.ipvlanLab = {
enable = true;
parent = "enp2s0";
};
skyg.server.dns.routing = {
enable = false;
openFirewall = true;
addressesSecretName = "dns-addresses.conf";
};
skyg.nixos.common.containers.networks.ipvlanLab = {
enable = true;
parent = "enp2s0";
ipRange = "10.0.101.240/28";
};
skyg.nixos.common.containers.openMetricsPort = true;
skyg.server.exporters.enable = true;
skyg.networkDrives.enable = true;
+5 -1
View File
@@ -1,10 +1,15 @@
{ config, ... }:
let
app = config.skyg.internalNetworkingMap.apps.nvr;
in
{
skyg.nixos.common.container-services.scrypted = {
enable = true;
autoUpdate.enable = true;
networks.lan = config.skyg.nixos.common.containers.networks.ipvlanLab.compose;
services.scrypted = {
image = "ghcr.io/koush/scrypted";
networks.lan.ipv4_address = app.ip;
volumes = [
"/var/run/dbus:/var/run/dbus"
"/var/run/avahi-daemon/socket:/var/run/avahi-daemon/socket"
@@ -12,7 +17,6 @@
"scrypted-nvr:/nvr"
];
environment.SCRYPTED_NVR_VOLUME = "/nvr";
network_mode = "host";
};
volumes.scrypted-nvr = {
driver = "local";
@@ -1,31 +0,0 @@
{ config, lib, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/5a468faa-b149-4ae2-9106-f0b5216d6d95";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/6CC4-8800";
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/e847bdf2-e049-428b-a203-8a1eae77ce56"; }];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
@@ -1,71 +0,0 @@
{ config, lib, pkgs, modulesPath, ... }:
let
kernel = config.boot.kernelPackages.kernel;
hddled = pkgs.stdenv.mkDerivation rec {
name = "hddled_tmj33-${version}-${kernel.version}";
version = "0.3";
src = pkgs.fetchFromGitHub {
owner = "arnarg";
repo = "hddled_tmj33";
rev = version;
sha256 = "sha256-sQ8fLK8NP5sHw/9gJTO6lqgWfwmi1G5KDwWuWujNCZw=";
};
nativeBuildInputs = kernel.moduleBuildDependencies;
# We don't want to depmod yet, just build and package the module
preConfigure = ''
sed -i 's|depmod|#depmod|' Makefile
'';
makeFlags = [
"TARGET=${kernel.modDirVersion}"
"KERNEL_MODULES=${kernel.dev}/lib/modules/${kernel.modDirVersion}"
"MODDESTDIR=$(out)/lib/modules/${kernel.modDirVersion}/kernel/drivers/misc"
];
};
in
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "usbhid" "uas" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.extraModulePackages = with pkgs.linuxPackages; [
it87
hddled
];
boot.kernelModules = [
"kvm-intel"
"coretemp"
"drivetemp"
"it87"
"hddled_tmj33"
];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/a3b275b4-96d4-4eb4-b01f-d80370899791";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/AAA7-BCE9";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/mnt/Data" =
{
device = "/dev/sda1";
fsType = "btrfs";
};
swapDevices = [ ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
nix.settings.max-jobs = 2;
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
}
@@ -2,6 +2,32 @@
# Clanker ! Do not modify this file!
#
{ config, lib, pkgs, modulesPath, ... }:
let
kernel = config.boot.kernelPackages.kernel;
hddled = pkgs.stdenv.mkDerivation rec {
name = "hddled_tmj33-${version}-${kernel.version}";
version = "0.3";
src = pkgs.fetchFromGitHub {
owner = "arnarg";
repo = "hddled_tmj33";
rev = version;
sha256 = "sha256-sQ8fLK8NP5sHw/9gJTO6lqgWfwmi1G5KDwWuWujNCZw=";
};
nativeBuildInputs = kernel.moduleBuildDependencies;
preConfigure = ''
sed -i 's|depmod|#depmod|' Makefile
'';
makeFlags = [
"TARGET=${kernel.modDirVersion}"
"KERNEL_MODULES=${kernel.dev}/lib/modules/${kernel.modDirVersion}"
"MODDESTDIR=$(out)/lib/modules/${kernel.modDirVersion}/kernel/drivers/misc"
];
};
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
@@ -18,7 +44,6 @@
"it87"
"hddled_tmj33"
];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
@@ -3,18 +3,22 @@
#
{ config, lib, pkgs, modulesPath, ... }:
{
fileSystems."/" = {
device = "/dev/disk/by-uuid/a3b275b4-96d4-4eb4-b01f-d80370899791";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/AAA7-BCE9";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/mnt/Data" = {
device = "/dev/sda1";
fsType = "btrfs";
};
fileSystems."/" =
{
device = "/dev/disk/by-uuid/a3b275b4-96d4-4eb4-b01f-d80370899791";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/AAA7-BCE9";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/mnt/Data" =
{
device = "/dev/sda1";
fsType = "btrfs";
};
swapDevices = [ ];
}