Merge zeus config

This commit is contained in:
Chris Dombroski 2024-09-20 19:43:01 -04:00
parent 2c1de27265
commit 21c2cc9136
2 changed files with 77 additions and 95 deletions

View file

@ -3,6 +3,8 @@
pkgs,
inputs,
ezModules,
modulesPath,
lib,
...
}:
let
@ -10,8 +12,7 @@ let
in
{
imports = [
# Include the results of the hardware scan.
./zeus/hardware-configuration.nix
"${modulesPath}/installer/scan/not-detected.nix"
inputs.impermanence.nixosModules.impermanence
inputs.nixos-hardware.nixosModules.supermicro
inputs.nixos-hardware.nixosModules.common-cpu-amd
@ -25,6 +26,12 @@ in
];
boot = {
initrd.availableKernelModules = [
"ohci_pci"
"ehci_pci"
"sata_nv"
"sd_mod"
];
loader = {
grub = {
enable = true;
@ -40,22 +47,86 @@ in
}
];
};
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/efi";
};
};
kernelModules = [ "kvm-amd" ];
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
};
fileSystems = {
"/" = {
device = "none";
fsType = "tmpfs";
options = [
"defaults"
"mode=755"
];
};
"/persist" = {
device = "zroot/root";
fsType = "zfs";
neededForBoot = true;
};
"/boot" = {
device = "zboot/boot";
fsType = "zfs";
};
"/home" = {
device = "zroot/home";
fsType = "zfs";
};
"/nix" = {
device = "zroot/nix";
fsType = "zfs";
};
"/var" = {
device = "zroot/var";
fsType = "zfs";
};
"/video-data" = {
device = "rpool/video-data";
fsType = "zfs";
};
"/efi" = {
device = "/dev/disk/by-uuid/6ED6-2ED0";
fsType = "vfat";
options = [ "nofail" ];
};
"/efi1" = {
device = "/dev/disk/by-uuid/6A4C-BAFE";
fsType = "vfat";
options = [ "nofail" ];
};
};
swapDevices = [
{ device = "/dev/disk/by-uuid/aecf6400-9c9f-43f9-8c57-08f3c8a633e7"; }
{ device = "/dev/disk/by-uuid/3fca7d18-441c-4f39-adad-ffd882b1f210"; }
];
sops = {
secrets."tailscale/authkey" = { };
templates."docker.env".content = ''
TAILSCALE_AUTHKEY=${config.sops.placeholder."tailscale/authkey"}
'';
};
networking.hostName = "zeus"; # Define your hostname.
networking.hostId = "9e95b576";
networking = {
hostName = "zeus"; # Define your hostname.
hostId = "9e95b576";
};
systemd.services = {
recyclarr = {
script = "${pkgs-unstable.recyclarr}/bin/recyclarr sync";
@ -406,6 +477,7 @@ in
];
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
users.users.nixremote = {
description = "User for remote builds";
isNormalUser = true;
@ -414,7 +486,7 @@ in
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH7rvqA2VG9kOPHBNgfna0YA+jEjIR6ZAKrdgWVWQjCV root@orangepihole"
];
};
nix.settings.trusted-users = ["nixremote" ];
nix.settings.trusted-users = [ "nixremote" ];
environment = {
systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.

View file

@ -1,90 +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 = [
"ohci_pci"
"ehci_pci"
"sata_nv"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "none";
fsType = "tmpfs";
options = [
"defaults"
"mode=755"
];
};
fileSystems."/persist" = {
device = "zroot/root";
fsType = "zfs";
neededForBoot = true;
};
fileSystems."/boot" = {
device = "zboot/boot";
fsType = "zfs";
};
fileSystems."/home" = {
device = "zroot/home";
fsType = "zfs";
};
fileSystems."/nix" = {
device = "zroot/nix";
fsType = "zfs";
};
fileSystems."/var" = {
device = "zroot/var";
fsType = "zfs";
};
fileSystems."/video-data" = {
device = "rpool/video-data";
fsType = "zfs";
};
fileSystems."/efi" = {
device = "/dev/disk/by-uuid/6ED6-2ED0";
fsType = "vfat";
options = [ "nofail" ];
};
fileSystems."/efi1" = {
device = "/dev/disk/by-uuid/6A4C-BAFE";
fsType = "vfat";
options = [ "nofail" ];
};
swapDevices = [
{ device = "/dev/disk/by-uuid/aecf6400-9c9f-43f9-8c57-08f3c8a633e7"; }
{ device = "/dev/disk/by-uuid/3fca7d18-441c-4f39-adad-ffd882b1f210"; }
];
# 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 false;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}