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WWR7DZNHDQC DSTJZR46W6HWZSHMT3B33WRSTJZ5BUICMJYHYG4BLMEZKG2HHAKQC { config, lib, ... }: letinherit (lib) last mkConst mkValue splitString;in {options = {os = mkConst <| last <| splitString "-" config.nixpkgs.hostPlatform.system;isLinux = mkConst <| config.os == "linux";isDarwin = mkConst <| config.os == "darwin";type = mkValue "server";};}isDesktop = mkConst <| config.type == "desktop";isServer = mkConst <| config.type == "server";isDesktopNotWsl = mkConst <| config.isDesktop && !config.isWsl;isGaming = mkValue false;isWsl = mkValue false;
{config.flake.modules.nixosModules.settings ={ pkgs, ... }:{networking.networkmanager = {enable = true;wifi.powersave = false;};users.users.jam.extraGroups = [ "networkmanager" ];# Bluetooth support.hardware.bluetooth = {enable = true;powerOnBoot = true;};services.blueman.enable = true;environment.systemPackages = [pkgs.lshw # Hardware info.pkgs.usbutils # USB device info.pkgs.pciutils # PCI device info.];# Network managerprograms.nm-applet.enable = true;};}
{config.flake.modules.homeModules.git ={ lib, ... }:letinherit (lib) mkDefault;in{programs.git = {enable = true;integrations.difftastic.enable = true;ignore = # .gitignore''.claude/mprocs.log'';# TODO: commit signingsettings = {user.name = "PlumJam";user.email = "git@plumj.am";init.defaultBranch = "master";log.date = "iso";column.ui = "auto";commit.verbose = true;status.branch = true;status.showStash = true;status.showUntrackedFiles = "all";push.autoSetupRemote = true;pull.rebase = true;rebase.autoStash = true;rebase.missingCommitsCheck = "warn";rebase.updateRefs = true;rerere.enabled = true;fetch.fsckObjects = true;receive.fsckObjects = true;transfer.fsckObjects = true;branch.sort = "-committerdate";tag.sort = "-taggerdate";core.compression = 9;core.preloadindex = true;# TODO# core.editor = config.environment.variables.EDITOR;core.longpaths = true;diff.algorithm = "histogram";diff.colorMoved = "default";merge.conflictStyle = mkDefault "zdiff3";commit.gpgSign = true;tag.gpgSign = true;gpg.format = "ssh";credential.helper = # .gitconfig''"!gh auth git-credential""cache --timeout 21600" # 6 hours"oauth""oauth -device"'';core.sshCommand = "ssh -i ~/.ssh/id";url."ssh://git@github.com/".insteadOf = "gh:";};};};}
inherit (lib) mkIf enabled;in mkIf config.isDesktopNotWsl {home-manager.sharedModules = [{settings = {mainBar = {};};tray = {reverse-direction = true;};pulseaudio = {default = [ "" "" "" ];};on-click-right = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";tooltip-format = "Volume: {volume}%\nClick: Open audio manager\nRight-click: Mute toggle";tooltip = true;};cpu = {};memory = {};};battery = {critical = 15;};};clock = {tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";};};};* {border: none;border-radius: 0;}#waybar {color: ${base07};}#window {color: ${base07};}#workspaces button.empty {}#workspaces button.active {color: ${base07};}color: ${base07}; /* Use highest contrast text */}#battery.critical:not(.charging) {animation-name: blink;animation-timing-function: linear;animation-iteration-count: infinite;animation-direction: alternate;color: ${base08};}@keyframes blink {to {color: ${base05};}}'';};}];}animation-name: blink;animation-timing-function: linear;animation-iteration-count: infinite;animation-direction: alternate;}#cpu.warning, #memory.warning, #disk.warning, #custom-gpu.warning {color: ${base0A};animation-duration: ${toString config.theme.duration.s.normal}s;color: ${base08};}color: ${base0A};}#cpu.critical, #memory.critical, #disk.critical, #custom-gpu.critical {#cpu.warning, #memory.warning, #disk.warning {animation-duration: ${toString config.theme.duration.s.short}s;}#cpu, #memory, #disk, #custom-gpu {min-width: 36px;margin: 0;margin-left: ${toString config.theme.margin.normal}px;padding: 0 ${toString config.theme.padding.normal}px;#tray, #pulseaudio, #cpu, #memory, #disk, #battery, #clock, #custom-gpu {background: rgba(${builtins.concatStringsSep ", " (map toString config.theme.withRgb.base00)}, 0.45) padding-box;color: ${base03};#workspaces button {}padding: 0 ${toString config.theme.padding.normal}px;border: ${toString (config.theme.border.small)}px solid transparent;border-radius: ${toString config.theme.radius.normal}px;border: ${toString (config.theme.border.small)}px solid transparent;border-radius: ${toString (config.theme.radius.big)}px;background:linear-gradient(225deg, ${base0B}, ${base09}) border-box;linear-gradient(rgba(${builtins.concatStringsSep ", " (map toString config.theme.withRgb.base00)}, ${toString config.theme.opacity.verylow}), rgba(${builtins.concatStringsSep ", " (map toString config.theme.withRgb.base00)}, ${toString config.theme.opacity.verylow})) padding-box,margin: 0;padding: 0;font-size: ${toString config.theme.font.size.small}px;font-family: "${config.theme.font.sans.name}";style = /* css */ ''interval = 1;format = " {:%Y-%m-%d | %H:%M:%S}";format-icons = [ "" "" "" "" "" "" "" "" "" "" ];tooltip = true;tooltip-format = "Battery: {capacity}%\nTime: {time}\nHealth: {health}%";states = {warning = 30;format = "{icon} {capacity}%";format-charging = " {capacity}%";format-plugged = " {capacity}%";"custom/gpu" = {exec = "bash -c 'if command -v nvidia-smi >/dev/null; then nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits | head -1; elif command -v radeontop >/dev/null; then radeontop -d - -l 1 | grep -o \"gpu [0-9]*\" | cut -d\" \" -f2; else echo \"N/A\"; fi'";interval = 5;tooltip = true;tooltip-format = "GPU Usage: {}%\nClick: Open system monitor";on-click = "kitty btop";states = {warning = 70;critical = 90;};format = " {}%";tooltip = true;tooltip-format = "Memory: {used:0.1f}G/{total:0.1f}G ({percentage}%)\nAvailable: {avail:0.1f}G";critical = 90;};critical = 90;};};disk = {path = "/";tooltip = true;tooltip-format = "Disk: {used}/{total} ({percentage_used}%)\nAvailable: {free}";interval = 300;states = {warning = 70;format = " {percentage_used}%";interval = 2;on-click = "kitty btop";states = {warning = 70;format = " {used:0.1f}G/{total:0.1f}G";tooltip = true;tooltip-format = "CPU Usage: {usage}%\nLoad: {load}";critical = 90;};interval = 2;on-click = "kitty btop";states = {warning = 70;format = " {usage}%";on-click = "pwvucontrol";format-icons = {format-source = "";format-source-muted = ""; # format = "{format_source} {icon} {volume}%";format-muted = "{format_source} ";spacing = 5;};"niri/window" = {max-length = 50;separate-outputs = true;rewrite = {"(.*) (—|-) (Zen Browser|Brave)" = " $1";"(.*) - Discord" = " $1";"(.*) — nu" = " $1";"niri/workspaces" = {format = "{index}";current-only = true;modules-right = [ "tray" "pulseaudio" "cpu" "memory" "disk" "custom/gpu" "battery" "clock" ];modules-left = [ "niri/workspaces" ];modules-center = [ "niri/window" ];layer = "top";height = config.theme.margin.big;margin-top = config.theme.margin.normal;margin-left = config.theme.margin.normal;margin-right = config.theme.margin.normal;programs.waybar = with config.theme.withHash; enabled {{ config, lib, ... }: let
{ config, lib, pkgs, ... }: letinherit (lib) enabled mkIf;in mkIf config.isDesktopNotWsl {networking.networkmanager = enabled {wifi.powersave = false;};users.users.jam.extraGroups = [ "networkmanager" ];# Bluetooth support.hardware.bluetooth = enabled {powerOnBoot = true;};services.blueman = enabled;];programs.nm-applet = enabled;}# Network managerenvironment.systemPackages = [pkgs.lshw # Hardware info.pkgs.usbutils # USB device info.pkgs.pciutils # PCI device info.
# Execute final command.let action = if $remote { $"Deploying to: ($host)" } else { "Building locally:" }let platform = if $os == "Darwin" { "Darwin" } else { "NixOS" }if not $quiet { print-notify $"($action) ($platform). Configuration for: ($host)." 50 }let final_args = if $rollback {[$host] | append $arguments} else {$final_args}};xdg.desktopEntries.rollback = {name = "Rollback";icon = "folder";exec = ''rebuild rollback'';terminal = false;};}];environment.systemPackages = [rebuildScript];}if $rollback {if not $quiet { print-notify $"Rollback for ($host) succeeded." 100 }} else {if not $quiet { print-notify $"Rebuild for ($host) succeeded." 100 }}}'';in {home-manager.sharedModules = mkIf config.isDesktopNotWsl [{xdg.desktopEntries.rebuild = {name = "Rebuild";icon = "system-run";exec = ''rebuild'';terminal = false;};xdg.desktopEntries.rebuild-plum = {name = "Rebuild plum";icon = "system-run";exec = ''rebuild --remote plum'';terminal = false;};xdg.desktopEntries.rebuild-kiwi = {name = "Rebuild kiwi";icon = "system-run";exec = ''rebuild --remote kiwi'';terminal = false;}if $remote {}} else {}for attempts in 1..($try_attempts + 1) {try {sudo NH_BYPASS_ROOT_CHECK=true NH_NO_CHECKS=true nh $command ...$final_argsbreak} catch { |e|if $attempts < $try_attempts {print-notify $"First attempt failed, retrying... (attempt ($attempts) of ($try_attempts))"} else {print-notify $"Error: Rebuild failed after ($try_attempts) attempts, run manually in a terminal."exit 1}}for attempts in 1..($try_attempts + 1) {try {NH_BYPASS_ROOT_CHECK=true NH_NO_CHECKS=true nh $command ...$final_argsbreak} catch { |e|if $attempts < $try_attempts {print-notify $"First attempt failed, retrying... (attempt ($attempts) of ($try_attempts))"} else {print-notify $"Error: Rebuild failed after ($try_attempts) attempts, run manually in a terminal."exit 1}}let command = if $rollback {"rollback"} else {if $os == "Darwin" { "darwin" } else { "os" }}# Add target-host for remote deployments.let final_args = if $remote {$base_args | append ["--target-host" $"root@($host)"]} else {$base_args}# nh os/darwin switch [flake_path] --hostname [host] -- [nix_args]let base_args = ["switch"$config_path"--hostname" $host"--accept-flake-config" # Avoid asking for y/n approval for all settings.] | append $arguments"--fallback" # Build locally if substituters fail.def --wrapped main []: nothing -> nothing {let host = if ($host | is-not-empty) {if $host != (hostname) and not $remote {if not $quiet { print-notify $"Error: Building local configuration for hostname that does not match the local machine." }exit 1}$host} else if $remote {if not $quiet { print-notify "Error: Hostname not specified for remote deployment." }exit 1} else {(hostname)}# Build locally (always).let os = (uname | get kernel-name)let config_path = if $os == "Darwin" { "/Users/jam/nixos" } else { "/home/jam/nixos" }host: string = "" # The host to build.--remote # Deploy to remote host using --target-host.--rollback # Rollback.--quiet (-q) # Run without output (for theme toggling).--try_attempts (-t): int = 0 # How many times to try the same rebuild....arguments # Extra arguments to pass to rebuild commands.}^${pkgs.libnotify}/bin/notify-send ...$args --urgency=($urgency) --expire-time=($timeout) "Rebuilder" $"($message)"}let args = if $progress >= 0 and $progress < 100 {["--hint" $"int:value:($progress)"]} else {[]let is_error = ($message | str downcase | str contains "error")let urgency = if $is_error { "critical" } else { "normal" }def print-notify [message: string, progress: int = -1] {print $"(ansi purple)[Rebuilder](ansi rst) ($message)"rebuildScript = pkgs.writeScriptBin "rebuild" /* nu */ ''#!${pkgs.nushell}/bin/nulet timeout = 5000inherit (lib) mkIf;{ pkgs, config, lib, ... }: let
{ lib, config, ... }: letin mkIf config.isDesktopNotWsl {home-manager.sharedModules = [{settings = {main = with config.theme.font; {font = "${mono.name}:size=${toString size.term}";dpi-aware = "yes";};colors = with config.theme.colors; {background = base00;foreground = base05;urls = base0D;regular0 = base00;regular1 = base08;regular2 = base0B;regular3 = base0A;regular4 = base0D;regular5 = base0E;regular6 = base0C;regular7 = base05;};};};}];}programs.foot = disabled {inherit (lib) disabled mkIf;
{ config, lib, pkgs, ... }: letinherit (lib) mkIf;helium-browser = letversion = "0.6.3.1";# I don't care about aarch64 because I have no aarch64 machines.# Keep that in mindif you're copying this.arch = if config.isLinux then {arch = "x86_64";hash = "sha256:37b2692cb39db2762ecd8ade37589a1c8f7dd8c4764ae5d39971df6ba7ddd545";} else null;inif arch == null then null elsepkgs.appimageTools.wrapType2 {pname = "helium-browser";inherit version;src = pkgs.fetchurl {url = "https://github.com/imputnet/helium-linux/releases/download/${version}/helium-${version}-${arch.arch}.AppImage";inherit (arch) hash;};};in {home-manager.sharedModules = mkIf (config.isDesktopNotWsl && helium-browser != null) [{home.packages = [ helium-browser ];xdg.desktopEntries.helium-browser = {name = "Helium Browser";icon = "helium-browser";exec = "helium-browser";terminal = false;};}];}
{ lib, config, ... }: letin {home-manager.sharedModules = mkIf config.isDesktopNotWsl [{settings = {tabs = {position = "left";show = "always";indicator.width = 2;favicons.scale = 0.8;mousewheel_switching = false;mode_on_change = "restore";};fonts.web.family = genAttrs(const (config.theme.font.sans.name));session.lazy_restore = true;auto_save.session = true;content.autoplay = false;input.insert_mode.auto_load = true;statusbar.widgets = ["progress""keypress""search_match""url""text:\:\:""scroll""text:\:\:""history""tabs"];};keyBindings.normal = {"d" = "nop";"<Space>f" = "cmd-set-text -s :open -tr";"<Space>b" = "cmd-set-text -s :tab-select";};extraConfig = ''c.tabs.padding = {"top": 0, "bottom": 0, "left": 0, "right": 0}c.url.searchengines = {"DEFAULT": "https://duckduckgo.com/?q={}","!gh": "https://github.com/search?o=desc&q={}&s=stars","!yt": "https://www.youtube.com/results?search_query={}","!rs": "https://doc.rust-lang.org/nightly/reference/?search={}","!rsby": "https://doc.rust-lang.org/rust-by-example/index.html?search={}","!ca": "https://crates.io/search?q={}",}'';};}];}"<Ctrl+s>" = "config-cycle tabs.show always never";"f" = "nop";"gw" = "hint";"K" = "tab-prev";"J" = "tab-next";};aliases = {"bc" = "tab-close";"rl" = "reload";"bp" = "tab-prev";"bn" = "tab-next";"clock""text: ""text:\:\:"colors = with config.theme.withHash; merge {webpage.darkmode.enabled = config.theme.is_dark;# Background.} <| (genAttrs [ "statusbar.command.bg" "statusbar.normal.bg" "tabs.odd.bg" "tabs.selected.even.fg" "tabs.selected.odd.fg" "tabs.pinned.selected.even.fg" "tabs.pinned.selected.odd.fg" "tabs.pinned.odd.fg" "tabs.pinned.even.fg" ](const base00)# Background 1.) // (genAttrs [ "tabs.even.bg" ](const base01)# Background 2.) // (genAttrs [ "tabs.bar.bg" ](const base02)# Foreground.) // (genAttrs [ "statusbar.command.fg" "statusbar.normal.fg" "statusbar.url.fg" "tabs.odd.fg" "tabs.even.fg" "tabs.selected.even.bg" "tabs.selected.odd.bg" "tabs.pinned.selected.even.bg" "tabs.pinned.selected.odd.bg" "statusbar.url.success.http.fg" "statusbar.url.success.https.fg" ](const base07)# Red.) // (genAttrs [ "statusbar.url.error.fg" "statusbar.url.warn.fg" "tabs.indicator.error" ](const base08)# Green.) // (genAttrs [](const base0B)# Blue.) // (genAttrs [ "statusbar.url.hover.fg" "tabs.pinned.even.bg" "tabs.pinned.odd.bg" ](const base0D));[ "sans_serif" "serif" "standard" ]fonts.default_family = config.theme.font.sans.name;prompt.radius = config.theme.radius.normal;keyhint.radius = config.theme.radius.normal;hints.radius = config.theme.radius.normal;editor.command = ["ghostty" "-e" "hx" "{file}:{line}:{column}"];completion = {height = "33%";shrink = true;cmd_history_max_items = 100000;use_best_match = true;};content.cookies.accept = "no-unknown-3rdparty";keyhint.delay = 0;messages.timeout = 5000;downloads.remove_finished = 30000;title.format = "{audio}{aligned_index}: {current_title}";title.format_pinned = "{audio}{aligned_index}: {current_title}";undo_stack_size = 1000;show_switching_delay = 3000;programs.qutebrowser = disabled {inherit (lib) disabled mkIf genAttrs const merge;
{ pkgs, lib, config, ... }: letinherit (lib) enabled mkIf mapAttrsToList;in mkIf config.isDesktopNotWsl {home-manager.sharedModules = [{programs.ghostty = enabled {clearDefaultKeybinds = true;installBatSyntax = true;settings = with config.theme; {window-padding-x = padding.small;window-padding-y = padding.small;window-decoration = false;scrollback-limit = 100 * 1024 * 1024; # 100 MiBmouse-hide-while-typing = true;confirm-close-surface = false;quit-after-last-window-closed = true;keybind = mapAttrsToList (name: value: "ctrl+shift+${name}=${value}") {c = "copy_to_clipboard";v = "paste_from_clipboard";i = "inspector:toggle";plus = "increase_font_size:1";minus = "decrease_font_size:1";equal = "reset_font_size";};};themes = with config.theme.withHash; {custom = {background = base00;cursor-color = base05;foreground = base05;selection-background = base02;selection-foreground = base00;palette = mapAttrsToList (name: value: "${name}=${value}") {"0" = base00;"1" = base01;"2" = base02;"3" = base03;"4" = base04;"5" = base05;"6" = base06;"7" = base07;"8" = base08;"9" = base09;"10" = base0A;"11" = base0B;"12" = base0C;"13" = base0D;"14" = base0E;"15" = base0F;};};};};# Desktop entry for Zellij in Fuzzel.xdg.desktopEntries.zellij-ghostty = {name = "Zellij Ghostty";icon = "ghostty";exec = "ghostty -e ${pkgs.zellij}/bin/zellij";terminal = false;};}];}theme = if config.theme.color_scheme == "pywal" then "custom" else config.theme.ghostty;font-size = font.size.term;font-family = font.mono.name;font-feature = "+calt, +liga, +dlig";
}};};];})fi; \fi; \done; \}; f'';ds = /* bash */ ''!f() { \if [ $# -eq 0 ]; then \git diff --staged; \return; \fi; \fi; \done; \}; f'';};for pattern in "$@"; do \matches=$(git ls-files | grep -i "$pattern"); \if [ -z "$matches" ]; then \echo "no files found matching \"$pattern\""; \continue; \fi; \if [ $(echo "$matches" | wc -l) -eq 1 ]; then \git diff --staged "$matches"; \else \echo "multiple matches for \"$pattern\":"; \echo "$matches"; \echo "$matches" | xargs git diff --staged; \for pattern in "$@"; do \matches=$(git ls-files | grep -i "$pattern"); \if [ -z "$matches" ]; then \echo "no files found matching \"$pattern\""; \continue; \fi; \if [ $(echo "$matches" | wc -l) -eq 1 ]; then \git diff "$matches"; \else \echo "multiple matches for \"$pattern\":"; \echo "$matches"; \echo "$matches" | xargs git diff; \fi; \fi; \for pattern in "$@"; do \matches=$(git ls-files | grep -i "$pattern"); \if [ -z "$matches" ]; then \echo "no files found matching \"$pattern\""; \continue; \fi; \if [ $(echo "$matches" | wc -l) -eq 1 ]; then \git restore --staged "$matches"; \echo "unstaged: $matches"; \else \echo "multiple matches for \"$pattern\":"; \echo "$matches"; \printf "unstage all? (y/n): "; \read response; \if echo "$response" | grep -q "^[Yy]"; then \echo "$matches" | xargs git restore --staged; \echo "unstaged all matches"; \fi; \fi; \done; \}; f'';d = /* bash */ ''!f() { \if [ $# -eq 0 ]; then \git diff; \return; \for pattern in "$@"; do \matches=$(git ls-files | grep -i "$pattern"); \if [ -z "$matches" ]; then \echo "no files found matching \"$pattern\""; \continue; \fi; \if [ $(echo "$matches" | wc -l) -eq 1 ]; then \git restore "$matches"; \echo "restored: $matches"; \else \echo "multiple matches for \"$pattern\":"; \echo "$matches"; \printf "restore all? (y/n): "; \read response; \if echo "$response" | grep -q "^[Yy]"; then \echo "$matches" | xargs git restore; \echo "restored all matches"; \fi; \fi; \done; \}; f'';rs = /* bash */ ''!f() { \if [ $# -eq 0 ]; then \git restore --staged .; \echo "unstaged all files"; \return; \a = /* bash */ ''!f() { \for pattern in "$@"; do \matches=$(git ls-files | grep -i "$pattern"); \if [ -z "$matches" ]; then \echo "no files found matching \"$pattern\""; \continue; \fi; \if [ $(echo "$matches" | wc -l) -eq 1 ]; then \git add "$matches"; \echo "added: $matches"; \else \echo "multiple matches for \"$pattern\":"; \echo "$matches"; \echo "$matches" | xargs git add; \echo "added all matches"; \fi; \done; \}; f'';r = /* bash */ ''!f() { \if [ $# -eq 0 ]; then \git restore .; \echo "restored all files"; \return; \sus = "!f() { git branch --set-upstream-to $1; }; f";oneln = "log --oneline";sw = "switch";st = "status -s";sta = "status";lg = "log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";aa = "add .";ap = "add -p";cm = "commit -m";ca = "commit --amend";f = "pull";p = "push";url."ssh://git@github.com/".insteadOf = "gh:";aliases = {diff-stat = "diff --stat --ignore-space-change -r";commit.gpgSign = true;tag.gpgSign = true;gpg.format = "ssh";credential.helper = ["!gh auth git-credential""cache --timeout 21600" # 6 hours"oauth""oauth -device"];core.sshCommand = "ssh -i ~/.ssh/id";merge.conflictStyle = lib.mkDefault "zdiff3";diff.algorithm = "histogram";diff.colorMoved = "default";core.compression = 9;core.preloadindex = true;core.editor = config.environment.variables.EDITOR;core.longpaths = true;core.excludesfile = "${globalGitignore}";branch.sort = "-committerdate";tag.sort = "-taggerdate";fetch.fsckObjects = true;receive.fsckObjects = true;transfer.fsckObjects = true;pull.rebase = true;rebase.autoStash = true;rebase.missingCommitsCheck = "warn";rebase.updateRefs = true;rerere.enabled = true;push.autoSetupRemote = true;status.branch = true;status.showStash = true;status.showUntrackedFiles = "all";commit.verbose = true;log.date = "iso";column.ui = "auto";init.defaultBranch = "master";settings = {user.name = "PlumJam";user.email = "git@plumj.am";lfs = enabled;signing.signByDefault = true;signing.key = "${homeArgs.config.home.homeDirectory}/.ssh/id";};programs.git = enabled {}(homeArgs: {programs.difftastic = enabled;inherit (lib) enabled;globalGitignore = pkgs.writeText "global-gitignore" ''.claude/mprocs.log'';in {environment.shellAliases = {g = "git";gi = "git";gt = "git";gti = "git";};home-manager.sharedModules = [{programs.gh = enabled {settings = {git_protocol = "ssh";editor = config.environment.variables.EDITOR;};environment.systemPackages = [ pkgs.git-credential-oauth ];{ config, lib, pkgs, ... }: let
}{ lib, ... }: {|> lib.remove ./default.nix;imports = lib.collectNix ./.
{ pkgs, config, lib, inputs, ... }: letinherit (lib) enabled mkIf genAttrs const merge;in {# This isn't working for now. Not sure why and can't find a related issue.# After loading I can't do anything and debug logs are full of: `[unhandled osc_dispatch]`.## So it appears to be related to my keyboard (Corne v4) which sends different inputs?# Rio works perfectly fine on the date host with the built-in keyboard...home-manager.sharedModules = mkIf config.isDesktopNotWsl [{programs.rio = with config.theme; enabled {package = inputs.rio.packages.${pkgs.stdenv.hostPlatform.system}.rio;themes = {gruvbox-dark-hard.colors = {background = "#1d2021";foreground = "#ebdbb2";selection-background = "#665c54";selection-foreground = "#ebdbb2";cursor = "#ebdbb2";black = "#1d2021";red = "#cc241d";green = "#98971a";yellow = "#d79921";blue = "#458588";magenta = "#b16286";cyan = "#689d6a";white = "#a89984";light_black = "#928374";light_red = "#fb4934";light_green = "#b8bb26";light_yellow = "#fabd2f";light_blue = "#83a598";light_magenta = "#d3869b";light_cyan = "#8ec07c";light_white = "#ebdbb2";};gruvbox-light-hard.colors = {background = "#f9f5d7";foreground = "#3c3836";selection-background = "#3c3836";selection-foreground = "#f9f5d7";cursor = "#3c3836";black = "#f9f5d7";red = "#cc241d";green = "#98971a";yellow = "#d79921";blue = "#458588";magenta = "#b16286";cyan = "#689d6a";white = "#7c6f64";light_black = "#928374";light_red = "#9d0006";light_green = "#79740e";light_yellow = "#b57614";light_blue = "#076678";light_magenta = "#8f3f71";light_cyan = "#427b58";light_white = "#3c3836";};};settings = {theme = config.theme.rio;editor.program = "hx";confirm-before-quit = false;hide-mouse-cursor-when-typing = true;navigation.use-split = false;padding-x = padding.small;padding-y = [ padding.small padding.small ];renderer = {target-fps = 280;};window.decorations = "Disabled";fonts = merge {features = [];use-drawable-chars = true;emoji.family = "Noto Color Emoji";} <| genAttrs [ "regular" "bold" "italic" "bold-italic" ] (const {family = font.mono.name;width = "Normal";});};};}];}xdg.desktopEntries.zellij-rio = {name = "Zellij Rio";icon = "rio";exec = "rio --command ${pkgs.zellij}/bin/zellij";terminal = false;};size = font.size.big;disable-unfocused-render = false;shell.args = [ "--login" "--interactive" ];shell.program = lib.getExe pkgs.nushell;