Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions hosts/Rhizome/programs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,9 @@
enable = true;
startOnActivation = true;
};

programs.cmux = {
enable = true;
enableDefaults = true;
};
}
71 changes: 1 addition & 70 deletions hosts/lobtop/programs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,75 +58,6 @@

programs.cmux = {
enable = true;

settings = {
app.minimalMode = true;
notifications.showInMenuBar = false;
ui.surfaceTabBar.buttons = [
"cmux.newTerminal"
"cmux.splitRight"
"cmux.splitDown"
];
workspaceColors = {
notificationBadgeColor = null;
indicatorStyle = "leftRail";
selectionColor = null;
colors = {
Red = "#ff7b72";
Orange = "#ffa657";
Green = "#7ee787";
Blue = "#79c0ff";
Sky = "#a5d6ff";
Purple = "#d2a8ff";
Pink = "#ff6ac1";
Cyan = "#9aedfe";
};
};
shortcuts.bindings = {
openFolder = "";
reopenPreviousSession = "";
goToWorkspace = "cmd+o";
commandPalette = "cmd+p";
nextSurface = "cmd+opt+→";
prevSurface = "cmd+opt+←";
nextSidebarTab = "cmd+opt+↓";
prevSidebarTab = "cmd+opt+↑";
closeOtherTabsInPane = "";
selectSurfaceByNumber = "cmd+1";
selectWorkspaceByNumber = "ctrl+1";
};
};

ghostty = {
settings = {
background = "#131313";
foreground = "#dddddd";
"cursor-color" = "#dddddd";
"selection-background" = "#353436";
"selection-foreground" = "#dddddd";
"font-family" = "MesloLGSDZ Nerd Font Mono";
"font-size" = 12;
"window-padding-x" = 8;
"window-padding-y" = 8;
};
palette = {
"0" = "#131313";
"1" = "#ff5c57";
"2" = "#5af78e";
"3" = "#f3f99d";
"4" = "#57c7ff";
"5" = "#ff6ac1";
"6" = "#9aedfe";
"7" = "#caccca";
"8" = "#686868";
"9" = "#ff7b72";
"10" = "#7ee787";
"11" = "#ffa657";
"12" = "#79c0ff";
"13" = "#d2a8ff";
"14" = "#a5d6ff";
"15" = "#ffffff";
};
};
enableDefaults = true;
};
}
128 changes: 89 additions & 39 deletions modules/darwin/programs/cmux.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,15 @@ in {
options.programs.cmux = {
enable = mkEnableOption "cmux";

enableDefaults = mkEnableOption "cmux and ghostty shared defaults";

settings = mkOption {
inherit (jsonFormat) type;
default = {};
description = ''
Configuration written to {file}`~/.config/cmux/cmux.json`.
Keys map directly to cmux JSON config fields.
'';
example = literalExpression ''
{
schemaVersion = 1;
app.minimalMode = true;
shortcuts.bindings = {
goToWorkspace = "cmd+o";
commandPalette = "cmd+p";
};
}
'';
};

ghostty = {
Expand All @@ -53,15 +45,6 @@ in {
Ghostty settings written to {file}`~/.config/ghostty/config`
as `key = value` pairs.
'';
example = literalExpression ''
{
background = "#131313";
foreground = "#dddddd";
"cursor-color" = "#dddddd";
"font-family" = "MesloLGSDZ Nerd Font Mono";
"font-size" = 12;
}
'';
};

palette = mkOption {
Expand All @@ -71,32 +54,99 @@ in {
Terminal color palette written as `palette = <index>=<color>` lines
in {file}`~/.config/ghostty/config`. Keys must be numeric strings "0"–"15".
'';
example = literalExpression ''
{
"0" = "#131313";
"1" = "#ff5c57";
"15" = "#ffffff";
}
'';
};
};
};

config = mkIf cfg.enable {
homebrew.casks = ["cmux"];
config = mkMerge [
(mkIf cfg.enableDefaults {
programs.cmux.settings = {
app.minimalMode = mkDefault true;
notifications.showInMenuBar = mkDefault false;
ui.surfaceTabBar.buttons = mkDefault [
"cmux.newTerminal"
"cmux.splitRight"
"cmux.splitDown"
];
workspaceColors = mkDefault {
notificationBadgeColor = null;
indicatorStyle = "leftRail";
selectionColor = null;
colors = {
Red = "#ff7b72";
Orange = "#ffa657";
Green = "#7ee787";
Blue = "#79c0ff";
Sky = "#a5d6ff";
Purple = "#d2a8ff";
Pink = "#ff6ac1";
Cyan = "#9aedfe";
};
};
shortcuts.bindings = mkDefault {
openFolder = "";
reopenPreviousSession = "";
goToWorkspace = "cmd+o";
commandPalette = "cmd+p";
nextSurface = "cmd+opt+→";
prevSurface = "cmd+opt+←";
nextSidebarTab = "cmd+opt+↓";
prevSidebarTab = "cmd+opt+↑";
closeOtherTabsInPane = "";
selectSurfaceByNumber = "cmd+1";
selectWorkspaceByNumber = "ctrl+1";
};
};

home-manager.users.${username} = {
xdg.configFile."cmux/cmux.json" = {
source = jsonFormat.generate "cmux-config" ({
"$schema" = "https://raw.githubusercontent.com/manaflow-ai/cmux/main/web/data/cmux.schema.json";
schemaVersion = 1;
}
// cfg.settings);
programs.cmux.ghostty = {
settings = mapAttrs (_: mkDefault) {
background = "#131313";
foreground = "#dddddd";
"cursor-color" = "#dddddd";
"selection-background" = "#353436";
"selection-foreground" = "#dddddd";
"font-family" = "MesloLGSDZ Nerd Font Mono";
"font-size" = 12;
"window-padding-x" = 8;
"window-padding-y" = 8;
};
palette = mapAttrs (_: mkDefault) {
"0" = "#131313";
"1" = "#ff5c57";
"2" = "#5af78e";
"3" = "#f3f99d";
"4" = "#57c7ff";
"5" = "#ff6ac1";
"6" = "#9aedfe";
"7" = "#caccca";
"8" = "#686868";
"9" = "#ff7b72";
"10" = "#7ee787";
"11" = "#ffa657";
"12" = "#79c0ff";
"13" = "#d2a8ff";
"14" = "#a5d6ff";
"15" = "#ffffff";
};
};
})

(mkIf cfg.enable {
homebrew.casks = ["cmux"];

home-manager.users.${username} = {
xdg.configFile."cmux/cmux.json" = {
source = jsonFormat.generate "cmux-config" ({
"$schema" = "https://raw.githubusercontent.com/manaflow-ai/cmux/main/web/data/cmux.schema.json";
schemaVersion = 1;
}
// cfg.settings);
};

xdg.configFile."ghostty/config" = mkIf (cfg.ghostty.settings != {} || cfg.ghostty.palette != {}) {
text = ghosttyConfigText;
xdg.configFile."ghostty/config" = mkIf (cfg.ghostty.settings != {} || cfg.ghostty.palette != {}) {
text = ghosttyConfigText;
};
};
};
};
})
];
}
Loading