diff options
| author | Miran Bastaja <miran.bastaja04@gmail.com> | 2024-04-06 20:08:58 +0200 |
|---|---|---|
| committer | Miran Bastaja <miran.bastaja04@gmail.com> | 2024-04-06 20:39:25 +0200 |
| commit | 661d4964d99a0a5cbab358643c6a271422e0d001 (patch) | |
| tree | 9ebc3d6316a1333a39b9817acb3753d8cdbfff7f /share/hm-modules/hyprdesktop.nix | |
| parent | 1c716c86fd1f038e2e0a566593ba04676628b5e8 (diff) | |
Programming Feng Shui praxis
Diffstat (limited to 'share/hm-modules/hyprdesktop.nix')
| -rw-r--r-- | share/hm-modules/hyprdesktop.nix | 189 |
1 files changed, 188 insertions, 1 deletions
diff --git a/share/hm-modules/hyprdesktop.nix b/share/hm-modules/hyprdesktop.nix index ffcd441..1b6fe96 100644 --- a/share/hm-modules/hyprdesktop.nix +++ b/share/hm-modules/hyprdesktop.nix @@ -1 +1,188 @@ -{ } +{ 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 { + 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 + unzip + gnutar + unrar-wrapper + # Useful nix tooling + nix-tree + fzf + + # 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 + + # 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. + gnome3.adwaita-icon-theme + ] ++ lists.optionals cfg.hasBluetooth [ overskride ] + ++ lists.optionals cfg.enableGaming [ + jdk17_headless + superTuxKart + wineWowPackages.full + winetricks + ] + ++ 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.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"; + }; + }; + + 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"; + }; + }; + }; +} |
