From 42d69bb8c581337c8a975757d47b17162f375b69 Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Fri, 20 Feb 2026 17:47:26 +0100 Subject: [PATCH] flake: fix pwndbg --- common/pwndbg-gdb-alias.nix | 8 --- flake.lock | 99 +++++++++++++++++++++++++++++++++++++ flake.nix | 15 ++++-- home/base.nix | 3 +- hosts/sisko/home.nix | 2 +- shells/ctf.nix | 3 +- 6 files changed, 114 insertions(+), 16 deletions(-) delete mode 100644 common/pwndbg-gdb-alias.nix diff --git a/common/pwndbg-gdb-alias.nix b/common/pwndbg-gdb-alias.nix deleted file mode 100644 index f45156f..0000000 --- a/common/pwndbg-gdb-alias.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ pwndbg }: - -# "$ coredumpctl gdb" always runs "gdb" from your path. -pwndbg.overrideAttrs ({ installPhase ? "", ... }: { - installPhase = installPhase + '' - ln -s $out/bin/pwndbg $out/bin/gdb - ''; -}) diff --git a/flake.lock b/flake.lock index abe1ecf..876f586 100644 --- a/flake.lock +++ b/flake.lock @@ -192,6 +192,79 @@ "type": "github" } }, + "pwndbg": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "pyproject-build-systems": "pyproject-build-systems", + "pyproject-nix": "pyproject-nix", + "uv2nix": "uv2nix" + }, + "locked": { + "lastModified": 1771451240, + "narHash": "sha256-qA8rm0zxrFBVbleYEOJziggyJtZEu1DFeAo3OAkbmB4=", + "owner": "pwndbg", + "repo": "pwndbg", + "rev": "5eb91f443cefb75fae9567aa23931670dc2277a9", + "type": "github" + }, + "original": { + "owner": "pwndbg", + "repo": "pwndbg", + "type": "github" + } + }, + "pyproject-build-systems": { + "inputs": { + "nixpkgs": [ + "pwndbg", + "nixpkgs" + ], + "pyproject-nix": [ + "pwndbg", + "pyproject-nix" + ], + "uv2nix": [ + "pwndbg", + "uv2nix" + ] + }, + "locked": { + "lastModified": 1763662255, + "narHash": "sha256-4bocaOyLa3AfiS8KrWjZQYu+IAta05u3gYZzZ6zXbT0=", + "owner": "pyproject-nix", + "repo": "build-system-pkgs", + "rev": "042904167604c681a090c07eb6967b4dd4dae88c", + "type": "github" + }, + "original": { + "owner": "pyproject-nix", + "repo": "build-system-pkgs", + "type": "github" + } + }, + "pyproject-nix": { + "inputs": { + "nixpkgs": [ + "pwndbg", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1769936401, + "narHash": "sha256-kwCOegKLZJM9v/e/7cqwg1p/YjjTAukKPqmxKnAZRgA=", + "owner": "pyproject-nix", + "repo": "pyproject.nix", + "rev": "b0d513eeeebed6d45b4f2e874f9afba2021f7812", + "type": "github" + }, + "original": { + "owner": "pyproject-nix", + "repo": "pyproject.nix", + "type": "github" + } + }, "root": { "inputs": { "extra-config": "extra-config", @@ -203,6 +276,7 @@ "nixpkgs-2211": "nixpkgs-2211", "nixpkgs-darwin": "nixpkgs-darwin", "nixpkgs-unstable": "nixpkgs-unstable", + "pwndbg": "pwndbg", "sops-nix": "sops-nix" } }, @@ -240,6 +314,31 @@ "repo": "default", "type": "github" } + }, + "uv2nix": { + "inputs": { + "nixpkgs": [ + "pwndbg", + "nixpkgs" + ], + "pyproject-nix": [ + "pwndbg", + "pyproject-nix" + ] + }, + "locked": { + "lastModified": 1769957392, + "narHash": "sha256-6PkqwwYf5K2CHi2V+faI/9pqjfz/HxUkI/MVid6hlOY=", + "owner": "pyproject-nix", + "repo": "uv2nix", + "rev": "d18bc50ae1c3d4be9c41c2d94ea765524400af75", + "type": "github" + }, + "original": { + "owner": "pyproject-nix", + "repo": "uv2nix", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index a3f2df7..a9648f7 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,7 @@ description = "Felixalb System flake"; inputs = { + # Nixpkgs and friends nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; # Remember to update ./common/auto-upgrade.nix nixpkgs-darwin.url = "github:NixOS/nixpkgs/nixpkgs-25.11-darwin"; nixpkgs-2211.url = "https://github.com/NixOS/nixpkgs/archive/34bfa9403e42eece93d1a3740e9d8a02fceafbca.tar.gz"; # old nixpgks for e.g. remmina @@ -13,13 +14,17 @@ home-manager.url = "github:nix-community/home-manager/release-25.11"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; + # Other inputs + extra-config.url = "git+file:///home/felixalb/nix-extra-config"; + matrix-synapse-next.url = "github:dali99/nixos-matrix-modules"; # TODO: Lock to release matrix-synapse-next.inputs.nixpkgs.follows = "nixpkgs"; nix-minecraft.url = "github:Infinidoge/nix-minecraft"; nix-minecraft.inputs.nixpkgs.follows = "nixpkgs"; - extra-config.url = "git+file:///home/felixalb/nix-extra-config"; + pwndbg.url = "github:pwndbg/pwndbg"; + pwndbg.inputs.nixpkgs.follows = "nixpkgs"; sops-nix.url = "github:Mic92/sops-nix"; sops-nix.inputs.nixpkgs.follows = "nixpkgs"; @@ -27,16 +32,17 @@ outputs = { self + , extra-config , home-manager , matrix-synapse-next - , nix-minecraft , nix-darwin + , nix-minecraft , nixpkgs , nixpkgs-2211 , nixpkgs-darwin , nixpkgs-unstable + , pwndbg , sops-nix - , extra-config , ... }@inputs: let pkgs-overlay = final: prev: { @@ -50,7 +56,8 @@ config.allowUnfree = true; }; - pwndbg-gdb-alias = prev.callPackage ./common/pwndbg-gdb-alias.nix { }; + pwndbg = pwndbg.packages."${prev.system}".default; + securecrt = prev.callPackage ./common/securecrt.nix { }; }; in diff --git a/home/base.nix b/home/base.nix index 0d52432..a8e76be 100644 --- a/home/base.nix +++ b/home/base.nix @@ -48,9 +48,10 @@ }; }; ignores = [ - "*~" "*.swp" + "*~" ".DS_Store" + ".gdb_history" ".vscode" ]; }; diff --git a/hosts/sisko/home.nix b/hosts/sisko/home.nix index d4d84a6..d39c105 100644 --- a/hosts/sisko/home.nix +++ b/hosts/sisko/home.nix @@ -37,7 +37,7 @@ exiftool ghidra - # pwndbg-gdb-alias # Broken in 25.05 + pwndbg-gdb-alias snicat # Window Manager Extras diff --git a/shells/ctf.nix b/shells/ctf.nix index 4f2ba59..07a2fd5 100644 --- a/shells/ctf.nix +++ b/shells/ctf.nix @@ -1,5 +1,6 @@ let unstable = import (fetchTarball https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz) { }; + # TODO: Add github:pwndbg/pwndbg in { pkgs ? import {} }: pkgs.mkShell { nativeBuildInputs = with pkgs; [ @@ -48,7 +49,6 @@ in { pkgs ? import {} }: # stegsolve gdb metasploit - pwndbg pwninit ropgadget sage @@ -56,5 +56,4 @@ in { pkgs ? import {} }: tcpdump wireshark ]; - }