Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mobile-nixos/mobile-nixos
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f7f4920584f3
Choose a base ref
...
head repository: mobile-nixos/mobile-nixos
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 741eba11acc1
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Mar 8, 2020

  1. initrd: Add initrd-meta build output, with ncdu metadata

    This can be used to sift through the files in stage-1, and hopefully
    pare it down when it bloats.
    samueldr committed Mar 8, 2020
    Copy the full SHA
    8a71c8d View commit details
  2. Merge pull request #90 from samueldr-wip/feature/initrd-meta

    initrd: Add `initrd-meta` build output, with ncdu metadata
    samueldr authored Mar 8, 2020
    Copy the full SHA
    741eba1 View commit details
Showing with 15 additions and 0 deletions.
  1. +15 −0 modules/initrd.nix
15 changes: 15 additions & 0 deletions modules/initrd.nix
Original file line number Diff line number Diff line change
@@ -192,6 +192,20 @@ let
name = "initrd-${device_config.name}";
inherit contents;
};

# ncdu -f result/initrd.ncdu
initrd-meta = pkgs.runCommandNoCC "initrd-${device_config.name}-meta" {
nativeBuildInputs = with pkgs.buildPackages; [
ncdu
cpio
];
} ''
mkdir initrd
(cd initrd; gzip -cd ${initrd}/initrd | cpio -i)
mkdir -p $out
ncdu -0x -o $out/initrd.ncdu ./initrd
'';
in
{
options = {
@@ -242,6 +256,7 @@ in
config = {
system.build.extraUtils = extraUtils;
system.build.initrd = "${initrd}/initrd";
system.build.initrd-meta = initrd-meta;
boot.specialFileSystems = {
# HACK: as we're using isContainer to bypass some NixOS stuff
# See <nixpkgs/nixos/modules/tasks/filesystems.nix>