Skip to content

Commit

Permalink
Merge pull request #4 from jwillikers/reduce-build-time
Browse files Browse the repository at this point in the history
Update to 24.11 and significantly reduce the build time
  • Loading branch information
jwillikers authored Nov 23, 2024
2 parents e53fc68 + b0c0d86 commit 13620ac
Show file tree
Hide file tree
Showing 24 changed files with 759 additions and 215 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/treefmt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ jobs:
- uses: DeterminateSystems/nix-installer-action@v16
- uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Run treefmt
# todo Use when updated to NixOS 24.11.
# run: nix develop --command treefmt --ci
run: nix develop --command treefmt --fail-on-change --no-cache
run: nix develop --command treefmt --ci
- uses: reviewdog/action-suggester@v1
with:
fail_on_error: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-nix-direnv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: DeterminateSystems/nix-installer-action@v16
- uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Update nix-direnv to the latest version
run: nix run '.#update-nix-direnv'
run: nix run .#update-nix-direnv
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-nixos-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Update NixOS Release

"on":
schedule:
- cron: "0 0 15 5,11 *"
- cron: "0 0 15 6,12 *"
workflow_dispatch:

permissions:
Expand All @@ -18,7 +18,7 @@ jobs:
- uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Update the NixOS release in flake.nix to the latest
run: |
nix run '.#update-nixos-release'
nix run .#update-nixos-release
if [[ -n $(git status --porcelain=2) ]]; then
nix flake update
fi
Expand Down
2 changes: 2 additions & 0 deletions .justfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,6 @@ alias u := update
alias up := update

update:
nix run ".#update-nix-direnv"
nix run ".#update-nixos-release"
nix flake update
1 change: 1 addition & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ extend-ignore-re = [
# HDA = "HDA"

[default.extend-words]
ALLO = "ALLO"
HDA = "HDA"
23 changes: 23 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cSpell.words": [
"adoc",
"alnum",
"alsa",
"audiobooks",
"autoconnect",
Expand All @@ -10,6 +11,7 @@
"bufcount",
"bufsize",
"cachix",
"ccache",
"channelmix",
"Colmena",
"Digi",
Expand All @@ -23,6 +25,7 @@
"ifdef",
"ifndef",
"Jellyfin",
"jsonfmt",
"justfile",
"jwillikers",
"libpipewire",
Expand All @@ -32,16 +35,23 @@
"mmcblk",
"Mopidy",
"mpris",
"nixbld",
"nixfmt",
"nixos",
"nixpkgs",
"NOPASSWD",
"Nushell",
"optimise",
"patchset",
"PDIF",
"Piceiver",
"Pipewire",
"pkgs",
"poweroff",
"prio",
"pulseaudio",
"RAOP",
"reviewdog",
"RTPRIO",
"Rygel",
"sampleformat",
Expand All @@ -52,16 +62,29 @@
"SNAPSERVER",
"SNMP",
"soundcard",
"statix",
"stdenv",
"subwoofer",
"Tailscale",
"taplo",
"treefmt",
"UGREEN",
"upmixing",
"upstreamed",
"webp",
"Wireplumber",
"wpctl",
"Xtreme",
"yamlfmt",
"zstdcat"
],
"files.watcherExclude": {
".direnv/**": true,
".lycheecache": true,
".pre-commit-config.yaml": true,
"result": true,
"result/**": true
},
"nix.enableLanguageServer": true,
"nix.serverPath": "nil"
}
35 changes: 34 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,43 @@ git clone [email protected]:jwillikers/piceiver.git
cd piceiver
----

. Configure ccache support for Nix.
These instructions are for non-NixOS.
See the https://nixos.wiki/wiki/CCache[NixOS Wiki CCache page] for details, including how to configure ccache for NixOS.

.. Create the ccache cache directory.
+
[,sh]
----
sudo mkdir --mode=0770 --parents /nix/var/cache/ccache
----

.. Set ownership of the ccache cache directory.
+
[,sh]
----
sudo chown root:nixbld /nix/var/cache/ccache
----

.. Configure the ccache directory as an extra sandbox path for Nix.
+
./etc/nix/nix.conf
[,ini]
----
extra-sandbox-paths = /nix/var/cache/ccache
----

.. Restart the Nix daemon for the change to take effect.
+
[,sh]
----
sudo systemctl restart nix-daemon.service
----

. Build the SD card image.
Prefix the command with `systemd-inhibit` to prevent your computer from sleeping.
This will take a long time.
Like, days in my case.
Like, [.line-through]#two days# a day in my case.
The default, `basic-sd-image` package, produces a minimal image that requires no extra configuration.
There is an alternative package, `full-sd-image`, which is more fully-featured, including more integrations, but requires customization and additional set up.
+
Expand Down
77 changes: 30 additions & 47 deletions flake.lock

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

Loading

0 comments on commit 13620ac

Please sign in to comment.