# 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")
  ];

  networking.hostId = "4488bd1a";
  networking.hostName = "telchar";
  boot = {
    initrd.availableKernelModules = [
      "nvme"
      "xhci_pci"
      "thunderbolt"
      "usbhid"
      "usb_storage"
      "sd_mod"
    ];
    initrd.kernelModules = [ "amdgpu" ];
    kernelModules = [ "kvm-amd" ];
    extraModulePackages = [ ];
  };

  swapDevices = [ ];
  virtualisation.docker.enable = true;

  hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

  # Enable Flatpak support
  services.flatpak.enable = true;

  ## Base config programs.
  programs = {
    # Enable Wireshark
    wireshark.enable = true;
    # Enable OpenJDK
    java.enable = true;
  };

  # sops
  sops.secrets = {
    "syncthing/publicCert" = {
      sopsFile = ./secrets.sops.yaml;
      owner = "jahanson";
      mode = "400";
      restartUnits = [ "syncthing.service" ];
    };
    "syncthing/privateKey" = {
      sopsFile = ./secrets.sops.yaml;
      owner = "jahanson";
      mode = "400";
      restartUnits = [ "syncthing.service" ];
    };
  };

  ## System settings and services.
  mySystem = {
    purpose = "Development";

    services.syncthing = {
      enable = true;
      user = "jahanson";
      publicCertPath = config.sops.secrets."syncthing/publicCert".path;
      privateKeyPath = config.sops.secrets."syncthing/privateKey".path;
    };

    ## Desktop Environment
    ## Gnome
    # de.gnome.enable = true;
    ## KDE
    de.kde.enable = true;

    ## Games
    games.steam.enable = true;

    ## System config
    system = {
      motd.networkInterfaces = [ "wlp1s0" ];
      fingerprint-reader-on-laptop-lid.enable = true;
    };

    framework_wifi_swap.enable = true;
    security._1password.enable = true;
  };
}