2 Commits

Author SHA1 Message Date
Noah Masur
7619ac6ea2 enable cargo for work and home 2025-10-13 13:39:48 -04:00
Noah Masur
7543721020 launch helix for editing desktop text files 2025-10-13 13:06:42 -04:00
5 changed files with 28 additions and 1 deletions

View File

@@ -27,6 +27,7 @@ in
rustfmt rustfmt
pkg-config pkg-config
openssl openssl
rust-analyzer
]; ];
}; };
} }

View File

@@ -454,6 +454,27 @@ in
}; };
# Create a desktop option for launching Helix from a file manager
# (Requires launching the terminal and then executing Helix)
xdg.desktopEntries.helix =
lib.mkIf (pkgs.stdenv.isLinux && config.nmasur.presets.services.i3.enable)
{
name = "Helix wrapper";
exec = ''sh -c "${lib.getExe config.nmasur.presets.services.i3.terminal} --command='hx \$1'" _ %F ''; # TODO: change to work for any terminal
mimeType = [
"text/plain"
"text/markdown"
];
};
xdg.mimeApps.defaultApplications = {
"text/plain" = lib.mkBefore [ "Helix.desktop" ];
"text/markdown" = lib.mkBefore [ "Helix.desktop" ];
};
home.packages = [
(pkgs.writers.writeDashBin "xterm" ''${lib.getExe config.nmasur.presets.services.i3.terminal} +new-window --command"$@" '')
];
}; };
} }

View File

@@ -66,7 +66,7 @@ in
lib.mkIf (pkgs.stdenv.isLinux && config.nmasur.presets.services.i3.enable) lib.mkIf (pkgs.stdenv.isLinux && config.nmasur.presets.services.i3.enable)
{ {
name = "Neovim wrapper"; name = "Neovim wrapper";
exec = "${lib.getExe config.nmasur.presets.services.i3.terminal} nvim %F"; # TODO: change to generic exec = ''${lib.getExe config.nmasur.presets.services.i3.terminal} --command="nvim %F"''; # TODO: change to generic
mimeType = [ mimeType = [
"text/plain" "text/plain"
"text/markdown" "text/markdown"

View File

@@ -19,6 +19,10 @@ in
pkgs.pgcli # Postgres client with autocomplete pkgs.pgcli # Postgres client with autocomplete
]; ];
nmasur.presets = {
programs.cargo.enable = lib.mkDefault true;
};
}; };
} }

View File

@@ -49,6 +49,7 @@ in
aws-ssh.enable = lib.mkDefault true; aws-ssh.enable = lib.mkDefault true;
bash.enable = lib.mkDefault true; bash.enable = lib.mkDefault true;
bat.enable = lib.mkDefault true; bat.enable = lib.mkDefault true;
cargo.enable = lib.mkDefault true;
direnv.enable = lib.mkDefault true; direnv.enable = lib.mkDefault true;
dotfiles.enable = lib.mkDefault true; dotfiles.enable = lib.mkDefault true;
fd.enable = lib.mkDefault true; fd.enable = lib.mkDefault true;