From 3a4fe00244549bc0161499737605624ac625043c Mon Sep 17 00:00:00 2001 From: chayleaf Date: Mon, 14 Aug 2023 03:50:27 +0700 Subject: [PATCH] update inputs --- extra-builtins.nix | 2 +- flake.lock | 71 +++++++++++++++--------------- flake.nix | 3 +- home/common/firefox.nix | 9 +--- home/common/gui.nix | 27 +++--------- home/common/nvim.nix | 3 +- home/hosts/nixmsi.nix | 4 +- pkgs/_sources/generated.json | 14 +++--- pkgs/_sources/generated.nix | 14 +++--- pkgs/chompjs.nix | 25 +++++++++++ pkgs/default.nix | 48 ++++++++++---------- system/hardware/bpi-r3/default.nix | 2 +- system/hosts/nixserver/home.nix | 4 +- system/modules/common.nix | 2 +- 14 files changed, 117 insertions(+), 111 deletions(-) create mode 100644 pkgs/chompjs.nix diff --git a/extra-builtins.nix b/extra-builtins.nix index 7b511a0..01d8312 100644 --- a/extra-builtins.nix +++ b/extra-builtins.nix @@ -5,7 +5,7 @@ copyToStore = pkgs: path: let archive = exec [ - "sh" "-c" + "/bin/sh" "-c" "echo '\"' && (cd /etc/nixos/private && tar czv ${path} 2>/dev/null | base64 -w0) && echo '\"'" ]; in "${pkgs.stdenvNoCC.mkDerivation { diff --git a/flake.lock b/flake.lock index 3e33c29..301001c 100644 --- a/flake.lock +++ b/flake.lock @@ -107,11 +107,11 @@ ] }, "locked": { - "lastModified": 1690652600, - "narHash": "sha256-Dy09g7mezToVwtFPyY25fAx1hzqNXv73/QmY5/qyR44=", + "lastModified": 1691882297, + "narHash": "sha256-e1/LAQSGLnBywfA1TfMl0Vj3tvYka73XOZ/D2/CJowE=", "owner": "nix-community", "repo": "home-manager", - "rev": "f58889c07efa8e1328fdf93dc1796ec2a5c47f38", + "rev": "c3ab5ea047e6dc73df530948f7367455749d8906", "type": "github" }, "original": { @@ -122,11 +122,11 @@ }, "impermanence": { "locked": { - "lastModified": 1684264534, - "narHash": "sha256-K0zr+ry3FwIo3rN2U/VWAkCJSgBslBisvfRIPwMbuCQ=", + "lastModified": 1690797372, + "narHash": "sha256-GImz19e33SeVcIvBB7NnhbJSbTpFFmNtWLh7Z85Y188=", "owner": "nix-community", "repo": "impermanence", - "rev": "89253fb1518063556edd5e54509c30ac3089d5e6", + "rev": "e3a7acd113903269a1b5c8b527e84ce7ee859851", "type": "github" }, "original": { @@ -143,11 +143,11 @@ ] }, "locked": { - "lastModified": 1690670967, - "narHash": "sha256-kKQaqyg7NKQo2bDEDg6KzSM1gB6uL91BejGJ758XhX8=", + "lastModified": 1691956035, + "narHash": "sha256-/BZBkQ9U1fz97hNblgEDZLnxnuBSoyu1MDouF7dkR9g=", "owner": "chayleaf", "repo": "maubot.nix", - "rev": "dfd38f11373ecf7f147b088db3076260814778a1", + "rev": "52022afdbb95b3acbfb8a7c60cb83f16391965ce", "type": "github" }, "original": { @@ -164,11 +164,11 @@ ] }, "locked": { - "lastModified": 1690592860, - "narHash": "sha256-DA/gv8gmYHrYjDSEmpk5mTWVXkI2+7hHhqZfUxK+mb8=", + "lastModified": 1691840527, + "narHash": "sha256-/uWb4ea3hr6uGQJxptMU4UumNiKcHZ9NUqq2W7fIVhM=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "5f7dba14d70d5d43440b169e7309b78c7f420295", + "rev": "e60190e96a7c22e9d0572ffa8b6d10811aa52e4c", "type": "github" }, "original": { @@ -179,11 +179,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1690200740, - "narHash": "sha256-aRkEXGmCbAGcvDcdh/HB3YN+EvoPoxmJMOaqRZmf6vM=", + "lastModified": 1691871742, + "narHash": "sha256-6yDNjfbAMpwzWL4y75fxs6beXHRANfYX8BNSPjYehck=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "ba9650b14e83b365fb9e731f7d7c803f22d2aecf", + "rev": "430a56dd16fe583a812b2df44dca002acab2f4f6", "type": "github" }, "original": { @@ -228,11 +228,11 @@ ] }, "locked": { - "lastModified": 1691308996, - "narHash": "sha256-eXxZ7Mib2U1pfcchrCqSGDRZBjCIbVIWEq93OcE6pEI=", + "lastModified": 1691619122, + "narHash": "sha256-E+r4TkIXgrLKY8zPzqpfYAmRgykqBuOuSXEYbBHkWPg=", "owner": "chayleaf", "repo": "nixos-router", - "rev": "c9528e1dc5acc77273543c88db47088ea5dd28b4", + "rev": "eece0699f54d8b7cbb6b8761ad77a3c86fb3c219", "type": "github" }, "original": { @@ -243,15 +243,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1691178599, - "narHash": "sha256-P4r79P2toVs0dfjXvyIp8QdnNcrFQQRFEUl/fHJBNz0=", - "owner": "chayleaf", + "lastModified": 1691951400, + "narHash": "sha256-5M4UuiUicOBiohCOyHaX/nKHDCZzrpPPdstcKzNpuFc=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "f18d5184718a901ba5b1ab437570ad291cc1873c", + "rev": "181318cb3c9eb368188138e45b29110619549413", "type": "github" }, "original": { - "owner": "chayleaf", + "owner": "nixos", + "ref": "master", "repo": "nixpkgs", "type": "github" } @@ -281,11 +282,11 @@ ] }, "locked": { - "lastModified": 1689273444, - "narHash": "sha256-tRT6o8Y6J5Qd1ZM7To0syjp7c/bFG5Pg+OPeJfYdCqY=", + "lastModified": 1691609126, + "narHash": "sha256-InbGoENdL8LNT/09pl7AW5uv2ZSDburqr5LgvkJDfj0=", "owner": "chayleaf", "repo": "notlua", - "rev": "d9ee5cfc40cf7c8f266ef22ac420586f54d0bb01", + "rev": "0e972a0d23f2faa511b9a3f6d445204e18cd5020", "type": "github" }, "original": { @@ -301,11 +302,11 @@ ] }, "locked": { - "lastModified": 1691303305, - "narHash": "sha256-9JUabsdRAZl4ixq4/m7+vryk4Tv4Dq3JTNAUxGV+nOU=", + "lastModified": 1691616520, + "narHash": "sha256-loZuL2YnMNwgH5GEZfXgXZadvo5P3Sp+YZSf9L3Wpu8=", "owner": "chayleaf", "repo": "notnft", - "rev": "f7fa096c285c0705bffc180d0d08ea82f3b8e957", + "rev": "118e25deeb741ba7963931212f02c96c50898578", "type": "github" }, "original": { @@ -316,11 +317,11 @@ }, "nur": { "locked": { - "lastModified": 1690659950, - "narHash": "sha256-3A0k6K8EPVRXwVPb/u53SHBb0wnx168WAxHR4CIUSa0=", + "lastModified": 1691949892, + "narHash": "sha256-HwI1BmPOnNz/+dJhUwueljqeCiNAQaWa140HFrMqB68=", "owner": "nix-community", "repo": "NUR", - "rev": "36a54ee4dea992172f1c83df36f8cf2f66f90598", + "rev": "5dfe5c73ab292b60d34c49b21a400e5f851fad66", "type": "github" }, "original": { @@ -354,11 +355,11 @@ ] }, "locked": { - "lastModified": 1690596958, - "narHash": "sha256-SWqxUiEP9O2gvlWtR4Ku6rIMGM7PuNZreAPrU2yAjsk=", + "lastModified": 1691892594, + "narHash": "sha256-Lt9/WUnI/ZqBYnHOC3n6Lg5jTfd/ZI+39jZx5HmolSQ=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "5c06b0ed7bfb00f3a925af6c4acd1636596381c1", + "rev": "c638e10caf94caaa97fb1df74e3bb467dc9b92db", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 9047040..8883642 100644 --- a/flake.nix +++ b/flake.nix @@ -2,8 +2,7 @@ description = "NixOS + Home Manager configuration of chayleaf"; inputs = { - # nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nixpkgs.url = "github:chayleaf/nixpkgs"; + nixpkgs.url = "github:nixos/nixpkgs/master"; nixos-hardware.url = "github:NixOS/nixos-hardware"; impermanence.url = "github:nix-community/impermanence"; nur.url = "github:nix-community/NUR"; diff --git a/home/common/firefox.nix b/home/common/firefox.nix index 8149b92..c687d38 100644 --- a/home/common/firefox.nix +++ b/home/common/firefox.nix @@ -28,13 +28,8 @@ programs.firefox = { enable = true; package = - let - # TODO: remove this override soon (it's already upstreamed) - librewolf-unwrapped = pkgs.librewolf-unwrapped.overrideAttrs (prev: { - MOZ_REQUIRE_SIGNING = ""; - }); - in pkgs.wrapFirefox librewolf-unwrapped { - inherit (librewolf-unwrapped) extraPrefsFiles extraPoliciesFiles; + pkgs.wrapFirefox pkgs.librewolf-unwrapped { + inherit (pkgs.librewolf-unwrapped) extraPrefsFiles extraPoliciesFiles; wmClass = "LibreWolf"; libName = "librewolf"; # TODO: keepass in extraNativeMessagingHosts? diff --git a/home/common/gui.nix b/home/common/gui.nix index 830abe2..6340bfd 100644 --- a/home/common/gui.nix +++ b/home/common/gui.nix @@ -34,7 +34,7 @@ tabbed # for preview ffmpeg ffmpegthumbnailer nsxiv imagemagick - zathura /*TODO libreoffice*/ fontpreview djvulibre poppler_utils + zathura /*libreoffice*/ fontpreview djvulibre poppler_utils ] ++ lib.optionals (!config.programs.mpv.enable) [ mpv ]; xdg.configFile."alsoft.conf".text = '' [general] @@ -162,7 +162,8 @@ # vaapi-device / vulkan-device # screen / vulkan-display-display audio-device = "pipewire"; - # because ao=pipewire doesn't work for whatever reason... + # because ao=pipewire doesn't work for audio-only files for whatever reason... + # TODO: hopefully remove it when it's fixed upstream ao = "pulse,alsa,jack,pipewire,"; audio-file-auto = "fuzzy"; sub-auto = "fuzzy"; @@ -251,25 +252,9 @@ # might check out some day (tm) # nyxt qutebrowser - # for updating parts of this repo - (nvfetcher.overrideAttrs (old: { - # HACK: replace nix with the nix version I use - postInstall = '' - wrapProgram "$out/bin/nvfetcher" --prefix 'PATH' ':' "${ - pkgs.lib.makeBinPath [ - pkgs.nvchecker - config.nix.package # nix-prefetch-url - pkgs.nix-prefetch-git - pkgs.nix-prefetch-docker - ] - }" - '' + (let - old-lines = lib.splitString "\n" old.postInstall; - first = builtins.head old-lines; - rest = builtins.tail old-lines; - in - assert lib.hasPrefix "wrapProgram " first; builtins.concatStringsSep "\n" rest); - })) + # for working with nix + nix-init + nvfetcher config.nur.repos.rycee.mozilla-addons-to-nix anki-bin diff --git a/home/common/nvim.nix b/home/common/nvim.nix index e04fbc0..86991a4 100644 --- a/home/common/nvim.nix +++ b/home/common/nvim.nix @@ -179,7 +179,8 @@ plugins = let ps = pkgs.vimPlugins; in map (x: if x?config && x?plugin then { type = "lua"; } // x else x) [ ps.vim-svelte # TODO remove on next nvim update (0.8.3/0.9? whenever they add builtin nix syntax) - ps.vim-nix + # testing the removal + # ps.vim-nix { plugin = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "vscode-nvim"; version = "2023-02-10"; diff --git a/home/hosts/nixmsi.nix b/home/hosts/nixmsi.nix index 3debab1..eb4ae70 100644 --- a/home/hosts/nixmsi.nix +++ b/home/hosts/nixmsi.nix @@ -65,10 +65,10 @@ home.packages = with pkgs; [ gimp krita blender-hip kdenlive glaxnimate mediainfo - ghidra cutter2 + ghidra (cutter.withPlugins (p: with p; [ sigdb rz-ghidra ])) openrgb piper steam-run steam - # faf-client + faf-client (osu-lazer-bin.override { command_prefix = "${obs-studio-plugins.obs-vkcapture}/bin/obs-gamecapture"; }) diff --git a/pkgs/_sources/generated.json b/pkgs/_sources/generated.json index fce42d7..eda336d 100644 --- a/pkgs/_sources/generated.json +++ b/pkgs/_sources/generated.json @@ -37,24 +37,24 @@ "pinned": false, "src": { "name": null, - "sha256": "sha256-yZn4vrG9FCX2Wvpz3aKPaqBK4ttNupZmrmX13QBDZFo=", + "sha256": "sha256-ldJBwp/9Cjb5k9FBrc6iz4/rnMhU5Ayf35+kNTAvXCg=", "type": "url", - "url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-9/GE-Proton8-9.tar.gz" + "url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-11/GE-Proton8-11.tar.gz" }, - "version": "GE-Proton8-9" + "version": "GE-Proton8-11" }, "searxng": { "cargoLocks": null, - "date": "2023-07-22", + "date": "2023-08-13", "extract": null, "name": "searxng", "passthru": null, "pinned": false, "src": { - "sha256": "sha256-Edv0SDcWG+c78iZwVnf2MBNDQFOABOZghnmfXGRaSeo=", + "sha256": "sha256-jQocVwpVl19BlyLxXQlLDcgl8+7+tnIaajObevJHdbw=", "type": "tarball", - "url": "https://github.com/searxng/searxng/archive/65d8b1a3106800304e9ed31b6c3f26e5b3ee5fcd.tar.gz" + "url": "https://github.com/searxng/searxng/archive/f175574f3731c99d82758952e37f52037476aa5f.tar.gz" }, - "version": "65d8b1a3106800304e9ed31b6c3f26e5b3ee5fcd" + "version": "f175574f3731c99d82758952e37f52037476aa5f" } } \ No newline at end of file diff --git a/pkgs/_sources/generated.nix b/pkgs/_sources/generated.nix index 4502316..a619951 100644 --- a/pkgs/_sources/generated.nix +++ b/pkgs/_sources/generated.nix @@ -20,19 +20,19 @@ }; proton-ge = { pname = "proton-ge"; - version = "GE-Proton8-9"; + version = "GE-Proton8-11"; src = fetchurl { - url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-9/GE-Proton8-9.tar.gz"; - sha256 = "sha256-yZn4vrG9FCX2Wvpz3aKPaqBK4ttNupZmrmX13QBDZFo="; + url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-11/GE-Proton8-11.tar.gz"; + sha256 = "sha256-ldJBwp/9Cjb5k9FBrc6iz4/rnMhU5Ayf35+kNTAvXCg="; }; }; searxng = { pname = "searxng"; - version = "65d8b1a3106800304e9ed31b6c3f26e5b3ee5fcd"; + version = "f175574f3731c99d82758952e37f52037476aa5f"; src = fetchTarball { - url = "https://github.com/searxng/searxng/archive/65d8b1a3106800304e9ed31b6c3f26e5b3ee5fcd.tar.gz"; - sha256 = "sha256-Edv0SDcWG+c78iZwVnf2MBNDQFOABOZghnmfXGRaSeo="; + url = "https://github.com/searxng/searxng/archive/f175574f3731c99d82758952e37f52037476aa5f.tar.gz"; + sha256 = "sha256-jQocVwpVl19BlyLxXQlLDcgl8+7+tnIaajObevJHdbw="; }; - date = "2023-07-22"; + date = "2023-08-13"; }; } diff --git a/pkgs/chompjs.nix b/pkgs/chompjs.nix new file mode 100644 index 0000000..cfe75d8 --- /dev/null +++ b/pkgs/chompjs.nix @@ -0,0 +1,25 @@ +# TODO: remove this file when searxng gets updated in nixpkgs +{ lib +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "chompjs"; + version = "1.2.2"; + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-I5PbVinyjO1OF78t9h67lVBM/VsogYoMj3iFZS4WTn8="; + }; + + pythonImportsCheck = [ "chompjs" ]; + + meta = with lib; { + description = "Parsing JavaScript objects into Python dictionaries"; + homepage = "https://pypi.org/project/chompjs/"; + license = licenses.mit; + maintainers = with maintainers; [ chayleaf ]; + }; +} diff --git a/pkgs/default.nix b/pkgs/default.nix index 4c88dfd..ffc0893 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -9,7 +9,7 @@ let sources = import ./_sources/generated.nix { inherit (pkgs) fetchgit fetchurl fetchFromGitHub dockerTools; }; - nixForNixPlugins = pkgs.nixVersions.nix_2_15; + nixForNixPlugins = pkgs.nixVersions.nix_2_17; in { @@ -31,33 +31,38 @@ in inherit (nix-gaming) faf-client osu-lazer-bin; inherit nixForNixPlugins; nix-plugins = pkgs.nix-plugins.overrideAttrs (old: { - src = old.src.override { - rev = "8b9d06ef5b1b4f53cc99fcfde72bae75c7a7aa9c"; - hash = "sha256-7Lo+YxpiRz0+ZLFDvYMJWWK2j0CyPDRoP1wAc+OaPJY="; - }; + version = "12.0.0"; + patches = [ + (pkgs.fetchpatch { + url = "https://github.com/shlevy/nix-plugins/pull/15/commits/f7534b96e70ca056ef793918733d1820af89a433.patch"; + hash = "sha256-ePRAnZAobasF6jA3QC73p8zyzayXORuodhus96V+crs="; + }) + ]; }); nix = nixForNixPlugins; nixVersions = pkgs.nixVersions.extend (self: super: { stable = nixForNixPlugins; unstable = nixForNixPlugins; }); - /* Various patches to change Nix version of existing packages so they don't error out because of nix-plugins in nix.conf + # Various patches to change Nix version of existing packages so they don't error out because of nix-plugins in nix.conf harmonia = pkgs.harmonia.override { nix = nixForNixPlugins; }; nix-init = pkgs.nix-init.override { nix = nixForNixPlugins; }; nix-serve = pkgs.nix-serve.override { nix = nixForNixPlugins; }; nix-serve-ng = pkgs.nix-serve-ng.override { nix = nixForNixPlugins; }; - nurl = pkgs.nurl.override { nixVersions = builtins.mapAttrs (k: v: nixForNixPlugins) pkgs.nixVersions; }; - */ - # TODO: - /*hydra_unstable = (pkgs.hydra_unstable.override { - nix = nixForNixPlugins; + hydra_unstable = (pkgs.hydra_unstable.override { + nix = nixForNixPlugins.overrideAttrs (old: { + # TODO: remove when https://github.com/NixOS/nix/issues/8796 is fixed or hydra code stops needing a fix + configureFlags = builtins.filter (x: x != "--enable-lto") (old.configureFlags or []); + }); }).overrideAttrs (old: { - version = "2023-05-08"; - src = old.src.override { - rev = "13ef4e3c5d87bc6f68c91a36d78cdc7d589d8ff2"; - sha256 = "sha256-niw0RHfwpo2/86wvtHrbU/DQYlkkwtrM+qG7GEC0qAo="; - }; - });*/ + patches = (old.patches or [ ]) ++ [ + (pkgs.fetchpatch { + url = "https://github.com/NixOS/hydra/pull/1296/commits/b23431a657d8a9b2f478c95dd81034780751a262.patch"; + hash = "sha256-ruTAIPUrPtfy8JkXYK2qigBrSa6KPXpJlORTNkUYrG0="; + }) + ]; + }); + nurl = pkgs.nurl.override { nix = nixForNixPlugins; }; clang-tools_latest = pkgs.clang-tools_16; clang_latest = pkgs.clang_16; @@ -91,6 +96,9 @@ in searxng = pkgs'.python3.pkgs.toPythonModule (pkgs.searxng.overrideAttrs (old: { inherit (sources.searxng) src; version = "unstable-" + sources.searxng.date; + propagatedBuildInputs = old.propagatedBuildInputs ++ [ + (pkgs'.python3.pkgs.callPackage ./chompjs.nix { }) + ]; })); # system76-scheduler = callPackage ./system76-scheduler.nix { }; techmino = callPackage ./techmino { }; @@ -116,10 +124,4 @@ in qemu = pkgs'.qemu_7; stdenv = pkgs'.ccacheStdenv; }; - - cutter2 = pkgs.callPackage ./rizin/wrapper.nix { - unwrapped = pkgs.cutter; - } [ (pkgs.libsForQt5.callPackage ./rizin/rz-ghidra.nix { - enableCutterPlugin = true; - }) ]; } // (import ../system/hardware/bpi-r3/pkgs.nix { inherit pkgs pkgs' lib sources; }) diff --git a/system/hardware/bpi-r3/default.nix b/system/hardware/bpi-r3/default.nix index f38e388..e56dbef 100644 --- a/system/hardware/bpi-r3/default.nix +++ b/system/hardware/bpi-r3/default.nix @@ -8,7 +8,7 @@ generic-extlinux-compatible.enable = true; }; - boot.kernelPackages = config._module.args.fromSourcePkgs.linuxPackages_bpiR3 or pkgs.linuxPackages_bpiR3_ccache; + boot.kernelPackages = config._module.args.fromSourcePkgs.linuxPackages_bpiR3_ccache or pkgs.linuxPackages_bpiR3_ccache; hardware.deviceTree.enable = true; hardware.deviceTree.filter = "mt7986a-bananapi-bpi-r3.dtb"; diff --git a/system/hosts/nixserver/home.nix b/system/hosts/nixserver/home.nix index 0c1798d..745b590 100644 --- a/system/hosts/nixserver/home.nix +++ b/system/hosts/nixserver/home.nix @@ -114,8 +114,6 @@ in { proxy_connect_timeout 300; proxy_send_timeout 300; '';*/ - # TODO: fix - # https://github.com/nix-community/harmonia/issues/120 locations."/".proxyPass = "http://${config.services.harmonia.settings.bind or "[::1]:5000"}"; locations."/".extraConfig = '' proxy_set_header Host $host; @@ -132,7 +130,7 @@ in { }; services.hydra = { - enable = false; + enable = true; hydraURL = "home.${cfg.domainName}/hydra"; listenHost = "127.0.0.1"; minimumDiskFree = 30; diff --git a/system/modules/common.nix b/system/modules/common.nix index 4d6afd8..5708bfb 100644 --- a/system/modules/common.nix +++ b/system/modules/common.nix @@ -100,6 +100,7 @@ in { kitty.terminfo # rxvt-unicode-unwrapped.terminfo ]); + # TODO: minimal fish config programs.vim = lib.mkIf cfg.minimal { defaultEditor = lib.mkDefault true; package = pkgs.vim-full.customize { @@ -132,7 +133,6 @@ in { }; # nixos-hardware uses mkDefault here, so we use slightly higher priority services.xserver.libinput.enable = mkForceDefault (!cfg.minimal); - # TODO: minimal fish/vim config /* services.xserver = { enable = true;