From 4cbe669783ed4255d3cd945fc913df8ddf7909e6 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Tue, 27 Sep 2022 16:06:54 +0100 Subject: [PATCH] move make-image to subdirectory --- default.nix | 10 +++++----- overlay.nix | 3 +++ .../liminix-tools/builders/squashfs.nix | 0 3 files changed, 8 insertions(+), 5 deletions(-) rename make-image.nix => pkgs/liminix-tools/builders/squashfs.nix (100%) diff --git a/default.nix b/default.nix index 133183d..541ed5d 100644 --- a/default.nix +++ b/default.nix @@ -4,6 +4,7 @@ let overlay = import ./overlay.nix; nixpkgs = import ( device.system // {overlays = [overlay]; }); + inherit (nixpkgs.pkgs) callPackage liminix; config = (import ./merge-modules.nix) [ ./modules/base.nix ({ lib, ... } : { config = { inherit (device) kernel; }; }) @@ -11,13 +12,12 @@ let ./modules/s6 ] nixpkgs.pkgs; finalConfig = config // { - packages = (with nixpkgs.pkgs; [ s6-rc ]) ++ - config.systemPackages ++ + packages = config.systemPackages ++ (builtins.attrValues config.services); }; - squashfs = (nixpkgs.pkgs.callPackage ./make-image.nix {}) finalConfig; - kernel = nixpkgs.pkgs.callPackage ./kernel { - inherit (finalConfig.kernel) config; + squashfs = liminix.builders.squashfs finalConfig; + kernel = callPackage ./kernel { + inherit (config.kernel) config; }; in { outputs = { diff --git a/overlay.nix b/overlay.nix index e14df0d..2147fe6 100644 --- a/overlay.nix +++ b/overlay.nix @@ -4,6 +4,9 @@ final: prev: { liminix = { services = final.callPackage ./pkgs/liminix-tools/services {}; networking = final.callPackage ./pkgs/liminix-tools/networking {}; + builders = { + squashfs = final.callPackage ./pkgs/liminix-tools/builders/squashfs.nix {}; + }; }; writeAshScript = final.callPackage ./pkgs/write-ash-script {}; s6-init-bin = final.callPackage ./pkgs/s6-init-bin {}; diff --git a/make-image.nix b/pkgs/liminix-tools/builders/squashfs.nix similarity index 100% rename from make-image.nix rename to pkgs/liminix-tools/builders/squashfs.nix