diff --git a/hosts/common/programs/assorted.nix b/hosts/common/programs/assorted.nix index 96f9b9b93..57f2ca27a 100644 --- a/hosts/common/programs/assorted.nix +++ b/hosts/common/programs/assorted.nix @@ -574,10 +574,6 @@ in gawk.sandbox.wrapperType = "inplace"; # /share/gawk libraries refer to /libexec gawk.sandbox.autodetectCliPaths = "existingFile"; - gdb.sandbox.enable = false; # gdb doesn't sandbox well. i don't know how you could. - # gdb.sandbox.method = "landlock"; # permission denied when trying to attach, even as root - gdb.sandbox.autodetectCliPaths = true; - geoclue2-with-demo-agent = {}; # MS GitHub stores auth token in .config diff --git a/hosts/common/programs/default.nix b/hosts/common/programs/default.nix index 698057d25..fc70de807 100644 --- a/hosts/common/programs/default.nix +++ b/hosts/common/programs/default.nix @@ -50,6 +50,7 @@ ./fwupd.nix ./g4music.nix ./gajim.nix + ./gdb.nix ./gdbus.nix ./geary.nix ./git.nix diff --git a/hosts/common/programs/gdb.nix b/hosts/common/programs/gdb.nix new file mode 100644 index 000000000..50e736993 --- /dev/null +++ b/hosts/common/programs/gdb.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: +{ + sane.programs.gdb = { + sandbox.enable = false; # gdb doesn't sandbox well. i don't know how you could. + # sandbox.method = "landlock"; # permission denied when trying to attach, even as root + sandbox.autodetectCliPaths = true; + fs.".config/gdb/gdbinit".symlink.text = '' + # enable commands like `py-bt`, `py-list`, etc. + # for usage, see: + source ${pkgs.python3}/share/gdb/libpython.py + ''; + }; +}