Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
70a25e2
feat: add cargohold NAS host configuration
ProjectInitiative Apr 3, 2025
933ad98
adding new host
ProjectInitiative Apr 3, 2025
9e510e4
Merge branch 'main' into aider/router
ProjectInitiative Apr 3, 2025
f6728f7
adding cargohold host
ProjectInitiative Apr 4, 2025
66436de
Merge branch 'main' into aider/router
ProjectInitiative Apr 4, 2025
0e7feb1
Merge branch 'main' into aider/router
ProjectInitiative Apr 6, 2025
0dcb96a
attempting to add rockchip support
ProjectInitiative Apr 8, 2025
41bfb17
attempting to build snapshottable docker container for building
ProjectInitiative Apr 8, 2025
dd19cad
fix: Ensure isGraphical defaults to false
ProjectInitiative Apr 8, 2025
adcd5b3
fix: Use lib.attrByPath to safely access isGraphical
ProjectInitiative Apr 8, 2025
7bc83b2
building docker container
ProjectInitiative Apr 8, 2025
9436580
added dockerfile and reverted helix custom build
ProjectInitiative Apr 8, 2025
11d144a
Merge branch 'main' into wip/radxa-nixos
ProjectInitiative Apr 18, 2025
f6c4102
rework: adding full uboot build for boards
ProjectInitiative Apr 30, 2025
deb0af7
rework: successful uboot - testing bootability
ProjectInitiative Apr 30, 2025
783d368
rework: successful uboot - testing bootability
ProjectInitiative May 2, 2025
d3571f1
test: shrinking filesize
ProjectInitiative May 6, 2025
9fff939
wip: semi-working boot
ProjectInitiative May 10, 2025
89e0293
add: added split builds. Configured uboot to suppor t USB mass storage
ProjectInitiative May 11, 2025
1398998
add: split build
ProjectInitiative May 13, 2025
90b260c
add: revamp
ProjectInitiative May 13, 2025
4927e09
add: uboot sd cards now works for e52c
ProjectInitiative May 18, 2025
04a4886
testing more uboot options;
ProjectInitiative May 20, 2025
de9bb01
Merge branch 'main' into wip/radxa-nixos
ProjectInitiative Jul 7, 2025
3780bac
wip: semi-working auto-boot need to fix dts
ProjectInitiative Jul 8, 2025
fcab74d
wip: doesnt crash, but not fully booting
ProjectInitiative Jul 8, 2025
a67421c
testing mainline dts
ProjectInitiative Jul 8, 2025
2ea7933
attepmting to build rock5a
ProjectInitiative Jul 9, 2025
6671571
bootable nixos on E52C 🎉
ProjectInitiative Jul 10, 2025
a16fda4
bootable nixos on E52C 🎉
ProjectInitiative Jul 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM nixos/nix:latest

# Enable flakes
RUN mkdir -p /etc/nix && \
echo 'experimental-features = nix-command flakes' >> /etc/nix/nix.conf

# Create user properly
# RUN useradd -m -u 1000 -s /bin/bash kylepzak

# Set working directory
WORKDIR /config

# Copy flake for build step (will be mounted at runtime)
COPY . .

# Build home-manager configuration
RUN nix run github:nix-community/home-manager/master -- build --flake .#"root@docker"
RUN nix-env -e man-db-2.13.0
RUN nix run github:nix-community/home-manager/master -- switch --flake .#"root@docker"

# Set the default command
CMD ["/bin/bash"]
28 changes: 28 additions & 0 deletions build-ubootimg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Define output file name
UBOOT_ROCKCHIP_BIN="u-boot-rockchip.bin"

# Define the offset for u-boot.itb within u-boot-rockchip.bin in bytes
OFFSET_UBOOT_ITB_BYTES=8355840 # This is (16384 - 64) sectors * 512 bytes/sector

