#
#  Specific system configuration settings for desktop
#
#  flake.nix
#   ├─ ./hosts
#   │   └─ ./laptop
#   │        ├─ default.nix *
#   │        └─ hardware-configuration.nix       
#   └─ ./modules
#       ├─ ./desktop
#       │   └─ ./hyprland
#       │       └─ hyprland.nix
#       ├─ ./modules
#       │   └─ ./programs
#       │       └─ waybar.nix
#       └─ ./hardware
#           └─ default.nix
#

{ config, pkgs, user, agenix, impermanence, ... }:

{
  imports =                                                         # For now, if applying to other system, swap files
    [(import ./hardware-configuration.nix)] ++                      # Current system hardware config @ /etc/nixos/hardware-configuration.nix
    [(import ../../modules/wm/virtualisation/docker.nix)] ++   # Docker
    [(import ../../modules/wm/virtualisation/kvm-intel.nix)] ++   # Docker
    (import ../../modules/services/dmz);                       # Server Services

  boot = {                                  # Boot options
    kernelPackages = pkgs.linuxPackages_latest;

    loader = {                              # EFI Boot
      systemd-boot.enable = true;
      efi = {
        canTouchEfiVariables = true;
        efiSysMountPoint = "/boot";
      };
      timeout = 1;                          # Grub auto select time
    };
  };

  programs = {                              # No xbacklight, this is the alterantive
    zsh.enable = true;
  };

  services = {
    qemuGuest.enable = true;
    avahi = {                               # Needed to find wireless printer
      enable = true;
      nssmdns4 = true;
      publish = {                           # Needed for detecting the scanner
        enable = true;
        addresses = true;
        userServices = true;
      };
    };
  };

}