Skip to content

Commit 1fbb32c

Browse files
kpangoclaude
andcommitted
fix sheldon plugin paths missing in docker container
The sheldon.zsh cache references ~/.local/share/sheldon/repos/ (generated before XDG_DATA_HOME was set to ~/.data), but devrun() only mounted ~/.data/sheldon. Add ~/.local/share/sheldon mount so both the stale cache paths and future XDG-correct paths are accessible in the container. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: kpango <kpango@vdaas.org>
1 parent 5f125d2 commit 1fbb32c

37 files changed

Lines changed: 660 additions & 210 deletions

nix/core/common.nix

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
{ pkgs, lib, inputs, username, homeDirectory, ... }:
1+
{
2+
pkgs,
3+
lib,
4+
inputs,
5+
username,
6+
homeDirectory,
7+
...
8+
}:
29

310
{
411
# Nix core configuration
@@ -9,7 +16,10 @@
916
];
1017
auto-optimise-store = true;
1118
# Allow the primary user to use trusted nix features (nix copy, custom substituters, etc.)
12-
trusted-users = [ "root" username ];
19+
trusted-users = [
20+
"root"
21+
username
22+
];
1323
};
1424

1525
# Automatic GC: discard generations older than 14 days.

nix/core/settings.nix

Lines changed: 93 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,16 @@ in
148148
portSteamRemotePlayTCP1
149149
portSteamRemotePlayTCP2
150150
];
151-
allowedUDPPorts = [ portSteamRemotePlayUDP1 portSteamRemotePlayUDP2 ];
152-
allowedUDPPortRanges = [{ from = portMoshStart; to = portMoshEnd; }];
151+
allowedUDPPorts = [
152+
portSteamRemotePlayUDP1
153+
portSteamRemotePlayUDP2
154+
];
155+
allowedUDPPortRanges = [
156+
{
157+
from = portMoshStart;
158+
to = portMoshEnd;
159+
}
160+
];
153161
externalInterface = "wlan0";
154162
extraCommands = "iptables -I INPUT -p udp -m udp --dport 32768:60999 -j ACCEPT";
155163
};
@@ -163,7 +171,10 @@ in
163171
networkManager = {
164172
dns = "dnsmasq";
165173
wifiBackend = "iwd";
166-
unmanaged = [ "interface-name:docker0" "interface-name:virbr0" ];
174+
unmanaged = [
175+
"interface-name:docker0"
176+
"interface-name:virbr0"
177+
];
167178
};
168179
# Local loopback addresses
169180
localHosts = {
@@ -262,7 +273,10 @@ in
262273
};
263274
preferences = {
264275
AppleInterfaceStyle = "Dark";
265-
AppleLanguages = [ "en-JP" "ja-JP" ];
276+
AppleLanguages = [
277+
"en-JP"
278+
"ja-JP"
279+
];
266280
screencaptureType = "png";
267281
};
268282
};
@@ -276,9 +290,30 @@ in
276290
# Filesystem Labels & Options
277291
disks = {
278292
rootLabel = "root";
279-
rootOptions = [ "rw" "relatime" "attr2" "inode64" "logbufs=8" "logbsize=32k" "noquota" "noatime" "nodiratime" "discard" ];
293+
rootOptions = [
294+
"rw"
295+
"relatime"
296+
"attr2"
297+
"inode64"
298+
"logbufs=8"
299+
"logbsize=32k"
300+
"noquota"
301+
"noatime"
302+
"nodiratime"
303+
"discard"
304+
];
280305
bootLabel = "boot";
281-
bootOptions = [ "rw" "relatime" "fmask=0022" "dmask=0022" "codepage=437" "iocharset=iso8859-1" "shortname=mixed" "utf8" "errors=remount-ro" ];
306+
bootOptions = [
307+
"rw"
308+
"relatime"
309+
"fmask=0022"
310+
"dmask=0022"
311+
"codepage=437"
312+
"iocharset=iso8859-1"
313+
"shortname=mixed"
314+
"utf8"
315+
"errors=remount-ro"
316+
];
282317
};
283318
# Kernel & OS Performance Tuning
284319
kernel = {
@@ -387,19 +422,60 @@ in
387422
};
388423
thinkfan = {
389424
sensors = [
390-
{ type = "tpacpi"; query = "/proc/acpi/ibm/fan"; }
391-
{ type = "hwmon"; query = "/sys/devices/virtual/thermal/thermal_zone0/temp"; }
392-
{ type = "hwmon"; query = "/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input"; }
425+
{
426+
type = "tpacpi";
427+
query = "/proc/acpi/ibm/fan";
428+
}
429+
{
430+
type = "hwmon";
431+
query = "/sys/devices/virtual/thermal/thermal_zone0/temp";
432+
}
433+
{
434+
type = "hwmon";
435+
query = "/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input";
436+
}
393437
];
394438
levels = [
395-
[ 0 0 47 ]
396-
[ 1 45 49 ]
397-
[ 2 47 52 ]
398-
[ 3 50 57 ]
399-
[ 4 55 62 ]
400-
[ 5 60 77 ]
401-
[ 7 73 93 ]
402-
[ 127 85 32767 ]
439+
[
440+
0
441+
0
442+
47
443+
]
444+
[
445+
1
446+
45
447+
49
448+
]
449+
[
450+
2
451+
47
452+
52
453+
]
454+
[
455+
3
456+
50
457+
57
458+
]
459+
[
460+
4
461+
55
462+
62
463+
]
464+
[
465+
5
466+
60
467+
77
468+
]
469+
[
470+
7
471+
73
472+
93
473+
]
474+
[
475+
127
476+
85
477+
32767
478+
]
403479
];
404480
};
405481
};

