From c21d7821b797a1c6b9a00c98e449ae344e57bb5c Mon Sep 17 00:00:00 2001 From: Bug <77031032+0zBug@users.noreply.github.com> Date: Fri, 2 May 2025 10:10:05 -0500 Subject: [PATCH] push --- .DS_Store | Bin 6148 -> 6148 bytes .stfolder/syncthing-folder-a0745f.txt | 2 +- core/boot.nix | 20 +++- core/network.nix | 3 +- packages/flatpak.nix | 4 +- packages/packages.nix | 41 +++++++- packages/plasticity.nix | 133 ++++++++++++++++++++++++++ packages/system.nix | 2 + packages/user.nix | 69 ++++++++++++- 9 files changed, 261 insertions(+), 13 deletions(-) create mode 100644 packages/plasticity.nix diff --git a/.DS_Store b/.DS_Store index d6995db19fcdc6d675b3479bcfe21993c26f5c08..2ffb11026509cdb21420f45e02898979159426b1 100644 GIT binary patch delta 17 YcmZoMXfc?Oz{of;(VmfUz0Fivs{%@&};+ diff --git a/.stfolder/syncthing-folder-a0745f.txt b/.stfolder/syncthing-folder-a0745f.txt index 3e320bf..85a8184 100644 --- a/.stfolder/syncthing-folder-a0745f.txt +++ b/.stfolder/syncthing-folder-a0745f.txt @@ -2,4 +2,4 @@ # Do not delete. folderID: nix -created: 2025-03-12T07:20:56-05:00 +created: 2025-03-12T07:24:38-05:00 diff --git a/core/boot.nix b/core/boot.nix index 0a2d389..67bba48 100644 --- a/core/boot.nix +++ b/core/boot.nix @@ -1,8 +1,22 @@ { ... }: { - boot.loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; + systemd.services = { + NetworkManager-wait-online.enable = false; + systemd-udev-settle.enable = false; + }; + + services.journald.extraConfig = "Storage=volatile"; + + boot = { + kernelModules = [ "ext4" "ahci" "nvme" ]; + kernelParams = [ "elevator=deadline" "quiet" ]; + + loader = { + timeout = 0; + grub.splashImage = null; + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; }; } diff --git a/core/network.nix b/core/network.nix index 7ad3062..b9431c6 100644 --- a/core/network.nix +++ b/core/network.nix @@ -3,6 +3,7 @@ { networking = { hostName = "nix"; - networkmanager.enable = true; + useNetworkd = true; + networkmanager.enable = false; }; } diff --git a/packages/flatpak.nix b/packages/flatpak.nix index ae696da..f02c270 100644 --- a/packages/flatpak.nix +++ b/packages/flatpak.nix @@ -3,12 +3,12 @@ { services.flatpak.packages = [ { appId = "com.github.tchx84.Flatseal"; origin = "flathub"; } - { flatpakref = "https://sober.vinegarhq.org/sober.flatpakref"; sha256 = "1pj8y1xhiwgbnhrr3yr3ybpfis9slrl73i0b1lc9q89vhip6ym2l"; } + "org.vinegarhq.Sober" + "org.vinegarhq.Vinegar" { flatpakref = "https://dl.flathub.org/repo/appstream/org.gimp.GIMP.flatpakref"; sha256 = "1xw8vwpgmyjf5xhh101gqffpwa8x41pysfdl3glx2xv7ydhpc3bj"; } "dev.qwery.AddWater" "io.github.Foldex.AdwSteamGtk" "com.jeffser.Alpaca" - "org.vinegarhq.Vinegar" "com.bambulab.BambuStudio" "org.gabmus.gfeeds" "org.gnome.Decibels" diff --git a/packages/packages.nix b/packages/packages.nix index 17c3059..be9449a 100644 --- a/packages/packages.nix +++ b/packages/packages.nix @@ -7,8 +7,19 @@ ./flatpak.nix ]; - nixpkgs.config.allowUnfree = true; - + nixpkgs = { + config = { + allowUnfree = true; + #cudaSupport = true; + }; + + overlays = [ + (self: super: { + plasticity = self.callPackage ./plasticity.nix { }; + }) + ]; + }; + services.flatpak = { enable = true; @@ -54,8 +65,32 @@ ssh -R \"$\{name}:80:localhost:$\{port}\" tuns.sh'\'' _"; dedicatedServer.openFirewall = true; localNetworkGameTransfers.openFirewall = true; }; - }; + nix-ld = { + enable = true; + libraries = with pkgs; [ + gtk3 + glib + alsa-lib + libGL + + libGLU + mesa + gcc + zlib + xorg.libX11 + fontconfig + pcre2 + xorg.libXext + gcc + xorg.libxcb + pkgs.qt5.full pkgs.freetype pkgs.fontconfig + pkgs.xorg.libX11 pkgs.xorg.libxcb pkgs.xorg.libXext + pkgs.xorg.libXrender + ]; + }; + }; + services = { printing.enable = true; diff --git a/packages/plasticity.nix b/packages/plasticity.nix new file mode 100644 index 0000000..653a9c5 --- /dev/null +++ b/packages/plasticity.nix @@ -0,0 +1,133 @@ +{ + alsa-lib, + at-spi2-atk, + autoPatchelfHook, + cairo, + cups, + dbus, + desktop-file-utils, + expat, + fetchurl, + gdk-pixbuf, + gtk3, + gvfs, + hicolor-icon-theme, + lib, + libdrm, + libglvnd, + libnotify, + libsForQt5, + libxkbcommon, + mesa, + nspr, + nss, + openssl, + pango, + rpmextract, + stdenv, + systemd, + trash-cli, + vulkan-loader, + wrapGAppsHook3, + xdg-utils, + xorg, +}: +stdenv.mkDerivation rec { + pname = "plasticity"; + version = "25.2.0"; + + src = fetchurl { + #url = "https://github.com/nkallen/plasticity/releases/download/v${version}/Plasticity-${version}-1.x86_64.rpm"; + #hash = "sha256:166f8hvgdgr5lpkff28ms5qb425b2w7ckskchsabr1nwq49f7y74"; + url = "https://github.com/4DBug/plasticity/releases/download/beta/plasticity-beta-25.2.0.beta.6-1.x86_64.rpm"; + hash = "sha256:0xm68cslchx1ppdiwagh9n520kxbjkxgyij4kmhr7pxfbmi1d9h5"; + }; + + passthru.updateScript = ./update.sh; + + nativeBuildInputs = [ + wrapGAppsHook3 + autoPatchelfHook + rpmextract + mesa + ]; + + buildInputs = [ + alsa-lib + at-spi2-atk + cairo + cups + dbus + desktop-file-utils + expat + gdk-pixbuf + gtk3 + gvfs + hicolor-icon-theme + libdrm + libnotify + libsForQt5.kde-cli-tools + libxkbcommon + nspr + nss + openssl + pango + (lib.getLib stdenv.cc.cc) + trash-cli + xdg-utils + ]; + + runtimeDependencies = [ + systemd + libglvnd + vulkan-loader + xorg.libX11 + xorg.libxcb + xorg.libXcomposite + xorg.libXdamage + xorg.libXext + xorg.libXfixes + xorg.libXrandr + xorg.libXtst + ]; + + dontUnpack = true; + + autoPatchelfIgnoreMissingDeps = [ + "ACCAMERA.tx" + "AcMPolygonObj15.tx" + "ATEXT.tx" + "ISM.tx" + "RText.tx" + "SCENEOE.tx" + "TD_DbEntities.tx" + "TD_DbIO.tx" + "WipeOut.tx" + ]; + + installPhase = '' + runHook preInstall + + mkdir $out + cd $out + rpmextract $src + mv $out/usr/* $out + rm -r $out/usr + + runHook postInstall + ''; + + preFixup = '' + gappsWrapperArgs+=(--add-flags "--use-gl=egl") + ''; + + meta = with lib; { + description = "CAD for artists"; + homepage = "https://www.plasticity.xyz"; + license = licenses.unfree; + mainProgram = "Plasticity"; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + maintainers = with maintainers; [ imadnyc ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/packages/system.nix b/packages/system.nix index cf764dc..3e4e38e 100644 --- a/packages/system.nix +++ b/packages/system.nix @@ -3,6 +3,8 @@ { environment.systemPackages = with pkgs; [ home-manager + comma + nix-index git wget diff --git a/packages/user.nix b/packages/user.nix index 1f9c193..6fcfe7d 100644 --- a/packages/user.nix +++ b/packages/user.nix @@ -23,12 +23,70 @@ pip pynput python-uinput + + # ninja + # pybind11 + + # diffusers + # einops + # opencv-python + # numpy + #torch-bin + #torchWithCuda + # transformers + # torchvision + #taming-transformers-rom1504 + #ConfigArgParse + #ipdb + # omegaconf + + #sentencepiece + # tqdm + + # Mesh Processing + # trimesh + # pymeshlab + # pygltflib + + #kornia + #facexlib + + # Training + # accelerate + #pytorch_lightning + #scikit-learn + #scikit-image + + # Demo only + # gradio + # fastapi + # uvicorn + # onnxruntime + #gevent + #geventhttpclient + # pymatting + # pooch + # jsonschema + # scikit-image + ])) - nodejs + #nodejs # 3D - blender + (blender.withPackages (ps: with ps; [ + libGLU + gcc + zlib + xorg.libX11 + fontconfig + pcre2 + xorg.libXext + gcc + xorg.libxcb + glib + ])) + plasticity # video @@ -50,10 +108,15 @@ cloudflared base16-schemes ptyxis - ## rpi-imager + rpi-imager fastfetch tree gnome-tweaks wine + xclicker + gh + scanmem + openrgb + samrewritten ]; }