diff --git a/hosts/perso-desktop/configuration.nix b/hosts/perso-desktop/configuration.nix index ccbfaf8..984e731 100644 --- a/hosts/perso-desktop/configuration.nix +++ b/hosts/perso-desktop/configuration.nix @@ -33,6 +33,11 @@ plymouth.enable = true; printing.enable = true; waydroid.enable = true; + + nix-ld = { + enable = true; + enableKdeDevelopmentEnvironment = true; + }; }; server = { diff --git a/modules/system/hardware/default.nix b/modules/system/hardware/default.nix index d70612d..191b6e3 100644 --- a/modules/system/hardware/default.nix +++ b/modules/system/hardware/default.nix @@ -5,6 +5,7 @@ ./bluetooth ./gamingKernel ./keymaps + ./nix-ld ./nvidia ./pipewire ./plymouth diff --git a/modules/system/hardware/nix-ld/default.nix b/modules/system/hardware/nix-ld/default.nix new file mode 100644 index 0000000..9acd3c7 --- /dev/null +++ b/modules/system/hardware/nix-ld/default.nix @@ -0,0 +1,31 @@ +{ config, pkgs, lib, ... }: + +with lib; +let + cfg = config.modules.system.hardware.nix-ld; +in +{ + options.modules.system.hardware.nix-ld = { + enable = mkEnableOption '' + Enable nixLd with my custom configurations + ''; + + enableKdeDevelopmentEnvironment = mkEnableOption '' + Configure all required packages to develop with kde-builder + ''; + }; + config = mkIf cfg.enable { + # Enable nix ld + programs.nix-ld.enable = true; + + programs.nix-ld.package = pkgs.nix-ld-rs; + + programs.nix-ld.libraries = [ + # Empty for now but used for default packages + ] ++ lib.optionals cfg.enableKdeDevelopmentEnvironment (import ./kde-dev-packages.nix { inherit pkgs; }); + } // mkIf cfg.enableKdeDevelopmentEnvironment { + environment.systemPackages = [ + (import ../../../../pkgs/kde-builder.nix { inherit pkgs; }) + ]; + }; +} \ No newline at end of file diff --git a/modules/system/hardware/nix-ld/kde-dev-packages.nix b/modules/system/hardware/nix-ld/kde-dev-packages.nix new file mode 100644 index 0000000..e3fa436 --- /dev/null +++ b/modules/system/hardware/nix-ld/kde-dev-packages.nix @@ -0,0 +1,140 @@ +{ pkgs }: + +with pkgs; [ + # From https://invent.kde.org/sysadmin/repo-metadata/-/blob/6ddda1e450fdbc093ca0138cf1c850e7b7e75044/distro-dependencies/arch.ini + + # .. gnu + autoconf + automake + bison + flex + gcc + gperf + gnumake + texinfo + + # .. llvm + clang + cmake + + # .. build systems + meson + ninja + + # .. rust + corrosion + + # .. others + boost + docbook_xsl + doxygen + gi-docgen + git + intltool + pkg-config + + # Qt-related + kdePackages.accounts-qt + + libdbusmenu + packagekit + kdePackages.qtbase + kdePackages.qttools + kdePackages.qtdeclarative + kdePackages.phonon + kdePackages.poppler + kdePackages.qca + kdePackages.qcoro + kdePackages.qtkeychain + + # Others/Unsorted + black-hole-solver + check + eigen + enchant + exiv2 + flatpak + fluidsynth + freecell-solver + giflib + itstool + jasper + kdePackages.kdsoap # QT6 + libcanberra + libdisplay-info + libdmtx + libfakekey + libgit2 + libical + olm + libpwquality + libqalculate + libraw + libutempter + xorg.libxcvt + expat + libxml2 + xorg.libX11 xorg.libXext xorg.libXft xorg.libXpm xorg.libXrandr xorg.libXScrnSaver # Replacement of libxss ? + lmdb + microsoft-gsl + mlt + mpv + networkmanager + openal + openexr + plymouth + power-profiles-daemon + kdePackages.qgpgme # qt6 + qrencode + # ruby-sass + # ruby-test-unit + # sane + sccache + shared-mime-info + kdePackages.signond + udisks2 + upower + vala + vlc + wayland + wayland-protocols + wayland-scanner + xapian + xercesc + xorg.xf86inputlibinput + xf86_input_wacom + xmlto + xorg.xorgserver + xsd + zxing-cpp + gtk3 + + # plasma-desktop + xdotool + + # appstream + gobject-introspection + xorg.xf86inputevdev + + # okular + discount + djvulibre + ebook_tools + libspectre + libzip + + (pkgs.python3.withPackages (python-pkgs: with python-pkgs; [ + pycairo + pip + setuptools + sphinx + + # drkonqi + psutil + pygdbmi + sentry-sdk + ])) + + # kpipewire + pipewire +] \ No newline at end of file diff --git a/pkgs/.gitkeep b/pkgs/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/pkgs/kde-builder.nix b/pkgs/kde-builder.nix new file mode 100644 index 0000000..c6acf86 --- /dev/null +++ b/pkgs/kde-builder.nix @@ -0,0 +1,31 @@ +{ + pkgs +}: + +with pkgs; +stdenv.mkDerivation rec { + pname = "kde-builder"; + version = "50a5c745e5bc6a47779abc4e441e6a13749d9f67"; + + src = fetchFromGitLab { + domain = "invent.kde.org"; + owner = "sdk"; + repo = "kde-builder"; + rev = version; + sha256 = "l3V9EyiOZXKMUuUvlX8awWbHiaufc9XjNhdPb1YnaKw="; + }; + + # https://invent.kde.org/sdk/kde-builder/-/blob/45eaedd70d39059a2fa94f4774b9c0642d02ec21/scripts/initial_setup.sh#L23 + buildInputs = [ + (pkgs.python3.withPackages (python-pkgs: with python-pkgs; [ + dbus-python + pyyaml + setproctitle + ])) + ]; + + installPhase = '' + mkdir -p $out/bin + cp -r * $out/bin/ + ''; +} \ No newline at end of file