nix/flake.nix

Lines changed: 94 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,15 @@
2222
};
2323
};
2424

25-
outputs = inputs@{ self, nixpkgs, darwin, home-manager, dotfiles-root, ... }:
25+
outputs =
26+
inputs@{
27+
self,
28+
nixpkgs,
29+
darwin,
30+
home-manager,
31+
dotfiles-root,
32+
...
33+
}:
2634
let
2735
# Import centrally managed settings and versions
2836
settings = import ./core/settings.nix;
@@ -37,80 +45,112 @@
3745
# isDarwinHost is passed explicitly rather than inferred from dotfilesPath,
3846
# because make nix/setup sets both dotfilesDir.linux and dotfilesDir.darwin
3947
# to the same absolute path, making path-comparison-based detection unreliable.
40-
mkHomeManagerBlock = hostname: isDarwinHost:
48+
mkHomeManagerBlock =
49+
hostname: isDarwinHost:
4150
let
4251
homeDirectory =
43-
if isDarwinHost
44-
then "${settings.homeDirectories.darwin}/${username}"
45-
else "${settings.homeDirectories.linux}/${username}";
52+
if isDarwinHost then
53+
"${settings.homeDirectories.darwin}/${username}"
54+
else
55+
"${settings.homeDirectories.linux}/${username}";
4656
in
4757
{
4858
home-manager = {
4959
useGlobalPkgs = true;
5060
useUserPackages = true;
5161
extraSpecialArgs = {
52-
inherit inputs username hostname versions settings dotfilesPath homeDirectory;
62+
inherit
63+
inputs
64+
username
65+
hostname
66+
versions
67+
settings
68+
dotfilesPath
69+
homeDirectory
70+
;
5371
isDarwin = isDarwinHost;
5472
isLinux = !isDarwinHost;
5573
};
5674
users.${username} = import ./modules/home;
5775
};
5876
};
5977

