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,16 +124,18 @@ in
};
};
home.packages = with pkgs.${namespace}; [
bolt-launcher
# librepods
] ++ (with pkgs;
[
iw
iwd
orca-slicer
vscodium
]);
home.packages =
with pkgs.${namespace};
[
bolt-launcher
# librepods
]
++ (with pkgs; [
iw
iwd
orca-slicer
vscodium
]);
programs = {
password-store = enabled;

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
@@ -11,4 +16,4 @@ in
enable = true;
};
};
}
}

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;
@@ -25,7 +34,7 @@ let
listenAddress = cfg.listenAddress;
listenPort = cfg.port;
};
radio = {
radio = {
device = "/dev/serial/by-id/usb-dresden_elektronik_Thread_RCP__ConBee_II__DE2475318-if00";
baudRate = 460800;
flowControl = true;

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; }
@@ -69,16 +69,16 @@ final: super: {
# raspberrypi-utils = super.${namespace}.raspberrypi-utils;
# raspberrypi-udev-rules = super.${namespace}.udev-rules;
# mesa = super.mesa.override { buildPackages.stdenv = super.ccacheStdenv; };
# # "webkitgtk_4_1" = super.stable."webkitgtk_4_1".override { clangStdenv = super.ccacheStdenv; };
# # "webkitgtk_6_0" = super."webkitgtk_6_0".override { clangStdenv = super.ccacheStdenv; };
# "jellyfin-ffmpeg" = super."jellyfin-ffmpeg".override {
# ffmpeg_7-full = super.ffmpeg_7-full.override { stdenv = super.ccacheStdenv; };
# };
# # "ffmpeg-headless-rpi" = super."ffmpeg-headless-rpi".override { ffmpeg = super.ffmpeg_7.override { stdenv = super.ccacheStdenv; }; };
# # rocmPackages = super.rocmPackages // {
# # hipblaslt = super.rocmPackages.hipblaslt.override {
# # stdenv = super.ccacheStdenv;
@@ -93,13 +93,13 @@ final: super: {
# # inherit gpuTargets;
# # };
# # };
# pcsx2 = super.pcsx2.override {
# llvmPackages = super.llvmPackages // {
# stdenv = super.ccacheStdenv;
# };
# };
# driversi686Linux = super.driversi686Linux // {
# mesa = super.driversi686Linux.mesa.override {
# stdenv = super.ccacheStdenv;
@@ -108,21 +108,21 @@ final: super: {
# };
# };
# };
# kdePackages = super.kdePackages // {
# qt3d = super.kdePackages.qt3d.override {
# qtbase = super.kdePackages.qtbase.override { stdenv = super.ccacheStdenv; };
# };
# qtwebengine = super.stable.kdePackages.qtwebengine; # .override { stdenv = super.ccacheStdenv; };
# };
# # python3Packages = super.python3Packages // {
# # torch = super.python3Packages.torch.override {
# # stdenv = super.ccacheStdenv;
# # inherit gpuTargets;
# # };
# # };
# # piper-tts = super.piper-tts.overridePythonAttrs (oldAttrs: {
# # pythonCatchConflictsPhase = null;
# # });

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

@@ -45,7 +45,7 @@ in
linuxPackages_cachyos-server-lto-znver4 = cachyosPackages.cachyos-server-lto-znver4;
linuxPackages_cachyos-server-lto-16k = cachyosPackages.cachyos-server-lto-16k;
# RC
linuxPackages_cachyos-rc-lto = cachyosPackages.cachyos-rc-lto;
linuxPackages_cachyos-rc-lto-znver4 = cachyosPackages.cachyos-rc-lto-znver4;

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 \
@@ -47,4 +50,4 @@ stdenv.mkDerivation rec {
platforms = [ "aarch64-linux" ];
maintainers = with maintainers; [ kazenyuk ];
};
}
}

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 ]);
@@ -28,9 +27,9 @@ stdenv.mkDerivation rec {
# Add required host tools if needed:
nativeBuildInputs = [
python3
git
libuuid
python3
git
libuuid
];
# Dont force a single root; we keep both dirs side by side

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";
@@ -27,7 +29,7 @@ let
rev = "9765be56f1f816ef737153f5588b3294fcc69a63";
hash = "sha256-oqfJbNeOj2BVJqWE+snD6ri3lUO1aNcmPg+eJpjyr5E=";
fetchSubmodules = true;
}
}
else
fetchFromGitHub rec {
owner = "tianocore";
@@ -37,9 +39,10 @@ let
hash = "sha256-R/rgz8dWcDYVoiM67K2UGuq0xXbjjJYBPtJ1FmfGIaU=";
fetchSubmodules = true;
}
);
);
edk2NonOsiSrc = (if MODEL == "5" then
edk2NonOsiSrc = (
if MODEL == "5" then
fetchFromGitHub rec {
owner = "mjallen18";
repo = "edk2-non-osi";
@@ -55,10 +58,11 @@ let
rev = "94d048981116e2e3eda52dad1a89958ee404098d";
hash = "sha256-6yuvVvmGn4yaEksbbvGDX1ZcKpdWBKnwaNjLGvgAWyk=";
}
);
);
edk2PlatformsSrc = (if MODEL == "5" then
fetchFromGitHub rec {
edk2PlatformsSrc = (
if MODEL == "5" then
fetchFromGitHub rec {
owner = "mjallen18";
repo = "edk2-platforms";
name = repo;
@@ -73,9 +77,12 @@ let
rev = "0991a0b643509d900e5d023a0116789827a696e5";
hash = "sha256-IdACr0NStqEpC0TFoKKgDwKT2mqyJwVXW/B7hlRXccI=";
}
);
);
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

@@ -271,7 +271,7 @@ let
else
throw "Unsupported cachyos _hugepage";
pageSizeConfig =
pageSizeConfig =
if cachyConfig.pageSize == "16k" then
[
"-d CONFIG_ARM64_4K_PAGES"

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,48 +128,46 @@ 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" ''
export FEXINTERPRETER="${fex}/bin/FEXInterpreter"
export FEX_ROOTFS="${fex}/share/fex-emu/RootFS"
# Set up FEX environment
export FEX_TSOENABLED=1
exec ${fex}/bin/FEXBash -c '${omnissaFHSUserEnv pname}/bin/${pname} "$@"' -- "$@"
'';
fexWrapper =
pname:
writeShellScript "${pname}-fex-wrapper" ''
export FEXINTERPRETER="${fex}/bin/FEXInterpreter"
export FEX_ROOTFS="${fex}/share/fex-emu/RootFS"
# Set up FEX environment
export FEX_TSOENABLED=1
exec ${fex}/bin/FEXBash -c '${omnissaFHSUserEnv pname}/bin/${pname} "$@"' -- "$@"
'';
# Option 2: muvm + FEX (better isolation, handles kernel differences)
muvmWrapper = pname: writeShellScript "${pname}-muvm-wrapper" ''
# muvm creates a lightweight VM with x86_64 emulation via FEX
# This provides better isolation and compatibility
exec ${muvm}/bin/muvm \
--fex \
--share-display \
--share-sound \
-- ${omnissaFHSUserEnv pname}/bin/${pname} "$@"
'';
muvmWrapper =
pname:
writeShellScript "${pname}-muvm-wrapper" ''
# muvm creates a lightweight VM with x86_64 emulation via FEX
# This provides better isolation and compatibility
exec ${muvm}/bin/muvm \
--fex \
--share-display \
--share-sound \
-- ${omnissaFHSUserEnv pname}/bin/${pname} "$@"
'';
# 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"
@@ -192,19 +189,24 @@ stdenv.mkDerivation {
installPhase = ''
runHook preInstall
mkdir -p $out/bin
${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 ''
# 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/
''}
${
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
''
# 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

@@ -23,7 +23,7 @@ python3Packages.buildPythonPackage rec {
pythonRelaxDeps = [
"aiomqtt"
"pycryptodome"
];
];
build-system = with python3Packages; [
poetry-core

View File

@@ -16,7 +16,7 @@ let
# NOTE: raspberrypifw & raspberryPiWirelessFirmware should be updated with this
# all of these fail for various reasons
# tag = "unstable_20260116";
# modDirVersion = "6.15.11";
@@ -66,11 +66,14 @@ lib.overrideDerivation
isLTS = true;
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;
});
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,18 +16,20 @@
nixpkgs = {
overlays = [
(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;
CONFIG_ARM64_16K_PAGES = lib.mkForce yes;
CONFIG_OF_CONFIGFS = yes;
CONFIG_CONFIGFS_FS = yes;
CONFIG_OF_OVERLAY = yes;
};
ignoreConfigErrors = true;
});
(_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;
CONFIG_ARM64_16K_PAGES = lib.mkForce yes;
CONFIG_OF_CONFIGFS = yes;
CONFIG_CONFIGFS_FS = yes;
CONFIG_OF_OVERLAY = yes;
};
ignoreConfigErrors = true;
}
);
})
];
};

View File

@@ -3,8 +3,8 @@
systemd.network.wait-online.enable = false;
# Force tailscaled to use nftables (Critical for clean nftables-only systems)
# This avoids the "iptables-compat" translation layer issues.
systemd.services.tailscaled.serviceConfig.Environment = [
"TS_DEBUG_FIREWALL_MODE=nftables"
systemd.services.tailscaled.serviceConfig.Environment = [
"TS_DEBUG_FIREWALL_MODE=nftables"
];
networking.nftables.enable = true;
boot.initrd.systemd.network.wait-online.enable = false;

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
];
};
};