turny: fix SPI/GPIO config for newer kernels
Build Images / build (push) Successful in 1m35s
Check / check (push) Failing after 3m8s

- Add complete config.txt settings with u-boot boot lines + spi=on
- Override sdImage.populateFirmwareCommands to use configtxt module output
- Mount firmware partition and add activation script to sync config.txt
- Load spi_bcm2835 and bcm2835_gpiomem kernel modules
- Add udev rule for gpiomem subsystem (not just gpio)
- Relax ProtectKernelTunables so service can access GPIO
- Update turny flake input to rppal-based CS pin fix
This commit is contained in:
Joakim Repomaa
2026-07-05 11:36:40 +03:00
parent 0e664c51f5
commit 1d2815fdd4
65 changed files with 1336 additions and 500 deletions
+83 -123
View File
@@ -8,16 +8,13 @@
...
}:
let
noctalia-package = inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default.override {
calendarSupport = true;
};
noctalia-package = inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default;
ns = lib.getExe noctalia-package;
ns-ipc =
args:
[
ns
"ipc"
"call"
"msg"
]
++ args;
in
@@ -72,7 +69,7 @@ in
gnumeric
gh
neovim-remote
pkgs-unstable.gradia
gradia
crystal
shards
moreutils
@@ -98,7 +95,7 @@ in
protonmail-bridge
hydroxide
imapsync
nixfmt-rfc-style
nixfmt
tree
virt-manager
pkgs-unstable.ncspot
@@ -137,128 +134,91 @@ in
'')
inputs.tree_hugger.packages.${stdenv.hostPlatform.system}.default
(writeShellScriptBin "ns" "${lib.join " " (ns-ipc [ ''"$@"'' ])}")
libnotify
supersonic-wayland
]
++ (with inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}; [
pi
opencode
crush
opencode
]);
programs = {
noctalia-shell = {
noctalia = {
enable = true;
settings = {
bar = {
density = "compact";
bar.main = {
position = "top";
showCapsule = false;
widgets = {
left = [
{
id = "Workspace";
hideUnoccupied = true;
labelMode = "none";
}
];
center = [
{
id = "Clock";
formatHorizontal = "HH:mm";
formatVertical = "HH mm";
usePrimaryColor = true;
}
];
right = [
{
id = "plugin:privacy-indicator";
}
{
id = "Battery";
warningThreshold = 20;
}
{
id = "NotificationHistory";
}
{
id = "Network";
}
{
id = "Bluetooth";
}
{
id = "VPN";
}
{
id = "ControlCenter";
useDistroLogo = true;
}
];
auto_hide = true;
reserve_space = false;
margin_edge = 5;
capsule = false;
start = [ "workspaces" ];
center = [ "clock" ];
end = [
"battery"
"notifications"
"network"
"bluetooth"
"control-center"
];
};
widget = {
workspaces = {
labels_only_when_occupied = true;
display = "none";
};
clock = {
format = "{:%H:%M}";
vertical_format = "{:%H\n%M}";
tooltip_format = "{:%A, %d. %B %Y}";
};
battery.warning_threshold = 20;
control-center.glyph = "snowflake";
};
audio.visualizerType = "linear";
wallpaper = {
overviewEnabled = true;
directory = "~/Pictures/Wallpapers";
automationEnabled = true;
automation.enabled = true;
};
controlCenter.shortcuts = {
right = [
{ id = "PowerProfile"; }
{ id = "KeepAwake"; }
{ id = "NightLight"; }
{ id = "DarkMode"; }
];
backdrop.enabled = true;
location.auto_locate = true;
control_center.shortcuts = [
{ type = "power_profile"; }
{ type = "caffeine"; }
{ type = "nightlight"; }
{ type = "dark_mode"; }
];
calendar = {
enabled = true;
account = {
mailbox = {
type = "caldav";
name = "Yhteinen Kalenteri";
provider = "custom";
server_url = "https://dav.mailbox.org/caldav/Y2FsOi8vMC82NA";
};
};
};
sessionMenu = {
countdownDuration = 5000;
powerOptions =
let
powerOption =
action: options:
{
inherit action;
enabled = true;
}
// options;
in
[
(powerOption "lock" {
keybind = "1";
countdownEnabled = false;
})
(powerOption "suspend" {
keybind = "2";
countdownEnabled = false;
})
(powerOption "hibernate" { keybind = "3"; })
(powerOption "reboot" { keybind = "4"; })
(powerOption "logout" { keybind = "5"; })
(powerOption "shutdown" { keybind = "6"; })
(powerOption "rebootToUefi" { keybind = "7"; })
];
};
colorSchemes.useWallpaperColors = true;
nightLight.enabled = true;
nightlight.enabled = true;
idle.enabled = true;
general = {
avatarImage = "~/.face";
radiusRatio = 0.2;
clockStyle = "analog";
shell = {
avatar_path = "~/.face";
};
location = {
monthBeforeDay = false;
analogClockInCalendar = true;
firstDayOfWeek = 0;
showWeekNumberInCalendar = true;
autoLocate = true;
theme = {
mode = "auto";
source = "wallpaper";
wallpaper_scheme = "m3-tonal-spot";
};
package = noctalia-package;
hooks.theme_mode_changed = "gsettings set org.gnome.desktop.interface color-scheme prefer-\${NOCTALIA_THEME_MODE}";
};
package = noctalia-package;
};
nh = {
@@ -823,6 +783,7 @@ in
packages = [
"dev.diegovsky.Riff"
"app.zen_browser.zen"
];
};
@@ -883,10 +844,10 @@ in
xdg.configFile."opencode/opencode.jsonc".text = builtins.toJSON {
"$schema" = "https://opencode.ai/config.json";
model = "firepass/accounts/fireworks/routers/kimi-k2p6-turbo";
small_model = "firepass/accounts/fireworks/routers/kimi-k2p6-turbo";
model = "fireworks-ai/accounts/fireworks/models/glm-5p2";
small_model = "fireworks-ai/accounts/fireworks/models/minimax-m3";
agent = {
explore.model = "firepass/accounts/fireworks/routers/kimi-k2p6-turbo";
explore.model = "fireworks-ai/accounts/fireworks/models/minimax-m3";
};
theme = "system";
lsp = {
@@ -1065,7 +1026,7 @@ in
layer-rules = [
{
matches = [ { namespace = "^noctalia-overview*"; } ];
matches = [ { namespace = "^noctalia-backdrop*"; } ];
place-within-backdrop = true;
}
];
@@ -1094,7 +1055,12 @@ in
# blur = true;
# xray = false;
# };
#}
{
matches = [ { app-id = "dev.noctalia.Noctalia.Settings"; } ];
open-floating = true;
default-column-width.fixed = 1080;
default-window-height.fixed = 920;
}
];
binds = lib.foldl' (acc: x: acc // x) { } (
@@ -1117,43 +1083,39 @@ in
"Mod+Alt+L" = {
hotkey-overlay.title = "Lock the Screen: hyprlock";
action.spawn = ns-ipc [
"lockScreen"
"session"
"lock"
];
};
"XF86AudioRaiseVolume" = {
allow-when-locked = true;
action.spawn = ns-ipc [
"volume"
"increase"
"volume-up"
];
};
"XF86AudioLowerVolume" = {
allow-when-locked = true;
action.spawn = ns-ipc [
"volume"
"decrease"
"volume-down"
];
};
"XF86AudioMute" = {
allow-when-locked = true;
action.spawn = ns-ipc [
"volume"
"muteOutput"
"volume-mute"
];
};
"XF86AudioMicMute" = {
allow-when-locked = true;
action.spawn = ns-ipc [
"volume"
"muteInput"
"mic-mute"
];
};
"XF86AudioPlay" = {
allow-when-locked = true;
action.spawn = ns-ipc [
"media"
"playPause"
"toggle"
];
};
"XF86AudioPrev" = {
@@ -1173,15 +1135,13 @@ in
"XF86MonBrightnessUp" = {
allow-when-locked = true;
action.spawn = ns-ipc [
"brightness"
"increase"
"brightness-up"
];
};
"XF86MonBrightnessDown" = {
allow-when-locked = true;
action.spawn = ns-ipc [
"brightness"
"decrease"
"brightness-down"
];
};
"Mod+O" = {