# 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,
  ...
}:
let
  defeaultBtrfsOptions = [
    "compress=zstd"
    "autodefrag"
  ];
in
{
  imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];

  fileSystems."/" = {
    device = "none";
    fsType = "tmpfs";
    options = [
      "defaults"
      "size=25%"
      "mode=755"
    ];
  };

  fileSystems."/nix" = {
    device = "/dev/disk/by-uuid/c6cf43cb-d0d2-4111-bc81-994e41b2632d";
    fsType = "btrfs";
    options = [
      "subvol=nix"
      "noatime"
    ]
    ++ defeaultBtrfsOptions;
  };

  fileSystems."/etc" = {
    device = "/dev/disk/by-uuid/c6cf43cb-d0d2-4111-bc81-994e41b2632d";
    fsType = "btrfs";
    options = [
      "subvol=etc"
      "noatime"
    ]
    ++ defeaultBtrfsOptions;
  };

  fileSystems."/root" = {
    device = "/dev/disk/by-uuid/c6cf43cb-d0d2-4111-bc81-994e41b2632d";
    fsType = "btrfs";
    options = [
      "subvol=root"
      "noatime"
    ]
    ++ defeaultBtrfsOptions;
  };

  fileSystems."/var/log" = {
    device = "/dev/disk/by-uuid/c6cf43cb-d0d2-4111-bc81-994e41b2632d";
    fsType = "btrfs";
    options = [
      "subvol=log"
      "noatime"
    ]
    ++ defeaultBtrfsOptions;
  };

  fileSystems."/home" = {
    device = "/dev/disk/by-uuid/c6cf43cb-d0d2-4111-bc81-994e41b2632d";
    fsType = "btrfs";
    options = [
      "subvol=home"
    ]
    ++ defeaultBtrfsOptions;
  };

  fileSystems."/boot" = {
    device = "/dev/disk/by-uuid/216E-A7AC";
    fsType = "vfat";
  };

  swapDevices = [
    {
      device = "/dev/disk/by-id/nvme-Samsung_SSD_980_PRO_1TB_S5P2NS0T307907H-part2";
      randomEncryption.enable = true;
    }
  ];

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

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