This commit is contained in:
Audrey 2025-03-04 16:23:41 -07:00
parent 6a9acfda3f
commit 11ed152b8f
5 changed files with 176 additions and 0 deletions

View File

@ -41,5 +41,17 @@
element-desktop element-desktop
slack slack
obs-studio obs-studio
kdePackages.plasma-thunderbolt
]; ];
systemd.services.clear-downloads = {
description = "Wipe downloads on boot";
script = ''
rm -rf /home/audrey/Downloads
mkdir /home/audrey/Downloads
chown audrey:users /home/audrey/Downloads
'';
wantedBy = [ "multi-user.target" ];
};
} }

View File

@ -27,6 +27,8 @@
users.defaultUserShell = pkgs.zsh; users.defaultUserShell = pkgs.zsh;
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.audrey = { users.users.audrey = {
uid = 1000;
description = "Audrey Dutcher";
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "docker" ]; extraGroups = [ "wheel" "docker" ];
packages = with pkgs; [ ]; packages = with pkgs; [ ];
@ -34,9 +36,14 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
wget wget
ripgrep
fd
curl curl
btop btop
nixfmt-rfc-style nixfmt-rfc-style
file
stdenv.cc
patchelf
# language servers # language servers
nil nil
@ -156,5 +163,8 @@
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh.enable = true; services.openssh.enable = true;
services.fwupd.enable = true;
services.hardware.bolt.enable = true;
} }

View File

@ -10,6 +10,7 @@ let overlay = final: prev: {
hash = "sha256-vwGHiLKSjJor4A+r599DlvSHXkDuuLSSQ4/tWFALMKU="; hash = "sha256-vwGHiLKSjJor4A+r599DlvSHXkDuuLSSQ4/tWFALMKU=";
})]; })];
}); });
idapro9 = pkgs.callPackage ../pkgs/idapro9.nix {};
}; };
in { in {

148
pkgs/idapro9.nix Normal file
View File

@ -0,0 +1,148 @@
{
lib,
stdenv,
requireFile,
fetchurl,
autoPatchelfHook,
copyDesktopItems,
python3,
libsForQt5,
cairo,
dbus,
fontconfig,
freetype,
glib,
gtk3,
libdrm,
libGL,
libkrb5,
libsecret,
libunwind,
libxkbcommon,
openssl,
gcc,
clang,
xorg,
zlib,
curl,
makeDesktopItem,
makeWrapper,
}:
let
pythonForIDA = python3.withPackages (ps: with ps; [ rpyc ]);
in
# https://github.com/msanft/ida-pro-overlay/blob/main/packages/ida-pro.nix
stdenv.mkDerivation (self: {
pname = "idapro";
version = "9.0.241217";
src = requireFile {
name = "idapro-9.0.241217.tar.xz";
hash = "sha256-V6RYQlwY8qYlASkyUZx2NgIkuQhf2fTd1tA7MFpOqLc=";
message = ''
Please run nix store add-file idapro-9.0.241217.tar.xz
Its sha256sum should be 57a458425c18f2a625012932519c76360224b9085fd9f4ddd6d03b305a4ea8b7
'';
};
nativeBuildInputs = [
autoPatchelfHook
copyDesktopItems
makeWrapper
];
# Add everything to the RPATH, in case IDA decides to dlopen things.
runtimeDependencies = [
cairo
dbus
fontconfig
freetype
glib
gtk3
libdrm
libGL
libkrb5
libsecret
libunwind
libxkbcommon
openssl.out
(if stdenv.cc.isGNU then gcc else clang).cc
xorg.libICE
xorg.libSM
xorg.libX11
xorg.libXau
xorg.libxcb
xorg.libXext
xorg.libXi
xorg.libXrender
xorg.xcbutilimage
xorg.xcbutilkeysyms
xorg.xcbutilrenderutil
xorg.xcbutilwm
zlib
curl.out
pythonForIDA
];
buildInputs = self.runtimeDependencies;
qtWrapperArgs = [
];
installPhase = ''
runHook preInstall
mkdir -p $out/opt $out/lib $out/bin
cp ${libsForQt5.qtbase.out}/lib/libQt5EglFSDeviceIntegration.so.5 .
cp -a * $out/opt
# Link the exported libraries to the output.
for lib in $out/opt/libida*; do
ln -s $lib $out/lib/$(basename $lib)
done
ln -s $out/opt/ida $out/bin/ida
ln -s ida $out/bin/ida64
runHook postInstall
'';
preFixup = ''
patchelf --shrink-rpath --allowed-rpath-prefixes $(patchelf --print-rpath $out/opt/libQt5EglFSDeviceIntegration.so.5 | sed 's/:/\n/g' | grep -v qtbase | paste -s -d: -) $out/opt/libQt5EglFSDeviceIntegration.so.5
# Some libraries come with the installer.
addAutoPatchelfSearchPath $out/opt
# Manually patch libraries that dlopen stuff.
patchelf --add-needed libpython3.12.so $out/lib/libida.so
patchelf --add-needed libcrypto.so $out/lib/libida.so
wrapProgram "$out/opt/ida" \
--prefix PYTHONPATH : $out/opt/idalib/python \
--prefix PATH : ${pythonForIDA}/bin
'';
#--prefix QT_PLUGIN_PATH : $out/opt/plugins/platforms \
desktopItem = makeDesktopItem {
name = "ida-pro";
exec = "ida";
icon = fetchurl {
url = "https://www.xzji.com/upload/y20/07x15/1518115f0eadb3d25ab.png";
name = "appico.png";
hash = "sha256-mso/8F4AT5Ry1RHG3plo03rssRRUw9xBwu3fjh8PqYc";
};
comment = self.meta.description;
desktopName = "IDA Pro";
genericName = "Interactive Disassembler";
categories = [ "Development" ];
startupWMClass = "IDA";
};
desktopItems = [ self.desktopItem ];
meta = with lib; {
description = "The world's smartest and most feature-full disassembler";
homepage = "https://hex-rays.com/ida-pro/";
mainProgram = "ida";
platforms = [ "x86_64-linux" ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
};
})

View File

@ -22,4 +22,9 @@
networking.firewall.allowedUDPPorts = [ 1337 ]; networking.firewall.allowedUDPPorts = [ 1337 ];
system.stateVersion = "24.11"; system.stateVersion = "24.11";
services.immich.enable = true;
environment.systemPackages = [
pkgs.idapro9
];
} }