{
  inputs,
  pkgs,
  lib,
  ...
}: {
  environment = {
    systemPackages = builtins.attrValues {
      inherit
        (pkgs)
        nil
        statix
        deadnix
        alejandra
        ;
    };
  };

  alqueva = {
    programs = {
      swaybg = {
        enable = true;
        wallpaper = inputs.wallpkgs.wallpapers.everforest-foggy_valley_1.path;
      };
      waybar = {
        enable = true;
        package = pkgs.waybar;
      };
      sleep-or-die = {
        enable = true;
        title = "It's bed time, lil bro.";
        message = "Go to bed now vro... you don't want to see a nice guy lose his temper... You have one hour.";
        image = ../../media/king_von.png;
        sound = ../../media/majoras_mask_bell.wav;
      };
      direnv.enable = true;
      git.enable = true;
      openssh.enable = true;
    };
    shells = {
      nushell = {
        enable = true;
        package = pkgs.amadaluzian-nu;
      };
      xonsh = {
        enable = true;
        package = pkgs.amadaluzian-xonsh;
      };
    };
    system.pipewire.enable = true;
    wms.niri.enable = true;
  };

  programs.nh = {
    enable = true;
    clean.enable = true;
    package = pkgs.symlinkJoin {
      name = "nh";
      paths = [
        pkgs.nh
      ];
      nativeBuildInputs = [
        pkgs.makeWrapper
      ];
      postBuild = ''
        wrapProgram $out/bin/nh \
          --set FLAKE "/home/artur/.config/nixos"
      '';
      meta = {inherit (pkgs.nh.meta) mainProgram;};
    };
  };

  services = {
    deluge = {
      enable = true;
      web.enable = false;
    };
    rsyncd.enable = true;
    emacs = {
      enable = true;
      package = inputs.pankomacs.packages.${pkgs.system}.pgtk;
      startWithGraphical = true;
      install = true;
      defaultEditor = true;
    };
  };

  programs.git.config = {
    gpg.format = "ssh";
    user = {
      email = "amad@atl.tools";
      name = "Artur Manuel";
      signingKey = "~/.ssh/id_ed25519.pub";
    };
  };

  nix.gc.automatic = lib.mkForce false;

  xdg.mime = {
    enable = true;
    defaultApplications = {
      "text/html" = ["org.qutebrowser.qutebrowser.desktop"];
      "x-scheme-handler/http" = ["org.qutebrowser.qutebrowser.desktop"];
      "x-scheme-handler/https" = ["org.qutebrowser.qutebrowser.desktop"];
    };
  };
}
