{ config, lib, pkgs, options, ... }: { imports = [ ./components ./window-managers ]; options.desktop = { accent = lib.mkOption { description = "The accent colour to use from catppuccin"; default = "blue"; type = with lib.types; enum [ "blue" "pink" ]; }; windowManager = lib.mkOption { description = "Which window manager to use"; default = null; type = with lib.types; nullOr (enum [ ]); }; }; config = { fonts.fontconfig.enable = true; home = { file."Pictures/wallpaper.jpg" = { enable = (config.desktop.windowManager != null); source = ./wallpaper-${config.desktop.accent}.jpg; }; packages = with pkgs; [ brightnessctl fira-code keepassxc nerd-fonts.fira-code ]; }; programs = { foot = { enable = lib.mkDefault (config.desktop.windowManager != null); settings = { bell = { notify = true; urgent = true; }; colors = { background = "1e1e2e"; cursor = "11111b f5e0dc"; foreground = "cdd6f4"; regular0 = "45475a"; regular1 = "f38ba8"; regular2 = "a6e3a1"; regular3 = "f9e2af"; regular4 = "89b4fa"; regular5 = "f5c2e7"; regular6 = "94e2d5"; regular7 = "bac2de"; bright0 = "585b70"; bright1 = "f38ba8"; bright2 = "a6e3a1"; bright3 = "f9e2af"; bright4 = "89b4fa"; bright5 = "f5c2e7"; bright6 = "94e2d5"; bright7 = "a6adc8"; "16" = "fab387"; "17" = "f5e0dc"; jump-labels = "11111b fab387"; search-box-match = "cdd6f4 313244"; search-box-no-match = "11111b f38ba8"; selection-background = "414356"; selection-foreground = "cdd6f4"; urls = "89b4fa"; }; cursor.blink = true; main = { dpi-aware = lib.mkDefault true; font = lib.mkDefault "FiraCode Nerd Font Mono:size=8"; }; mouse.hide-when-typing = true; }; }; librewolf = { enable = lib.mkDefault (config.desktop.windowManager != null); profiles = { # sidebar visibility keeps getting reset when launching the browser. default.settings."sidebar.visibility" = "hide-sidebar"; noRFP = { id = 1; settings = { "privacy.resistFingerprinting" = false; "sidebar.visibility" = "hide-sidebar"; "webgl.disabled" = false; }; }; }; settings = { "browser.uidensity" = 1; "sidebar.animation.enabled" = false; "sidebar.new-sidebar.has-used" = true; "sidebar.verticalTabs" = true; }; }; }; }; }