1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-27 18:17:44 +00:00

Fix lldb for helix

This commit is contained in:
RGBCube 2025-02-09 16:15:08 +03:00
parent 8ac83a419b
commit 45d0cd8312
8 changed files with 23 additions and 21 deletions

View file

@ -81,7 +81,7 @@ in {
gitUrl = "https://git.rgbcu.be/"; gitUrl = "https://git.rgbcu.be/";
gitDomain = head <| match "https://(.*)/" gitUrl; gitDomain = head <| match "https://(.*)/" gitUrl;
in { in {
programs.nushell.configFile.text = mkAfter '' programs.nushell.configFile.text = mkAfter /* nu */ ''
# Sets the remote origin to the specified user and repository on my git instance # Sets the remote origin to the specified user and repository on my git instance
def gsr [user_and_repo: string] { def gsr [user_and_repo: string] {
let user_and_repo = if ($user_and_repo | str index-of "/") != -1 { let user_and_repo = if ($user_and_repo | str index-of "/") != -1 {

View file

@ -22,7 +22,7 @@ in {
})]; })];
home-manager.sharedModules = [{ home-manager.sharedModules = [{
programs.nushell.configFile.text = mkIf (config.isDesktop && config.isLinux) <| mkAfter '' programs.nushell.configFile.text = mkIf (config.isDesktop && config.isLinux) <| mkAfter /* nu */ ''
def --wrapped hx [...arguments] { def --wrapped hx [...arguments] {
if $env.TERM == "xterm-kitty" { if $env.TERM == "xterm-kitty" {
kitty @ set-spacing padding=0 kitty @ set-spacing padding=0
@ -118,20 +118,22 @@ in {
}]; }];
args.program = "{0}"; args.program = "{0}";
args.initCommands = [ "command script import ${pkgs.writeText "lldb_dap_rustc_primer.py" '' args.initCommands = let
import subprocess primer = pkgs.writeTextDir "lldb_dap_rustc_primer.py" /* py */ ''
import pathlib import subprocess
import lldb import pathlib
import lldb
# Not hardcoding a nix store path here on purpose. # Not hardcoding a nix store path here on purpose.
rustlib_etc = pathlib.Path(subprocess.getoutput("rustc --print sysroot")) / "lib" / "rustlib" / "etc" rustlib_etc = pathlib.Path(subprocess.getoutput("rustc --print sysroot")) / "lib" / "rustlib" / "etc"
if not rustlib_etc.exists(): if not rustlib_etc.exists():
raise RuntimeError("Unable to determine rustc sysroot") raise RuntimeError("Unable to determine rustc sysroot")
# Load lldb_lookup.py and execute lldb_commands with the correct path # Load lldb_lookup.py and execute lldb_commands with the correct path
lldb.debugger.HandleCommand(f"""command script import "{rustlib_etc / 'lldb_lookup.py'}" """) lldb.debugger.HandleCommand(f"""command script import "{rustlib_etc / 'lldb_lookup.py'}" """)
lldb.debugger.HandleCommand(f"""command source -s 0 "{rustlib_etc / 'lldb_commands'}" """) lldb.debugger.HandleCommand(f"""command source -s 0 "{rustlib_etc / 'lldb_commands'}" """)
''}" ]; '';
in [ "command script import ${primer}/lldb_dab_rustc_primer.py" ];
}]; }];
} }
]; ];

View file

@ -38,7 +38,7 @@ in {
]; ];
home-manager.sharedModules = [{ home-manager.sharedModules = [{
programs.nushell.configFile.text = mkAfter '' programs.nushell.configFile.text = mkAfter /* nu */ ''
def --wrapped nr [program: string = "", ...arguments] { def --wrapped nr [program: string = "", ...arguments] {
if ($program | str contains "#") or ($program | str contains ":") { if ($program | str contains "#") or ($program | str contains ":") {
nix run $program -- ...$arguments nix run $program -- ...$arguments

View file

@ -1,7 +1,7 @@
{ lib, ... }: let { lib, ... }: let
inherit (lib) enabled; inherit (lib) enabled;
in { in {
environment.shellAliases.todo = ''rg "todo|fixme" --colors match:fg:yellow --colors match:style:bold''; environment.shellAliases.todo = /* sh */ ''rg "todo|fixme" --colors match:fg:yellow --colors match:style:bold'';
home-manager.sharedModules = [{ home-manager.sharedModules = [{
programs.ripgrep = enabled { programs.ripgrep = enabled {

View file

@ -16,7 +16,7 @@ in merge <| mkIf config.isDesktop {
"toolkit.legacyUserProfileCustomizations.stylesheets" = true; "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
}; };
userChrome = '' userChrome = /* css */ ''
#TabsToolbar { #TabsToolbar {
visibility: collapse; visibility: collapse;
} }

View file

@ -3,7 +3,7 @@
in merge <| mkIf config.isDesktop { in merge <| mkIf config.isDesktop {
home-manager.sharedModules = [{ home-manager.sharedModules = [{
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
bindl = [(replaceStrings [ "\n;" "\n" ] [ ";" "" ] '' bindl = [(replaceStrings [ "\n;" "\n" ] [ ";" "" ] /* sh */ ''
, XF86PowerOff, exec, , XF86PowerOff, exec,
pkill fuzzel; pkill fuzzel;
echo -en "Suspend\0icon\x1fsystem-suspend\nHibernate\0icon\x1fsystem-suspend-hibernate-alt2\nPower Off\0icon\x1fsystem-shutdown\nReboot\0icon\x1fsystem-reboot" echo -en "Suspend\0icon\x1fsystem-suspend\nHibernate\0icon\x1fsystem-suspend-hibernate-alt2\nPower Off\0icon\x1fsystem-shutdown\nReboot\0icon\x1fsystem-reboot"

View file

@ -89,7 +89,7 @@ in merge <| mkIf config.isDesktop {
clock.tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"; clock.tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
}]; }];
style = '' style = /* css */ ''
* { * {
border: none; border: none;
border-radius: ${toString cornerRadius}px; border-radius: ${toString cornerRadius}px;

View file

@ -3,11 +3,11 @@
in merge { in merge {
security.sudo = enabled { security.sudo = enabled {
execWheelOnly = true; execWheelOnly = true;
extraConfig = '' extraConfig = /* sudo */ ''
Defaults lecture = never Defaults lecture = never
Defaults pwfeedback Defaults pwfeedback
Defaults env_keep += "DISPLAY EDITOR PATH" Defaults env_keep += "DISPLAY EDITOR PATH"
${optionalString config.isServer '' ${optionalString config.isServer /* sudo */ ''
Defaults timestamp_timeout = 0 Defaults timestamp_timeout = 0
''} ''}
''; '';