From 5fed5f56c5dc935e7674ff2e370fb7afa45392bd 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 | 79 +++++++++++++++--------------- flake.nix | 4 +- home/common/firefox.nix | 9 +--- home/common/gui.nix | 27 +++------- home/common/nvim.nix | 3 +- home/hosts/nixmsi.nix | 2 +- 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/hardware/bpi-r3/pkgs.nix | 57 +++++++++++---------- system/hosts/nixserver/home.nix | 4 +- system/hosts/router/default.nix | 17 +++---- system/modules/common.nix | 2 +- 16 files changed, 156 insertions(+), 153 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..4a4f047 100644 --- a/flake.lock +++ b/flake.lock @@ -69,11 +69,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1688254665, - "narHash": "sha256-8FHEgBrr7gYNiS/NzCxIO3m4hvtLRW9YY1nYo1ivm3o=", + "lastModified": 1690933134, + "narHash": "sha256-ab989mN63fQZBFrkk4Q8bYxQCktuHmBIBqUG1jl6/FQ=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "267149c58a14d15f7f81b4d737308421de9d7152", + "rev": "59cf3f1447cfc75087e7273b04b31e689a8599fb", "type": "github" }, "original": { @@ -107,11 +107,11 @@ ] }, "locked": { - "lastModified": 1690652600, - "narHash": "sha256-Dy09g7mezToVwtFPyY25fAx1hzqNXv73/QmY5/qyR44=", + "lastModified": 1691998815, + "narHash": "sha256-HuFgb+W1Dvd0mjjudpTf0hVg/YKKiMRpX14t7dJeTm8=", "owner": "nix-community", "repo": "home-manager", - "rev": "f58889c07efa8e1328fdf93dc1796ec2a5c47f38", + "rev": "da6874e8bb82204323b94154585a1471c739f73e", "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": 1692048568, + "narHash": "sha256-b//Inw4b68N38rcerDU9P6wldF804rQQmR8s3EHOR/E=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "5f7dba14d70d5d43440b169e7309b78c7f420295", + "rev": "58422c29f4208e2c2e9b4b7d2704f9c31c5b9507", "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": 1691963046, + "narHash": "sha256-6K2UtOT3RnsTzqkZVRJRR4A9BLAwg6kLEsRRR6FjBeY=", "owner": "chayleaf", "repo": "nixos-router", - "rev": "c9528e1dc5acc77273543c88db47088ea5dd28b4", + "rev": "2041ec14178acdb1ae6412c4da1ef766f20c545d", "type": "github" }, "original": { @@ -243,15 +243,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1691178599, - "narHash": "sha256-P4r79P2toVs0dfjXvyIp8QdnNcrFQQRFEUl/fHJBNz0=", + "lastModified": 1692034721, + "narHash": "sha256-2LRUPajtgMEUZCWvF5RkwKMpKy1grxS6lNdWkXZ7IEo=", "owner": "chayleaf", "repo": "nixpkgs", - "rev": "f18d5184718a901ba5b1ab437570ad291cc1873c", + "rev": "c412885a154f0fbd0e11195c78d473f40f0e03c4", "type": "github" }, "original": { "owner": "chayleaf", + "ref": "ccache", "repo": "nixpkgs", "type": "github" } @@ -259,11 +260,11 @@ "nixpkgs-lib": { "locked": { "dir": "lib", - "lastModified": 1688049487, - "narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=", + "lastModified": 1690881714, + "narHash": "sha256-h/nXluEqdiQHs1oSgkOOWF+j8gcJMWhwnZ9PFabN6q0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9", + "rev": "9e1960bc196baf6881340d53dccb203a951745a2", "type": "github" }, "original": { @@ -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": 1692017787, + "narHash": "sha256-RVohbSWkS3iMexiF6w9QkMtmwsCRe7OLxJ0hgCe22/g=", "owner": "nix-community", "repo": "NUR", - "rev": "36a54ee4dea992172f1c83df36f8cf2f66f90598", + "rev": "2ba2c24ca845753a7c8a62f5e372b68a7e39b78e", "type": "github" }, "original": { @@ -354,11 +355,11 @@ ] }, "locked": { - "lastModified": 1690596958, - "narHash": "sha256-SWqxUiEP9O2gvlWtR4Ku6rIMGM7PuNZreAPrU2yAjsk=", + "lastModified": 1691979003, + "narHash": "sha256-kT7FB6+wiTPzXtzNdQJmBGyFGM3/9QvjDTF5YK3eYTs=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "5c06b0ed7bfb00f3a925af6c4acd1636596381c1", + "rev": "ce646c4052c4979078a1ed263bc6e8c1a14c0d07", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 9047040..f794319 100644 --- a/flake.nix +++ b/flake.nix @@ -2,8 +2,8 @@ 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"; + nixpkgs.url = "github:chayleaf/nixpkgs/ccache"; 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..ba8ca93 100644 --- a/home/hosts/nixmsi.nix +++ b/home/hosts/nixmsi.nix @@ -65,7 +65,7 @@ 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 diff --git a/pkgs/_sources/generated.json b/pkgs/_sources/generated.json index fce42d7..6260271 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-14", "extract": null, "name": "searxng", "passthru": null, "pinned": false, "src": { - "sha256": "sha256-Edv0SDcWG+c78iZwVnf2MBNDQFOABOZghnmfXGRaSeo=", + "sha256": "sha256-jkojLKFfM2Oq10YU54Kf/I+P7C1Qnrhl+7bd2RQhgMM=", "type": "tarball", - "url": "https://github.com/searxng/searxng/archive/65d8b1a3106800304e9ed31b6c3f26e5b3ee5fcd.tar.gz" + "url": "https://github.com/searxng/searxng/archive/7052a1a7cfa9aa691d854a9513d023e3fdc28fcf.tar.gz" }, - "version": "65d8b1a3106800304e9ed31b6c3f26e5b3ee5fcd" + "version": "7052a1a7cfa9aa691d854a9513d023e3fdc28fcf" } } \ No newline at end of file diff --git a/pkgs/_sources/generated.nix b/pkgs/_sources/generated.nix index 4502316..8708fa5 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 = "7052a1a7cfa9aa691d854a9513d023e3fdc28fcf"; src = fetchTarball { - url = "https://github.com/searxng/searxng/archive/65d8b1a3106800304e9ed31b6c3f26e5b3ee5fcd.tar.gz"; - sha256 = "sha256-Edv0SDcWG+c78iZwVnf2MBNDQFOABOZghnmfXGRaSeo="; + url = "https://github.com/searxng/searxng/archive/7052a1a7cfa9aa691d854a9513d023e3fdc28fcf.tar.gz"; + sha256 = "sha256-jkojLKFfM2Oq10YU54Kf/I+P7C1Qnrhl+7bd2RQhgMM="; }; - date = "2023-07-22"; + date = "2023-08-14"; }; } 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/hardware/bpi-r3/pkgs.nix b/system/hardware/bpi-r3/pkgs.nix index 1eccc4e..3bcd5fd 100644 --- a/system/hardware/bpi-r3/pkgs.nix +++ b/system/hardware/bpi-r3/pkgs.nix @@ -60,6 +60,32 @@ let url = "ftp://ftp.denx.de/pub/u-boot/u-boot-${ubootVersion}.tar.bz2"; hash = "sha256-tqp9fnGPQFeNGrkU/A6AusDEz7neh2KiR9HWbR7+WTY="; }; + # there are few direct hits with the linux kernel, so use CCACHE_NODIRECT + # (direct hits are file-based, non-direct are preprocessed file-based) + ccacheConfig = '' + export CCACHE_COMPRESS=1 + export CCACHE_DIR="/var/cache/ccache" + export CCACHE_UMASK=007 + export CCACHE_SLOPPINESS=include_file_mtime,time_macros + export CCACHE_NODIRECT=1 + if [ ! -d "$CCACHE_DIR" ]; then + echo "=====" + echo "Directory '$CCACHE_DIR' does not exist" + echo "Please create it with:" + echo " sudo mkdir -m0770 '$CCACHE_DIR'" + echo " sudo chown root:nixbld '$CCACHE_DIR'" + echo "=====" + exit 1 + fi + if [ ! -w "$CCACHE_DIR" ]; then + echo "=====" + echo "Directory '$CCACHE_DIR' is not accessible for user $(whoami)" + echo "Please verify its access permissions" + echo "=====" + exit 1 + fi + ''; + in rec { ubootBpiR3Sd = pkgs.buildUBoot { defconfig = "mt7986a_bpir3_sd_defconfig"; @@ -309,38 +335,11 @@ in rec { }; }; linux_bpiR3_ccache = linux_bpiR3.override { - stdenv = pkgs'.ccacheStdenv; + stdenv = pkgs'.ccacheStdenv.override { extraConfig = ccacheConfig; }; buildPackages = pkgs'.buildPackages // { - stdenv = pkgs'.buildPackages.ccacheStdenv; + stdenv = pkgs'.buildPackages.ccacheStdenv.override { extraConfig = ccacheConfig; }; }; }; linuxPackages_bpiR3 = pkgs.linuxPackagesFor linux_bpiR3; linuxPackages_bpiR3_ccache = pkgs.linuxPackagesFor linux_bpiR3_ccache; - # there are few direct hits with the linux kernel, so use CCACHE_NODIRECT - # (direct hits are file-based, non-direct are preprocessed file-based) - ccacheWrapper = pkgs.ccacheWrapper.override { - extraConfig = '' - export CCACHE_COMPRESS=1 - export CCACHE_DIR="/var/cache/ccache" - export CCACHE_UMASK=007 - export CCACHE_SLOPPINESS=include_file_mtime,time_macros - export CCACHE_NODIRECT=1 - if [ ! -d "$CCACHE_DIR" ]; then - echo "=====" - echo "Directory '$CCACHE_DIR' does not exist" - echo "Please create it with:" - echo " sudo mkdir -m0770 '$CCACHE_DIR'" - echo " sudo chown root:nixbld '$CCACHE_DIR'" - echo "=====" - exit 1 - fi - if [ ! -w "$CCACHE_DIR" ]; then - echo "=====" - echo "Directory '$CCACHE_DIR' is not accessible for user $(whoami)" - echo "Please verify its access permissions" - echo "=====" - exit 1 - fi - ''; - }; } 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/hosts/router/default.nix b/system/hosts/router/default.nix index 3bb5f46..be298fa 100644 --- a/system/hosts/router/default.nix +++ b/system/hosts/router/default.nix @@ -240,11 +240,12 @@ let vacuumAddress6 = addToIp parsedGatewayAddr6 2; hosted-domains = - builtins.concatLists - (builtins.attrValues - (builtins.mapAttrs - (k: v: [ k ] ++ v.serverAliases) - server-config.services.nginx.virtualHosts)); + builtins.filter (domain: domain != "localhost") + (builtins.concatLists + (builtins.attrValues + (builtins.mapAttrs + (k: v: [ k ] ++ v.serverAliases) + server-config.services.nginx.virtualHosts))); in { imports = [ ./options.nix ./metrics.nix ]; system.stateVersion = "22.11"; @@ -721,11 +722,7 @@ in { users.users.${config.common.mainUsername}.extraGroups = [ config.services.unbound.group ]; services.unbound = { enable = true; - package = pkgs.unbound-with-systemd.override { - stdenv = pkgs.ccacheStdenv; - withPythonModule = true; - python = pkgs.python3; - }; + package = pkgs.unbound-full; localControlSocketPath = "/run/unbound/unbound.ctl"; # we override resolvconf above manually resolveLocalQueries = false; 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;