{ inputs, outputs, pkgs, ... }:

{
	imports = [
		./hardware-configuration.nix

		../../modules/system
	];

  settings = {
		hostname = "ti-clt-dsk01";
    display-manager = "cosmic-greeter";
    desktop-environments = {
      cosmic.enable = true;
      hyprland.enable = false;
      gnome.enable = false;
      niri.enable = true;
    };
    applications = {
      common.enable = true;
      steam.enable = true;
      thunar.enable = false;
    };
    services = {
      docker.enable = true;
      quickemu.enable = false;
      sunshine.enable = true;
      garbage-collection.enable = true;
			ssh.enable = true;
    };
    hardware = {
      fprint.enable = false;
      printing.enable = true;
      bluetooth.enable = true;
      firewall.enable = true;
      locale.enable = true;
      nvidia.enable = true;
    };
  };

	# Users
	users.users.xeovalyte = {
		isNormalUser = true;
		description = "Timo Boomers";
		extraGroups = [ "wheel" ];
	};

	# Boot
  boot.loader.efi.canTouchEfiVariables = true;
  boot.loader.grub = {
    enable = true;
    efiSupport = true;
    device = "nodev";
  };

	# Networking
	networking.interfaces.enp7s0.wakeOnLan.enable = true;
  networking.hosts = {
    "192.168.100.118" = [
      "tbmrs.nl"
      "auth.tbmrs.nl"
      "git.tbmrs.nl"
      "photos.tbmrs.nl"
      "home.tbmrs.nl"
      "uptime.tbmrs.nl"
      "share.tbmrs.nl"
      "files.tbmrs.nl"
      "mail.tbmrs.nl"
      "vault.local.tbmrs.nl"
      "paperless.local.tbmrs.nl"
      "monitor.local.tbmrs.nl"
      "syncthing.local.tbmrs.nl"
      "home-assistant.local.tbmrs.nl"
      "tasks.local.tbmrs.nl"
      "links.local.tbmrs.nl"
      "stream.local.tbmrs.nl"
    ];
  };

  # Setup nfs share
  services.nfs = {
    server = {
      enable = true;
      exports = ''
        /export 192.168.100.0/24(rw,fsid=0,no_subtree_check)
        /export/wrb 192.168.100.0/24(rw,nohide,no_subtree_check)
      '';
    };
  };
  networking.firewall.allowedTCPPorts = [ 2049 ];

  # Temp keyboard override
  environment.systemPackages = with pkgs; [
    via
    vial
  ];
  services.udev.packages = with pkgs; [
    via
    vial
  ];

  # manual udev override
  # services.udev.extraRules = ''
  #   KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{serial}=="*vial:f64c2b3c*", ATTRS{idVendor}=="320f", ATTRS{idProduct}=="5055", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
  # '';

  # state version
  system.stateVersion = "24.11";
}
