feat: Added stuff to zed for linux

This commit is contained in:
uttarayan21
2025-08-14 00:56:21 +05:30
parent 4afa27833e
commit 0d940dd8b2
3 changed files with 69 additions and 11 deletions

View File

@@ -3,25 +3,58 @@
lib, lib,
... ...
}: { }: {
home.packages = with pkgs; [nixd nil sleek]; home.packages = with pkgs; [
nixd
nil
sleek
];
programs.television.enable = true;
programs.zed-editor = { programs.zed-editor = {
enable = true; enable = true;
extensions = ["catppuccin" "toml" "json" "yaml" "markdown" "python" "javascript" "typescript"]; extensions = [
"catppuccin"
"toml"
"json"
"yaml"
"markdown"
"python"
"javascript"
"typescript"
];
userKeymaps = [ userKeymaps = [
{ {
context = "Workspace"; context = "Workspace";
bindings = { bindings = {
"ctrl-\\" = "workspace::ToggleBottomDock"; "ctrl-\\" = "workspace::ToggleBottomDock";
"ctrl-shift-r" = "workspace::ToggleRightDock";
"ctrl-k" = "editor::GoToDefinition"; "ctrl-k" = "editor::GoToDefinition";
"ctrl-n" = null;
"ctrl-p" = null;
"space f f" = [
"task::Spawn"
{
task_name = "file_finder";
reveal_target = "center";
}
];
"space g g" = [
"task::Spawn"
{
task_name = "live_grep";
reveal_target = "center";
}
];
}; };
} }
{ {
context = "Editor"; context = "Editor";
use_key_equivalents = true; use_key_equivalents = true;
bindings = { bindings = {
"ctrl-shift-r" = "workspace::ToggleRightDock";
"ctrl-k" = "editor::GoToDefinition"; "ctrl-k" = "editor::GoToDefinition";
"ctrl-t" = "pane::GoBack"; "ctrl-t" = "pane::GoBack";
"ctrl-l" = "editor::AcceptEditPrediction"; "ctrl-l" = "editor::AcceptEditPrediction";
"ctrl-\\" = "workspace::ToggleBottomDock";
}; };
} }
{ {
@@ -37,11 +70,12 @@
edit_prediction_provider = "copilot"; edit_prediction_provider = "copilot";
}; };
agent = { agent = {
default_profile = "ask"; default_profile = "write";
default_model = { default_model = {
provider = "copilot_chat"; provider = "copilot_chat";
model = "o4-mini"; model = "claude-sonnet-4";
}; };
always_allow_tool_actions = true;
}; };
vim_mode = true; vim_mode = true;
relative_line_numbers = true; relative_line_numbers = true;
@@ -83,6 +117,33 @@
}; };
theme = "Catppuccin Mocha"; theme = "Catppuccin Mocha";
}; };
extraPackages = with pkgs; [nixd nil sleek]; userTasks = [
{
label = "file_finder";
command = "${lib.getExe pkgs.zed-editor} \"$(tv files)\"";
hide = "always";
allow_concurrent_runs = true;
use_new_terminal = true;
}
{
label = "live_grep";
command = "tv text | read -alz res; and ${lib.getExe pkgs.zed-editor} $res";
hide = "always";
allow_concurrent_runs = false;
use_new_terminal = false;
shell = {
with_arguments = {
program = "fish";
args = ["--no-config"];
};
};
}
];
extraPackages = with pkgs; [
nixd
nil
sleek
television
];
}; };
} }

View File

@@ -20,6 +20,7 @@
i-dont-care-about-cookies i-dont-care-about-cookies
keepa keepa
sponsorblock sponsorblock
floccus
]; ];
}; };
nativeMessagingHosts = [pkgs.tridactyl-native]; nativeMessagingHosts = [pkgs.tridactyl-native];

View File

@@ -2,12 +2,11 @@
lib, lib,
config, config,
... ...
}: }: {
{
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
sops = { sops = {
# secrets."gitea/registration".owner = config.systemd.services.gitea-actions-mirai.serviceConfig.User; # secrets."gitea/registration".owner = config.systemd.services.gitea-actions-mirai.serviceConfig.User;
secrets."gitea/registration" = { }; secrets."gitea/registration" = {};
templates = { templates = {
"GITEA_REGISTRATION_TOKEN.env".content = '' "GITEA_REGISTRATION_TOKEN.env".content = ''
TOKEN=${config.sops.placeholder."gitea/registration"} TOKEN=${config.sops.placeholder."gitea/registration"}
@@ -72,9 +71,6 @@
{ {
domain = "git.darksailor.dev"; domain = "git.darksailor.dev";
policy = "one_factor"; policy = "one_factor";
resources = [
"/user/settings"
];
} }
]; ];
}; };