echo "IDBLOADER_PATH: $IDBLOADER_PATH"
echo "UBOOT_ITB_PATH: $UBOOT_ITB_PATH"
echo "Target combined file: $UBOOT_ROCKCHIP_BIN"
echo "Offset for u-boot.itb: $OFFSET_UBOOT_ITB_BYTES bytes"

# Copy idbloader.img to be the start of u-boot-rockchip.bin
cp "$IDBLOADER_PATH" "$UBOOT_ROCKCHIP_BIN"

# Pad the u-boot-rockchip.bin file with zeros up to the point where u-boot.itb should start
# This ensures idbloader.img is not overwritten if it's smaller than the offset,
# and the file is extended to the correct size before writing u-boot.itb.
# Using truncate is efficient for creating sparse space if the filesystem supports it,
# or filling with nulls.
truncate -s $OFFSET_UBOOT_ITB_BYTES "$UBOOT_ROCKCHIP_BIN"

# Now, write u-boot.itb at the specified offset
# 'conv=notrunc' ensures that dd does not truncate the output file.
# 'bs=1' ensures byte-level precision for seek.
dd if="$UBOOT_ITB_PATH" of="$UBOOT_ROCKCHIP_BIN" bs=1 seek=$OFFSET_UBOOT_ITB_BYTES conv=notrunc

echo "Created $UBOOT_ROCKCHIP_BIN successfully."
ls -lh "$UBOOT_ROCKCHIP_BIN"
174 changes: 170 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
inputs = {
# NixPkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
nixpkgs-master.url = "github:nixos/nixpkgs/master";
# NixPkgs Unstable
unstable.url = "github:nixos/nixpkgs/nixos-unstable";

Expand Down Expand Up @@ -134,6 +135,16 @@
inputs.nixos-hardware.follows = "nixos-hardware";
};

nixos-rk3588 = {
url = "github:gnull/nixos-rk3588";
inputs.nixpkgs.follows = "nixpkgs";
};

# uboot-flake = {
# url = "path:/home/kylepzak/development/build-software/custom-nix/uboot-radxa-build";
# inputs.nixpkgs.follows = "nixpkgs-master";
# };

};

outputs =
Expand Down Expand Up @@ -280,6 +291,9 @@
stormjib = {
system = "aarch64-linux";
};
lightship-aus = {
system = "aarch64-linux";
};
};
modules =
let
Expand Down
21 changes: 21 additions & 0 deletions homes/x86_64-linux/root@docker/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{ lib, ... }:
{

projectinitiative = {
home = {
enable = true;
stateVersion = "24.11";
home = lib.mkForce "/root";
};

suites = {
terminal-env.enable = true;
};

cli-apps = {
zsh.enable = true;
nix.enable = true;
home-manager.enable = true;
};
};
}
2 changes: 1 addition & 1 deletion modules/home/browsers/chrome/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ with lib;
with lib.${namespace};
let
cfg = config.${namespace}.browsers.chrome;
isGraphical = osConfig.${namespace}.isGraphical;
isGraphical = lib.attrByPath [ namespace "isGraphical" ] false osConfig;
in
{
options.${namespace}.browsers.chrome = with types; {
Expand Down
2 changes: 1 addition & 1 deletion modules/home/browsers/chromium/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ with lib;
with lib.${namespace};
let
cfg = config.${namespace}.browsers.chromium;
isGraphical = osConfig.${namespace}.isGraphical;
isGraphical = lib.attrByPath [ namespace "isGraphical" ] false osConfig;
in
{
options.${namespace}.browsers.chromium = with types; {
Expand Down
2 changes: 1 addition & 1 deletion modules/home/browsers/firefox/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ with lib;
with lib.${namespace};
let
cfg = config.${namespace}.browsers.firefox;
isGraphical = osConfig.${namespace}.isGraphical;
isGraphical = lib.attrByPath [ namespace "isGraphical" ] false osConfig;
in
{
options.${namespace}.browsers.firefox = with types; {
Expand Down
Loading