60-
mkNixosSystem = hostname: extraModules: nixpkgs.lib.nixosSystem {
61-
system = settings.system.linux;
62-
specialArgs = {
63-
inherit inputs username hostname versions settings dotfilesPath;
64-
isDarwin = false;
65-
isLinux = true;
66-
homeDirectory = "${settings.homeDirectories.linux}/${username}";
78+
mkNixosSystem =
79+
hostname: extraModules:
80+
nixpkgs.lib.nixosSystem {
81+
system = settings.system.linux;
82+
specialArgs = {
83+
inherit
84+
inputs
85+
username
86+
hostname
87+
versions
88+
settings
89+
dotfilesPath
90+
;
91+
isDarwin = false;
92+
isLinux = true;
93+
homeDirectory = "${settings.homeDirectories.linux}/${username}";
94+
};
95+
modules = [
96+
{ nixpkgs.pkgs = mkPkgs settings.system.linux; }
97+
./modules/nixos
98+
home-manager.nixosModules.home-manager
99+
(mkHomeManagerBlock hostname false)
100+
]
101+
++ extraModules;
67102
};
68-
modules = [
69-
{ nixpkgs.pkgs = mkPkgs settings.system.linux; }
70-
./modules/nixos
71-
home-manager.nixosModules.home-manager
72-
(mkHomeManagerBlock hostname false)
73-
] ++ extraModules;
74-
};
75103

76-
mkDarwinSystem = hostname: extraModules: darwin.lib.darwinSystem {
77-
system = settings.system.darwin;
78-
specialArgs = {
79-
inherit inputs username hostname versions settings dotfilesPath;
80-
isDarwin = true;
81-
isLinux = false;
82-
homeDirectory = "${settings.homeDirectories.darwin}/${username}";
104+
mkDarwinSystem =
105+
hostname: extraModules:
106+
darwin.lib.darwinSystem {
107+
system = settings.system.darwin;
108+
specialArgs = {
109+
inherit
110+
inputs
111+
username
112+
hostname
113+
versions
114+
settings
115+
dotfilesPath
116+
;
117+
isDarwin = true;
118+
isLinux = false;
119+
homeDirectory = "${settings.homeDirectories.darwin}/${username}";
120+
};
121+
modules = [
122+
{ nixpkgs.pkgs = mkPkgs settings.system.darwin; }
123+
./modules/darwin
124+
home-manager.darwinModules.home-manager
125+
(mkHomeManagerBlock hostname true)
126+
]
127+
++ extraModules;
83128
};
84-
modules = [
85-
{ nixpkgs.pkgs = mkPkgs settings.system.darwin; }
86-
./modules/darwin
87-
home-manager.darwinModules.home-manager
88-
(mkHomeManagerBlock hostname true)
89-
] ++ extraModules;
90-
};
91129

92130
# Instantiate nixpkgs with overlays and allowUnfree for a given system
93-
mkPkgs = system: import nixpkgs {
94-
inherit system;
95-
config.allowUnfree = true;
96-
overlays = import ./overlays;
97-
};
131+
mkPkgs =
132+
system:
133+
import nixpkgs {
134+
inherit system;
135+
config.allowUnfree = true;
136+
overlays = import ./overlays;
137+
};
98138

99139
in
100140
{
101141
# macOS Apple Silicon Configurations
102142
darwinConfigurations = nixpkgs.lib.genAttrs [
103143
"macbook-air-m1"
104144
"macbook-pro-m3"
105-
]
106-
(hostname: mkDarwinSystem hostname [ ]);
145+
] (hostname: mkDarwinSystem hostname [ ]);
107146

108147
# NixOS Configurations — short attribute name, full real hostname
109148
nixosConfigurations = {
110149
p1 = mkNixosSystem "thinkpad-p1-gen5" [ ./hosts/p1 ];
111150
x1 = mkNixosSystem "thinkpad-x1-gen9" [ ./hosts/x1 ];
112151
g2 = mkNixosSystem "hp-dragonfly-g2" [ ./hosts/g2 ];
113-
} // {
152+
}
153+
// {
114154

115155
# ── Threadripper workstation (tr) ────────────────────────────────────
116156
# AMD Ryzen Threadripper 3990X, 251 GB RAM
@@ -119,7 +159,13 @@
119159
tr = nixpkgs.lib.nixosSystem {
120160
system = settings.system.linux;
121161
specialArgs = {
122-
inherit inputs username versions settings dotfilesPath;
162+
inherit
163+
inputs
164+
username
165+
versions
166+
settings
167+
dotfilesPath
168+
;
123169
hostname = "desk-threadripper";
124170
isDarwin = false;
125171
isLinux = true;
@@ -138,16 +184,16 @@
138184
formatter = nixpkgs.lib.genAttrs [
139185
"x86_64-linux"
140186
"aarch64-darwin"
141-
]
142-
(system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
187+
] (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
143188

144189
# Custom packages
145-
packages = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-darwin" ] (system:
146-
import ./pkgs { pkgs = mkPkgs system; }
190+
packages = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-darwin" ] (
191+
system: import ./pkgs { pkgs = mkPkgs system; }
147192
);
148193

149194
# Development shells for repository management
150-
devShells = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-darwin" ] (system:
195+
devShells = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-darwin" ] (
196+
system:
151197
let
152198
pkgs = mkPkgs system;
153199
in

0 commit comments

Comments
 (0)