{
  config,
  pkgs,
  inputs,
  ...
}: {
  security.pam.services.gdm.enableGnomeKeyring = true;
  # Enable the X11 windowing system.
  hardware.opengl.driSupport32Bit = true;
  hardware.bluetooth.enable = true;
  hardware.pulseaudio.enable = false;
  services.blueman.enable = true;
  programs.partition-manager.enable = true;

  networking = {
    networkmanager.enable = true;
  };

  systemd.services.NetworkManager-wait-online = {
    serviceConfig = {
      ExecStart = ["" "${pkgs.networkmanager}/bin/nm-online -q"];
    };
  };

  security.pam.services.swaylock = {};

  age.secrets = {
    age_identity = {
      file = ../../../secrets/age_identity.age;
      owner = config.users.users.daniel.name;
    };
    minisign_private_key = {
      file = ../../../secrets/minisign_private_key.age;
      owner = config.users.users.daniel.name;
    };
  };

  fonts = {
    packages = with pkgs; [
      fraunces
      noto-fonts
      noto-fonts-cjk
      noto-fonts-emoji
      (nerdfonts.override {fonts = ["Iosevka"];})
      ubuntu_font_family
    ];

    fontDir.enable = true;
  };

  programs = {
    hyprland.enable = true;

    steam = {
      enable = true;
    };
  };

  services = {
    gnome.gnome-keyring.enable = true;

    pipewire = {
      enable = true;
      pulse.enable = true;
      wireplumber.enable = true;
    };

    udev = {
      packages = [
        (
          pkgs.writeTextFile {
            name = "ub";
            text = builtins.readFile ./50-qmk.rules;
            destination = "/etc/udev/rules.d/50-qmk.rules";
          }
        )
      ];
      extraRules = ''
        # Raspberry Pi Picoprobe
        SUBSYSTEM="usb", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0003", MODE="0666"
      '';
    };

    udisks2.enable = true;

    xserver = {
      enable = true;
      layout = "gb";

      libinput = {
        enable = true;
        mouse = {
          accelProfile = "flat";
          accelSpeed = "1";
        };
      };

      displayManager = {
        gdm = {
          enable = true;
        };
      };
    };
  };
}
