1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-17 04:51:31 +03:00
mobile-nixos/modules/system-build.nix
Samuel Dionne-Riel 826315aa11 system-build: Init module adding details to toplevel
For now, device-name... but see following commit.
2021-02-11 18:14:30 -05:00

21 lines
427 B
Nix

{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf;
deviceName = config.mobile.device.name;
in
{
config = mkIf (!config.mobile.rootfs.shared.enabled) {
system.extraSystemBuilderCmds = ''
echo ":: Adding Mobile NixOS information to the build..."
(
PS4=" $ "; set -x
mkdir -p $out/mobile-nixos
cd $out/mobile-nixos
echo "${deviceName}" > device-name
)
'';
};
}