From 99f553a4c6aa15a181874d8a43e4d057e2d8776c Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 9 Mar 2024 17:56:02 +0100 Subject: [PATCH] js, wip net native aot --- modules/buildtools.nix | 32 ++++++++++++++++++++++++++++++-- modules/desktop/default.nix | 37 +++++++++++++++++++++++++++---------- modules/nixpkgs.nix | 4 ++-- vinzenz-lpt2.nix | 1 + 4 files changed, 60 insertions(+), 14 deletions(-) diff --git a/modules/buildtools.nix b/modules/buildtools.nix index b9e6406..c73337c 100644 --- a/modules/buildtools.nix +++ b/modules/buildtools.nix @@ -5,6 +5,9 @@ ... }: let cfg = config.my.buildtools; + dotnetPackage = with pkgs; (dotnetCorePackages.combinePackages [ + dotnet-sdk_8 + ]); in { options.my.buildtools = { native = lib.mkEnableOption "include native build tools"; @@ -12,6 +15,7 @@ in { rust = lib.mkEnableOption "include rust build tools"; jetbrains-remote-server = lib.mkEnableOption "setup jetbrais IDE installs so -remote-dev-server can be started"; objective-c = lib.mkEnableOption "Objective-C with GNUStep"; + js = lib.mkEnableOption "node stuff"; }; config = lib.mkMerge [ @@ -22,24 +26,43 @@ in { gnumake gcc gdb - llvmPackages_latest.llvm + llvmPackages.llvm llvmPackages.clangUseLLVM ]; }) (lib.mkIf cfg.dotnet { environment = { systemPackages = with pkgs; [ - dotnet-sdk_8 + unstable.jetbrains.jdk + unstable.jetbrains.rider + + dotnetPackage zlib zlib.dev openssl icu + icu.dev + + # native aot + gcc + libunwind ]; variables = { DOTNET_CLI_TELEMETRY_OPTOUT = "1"; }; }; + programs.nix-ld.libraries = with pkgs; [ + # native aot + libunwind + icu + zlib + zlib.dev + openssl + icu + icu.dev + dotnetPackage + ]; }) (lib.mkIf cfg.rust { environment.systemPackages = with pkgs; [ @@ -82,5 +105,10 @@ in { gnumake ]); }) + (lib.mkIf cfg.js { + environment.systemPackages = with pkgs; [ + nodejs + ]; + }) ]; } diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 005a210..923be0f 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -53,6 +53,25 @@ in { enable = true; languagePacks = ["en-US" "de"]; }; + nix-ld = { + enable = true; + libraries = with pkgs; [ + stdenv.cc.cc + zlib + zstd + curl + openssl + attr + libssh + bzip2 + libxml2 + acl + libsodium + util-linux + xz + systemd + ]; + }; }; networking = { @@ -86,17 +105,15 @@ in { ''; }; - environment = { - systemPackages = with pkgs; [ - lm_sensors + environment.systemPackages = with pkgs; [ + lm_sensors - # office - libreoffice-qt - hunspell - hunspellDicts.de-de - hunspellDicts.en-us-large - ]; - }; + # office + libreoffice-qt + hunspell + hunspellDicts.de-de + hunspellDicts.en-us-large + ]; nixpkgs.config.permittedInsecurePackages = []; diff --git a/modules/nixpkgs.nix b/modules/nixpkgs.nix index 231996e..6f282ae 100644 --- a/modules/nixpkgs.nix +++ b/modules/nixpkgs.nix @@ -3,8 +3,8 @@ lib, ... }: let - unstable-commit-sha = "e92b6015881907e698782c77641aa49298330223"; - ultrastable-commit-sha = "5de0b32be6e85dc1a9404c75131316e4ffbc634c"; + unstable-commit-sha = "9df3e30ce24fd28c7b3e2de0d986769db5d6225d"; + ultrastable-commit-sha = "2be119add7b37dc535da2dd4cba68e2cf8d1517e"; in { options.my.allowUnfreePackages = lib.mkOption { type = lib.types.listOf lib.types.str; diff --git a/vinzenz-lpt2.nix b/vinzenz-lpt2.nix index 9f57054..b41fcd2 100644 --- a/vinzenz-lpt2.nix +++ b/vinzenz-lpt2.nix @@ -18,6 +18,7 @@ buildtools = { dotnet = true; #objective-c = true; + js = true; }; allowUnfreePackages = [