Update flakes with electron workaround

This commit is contained in:
Tristan D. 2024-04-11 17:48:21 +02:00
parent e376ac08e0
commit 2d3f3935a4
Signed by: tristan
SSH key fingerprint: SHA256:U7y6eMb7CQDaTHv9XoX6/BaQnPqyxxKc+Xnfcefi6rY
4 changed files with 86 additions and 39 deletions

76
flake.lock generated
View file

@ -53,11 +53,11 @@
"yafas": "yafas"
},
"locked": {
"lastModified": 1712601472,
"narHash": "sha256-gNk41482AiE1qaQJ0YWPlFq5mtTB+O+G2R/bwfpGZV4=",
"lastModified": 1712786091,
"narHash": "sha256-YK84WXkrqs0/uVoXb8x3+xx1P1dn/IoO+DwD6P/+7n0=",
"owner": "chaotic-cx",
"repo": "nyx",
"rev": "408a3bcc94ddd16288fab2d85a33a0604ad6ae8f",
"rev": "0d1cb79bc1fdae025f557f6c5053c69b35f4cc35",
"type": "github"
},
"original": {
@ -113,11 +113,11 @@
]
},
"locked": {
"lastModified": 1712369716,
"narHash": "sha256-9zs+0GTfSyGHdpiA6dPJXnDKAHmfr01OE9FxDE9KvPI=",
"lastModified": 1712690805,
"narHash": "sha256-5/gL5CM1MeuHh3zoSyt07lhJTb5GBGRTIGFqONyJl9g=",
"owner": "girlbossceo",
"repo": "conduwuit",
"rev": "2516d44cb178547194a66fa9c44930ab9bddd910",
"rev": "6345742e8b83a528353beb0fbb0e5b54aa39191d",
"type": "github"
},
"original": {
@ -153,11 +153,11 @@
]
},
"locked": {
"lastModified": 1712612224,
"narHash": "sha256-Tv4C8OSPVmm4LbpJGLFSODyvJy6DqrisEGPCQdNVOeY=",
"lastModified": 1712798444,
"narHash": "sha256-aAksVB7zMfBQTz0q2Lw3o78HM3Bg2FRziX2D6qnh+sk=",
"owner": "nix-community",
"repo": "disko",
"rev": "79eab0e82cb126bf4ac170f44af82479f0895ab5",
"rev": "a297cb1cb0337ee10a7a0f9517954501d8f6f74d",
"type": "github"
},
"original": {
@ -177,11 +177,11 @@
]
},
"locked": {
"lastModified": 1712653802,
"narHash": "sha256-8lhL1auFSvJN0U33/LhaTbRQwJfoHHzMc3AuLmYkhmU=",
"lastModified": 1712800011,
"narHash": "sha256-mEL4y1N/aQrI+OeYHm6Sol8lpDVsceCc2TJF8+uMv6Y=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "66f48ac73046a9dab5f896f0bfa5c618b94417cb",
"rev": "9b79fd139ff55062e46191bd5dd42fcb79696328",
"type": "github"
},
"original": {
@ -529,11 +529,11 @@
]
},
"locked": {
"lastModified": 1712645849,
"narHash": "sha256-67v20E0gH7nvAaMsah2oRIocnxGO25fATUyzQHIywxQ=",
"lastModified": 1712759992,
"narHash": "sha256-2APpO3ZW4idlgtlb8hB04u/rmIcKA8O7pYqxF66xbNY=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "40a99619da804a78a0b166e5c6911108c059c3a8",
"rev": "31357486b0ef6f4e161e002b6893eeb4fafc3ca9",
"type": "github"
},
"original": {
@ -551,11 +551,11 @@
]
},
"locked": {
"lastModified": 1712296875,
"narHash": "sha256-Cmyer1n39J5IucCiyy84kf1XLr1Gdz/i5HKbzzEOQYM=",
"lastModified": 1712521891,
"narHash": "sha256-qJRkB7QZo2mdR/nABeHQKi3xkQxUsSGjVVQXTSHQocI=",
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
"rev": "9b0e8712f1a9e5569036b227d539b745fcf54aad",
"rev": "ec53086c76303dc8880fa7ba06c45abcae8b3398",
"type": "github"
},
"original": {
@ -577,11 +577,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1712361380,
"narHash": "sha256-1cEiFtUvjBlp4J4kCvlsEobrTEsAzRBhRNvG8N1XH9w=",
"lastModified": 1712679520,
"narHash": "sha256-TQ9Y4wQV+wIuMBGkwbkDey+mcfdHH+ix7ccepzFQBNc=",
"owner": "martinvonz",
"repo": "jj",
"rev": "93cebcd0c0e910b8b7de606982efa8430a94676e",
"rev": "580a90b6944f3a658e5bdea8d6f43afebd91eda7",
"type": "github"
},
"original": {
@ -614,11 +614,11 @@
]
},
"locked": {
"lastModified": 1712150496,
"narHash": "sha256-24MK9P+3OIBeaVsyy6r/W77/9TVLCQGDF8RVOCkK4Uk=",
"lastModified": 1712736594,
"narHash": "sha256-r9i9cZUB02l0qhJ7Q4g3zXM8uClM4zxjEYM1AAFq48I=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "8be938197486acb2af4ba91aae0fac57619a46c8",
"rev": "0cd149c939c1f756a96381a84801073021ac1e63",
"type": "github"
},
"original": {
@ -806,12 +806,12 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1712439257,
"narHash": "sha256-aSpiNepFOMk9932HOax0XwNxbA38GOUVOiXfUVPOrck=",
"rev": "ff0dbd94265ac470dda06a657d5fe49de93b4599",
"revCount": 608655,
"lastModified": 1712608508,
"narHash": "sha256-vMZ5603yU0wxgyQeHJryOI+O61yrX2AHwY6LOFyV1gM=",
"rev": "4cba8b53da471aea2ab2b0c1f30a81e7c451f4b6",
"revCount": 609462,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.608655%2Brev-ff0dbd94265ac470dda06a657d5fe49de93b4599/018eb77a-ddbc-7dfa-9c9c-d5444d2bb52f/source.tar.gz"
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.609462%2Brev-4cba8b53da471aea2ab2b0c1f30a81e7c451f4b6/018ec465-ecc0-7383-ad59-bf84009e7b07/source.tar.gz"
},
"original": {
"type": "tarball",
@ -870,11 +870,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1712634594,
"narHash": "sha256-fzBqUvcJjjyIapioiaW5b/mj7V/xxljDt864JrDC5qI=",
"lastModified": 1712757991,
"narHash": "sha256-kR7C7Fqt3JP40h0mzmSZeWI5pk1iwqj4CSeGjnUbVHc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0dca19054c663a0cf3b471be3c3079acfd623924",
"rev": "d6b3ddd253c578a7ab98f8011e59990f21dc3932",
"type": "github"
},
"original": {
@ -934,11 +934,11 @@
},
"nixpkgs_5": {
"locked": {
"lastModified": 1712439257,
"narHash": "sha256-aSpiNepFOMk9932HOax0XwNxbA38GOUVOiXfUVPOrck=",
"lastModified": 1712608508,
"narHash": "sha256-vMZ5603yU0wxgyQeHJryOI+O61yrX2AHwY6LOFyV1gM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ff0dbd94265ac470dda06a657d5fe49de93b4599",
"rev": "4cba8b53da471aea2ab2b0c1f30a81e7c451f4b6",
"type": "github"
},
"original": {
@ -1003,11 +1003,11 @@
},
"nur": {
"locked": {
"lastModified": 1712669145,
"narHash": "sha256-a2f84spXeiQM13f0K+WRi/bT2C1i44AJddvzfredhfM=",
"lastModified": 1712832312,
"narHash": "sha256-cCbPmeF4BZGfXqshK0X3h8ldwrOFQO0NNpmYXQVvRoY=",
"owner": "nix-community",
"repo": "NUR",
"rev": "916cd4c4d5c3e287ff4cc68fef4b86a1ee2c7799",
"rev": "a82af85f3b1d080245a9d4f7d8d03b8ee424236e",
"type": "github"
},
"original": {

View file

@ -82,11 +82,50 @@
inputs.nix-alien.overlays.default
inputs.nix-ld-rs.overlays.default
];
electronWorkaround = pkgs: rec {
electron_28 = pkgs.electron_28.overrideAttrs
(oldAttrs: rec {
buildCommand =
let
electron-unwrapped = pkgs.electron_28.passthru.unwrapped.overrideAttrs (oldAttrs: rec {
postPatch = builtins.replaceStrings [ "--exclude='src/third_party/blink/web_tests/*'" ] [ "--exclude='src/third_party/blink/web_tests/*' --exclude='src/content/test/data/*'" ] oldAttrs.postPatch;
});
in
''
gappsWrapperArgsHook
mkdir -p $out/bin
makeWrapper "${electron-unwrapped}/libexec/electron/electron" "$out/bin/electron" \
"''${gappsWrapperArgs[@]}" \
--set CHROME_DEVEL_SANDBOX $out/libexec/electron/chrome-sandbox
ln -s ${electron-unwrapped}/libexec $out/libexec
'';
});
electron = pkgs.electron.overrideAttrs
(oldAttrs: rec {
buildCommand =
let
electron-unwrapped = pkgs.electron.passthru.unwrapped.overrideAttrs (oldAttrs: rec {
postPatch = builtins.replaceStrings [ "--exclude='src/third_party/blink/web_tests/*'" ] [ "--exclude='src/third_party/blink/web_tests/*' --exclude='src/content/test/data/*'" ] oldAttrs.postPatch;
});
in
''
gappsWrapperArgsHook
mkdir -p $out/bin
makeWrapper "${electron-unwrapped}/libexec/electron/electron" "$out/bin/electron" \
"''${gappsWrapperArgs[@]}" \
--set CHROME_DEVEL_SANDBOX $out/libexec/electron/chrome-sandbox
ln -s ${electron-unwrapped}/libexec $out/libexec
'';
});
};
pkgs-args = {
inherit system overlays;
config = {
allowUnfree = true;
packageOverrides = pkgs: { };
packageOverrides = electronWorkaround;
permittedInsecurePackages = [
"electron-22.3.27"
"electron-24.8.6"

View file

@ -50,6 +50,9 @@
# Force radv
environment.variables.AMD_VULKAN_ICD = "RADV";
environment.systemPackages = with pkgs; [
## MONITORING TOOLS ##
nvtopPackages.amd # for AMD GPUs
vulkan-tools
libva-utils
glxinfo # TODO right place here or in desktop ?

View file

@ -75,6 +75,11 @@
git
vim # fallback ed
wget
## MONITORING TOOLS ##
btop # for CPU, RAM, and Disk monitoring
iotop # for disk I/O monitoring
iftop # for network I/O monitoring
];
fileSystems."/etc/nixos" = {