This commit is contained in:
mjallen18
2026-01-14 18:00:52 -06:00
parent 59b4729636
commit 7306b08762
23 changed files with 197 additions and 155 deletions

View File

@@ -124,11 +124,13 @@ in
};
};
home.packages = with pkgs.${namespace}; [
home.packages =
with pkgs.${namespace};
[
bolt-launcher
# librepods
] ++ (with pkgs;
[
]
++ (with pkgs; [
iw
iwd
orca-slicer

View File

@@ -153,7 +153,7 @@ with lib;
extraConfig = mkOption {
type = with types; str;
default = '''';
default = "";
description = "Any extra configuration options";
};

View File

@@ -115,8 +115,8 @@ in
tarnow = "${getExe pkgs.gnutar} -acf ";
untar = "${getExe pkgs.gnutar} -zxvf ";
wget = "${getExe pkgs.wget} -c ";
remove-empty = ''${getExe' pkgs.findutils "find"} . -type d --empty --delete'';
print-empty = ''${getExe' pkgs.findutils "find"} . -type d --empty --print'';
remove-empty = "${getExe' pkgs.findutils "find"} . -type d --empty --delete";
print-empty = "${getExe' pkgs.findutils "find"} . -type d --empty --print";
dfh = "${getExe' pkgs.coreutils "df"} -h";
duh = "${getExe' pkgs.coreutils "du"} -h";
usage = "${getExe' pkgs.coreutils "du"} -ah -d1 | sort -rn 2>/dev/null";

View File

@@ -1,4 +1,9 @@
{ config, lib, namespace, ... }:
{
config,
lib,
namespace,
...
}:
let
hasDestopEnvironment =
config.${namespace}.desktop.cosmic.enable

View File

@@ -153,7 +153,10 @@ let
uefiBuilder = import ./uefi-builder.nix {
inherit pkgs;
uefiPackage = (
if (cfg.variant == "5") then pkgs.${namespace}.uefi-rpi5 else pkgs.${namespace}.edk2.override { MODEL = "4"; }
if (cfg.variant == "5") then
pkgs.${namespace}.uefi-rpi5
else
pkgs.${namespace}.edk2.override { MODEL = "4"; }
);
firmwareBuilder = firmwarePopulateCmd;
};

View File

@@ -19,9 +19,9 @@ in
{
options.${namespace}.hardware = {
raspberry-pi.leds = {
eth.disable = mkDisableOption ''ethernet LEDs.'';
act.disable = mkDisableOption ''activity LED.'';
pwr.disable = mkDisableOption ''power LED.'';
eth.disable = mkDisableOption "ethernet LEDs.";
act.disable = mkDisableOption "activity LED.";
pwr.disable = mkDisableOption "power LED.";
};
};

View File

@@ -1,6 +1,5 @@
{
config,
system,
lib,
namespace,
...

View File

@@ -1,10 +1,19 @@
{ inputs, config, namespace, lib, pkgs, ... }:
{
inputs,
config,
namespace,
lib,
pkgs,
...
}:
let
inherit (lib.${namespace}) mkModule mkOpt mkBoolOpt;
inherit (lib.${namespace}) mkOpt;
name = "otbr";
cfg = config.${namespace}.services.${name};
otbrPackage = pkgs.callPackage "${inputs.nixpkgs-otbr}/pkgs/by-name/op/openthread-border-router/package.nix" { };
otbrPackage =
pkgs.callPackage "${inputs.nixpkgs-otbr}/pkgs/by-name/op/openthread-border-router/package.nix"
{ };
otbrConfig = lib.${namespace}.mkModule {
inherit config name;

View File

@@ -1,5 +1,5 @@
{ namespace, ... }:
final: super: {
{ ... }:
_final: _super: {
# ${namespace} = super.${namespace} // {
# linuxPackages_rpi5 = super.linuxPackagesFor (
# super.${namespace}.linux-rpi.override { stdenv = super.ccacheStdenv; }

View File

@@ -1,4 +1,4 @@
{ inputs, ... }:
{ ... }:
_final: _prev: {
# home-assistant = final.unstable.home-assistant;
# home-assistant-custom-components = final.unstable.home-assistant-custom-components;

View File

@@ -1,9 +1,10 @@
{ stdenv
, fetchFromGitHub
, lib
, MODEL ? "5"
, DEBUG ? "0"
, TFA_FLAGS ? ""
{
stdenv,
fetchFromGitHub,
lib,
MODEL ? "5",
DEBUG ? "0",
TFA_FLAGS ? "",
}:
stdenv.mkDerivation rec {
@@ -18,7 +19,9 @@ stdenv.mkDerivation rec {
};
# Add required host tools if needed:
nativeBuildInputs = [ /* dtc python3 openssl etc. */ ];
nativeBuildInputs = [
# dtc python3 openssl etc.
];
buildPhase = ''
make \

View File

@@ -1,12 +1,11 @@
{ stdenv
, lib
, src
, version ? "stable202511"
, python3
, git
, libuuid
, pkgs
, namespace
{
stdenv,
lib,
src,
version ? "stable202511",
python3,
git,
libuuid,
}:
let
pythonEnv = python3.withPackages (ps: [ ps.tkinter ]);

View File

@@ -1,25 +1,27 @@
{ stdenv
, fetchFromGitHub
, lib
, MODEL ? "5"
, RELEASE_TYPE ? "RELEASE"
, EDK2_FLAGS ? ""
, nasm
, perl
, python3
, python3Packages
, openssl
, git
, libuuid
, acpica-tools
, pkgs
, namespace
{
stdenv,
fetchFromGitHub,
lib,
MODEL ? "5",
RELEASE_TYPE ? "RELEASE",
EDK2_FLAGS ? "",
nasm,
perl,
python3,
python3Packages,
openssl,
git,
libuuid,
acpica-tools,
pkgs,
namespace,
}:
let
pname = "edk2";
version = "stable202511";
edk2Src = (if MODEL == "5" then
edk2Src = (
if MODEL == "5" then
fetchFromGitHub rec {
owner = "mjallen18";
repo = "edk2";
@@ -39,7 +41,8 @@ let
}
);
edk2NonOsiSrc = (if MODEL == "5" then
edk2NonOsiSrc = (
if MODEL == "5" then
fetchFromGitHub rec {
owner = "mjallen18";
repo = "edk2-non-osi";
@@ -57,7 +60,8 @@ let
}
);
edk2PlatformsSrc = (if MODEL == "5" then
edk2PlatformsSrc = (
if MODEL == "5" then
fetchFromGitHub rec {
owner = "mjallen18";
repo = "edk2-platforms";
@@ -75,7 +79,10 @@ let
}
);
baseTools = pkgs.${namespace}.edk2-basetools.override { version = "stable202511"; src = edk2Src; };
baseTools = pkgs.${namespace}.edk2-basetools.override {
version = "stable202511";
src = edk2Src;
};
armTrustedFirmware = pkgs.${namespace}.arm-trusted-firmware.override { inherit MODEL; };
pythonEnv = python3.withPackages (

View File

@@ -10,12 +10,10 @@
wayland,
libxkbcommon,
libGL,
vulkan-loader,
xorg,
expat,
fontconfig,
freetype,
gsettings-desktop-schemas,
}:
rustPlatform.buildRustPackage rec {

View File

@@ -21,7 +21,6 @@ let
version = "2506";
isAarch64 = stdenv.hostPlatform.system == "aarch64-linux";
isX86_64 = stdenv.hostPlatform.system == "x86_64-linux";
# Always extract x64 binaries (we'll emulate on aarch64)
sysArch = "x64";
@@ -129,7 +128,9 @@ let
# Create wrapper scripts for aarch64 that use FEX or muvm
# Option 1: Direct FEX execution (simpler, less isolation)
fexWrapper = pname: writeShellScript "${pname}-fex-wrapper" ''
fexWrapper =
pname:
writeShellScript "${pname}-fex-wrapper" ''
export FEXINTERPRETER="${fex}/bin/FEXInterpreter"
export FEX_ROOTFS="${fex}/share/fex-emu/RootFS"
@@ -140,7 +141,9 @@ let
'';
# Option 2: muvm + FEX (better isolation, handles kernel differences)
muvmWrapper = pname: writeShellScript "${pname}-muvm-wrapper" ''
muvmWrapper =
pname:
writeShellScript "${pname}-muvm-wrapper" ''
# muvm creates a lightweight VM with x86_64 emulation via FEX
# This provides better isolation and compatibility
@@ -152,25 +155,19 @@ let
'';
# Select the appropriate wrapper based on configuration
aarch64Wrapper = pname:
if useMusvm
then muvmWrapper pname
else fexWrapper pname;
aarch64Wrapper = pname: if useMusvm then muvmWrapper pname else fexWrapper pname;
# Final wrapper that handles both architectures
universalWrapper = pname:
if isAarch64
then aarch64Wrapper pname
else "${omnissaFHSUserEnv pname}/bin/${pname}";
desktopItem = makeDesktopItem {
name = "horizon-client";
desktopName = "Omnissa Horizon Client";
icon = "${omnissaHorizonClientFiles}/share/icons/horizon-client.png";
exec = "${
if isAarch64
then aarch64Wrapper mainProgram
else "${omnissaFHSUserEnv mainProgram}/bin/${mainProgram}"
if isAarch64 then
aarch64Wrapper mainProgram
else
"${omnissaFHSUserEnv mainProgram}/bin/${mainProgram}"
} %u";
mimeTypes = [
"x-scheme-handler/horizon-client"
@@ -193,17 +190,22 @@ stdenv.mkDerivation {
runHook preInstall
mkdir -p $out/bin
${if isAarch64 then ''
${
if isAarch64 then
''
# On aarch64, create wrapper scripts that use FEX/muvm
cp ${aarch64Wrapper "horizon-client"} $out/bin/horizon-client
chmod +x $out/bin/horizon-client
cp ${aarch64Wrapper "omnissa-usbarbitrator"} $out/bin/omnissa-usbarbitrator
chmod +x $out/bin/omnissa-usbarbitrator
'' else ''
''
else
''
# On x86_64, use native FHS environment directly
ln -s ${omnissaFHSUserEnv "horizon-client"}/bin/horizon-client $out/bin/
ln -s ${omnissaFHSUserEnv "omnissa-usbarbitrator"}/bin/omnissa-usbarbitrator $out/bin/
''}
''
}
runHook postInstall
'';
@@ -221,7 +223,10 @@ stdenv.mkDerivation {
description = "Allows you to connect to your Omnissa Horizon virtual desktop";
homepage = "https://www.omnissa.com/products/horizon-8/";
license = licenses.unfree;
platforms = [ "x86_64-linux" "aarch64-linux" ];
platforms = [
"x86_64-linux"
"aarch64-linux"
];
maintainers = with maintainers; [ mhutter ];
};
}

View File

@@ -66,11 +66,14 @@ lib.overrideDerivation
isLTS = true;
structuredExtraConfig = lib.mkIf (rpiVersion == 5) (with lib.kernel; {
structuredExtraConfig = lib.mkIf (rpiVersion == 5) (
with lib.kernel;
{
CONFIG_ARM64_4K_PAGES = lib.mkForce no;
CONFIG_ARM64_64K_PAGES = lib.mkForce no;
CONFIG_ARM64_16K_PAGES = lib.mkForce yes;
});
}
);
extraMeta =
if (rpiVersion < 3) then

View File

@@ -127,7 +127,6 @@
virt-manager
wget
(pkgs.OVMF.override {
secureBoot = true;
})

View File

@@ -16,8 +16,9 @@
nixpkgs = {
overlays = [
(self: super: {
linuxPackages_pi5-16k = pkgs.linuxPackagesFor (pkgs.linux_6_18.override {
(_self: _super: {
linuxPackages_pi5-16k = pkgs.linuxPackagesFor (
pkgs.linux_6_18.override {
structuredExtraConfig = with lib.kernel; {
CONFIG_ARM64_4K_PAGES = lib.mkForce no;
CONFIG_ARM64_64K_PAGES = lib.mkForce no;
@@ -27,7 +28,8 @@
CONFIG_OF_OVERLAY = yes;
};
ignoreConfigErrors = true;
});
}
);
})
];
};

View File

@@ -53,8 +53,16 @@
firewall = {
enable = true;
allowPing = true;
allowedTCPPorts = [ 8192 8880 8881 ];
allowedUDPPorts = [ 8192 8880 8881 ];
allowedTCPPorts = [
8192
8880
8881
];
allowedUDPPorts = [
8192
8880
8881
];
};
};