diff --git a/flake.lock b/flake.lock index f593078..7a12b04 100644 --- a/flake.lock +++ b/flake.lock @@ -107,11 +107,11 @@ ] }, "locked": { - "lastModified": 1689134369, - "narHash": "sha256-0G9dutIvhS/WUr3Awcnqw71g8EVVvvkOhVDnDDbY4Fw=", + "lastModified": 1690652600, + "narHash": "sha256-Dy09g7mezToVwtFPyY25fAx1hzqNXv73/QmY5/qyR44=", "owner": "nix-community", "repo": "home-manager", - "rev": "e42fb59768f0305085abde0dd27ab5e0cc15420c", + "rev": "f58889c07efa8e1328fdf93dc1796ec2a5c47f38", "type": "github" }, "original": { @@ -143,11 +143,11 @@ ] }, "locked": { - "lastModified": 1688069522, - "narHash": "sha256-yvn2wt2AY0u4NElWffiJrrtNEj14lBLlIyvDOmP72Qw=", + "lastModified": 1690670967, + "narHash": "sha256-kKQaqyg7NKQo2bDEDg6KzSM1gB6uL91BejGJ758XhX8=", "owner": "chayleaf", "repo": "maubot.nix", - "rev": "d90b8eebe37c4382d2588e94a6bc721ca6e5f476", + "rev": "dfd38f11373ecf7f147b088db3076260814778a1", "type": "github" }, "original": { @@ -164,11 +164,11 @@ ] }, "locked": { - "lastModified": 1689556975, - "narHash": "sha256-0rft9zKuYa3dDpMywFHUTUl7+fKu7P9u8lsA1esMndA=", + "lastModified": 1690592860, + "narHash": "sha256-DA/gv8gmYHrYjDSEmpk5mTWVXkI2+7hHhqZfUxK+mb8=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "779075ec32036efc14fbcaa9a328bba860e964c6", + "rev": "5f7dba14d70d5d43440b169e7309b78c7f420295", "type": "github" }, "original": { @@ -179,11 +179,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1689060619, - "narHash": "sha256-vODUkZLWFVCvo1KPK3dC2CbXjxa9antEn5ozwlcTr48=", + "lastModified": 1690200740, + "narHash": "sha256-aRkEXGmCbAGcvDcdh/HB3YN+EvoPoxmJMOaqRZmf6vM=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "44bc025007e5fcc10dbc3d9f96dcbf06fc0e8c1c", + "rev": "ba9650b14e83b365fb9e731f7d7c803f22d2aecf", "type": "github" }, "original": { @@ -208,11 +208,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1689103880, - "narHash": "sha256-vHRCkcpnBbFsPqUNXliUmdPU81jqyuL9ZPzj3vJx2RE=", + "lastModified": 1689976554, + "narHash": "sha256-uWJq3sIhkqfzPmfB2RWd5XFVooGFfSuJH9ER/r302xQ=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "69a4b7ad67d2732ba1f86666b3d4d2d83b15200e", + "rev": "c63f6e7b053c18325194ff0e274dba44e8d2271e", "type": "gitlab" }, "original": { @@ -243,16 +243,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1689168768, - "narHash": "sha256-mCw3LPg2jJkapvJpkd1IZ8k0IJlSG2ECvz3vcOAu+Uo=", + "lastModified": 1690548937, + "narHash": "sha256-x3ZOPGLvtC0/+iFAg9Kvqm/8hTAIkGjc634SqtgaXTA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6fd9edc94426a3c050ad589c8f033b5ca55454c7", + "rev": "2a9d660ff0f7ffde9d73be328ee6e6f10ef66b28", "type": "github" }, "original": { "owner": "nixos", - "ref": "master", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -275,22 +275,6 @@ "type": "github" } }, - "nixpkgs2": { - "locked": { - "lastModified": 1689008574, - "narHash": "sha256-VFMgyHDiqsGDkRg73alv6OdHJAqhybryWHv77bSCGIw=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "4a729ce4b1fe5ec4fffc71c67c96aa5184ebb462", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "notlua": { "inputs": { "nixpkgs": [ @@ -298,11 +282,11 @@ ] }, "locked": { - "lastModified": 1688049338, - "narHash": "sha256-HRWFIl2UY6wVUc/xJh3kKX/Nb3kTm33e39ZO7MnY+x0=", + "lastModified": 1689273444, + "narHash": "sha256-tRT6o8Y6J5Qd1ZM7To0syjp7c/bFG5Pg+OPeJfYdCqY=", "owner": "chayleaf", "repo": "notlua", - "rev": "1582e95567c13d5bf103e035a7cd18ce901b5186", + "rev": "d9ee5cfc40cf7c8f266ef22ac420586f54d0bb01", "type": "github" }, "original": { @@ -318,11 +302,11 @@ ] }, "locked": { - "lastModified": 1689165382, - "narHash": "sha256-sBaEdI+lVJ6bcn287g3z8uc4wCRz9E+S5m67MWi/t6I=", + "lastModified": 1689260608, + "narHash": "sha256-GHnXziKo8EzGnvMzKEExA5/H3N1Hp3GtRy84E2z4YN8=", "owner": "chayleaf", "repo": "notnft", - "rev": "2ad8d7f831e05e0e646d345350f59b7030cb1cd6", + "rev": "98ff79679cfdc31f49abaeb513cb6d36905dd32e", "type": "github" }, "original": { @@ -333,11 +317,11 @@ }, "nur": { "locked": { - "lastModified": 1689162346, - "narHash": "sha256-/Aaygnbta0Dd5cyKZVk3AVA/MEmcWjEasYzUQa/tkJc=", + "lastModified": 1690659950, + "narHash": "sha256-3A0k6K8EPVRXwVPb/u53SHBb0wnx168WAxHR4CIUSa0=", "owner": "nix-community", "repo": "NUR", - "rev": "b1a645e8e9fee78ad8e1f32575a29d1af8de9cf8", + "rev": "36a54ee4dea992172f1c83df36f8cf2f66f90598", "type": "github" }, "original": { @@ -357,7 +341,6 @@ "nixos-mailserver": "nixos-mailserver", "nixos-router": "nixos-router", "nixpkgs": "nixpkgs", - "nixpkgs2": "nixpkgs2", "notlua": "notlua", "notnft": "notnft", "nur": "nur", @@ -372,11 +355,11 @@ ] }, "locked": { - "lastModified": 1689129196, - "narHash": "sha256-/z/Al4sFcIh5oPQWA9MclQmJR9g3RO8UDiHGaj/T9R8=", + "lastModified": 1690596958, + "narHash": "sha256-SWqxUiEP9O2gvlWtR4Ku6rIMGM7PuNZreAPrU2yAjsk=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "db8d909c9526d4406579ee7343bf2d7de3d15eac", + "rev": "5c06b0ed7bfb00f3a925af6c4acd1636596381c1", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 685ab4d..2439a86 100644 --- a/flake.nix +++ b/flake.nix @@ -2,8 +2,7 @@ description = "NixOS + Home Manager configuration of chayleaf"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/master"; - nixpkgs2.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixos-hardware.url = "github:NixOS/nixos-hardware"; impermanence.url = "github:nix-community/impermanence"; nur.url = "github:nix-community/NUR"; @@ -49,7 +48,7 @@ }; }; - outputs = inputs@{ self, nixpkgs, nixpkgs2, nixos-hardware, impermanence, home-manager, nur, nix-gaming, notlua, notnft, nixos-mailserver, nixos-router, maubot, ... }: + outputs = inputs@{ self, nixpkgs, nixos-hardware, impermanence, home-manager, nur, nix-gaming, notlua, notnft, nixos-mailserver, nixos-router, maubot, ... }: let # --impure required for developing # it takes the paths for modules from filesystem as opposed to flake inputs @@ -90,28 +89,42 @@ }; # I override some settings down the line, but overlays always stay the same mkPkgs = config: import nixpkgs (config // { - overlays = (if config?overlays then config.overlays else [ ]) ++ [ overlay ]; + overlays = (config.overlays or [ ]) ++ [ overlay ]; }); # this is actual config, it gets processed below config = let - mkBpiR3 = storage: config: config // { + mkBpiR3 = args: config: config // { system = "aarch64-linux"; - modules = (config.modules or [ ]) ++ [ (import ./system/devices/bpi-r3-router.nix storage) ]; + modules = (config.modules or [ ]) ++ [ (import ./system/devices/bpi-r3-router.nix args) ]; }; routerConfig = rec { system = "aarch64-linux"; specialArgs.server-config = nixosConfigurations.nixserver.config; modules = [ { - _module.args.pkgs2 = import nixpkgs2 { inherit system; overlays = [ overlay ]; }; _module.args.notnft = if devNft then (import /${devPath}/notnft { inherit (nixpkgs) lib; }).config.notnft else notnft.lib.${system}; } (if devNixRt then import /${devPath}/nixos-router else nixos-router.nixosModules.default) ]; }; - in { + crossConfig' = from: config: config // { + modules = config.modules ++ [ + { + _module.args.fromSourcePkgs = (mkPkgs { system = from; }).pkgsCross.${{ + aarch64-linux = "aarch64-multiplatform"; + }.${config.system}}; + } + ]; + }; + crossConfig = config: crossConfig' ({ + x86_64-linux = "aarch64-linux"; + aarch64-linux = "x86_64-linux"; + }.${config.system or "x86_64-linux"}) config; + in rec { router-emmc = mkBpiR3 "emmc" routerConfig; router-sd = mkBpiR3 "sd" routerConfig; + router-emmc-cross = crossConfig router-emmc; + router-sd-cross = crossConfig router-emmc; nixserver = { modules = [ nixos-mailserver.nixosModules.default @@ -119,6 +132,7 @@ (if devMaubot then import /${devPath}/maubot.nix/module else maubot.nixosModules.default) ]; }; + nixserver-cross = crossConfig nixserver; nixmsi = rec { system = "x86_64-linux"; modules = [ @@ -134,6 +148,7 @@ ./home/hosts/nixmsi.nix ]; }; + nixmsi-cross = crossConfig nixmsi; }; # this is the system config processing part @@ -252,7 +267,7 @@ "x86_64-linux" "aarch64-linux" ] (system: let self = overlay self (import nixpkgs { inherit system; }); in self ); - nixosImages.router = let pkgs = import nixpkgs { system = "aarch64-linux"; overlays = [ overlay ]; }; in { + nixosImages.router = let pkgs = mkPkgs { system = "aarch64-linux"; }; in { emmcImage = pkgs.callPackage ./system/hardware/bpi-r3/image.nix { inherit (nixosConfigurations.router-emmc) config; rootfsImage = nixosConfigurations.router-emmc.config.system.build.rootfsImage; @@ -268,7 +283,7 @@ hydraJobs = { server.${config.nixserver.system or "x86_64-linux"} = nixosConfigurations.nixserver.config.system.build.toplevel; workstation.${config.nixmsi.system or "x86_64-linux"} = nixosConfigurations.nixmsi.config.system.build.toplevel; - router.${config.router-emmc.system or "x86_64-linux"} = nixosConfigurations.router-emmc.config.system.build.toplevel; + router.${config.router-emmc.system or "x86_64-linux"} = nixosConfigurations.router-emmc-cross.config.system.build.toplevel; workstation-home.${config.nixmsi.system or "x86_64-linux"} = homeConfigurations."user@nixmsi".activation-script; }; }; diff --git a/home/hosts/nixmsi.nix b/home/hosts/nixmsi.nix index 2335a7b..77f4e25 100644 --- a/home/hosts/nixmsi.nix +++ b/home/hosts/nixmsi.nix @@ -67,7 +67,7 @@ ghidra cutter2 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 db61001..fce42d7 100644 --- a/pkgs/_sources/generated.json +++ b/pkgs/_sources/generated.json @@ -37,24 +37,24 @@ "pinned": false, "src": { "name": null, - "sha256": "sha256-0ePO6ZzsZpAb9iM++k4fYDwKzJpuZNgfPKwZePAUc0Y=", + "sha256": "sha256-yZn4vrG9FCX2Wvpz3aKPaqBK4ttNupZmrmX13QBDZFo=", "type": "url", - "url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-6/GE-Proton8-6.tar.gz" + "url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-9/GE-Proton8-9.tar.gz" }, - "version": "GE-Proton8-6" + "version": "GE-Proton8-9" }, "searxng": { "cargoLocks": null, - "date": "2023-07-07", + "date": "2023-07-22", "extract": null, "name": "searxng", "passthru": null, "pinned": false, "src": { - "sha256": "sha256-eOq4vZ8690H1lCRu8LXgUJvc/4lY+VqvVOqRyEURreI=", + "sha256": "sha256-Edv0SDcWG+c78iZwVnf2MBNDQFOABOZghnmfXGRaSeo=", "type": "tarball", - "url": "https://github.com/searxng/searxng/archive/cada89ee3648de6ca5b458aeacafe6c10d5230a2.tar.gz" + "url": "https://github.com/searxng/searxng/archive/65d8b1a3106800304e9ed31b6c3f26e5b3ee5fcd.tar.gz" }, - "version": "cada89ee3648de6ca5b458aeacafe6c10d5230a2" + "version": "65d8b1a3106800304e9ed31b6c3f26e5b3ee5fcd" } } \ No newline at end of file diff --git a/pkgs/_sources/generated.nix b/pkgs/_sources/generated.nix index 6e48c14..4502316 100644 --- a/pkgs/_sources/generated.nix +++ b/pkgs/_sources/generated.nix @@ -20,19 +20,19 @@ }; proton-ge = { pname = "proton-ge"; - version = "GE-Proton8-6"; + version = "GE-Proton8-9"; src = fetchurl { - url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-6/GE-Proton8-6.tar.gz"; - sha256 = "sha256-0ePO6ZzsZpAb9iM++k4fYDwKzJpuZNgfPKwZePAUc0Y="; + url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-9/GE-Proton8-9.tar.gz"; + sha256 = "sha256-yZn4vrG9FCX2Wvpz3aKPaqBK4ttNupZmrmX13QBDZFo="; }; }; searxng = { pname = "searxng"; - version = "cada89ee3648de6ca5b458aeacafe6c10d5230a2"; + version = "65d8b1a3106800304e9ed31b6c3f26e5b3ee5fcd"; src = fetchTarball { - url = "https://github.com/searxng/searxng/archive/cada89ee3648de6ca5b458aeacafe6c10d5230a2.tar.gz"; - sha256 = "sha256-eOq4vZ8690H1lCRu8LXgUJvc/4lY+VqvVOqRyEURreI="; + url = "https://github.com/searxng/searxng/archive/65d8b1a3106800304e9ed31b6c3f26e5b3ee5fcd.tar.gz"; + sha256 = "sha256-Edv0SDcWG+c78iZwVnf2MBNDQFOABOZghnmfXGRaSeo="; }; - date = "2023-07-07"; + date = "2023-07-22"; }; } diff --git a/pkgs/default.nix b/pkgs/default.nix index cdd4e45..40a1b18 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -43,7 +43,7 @@ in ''; }; rofi-steam-game-list = callPackage ./rofi-steam-game-list { }; - searxng = pkgs.searxng.overrideAttrs (old: { + searxng = pkgs.searxng.overridePythonAttrs (old: { inherit (sources.searxng) src; version = "unstable-" + sources.searxng.date; propagatedBuildInputs = old.propagatedBuildInputs ++ (with pkgs'.python3.pkgs; [ diff --git a/system/devices/bpi-r3-router.nix b/system/devices/bpi-r3-router.nix index 9a94b98..3c2eee3 100644 --- a/system/devices/bpi-r3-router.nix +++ b/system/devices/bpi-r3-router.nix @@ -1,6 +1,6 @@ storage: -{ config, ... }: +{ config, lib, ... }: let rootUuid = "44444444-4444-4444-8888-888888888888"; diff --git a/system/hardware/bpi-r3/default.nix b/system/hardware/bpi-r3/default.nix index 287df7f..f38e388 100644 --- a/system/hardware/bpi-r3/default.nix +++ b/system/hardware/bpi-r3/default.nix @@ -1,5 +1,4 @@ { pkgs -, pkgs2 , config , ... }: @@ -9,8 +8,7 @@ generic-extlinux-compatible.enable = true; }; - # boot.kernelPackages = pkgs.linuxPackages_testing; - boot.kernelPackages = pkgs2.linuxPackages_bpiR3; + boot.kernelPackages = config._module.args.fromSourcePkgs.linuxPackages_bpiR3 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 132f634..1eccc4e 100644 --- a/system/hardware/bpi-r3/pkgs.nix +++ b/system/hardware/bpi-r3/pkgs.nix @@ -117,10 +117,6 @@ in rec { fixupPhase = "true"; }; linux_bpiR3 = pkgs.linux_latest.override { - stdenv = pkgs'.ccacheStdenv; - buildPackages = pkgs'.buildPackages // { - stdenv = pkgs'.buildPackages.ccacheStdenv; - }; # there's probably more enabled-by-default configs that are better left disabled, but whatever structuredExtraConfig = with lib.kernel; { /* "Select this option if you are building a kernel for a server or @@ -265,8 +261,8 @@ in rec { COMMON_CLK_MEDIATEK_FHCTL = yes; COMMON_CLK_MT7986 = yes; COMMON_CLK_MT7986_ETHSYS = yes; - # CPU_THERMAL = yes; - # THERMAL_OF = yes; + CPU_THERMAL = yes; + THERMAL_OF = yes; EINT_MTK = yes; MEDIATEK_GE_PHY = yes; MEDIATEK_WATCHDOG = yes; @@ -312,7 +308,14 @@ in rec { MMC_MTK = yes; }; }; + linux_bpiR3_ccache = linux_bpiR3.override { + stdenv = pkgs'.ccacheStdenv; + buildPackages = pkgs'.buildPackages // { + stdenv = pkgs'.buildPackages.ccacheStdenv; + }; + }; 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 {