{ config, pkgs, lib, ... }:
{
  # Bootloader
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  #boot.kernel.sysctl."vm.swappiness" = lib.mkDefault 10; # 0-100, commonly 60

  # for testing only, not for building
  boot.binfmt.addEmulatedSystemsToNixSandbox = false;
  boot.binfmt.emulatedSystems = [
    "aarch64-linux"
    "armv7l-linux"
    "riscv64-linux"
    "x86_64-windows"
  ];
  #nix.settings.system = "x86_64-linux";
  #nix.settings.extra-platforms = [ "i686-linux" ];

  imports = [
    ./hardware-configuration.nix
    ../../../profiles/sshd.nix
    #../../../profiles/no-suspend.nix
    ../../../profiles/oci/podman.nix
    #../../../profiles/oci/docker.nix
    ../../../profiles/oci/distrobox.nix

    ../../../users/pbsds
    ../../../users/pbsds/syncthing.nix

    #../../../profiles/mounts/freon-nfs.nix
    #../../../profiles/mounts/reidun-nfs.nix
    #../../../profiles/mounts/meconium-nfs.nix

    ../../../profiles/shell.nix


    ../../../profiles/desktop
    ../../../profiles/desktop/gnome # configures gdm
    #../../../profiles/desktop/sound/alsa.nix
    #../../../profiles/desktop/sound/pulseaudio.nix
    ../../../profiles/desktop/sound/pipewire.nix

    ../../../profiles/desktop/steam.nix
    #../../../profiles/desktop/xboxdrv.nix # TODO: try out
    ../../../profiles/desktop/lutris.nix
    ../../../profiles/desktop/flatpak.nix
    ../../../profiles/desktop/waydroid.nix

    ../../../profiles/printing.nix

    ../../../profiles/known-hosts.nix
  ];

  environment.systemPackages = with pkgs; [
    krita
  ];

  time.timeZone = null; # allows imperative configuring

  networking.firewall.allowedTCPPorts = [ 57621 ]; # spotify local discovery

  hardware.bluetooth.enable = true;

  # services.irqbalance.enable = true; # different balancer, avoids freezes, god for old laptops

  # Networking
  networking.networkmanager.enable = true;
  #networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.
  #networking.useDHCP = true;
  #TODO: avahi? resolved? https://git.pvv.ntnu.no/Drift/pvv-nixos-config/src/main/base.nix#L15-L18

  # TODO: remove? Move?
  programs.dconf.enable = true;
}