{ config, pkgs, lib, ... }: let inherit (lib) mkIf mkOption mkEnableOption types mdDoc lists ; cfg = config.custom.hyprdesktop; in { imports = [ ../home/minimal.nix ]; options.custom.hyprdesktop = { enable = mkEnableOption "Enable hyprdesktop"; mainUser = mkOption { type = types.str; example = "alice"; description = mdDoc "Main superuser's username."; }; hasBluetooth = mkOption { type = types.bool; default = false; example = "true"; }; hasBrightnessCtl = mkOption { type = types.bool; default = false; example = "true"; }; hasBattery = mkOption { type = types.bool; default = false; example = "true"; }; enableGaming = mkOption { type = types.bool; default = false; example = "true"; }; enableWindowsCompat = mkOption { type = types.bool; default = false; example = "true"; }; enableGitAnnex = mkOption { type = types.bool; default = true; example = "false"; }; }; config = mkIf cfg.enable { wayland.windowManager.hyprland.enable = true; home.packages = with pkgs; [ xh # Nice to use HTTP client bc # CLI calculator amfora # Gemini CLI browser trashy # Trash CLI tokei # counts lines of code btop # modern top wireplumber # session & policy manager for pipewire grim # screenshot utility for wayland slurp # region selection UI for wayland wl-clipboard # clipboard utility nushell # next-generation shell ffmpeg imagemagick exiftool sl jaq # json query tool mullvad # tools for dealing with all sorts archives atool zip unzip gnutar unrar-wrapper gzip # Useful nix tooling nix-tree fzf # other random CLI's wget pup oil xdg-utils ts # task spooler - better job control # Developer stuff git gitui clang clangStdenv tinycc gnumake cmake go python3 lua (rust-bin.selectLatestNightlyWith (toolchain: toolchain.default)) # TUI/GUI programs cmus # music player calibre # Document organisation/reading program libreoffice-qt beekeeper-studio # SQL database client thunderbird # email client nsxiv # image viewer discord signal-desktop tdesktop # Telegram desktop fluffychat # matrix client qbittorrent # bittorrent client zathura # document reader bitwarden # password manager heroic # FOSS game launcher for GOG & Epic foliate prismlauncher # Other # It seems that not all gtk icon themes contain all icons? At least the # Flat-Remix icon themes don't contain all the icons that Foliate uses, # so I'm bringing in the adwaita icons as a fallback. adwaita-icon-theme ] ++ lists.optionals cfg.hasBluetooth [ overskride ] ++ lists.optionals cfg.enableGaming [ jdk17_headless superTuxKart wineWowPackages.full winetricks itch ] ++ lists.optionals (cfg.enableWindowsCompat || cfg.enableGaming) [ wineWowPackages.full winetricks qemu_kvm ] ++ lists.optionals cfg.hasBrightnessCtl [ brightnessctl ] ++ lists.optionals cfg.enableGitAnnex [ git-annex git-remote-gcrypt ]; home.shellAliases = { sl = "sl -awFc5"; }; services.dunst.enable = true; services.wpaperd.enable = true; services.poweralertd.enable = cfg.hasBattery; programs.mpv.enable = true; programs.git.enable = true; programs.kitty.enable = true; programs.waybar.enable = true; programs.firefox.enable = true; programs.tofi.enable = true; programs.gallery-dl.enable = true; programs.fish.enable = true; programs.eza.enable = true; programs.starship.enable = true; programs.atuin.enable = true; programs.nix-index.enable = true; programs.zoxide.enable = true; programs.direnv = { enable = true; nix-direnv.enable = true; }; programs.helix = { enable = true; defaultEditor = true; }; xdg = { systemDirs.data = let gds = pkgs.gsettings-desktop-schemas; gtk3 = pkgs.gtk3; in [ "${gds}/share/gsettings-schemas/${gds.name}" "${gtk3}/share/gsettings-schemas/${gtk3.name}" ]; userDirs = let annex = "${config.home.homeDirectory}/Annex"; in { enable = true; createDirectories = true; } // mkIf cfg.enableGitAnnex { pictures = "${annex}/Pictures"; music = "${annex}/Music"; documents = "${annex}/Documents"; }; portal.xdgOpenUsePortal = true; }; gtk = { theme = { package = pkgs.flat-remix-gtk; name = "Flat-Remix-GTK-Blue-Darkest"; }; iconTheme = { package = pkgs.flat-remix-icon-theme; name = "Flat-Remix-Blue-Dark"; }; }; }; }