# home-manager/fred.nix { config, pkgs, lib, inputs, osConfig, ... }: let isDesktop = lib.elem osConfig.networking.hostName [ "FredOS-Gaming" "FredOS-Macbook" ]; in { home.stateVersion = "25.11"; home.packages = with pkgs; [ # ]; home.file.".config/nixpkgs/config.nix".text = '' { allowUnfree = true; } ''; # Wallpaper source — consumed by stylix's image option (set in # settings/stylix.nix) and by quickshell's wallpaper layer. home.file.".local/share/backgrounds/wallpaper.png".source = "${inputs.self}/walls/wallpaper.png"; # btop — stylix's btop target writes the colour theme; we keep our # non-colour preferences here. programs.btop = { enable = true; settings = { theme_background = false; vim_keys = false; proc_filter_kernel = true; }; }; # ── Yazi — TUI file manager, Super+E ────────────────────────────────── # Not themed per wallpaper, on purpose: it draws with the terminal's 16 # ANSI colours, so it inherits ghostty's palette the instant theme-apply # reloads it — no per-wallpaper files, no restart, and none of the # full-reflow jank a GTK theme switch causes. # # It cannot drag a file into a browser: a TUI has no wayland surface, so # it can never start a drag. Nemo stays installed for that. programs.yazi = lib.mkIf isDesktop { enable = true; enableFishIntegration = true; # Off by default; yazi is keyboard-first. settings.mgr.mouse_events = [ "click" "scroll" ]; # Colour NAMES, not hex — the whole point. "reset" means the terminal's # own fg/bg, and the eight names map onto ghostty's palette, which our # ghostty.conf fills from the wallpaper: # black=base00 red=base08 green=base0B yellow=base0A # blue=base0D (accent) magenta=base0E cyan=base0C # gray=base05 (text) darkgray=base03 (borders) theme = let accent = "blue"; dim = "darkgray"; text = "gray"; on = c: { fg = "black"; bg = c; }; fg = c: { fg = c; }; both = c: { fg = c; bg = c; }; in { mgr = { cwd = fg accent; find_keyword = { fg = "green"; bold = true; }; find_position = fg "magenta"; marker_selected = both "yellow"; marker_copied = both "green"; marker_cut = both "red"; border_style = fg dim; count_copied = on "green"; count_cut = on "red"; count_selected = on "yellow"; }; indicator.current = { bg = dim; bold = true; }; tabs = { active = (on accent) // { bold = true; }; inactive = { fg = accent; bg = "black"; }; }; mode = { normal_main = (on accent) // { bold = true; }; normal_alt = { fg = accent; bg = "black"; }; select_main = (on "green") // { bold = true; }; select_alt = { fg = "green"; bg = "black"; }; unset_main = (on "yellow") // { bold = true; }; unset_alt = { fg = "yellow"; bg = "black"; }; }; status = { progress_label = fg text; progress_normal = fg text; progress_error = fg "red"; perm_type = fg accent; perm_read = fg "yellow"; perm_write = fg "red"; perm_exec = fg "green"; perm_sep = fg "cyan"; }; pick = { border = fg accent; active = fg "magenta"; inactive = fg text; }; input = { border = fg accent; title = fg text; value = fg text; selected.bg = dim; }; completion = { border = fg accent; active = { fg = "magenta"; bg = dim; }; inactive = fg text; }; tasks = { border = fg accent; title = fg text; hovered = { fg = text; bg = dim; }; }; which = { mask.bg = "black"; cand = fg "cyan"; rest = fg "yellow"; desc = fg text; separator_style = fg dim; }; help = { on = fg "magenta"; run = fg "cyan"; desc = fg text; hovered = { fg = text; bg = dim; }; footer = fg text; }; filetype.rules = [ { mime = "image/*"; fg = "cyan"; } { mime = "video/*"; fg = "yellow"; } { mime = "audio/*"; fg = "yellow"; } { mime = "application/zip"; fg = "magenta"; } { mime = "application/gzip"; fg = "magenta"; } { mime = "inode/directory"; fg = accent; bold = true; } { name = "*"; fg = "reset"; } ]; }; }; # Ghostty — stylix's ghostty target writes the colour theme. programs.ghostty = lib.mkIf isDesktop { enable = true; settings = { font-family = "CaskaydiaCove NF"; font-size = 11; font-thicken = true; window-padding-x = 10; window-padding-y = 10; window-padding-balance = true; background-opacity = 0.98; confirm-close-surface = false; gtk-titlebar = false; gtk-single-instance = true; # keeps the warm instance alive with zero windows quit-after-last-window-closed = false; cursor-style = "bar"; cursor-style-blink = true; }; }; # Warm Ghostty instance — new windows attach via gtk-single-instance. systemd.user.services.ghostty-daemon = lib.mkIf isDesktop { Unit = { Description = "Ghostty warm instance (no window)"; After = [ "graphical-session.target" ]; PartOf = [ "graphical-session.target" ]; }; Service = { Type = "simple"; ExecStart = "${pkgs.ghostty}/bin/ghostty --initial-window=false"; Restart = "always"; }; Install.WantedBy = [ "graphical-session.target" ]; }; }