From 81e2cfe744bef7577a2262c6c5727721e3c65095 Mon Sep 17 00:00:00 2001 From: Julien Moutinho <julm@sourcephile.fr> Date: Thu, 28 Mar 2024 01:52:55 +0100 Subject: [PATCH] carotte: fix build --- flake.nix | 4 ++-- hosts/carotte.nix | 8 +++++--- hosts/carotte/networking.nix | 2 +- hosts/carotte/security.nix | 2 ++ nixos/profiles/hardware/cubieboard2.nix | 12 +++++++----- nixos/profiles/systems/crossCompilation.nix | 4 ++-- 6 files changed, 19 insertions(+), 13 deletions(-) diff --git a/flake.nix b/flake.nix index 9983a37..ead9d87 100644 --- a/flake.nix +++ b/flake.nix @@ -119,7 +119,7 @@ apps = forAllSystems ({ pkgs, system, ... }: with builtins; mapAttrs - (hostName: { config, ... }: + (hostName: { config, pkgs, ... }: let inherit (config.system) build; target = "\"\${TARGET:-root@${config.networking.hostName}.wg}\""; @@ -180,7 +180,7 @@ ''); # Example: nix run .#carotte.install-sd # DELETEME: quite useless, better to use nixos-install - "install-sd" = scriptApp "install-sd" [ zstd ] '' + "install-sd" = scriptApp "install-sd" [ pkgs.zstd ] '' set -o pipefail nix-store --add-root hosts/${hostName}.root --indirect --realise ${build.sdImage} unzstd --stdout ${build.sdImage}/sd-image/*.img.zst | diff --git a/hosts/carotte.nix b/hosts/carotte.nix index 2e0acac..4fbefa4 100644 --- a/hosts/carotte.nix +++ b/hosts/carotte.nix @@ -9,17 +9,19 @@ { install.substituteOnDestination = false; } - ../nixos/defaults.nix + (inputs.julm-nix + "/nixos/profiles/builder.nix") + (inputs.julm-nix + "/nixos/profiles/lang-fr.nix") + (inputs.julm-nix + "/nixos/profiles/networking/remote.nix") ../nixos/profiles/systems/debug.nix #carotte/fileSystems.nix carotte/hardware.nix - carotte/hostapd.nix + #carotte/hostapd.nix carotte/networking.nix carotte/security.nix carotte/system.nix carotte/users.nix - (inputs.secrets + "/hosts/${hostName}/users.nix") + #(inputs.secrets + "/hosts/${hostName}/users.nix") #carotte/xserver.nix ]; } diff --git a/hosts/carotte/networking.nix b/hosts/carotte/networking.nix index 0039e4e..f29b8ab 100644 --- a/hosts/carotte/networking.nix +++ b/hosts/carotte/networking.nix @@ -1,7 +1,7 @@ { hostName, ... }: { imports = [ - networking/wireguard/intranet.nix + #networking/wireguard/intranet.nix ]; networking = { hostName = hostName; diff --git a/hosts/carotte/security.nix b/hosts/carotte/security.nix index af3d09f..e582910 100644 --- a/hosts/carotte/security.nix +++ b/hosts/carotte/security.nix @@ -2,6 +2,7 @@ { security.lockKernelModules = false; security.virtualisation.flushL1DataCache = lib.mkForce null; + /* security.gnupg.agent = { keyring."C7BCEA3D090956E7D51E94ADFF53191D9FA89552" = { passwordGpg = "gnupg/root.gpg"; @@ -12,4 +13,5 @@ # This is for removing remote gpg-agent's socket StreamLocalBindUnlink yes ''; + */ } diff --git a/nixos/profiles/hardware/cubieboard2.nix b/nixos/profiles/hardware/cubieboard2.nix index d138c73..df0aafe 100644 --- a/nixos/profiles/hardware/cubieboard2.nix +++ b/nixos/profiles/hardware/cubieboard2.nix @@ -38,21 +38,23 @@ "console=tty0" ]; boot.kernelPatches = [ + /* { name = "0001-core_pattern-fix-too-small-CORENAME_MAX_SIZE"; patch = ../../../nixpkgs/patches/linux/0001-core_pattern-fix-too-small-CORENAME_MAX_SIZE.patch; extraConfig = '' ''; } + */ ]; #nixpkgs.config.allowUnfree = true; - nixpkgs.crossSystem = lib.systems.examples.armv7l-hf-multiplatform; + #nixpkgs.crossSystem = lib.systems.examples.armv7l-hf-multiplatform; nixpkgs.overlays = [ (_final: super: { # https://linux-sunxi.org/Mali_Open_Source_Driver#Configuration_and_Build mesa = super.mesa.override { - driDrivers = [ ]; + #driDrivers = [ ]; eglPlatforms = [ "x11" ]; enableGalliumNine = false; galliumDrivers = [ "lima" "panfrost" "kmsro" "swrast" ]; @@ -790,7 +792,7 @@ DRM_PANEL_ORIENTATION_QUIRKS = no; DRM_LIB_RANDOM = no; - INFINIBAND = no; + INFINIBAND = lib.mkForce no; INPUT_TOUCHSCREEN = no; MEDIA_ANALOG_TV_SUPPORT = lib.mkForce no; MEDIA_DIGITAL_TV_SUPPORT = lib.mkForce no; @@ -814,8 +816,8 @@ }); }) ]; - boot.cleanTmpDir = true; - boot.tmpOnTmpfs = lib.mkForce false; + boot.tmp.cleanOnBoot = true; + boot.tmp.useTmpfs = lib.mkForce false; # TODO: is that needed? hardware.enableRedistributableFirmware = true; sdImage = { diff --git a/nixos/profiles/systems/crossCompilation.nix b/nixos/profiles/systems/crossCompilation.nix index 82ac91c..fbde13a 100644 --- a/nixos/profiles/systems/crossCompilation.nix +++ b/nixos/profiles/systems/crossCompilation.nix @@ -4,7 +4,7 @@ (final: super: { gnupg = super.gnupg.override { # Wants polkit which wants spidermonkey (slow to compile) - pcsclite = null; + pcsclite = final.hello; }; systemd = super.systemd.override { # Wants tpm2-tss which does not cross-compile @@ -13,7 +13,7 @@ withEfi = false; }; # https://logs.nix.samueldr.com/nixos/2019-07-23#2416964; - xorg = super.xorg.overrideScope' (_ofinal: _osuper: { + xorg = super.xorg.overrideScope (_ofinal: _osuper: { fontadobe100dpi = final.hello; fontadobe75dpi = final.hello; fontcursormisc = final.hello; -- 2.47.2