1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-15 19:23:01 +03:00

examples/jumpdrive: WIP init of a jumpdrive example system

This commit is contained in:
Samuel Dionne-Riel 2020-03-21 20:14:04 -04:00
parent 179d8b1b70
commit 41978bc480
3 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,15 @@
[JumpDrive](https://github.com/dreemurrs-embedded/Jumpdrive), but with Mobile NixOS
===================================================================================
What's this?
------------
This is a system that allows you to present the internal storage of a device
over the USB connection using Linux USB gadget mode.
* * *
With that said, while the project differs enough in implementation, I want
to acknowledge the obvious inspiration taken from the [JumpDrive](https://github.com/dreemurrs-embedded/Jumpdrive)
project.

View File

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
{
# There is no mounting here.
fileSystems = lib.mkForce {};
mobile.boot.stage-1.usb = {
enable = true;
features = [ "mass_storage" ];
};
system.build.rootfs = null;
mobile.boot.stage-1.networking.enable = true;
mobile.boot.stage-1.ssh.enable = true;
}

View File

@ -0,0 +1,11 @@
{ device }:
let
system-build = import ../../. {
inherit device;
configuration = [ (import ./configuration.nix) ];
};
in
{
inherit (system-build) build;
}