add "standard" module, which includes flashimage kexec & jffs2

most systems need most of these, so it makes writing the docs a
lot easier
This commit is contained in:
Daniel Barlow 2023-05-16 20:13:46 +01:00
parent 6870abfe83
commit b0a0fdcfcc
7 changed files with 19 additions and 14 deletions

View file

@ -12,13 +12,14 @@ and the services that you want to run on it. Start by copying
``vanilla-configuration.nix`` and adjusting it, or look in the `examples` ``vanilla-configuration.nix`` and adjusting it, or look in the `examples`
directory for some pre-written configurations. directory for some pre-written configurations.
If you want to create a configuration that can be installed on Your configuration may include modules and probably _should_
a hardware device, be sure to include the "flashimage" module. include the ``standard`` module unless you understand what it
does and what happens if you leave it out.
.. code-block: nix .. code-block: nix
imports = [ imports = [
./modules/flashimage.nix ./modules/standard.nix
] ]

View file

@ -31,10 +31,8 @@ in rec {
}; };
imports = [ imports = [
../modules/tftpboot.nix ../modules/standard.nix
../modules/wlan.nix ../modules/wlan.nix
../modules/flashimage.nix
../modules/kexecboot.nix
]; ];
hostname = "arhcive"; hostname = "arhcive";

View file

@ -34,8 +34,7 @@ in rec {
imports = [ imports = [
../modules/wlan.nix ../modules/wlan.nix
../modules/tftpboot.nix ../modules/standard.nix
../modules/flashimage.nix
]; ];
hostname = "extneder"; hostname = "extneder";

View file

@ -33,9 +33,7 @@ in rec {
imports = [ imports = [
../modules/wlan.nix ../modules/wlan.nix
../modules/tftpboot.nix ../modules/standard.nix
../modules/flashimage.nix
../modules/jffs2.nix
]; ];
rootfsType = "jffs2"; rootfsType = "jffs2";

11
modules/standard.nix Normal file
View file

@ -0,0 +1,11 @@
{
# "standard" modules that aren't fundamentally required,
# but are probably useful in most common workflows and
# you should have to opt out of instead of into
imports = [
./tftpboot.nix
./kexecboot.nix
./flashimage.nix
./jffs2.nix
];
}

View file

@ -13,8 +13,6 @@ let
in { in {
imports = [ imports = [
../../vanilla-configuration.nix ../../vanilla-configuration.nix
../../modules/squashfs.nix
../../modules/jffs2.nix
]; ];
config = { config = {
services.sshd = longrun { services.sshd = longrun {

View file

@ -4,7 +4,7 @@ let
inherit (pkgs.liminix.services) oneshot longrun bundle target; inherit (pkgs.liminix.services) oneshot longrun bundle target;
in rec { in rec {
imports = [ imports = [
./modules/tftpboot.nix ./modules/standard.nix
./modules/wlan.nix ./modules/wlan.nix
]; ];
services.loopback = config.hardware.networkInterfaces.lo; services.loopback = config.hardware.networkInterfaces.lo;