Skip to content

Instantly share code, notes, and snippets.

@ironicbadger
Last active March 10, 2024 03:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ironicbadger/e05b1e6cf9e6d27205cb3d6b08dddfaa to your computer and use it in GitHub Desktop.
Save ironicbadger/e05b1e6cf9e6d27205cb3d6b08dddfaa to your computer and use it in GitHub Desktop.
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelModules = [ "drivetemp" ];
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.extraPools = [ "nvme-appdata" "ssd4tb" ];
services.zfs.autoScrub.enable = true;
time.timeZone = "America/New_York";
users.users.alex = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" ];
};
environment.systemPackages = with pkgs; [
dig
docker-compose
figurine
gptfdisk
htop
hddtemp
intel-gpu-tools
inxi
iotop
lm_sensors
mergerfs
mc
ncdu
nmap
nvme-cli
sanoid
snapraid
tdns-cli
tmux
tree
vim
wget
smartmontools
e2fsprogs # badblocks
];
networking = {
firewall.enable = false;
hostName = "morpheus";
#hostId = "e5f8d402";
interfaces = {
eno1 = {
useDHCP = false;
ipv4.addresses = [ {
address = "10.42.1.10";
prefixLength = 20;
} ];
};
};
defaultGateway = "10.42.0.254";
nameservers = [ "10.42.0.253" ];
};
services.fwupd.enable = true;
services.openssh = {
enable = true;
settings.PasswordAuthentication = true;
settings.PermitRootLogin = "yes";
};
services.tailscale.enable = true;
virtualisation = {
docker = {
enable = true;
autoPrune = {
enable = true;
dates = "weekly";
};
};
};
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
warn-dirty = false;
};
};
system.copySystemConfiguration = true;
system.stateVersion = "23.11";
}
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "mpt3sas" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "rpool/root";
fsType = "zfs";
};
fileSystems."/home" =
{ device = "rpool/home";
fsType = "zfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/4351-DD73";
fsType = "vfat";
};
fileSystems."/mnt/jbod" =
{ device = "/mnt/disks/disk*";
fsType = "fuse.mergerfs";
options = ["defaults" "minfreespace=250G" "fsname=mergerfs-jbod"];
};
fileSystems."/mnt/disks/disk1" =
{ device = "/dev/disk/by-id/ata-WDC_WD180EDGZ-11B9PA0_2GH0M6HS-part1";
fsType = "ext4";
};
fileSystems."/mnt/disks/disk2" =
{ device = "/dev/disk/by-id/ata-WDC_WD180EDGZ-11B9PA0_2TGGDS5Z-part1";
fsType = "ext4";
};
fileSystems."/mnt/disks/disk3" =
{ device = "/dev/disk/by-id/ata-WDC_WD180EDGZ-11B9PA0_3ZGA70DZ-part1";
fsType = "ext4";
};
fileSystems."/mnt/legacy" =
{ device = "/mnt/disks/legacy*";
fsType = "mergerfs";
options = ["defaults" "minfreespace=250G" "fsname=mergerfs-legacy"];
};
fileSystems."/mnt/disks/legacy1" =
{ device = "/dev/disk/by-id/ata-WDC_WD140EDGZ-11B1PA0_Y6GX1KWC-part1";
fsType = "ext4";
};
fileSystems."/mnt/disks/legacy2" =
{ device = "/dev/disk/by-id/ata-WDC_WD120EDAZ-11F3RA0_5PJJ0K4F-part1";
fsType = "xfs";
};
fileSystems."/mnt/disks/legacy3" =
{ device = "/dev/disk/by-id/ata-WDC_WD120EDAZ-11F3RA0_5PK9EAHE-part1";
fsType = "xfs";
};
fileSystems."/mnt/disks/legacy4" =
{ device = "/dev/disk/by-id/ata-WDC_WD120EMAZ-11BLFA0_5PGENVSD-part1";
fsType = "xfs";
};
fileSystems."/mnt/disks/legacy5" =
{ device = "/dev/disk/by-id/ata-ST10000DM0004-2GR11L_ZJV5CF96-part1";
fsType = "xfs";
};
swapDevices = [ ];
networking.useDHCP = lib.mkDefault true;
networking.hostId = "7f8ded12";
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.eno2.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment