mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-15 02:43:24 +03:00
examples/jumpdrive: WIP init of a jumpdrive example system
This commit is contained in:
parent
179d8b1b70
commit
41978bc480
15
examples/jumpdrive/README.md
Normal file
15
examples/jumpdrive/README.md
Normal 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.
|
16
examples/jumpdrive/configuration.nix
Normal file
16
examples/jumpdrive/configuration.nix
Normal 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;
|
||||
}
|
11
examples/jumpdrive/default.nix
Normal file
11
examples/jumpdrive/default.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{ device }:
|
||||
|
||||
let
|
||||
system-build = import ../../. {
|
||||
inherit device;
|
||||
configuration = [ (import ./configuration.nix) ];
|
||||
};
|
||||
in
|
||||
{
|
||||
inherit (system-build) build;
|
||||
}
|
Loading…
Reference in New Issue
Block a user