# 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" "uas" "usbhid" "sd_mod" ];
  boot.initrd.kernelModules = [ ];
  boot.kernelModules = [ "kvm-amd" ];
  boot.extraModulePackages = [ ];

  fileSystems."/" =
    { device = "rpool/root";
      fsType = "zfs";
      neededForBoot = true;
    };

  fileSystems."/nix" =
    { device = "rpool/nix";
      fsType = "zfs";
      neededForBoot = true;
    };

  fileSystems."/tmp" =
    { device = "rpool/tmp";
      fsType = "zfs";
      neededForBoot = true;
    };

  fileSystems."/var" =
    { device = "rpool/var";
      fsType = "zfs";
      neededForBoot = true;
    };

  fileSystems."/mnt/data" =
    { device = "tank/data";
      fsType = "zfs";
      neededForBoot = true;
    };

  fileSystems."/boot" =
    { device = "/dev/disk/by-uuid/69DD-1C3C";
      fsType = "vfat";
      neededForBoot = true;
    };

  fileSystems."/home" =
    { device = "hpool/home";
      fsType = "zfs";
      neededForBoot = true;
    };

  # Stupid filesystems i need to mount often
  fileSystems."/mnt/walkman" =
    { device = "/dev/disk/by-uuid/A0F4-58DE";
      neededForBoot = false;
      options = [
          "noauto"
          "rw"
          "user"
      ];
    };

  fileSystems."/mnt/sdb" =
    { device = "/dev/sdb1";
      neededForBoot = false;
      options = [
          "noauto"
          "rw"
          "user"
      ];
    };

  swapDevices =
    [ { device = "/dev/disk/by-uuid/e259a78e-fe34-495a-91f2-bfe23d1befad"; }
    ];

  # 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.enp14s0.useDHCP = lib.mkDefault true;
  # networking.interfaces.wlp15s0.useDHCP = lib.mkDefault true;

  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
  hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
