alpha
Login
or
Join now
seanaye.bsky.social
/
nixos-config
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
me like nix
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
add some stuff
author
Sean Aye
date
2 months ago
(Apr 20, 2026, 1:00 PM -0400)
commit
7b440484
7b4404848073aa4691b69f8d17713b3ed1b331df
parent
e5027ac5
e5027ac58cdd2927e24376131781b97bfaf91151
change-id
wxpzpkxq
wxpzpkxqtlskrkwpsxkpqkrtomkvznxw
+49
-4
7 changed files
Expand all
Collapse all
Unified
Split
modules
apps.nix
home-automation.nix
hosts
pi.nix
pizero.nix
media-server.nix
pi-camera.nix
pi-stability.nix
+3
modules/apps.nix
Reviewed
···
92
92
];
93
93
94
94
home.file.".claude/settings.json".text = builtins.toJSON {
95
95
+
preferences = {
96
96
+
thinking = "high";
97
97
+
};
95
98
enabledPlugins = {
96
99
"rust-analyzer-lsp@claude-plugins-official" = true;
97
100
"typescript-lsp@claude-plugins-official" = true;
+3
-3
modules/home-automation.nix
Reviewed
···
161
161
automation = [
162
162
{
163
163
id = "1761448856909";
164
164
-
alias = "Lower heat at night";
164
164
+
alias = "Cool at night";
165
165
trigger = [
166
166
{
167
167
platform = "time";
···
174
174
action = "climate.set_temperature";
175
175
target.device_id = "bfe22d32a4532f8ae991d6daffb48267";
176
176
data = {
177
177
-
hvac_mode = "heat";
178
178
-
temperature = 18;
177
177
+
hvac_mode = "cool";
178
178
+
temperature = 20;
179
179
};
180
180
}
181
181
];
+1
modules/hosts/pi.nix
Reviewed
···
23
23
# Aspect modules
24
24
nm.pi-camera
25
25
nm.pi-wifi
26
26
+
nm.pi-stability
26
27
27
28
# Pi 4 specific settings
28
29
{
+1
modules/hosts/pizero.nix
Reviewed
···
22
22
# Aspect modules
23
23
nm.pi-camera
24
24
nm.pi-wifi
25
25
+
nm.pi-stability
25
26
26
27
# Pi Zero 2W specific settings
27
28
(
+3
modules/media-server.nix
Reviewed
···
101
101
};
102
102
};
103
103
104
104
+
# Avoid jellyfin blocking shutdown for 2 minutes
105
105
+
systemd.services.jellyfin.serviceConfig.TimeoutStopSec = 10;
106
106
+
104
107
# Install Kodi Sync Queue plugin into Jellyfin
105
108
systemd.services.jellyfin.serviceConfig.ExecStartPre =
106
109
let
+8
-1
modules/pi-camera.nix
Reviewed
···
100
100
default = 256;
101
101
description = "GPU memory allocation in MB";
102
102
};
103
103
+
cmaMem = lib.mkOption {
104
104
+
type = lib.types.int;
105
105
+
default = 256;
106
106
+
description = "CMA (Contiguous Memory Allocator) size in MB for DMA buffers";
107
107
+
};
103
108
flipCamera = lib.mkOption {
104
109
type = lib.types.bool;
105
110
default = false;
···
191
196
fragment@99 {
192
197
target-path = "/reserved-memory/linux,cma";
193
198
__overlay__ {
194
194
-
size = <0x00 0x10000000>; /* 256MB */
199
199
+
size = <0x10000000>; /* 256MB */
195
200
};
196
201
};
197
202
};
···
331
336
cat >> ./firmware/config.txt << EOF
332
337
333
338
# Camera support - Pi Camera v3 (IMX708)
339
339
+
dtoverlay=imx708
334
340
gpu_mem=${toString cfg.gpuMem}
341
341
+
dtoverlay=cma,cma-${toString cfg.cmaMem}
335
342
EOF
336
343
337
344
if [ -d ${pkgs.raspberrypifw}/share/raspberrypi/boot/overlays ]; then
+30
modules/pi-stability.nix
Reviewed
···
1
1
+
{ ... }: {
2
2
+
flake.modules.nixos.pi-stability =
3
3
+
{ lib, ... }:
4
4
+
{
5
5
+
# ZRAM swap to prevent OOM freezes
6
6
+
# Pi has limited RAM and continuous video streaming builds memory pressure
7
7
+
zramSwap = {
8
8
+
enable = true;
9
9
+
memoryPercent = 50;
10
10
+
};
11
11
+
12
12
+
# Hardware watchdog - automatically reboots on freeze
13
13
+
# Pi 4 and Zero 2W both have bcm2835 watchdog hardware
14
14
+
boot.kernelModules = [ "bcm2835_wdt" ];
15
15
+
systemd.watchdog = {
16
16
+
runtimeTime = "30s";
17
17
+
rebootTime = "60s";
18
18
+
};
19
19
+
20
20
+
# Reduce SD card writes - logs to tmpfs
21
21
+
services.journald.extraConfig = ''
22
22
+
Storage=volatile
23
23
+
RuntimeMaxUse=64M
24
24
+
'';
25
25
+
26
26
+
# tmpfs for /tmp to avoid SD wear
27
27
+
boot.tmp.useTmpfs = true;
28
28
+
boot.tmp.tmpfsSize = "64M";
29
29
+
};
30
30
+
}