move output module imports example -> device

The outputs available are a characteristic of the device, not
the example.
This commit is contained in:
Daniel Barlow 2023-12-10 16:38:53 +00:00
parent c81e7c4d35
commit 5eeb277564
16 changed files with 44 additions and 50 deletions

View file

@ -48,7 +48,12 @@
''; '';
}; };
in { in {
imports = [ ../../modules/arch/aarch64.nix ]; imports = [
../../modules/arch/aarch64.nix
../../modules/outputs/tftpboot.nix
../../modules/outputs/ubifs.nix
];
config = {
kernel = { kernel = {
src = pkgs.pkgsBuildBuild.fetchurl { src = pkgs.pkgsBuildBuild.fetchurl {
name = "linux.tar.gz"; name = "linux.tar.gz";
@ -220,6 +225,6 @@
}; };
}; };
}; };
};
}; };
} }

View file

@ -1,5 +1,8 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = [
../../modules/outputs/jffs2.nix
];
config = { config = {
kernel = { kernel = {
src = pkgs.pkgsBuildBuild.fetchurl { src = pkgs.pkgsBuildBuild.fetchurl {

View file

@ -96,6 +96,9 @@
imports = [ imports = [
../../modules/network ../../modules/network
../../modules/arch/mipseb.nix ../../modules/arch/mipseb.nix
../../modules/outputs/tftpboot.nix
../../modules/outputs/flashimage.nix
../../modules/outputs/jffs2.nix
]; ];
programs.busybox.options = { programs.busybox.options = {

View file

@ -52,7 +52,12 @@
klibBuild = config.system.outputs.kernel.modulesupport; klibBuild = config.system.outputs.kernel.modulesupport;
}; };
in { in {
imports = [ ../../modules/arch/mipsel.nix ]; imports = [
../../modules/arch/mipsel.nix
../../modules/outputs/tftpboot.nix
../../modules/outputs/flashimage.nix
../../modules/outputs/jffs2.nix
];
hardware = { hardware = {
defaultOutput = "flashimage"; defaultOutput = "flashimage";
loadAddress = lim.parseInt "0x80000000"; loadAddress = lim.parseInt "0x80000000";

View file

@ -52,7 +52,12 @@
hash = "sha256:1dkhfznmdz6s50kwc841x3wj0h6zg6icg5g2bim9pvg66as2vmh9"; hash = "sha256:1dkhfznmdz6s50kwc841x3wj0h6zg6icg5g2bim9pvg66as2vmh9";
}; };
in { in {
imports = [ ../../modules/arch/mipsel.nix ]; imports = [
../../modules/arch/mipsel.nix
../../modules/outputs/tftpboot.nix
../../modules/outputs/flashimage.nix
../../modules/outputs/jffs2.nix
];
filesystem = dir { filesystem = dir {
lib = dir { lib = dir {
firmware = dir { firmware = dir {

View file

@ -12,7 +12,13 @@
module = {pkgs, config, lib, lim, ... }: module = {pkgs, config, lib, lim, ... }:
let openwrt = pkgs.openwrt; in { let openwrt = pkgs.openwrt; in {
imports = [ ../../modules/arch/arm.nix ]; imports = [
../../modules/arch/arm.nix
../modules/outputs/tftpboot.nix
../modules/outputs/diskimage.nix
../modules/outputs/extlinux.nix
../modules/outputs/ext4fs.nix
];
kernel = { kernel = {
src = pkgs.pkgsBuildBuild.fetchurl { src = pkgs.pkgsBuildBuild.fetchurl {
name = "linux.tar.gz"; name = "linux.tar.gz";
@ -46,10 +52,6 @@
# WARNING: unmet direct dependencies detected for ARCH_WANT_LIBATA_LEDS # WARNING: unmet direct dependencies detected for ARCH_WANT_LIBATA_LEDS
ATA = "y"; ATA = "y";
# switch is DSA
# CONFIG_NET_DSA_MV88E6060=y
# CONFIG_NET_DSA_MV88E6XXX=y
# CONFIG_NET_DSA_MV88E6XXX_GLOBAL2=y
# CONFIG_REGMAP=y # CONFIG_REGMAP=y
# CONFIG_REGMAP_I2C=y # CONFIG_REGMAP_I2C=y

View file

@ -30,14 +30,7 @@ in rec {
../modules/ssh ../modules/ssh
../modules/watchdog ../modules/watchdog
../modules/mount ../modules/mount
../modules/outputs/tftpboot.nix
../modules/outputs/kexecboot.nix
../modules/outputs/flashimage.nix
../modules/outputs/jffs2.nix
../modules/outputs/ubifs.nix
]; ];
hostname = "arhcive"; hostname = "arhcive";
kernel = { kernel = {

View file

@ -33,11 +33,6 @@ in rec {
../modules/ntp ../modules/ntp
../modules/ppp ../modules/ppp
../modules/ssh ../modules/ssh
../modules/outputs/tftpboot.nix
../modules/outputs/kexecboot.nix
../modules/outputs/flashimage.nix
../modules/outputs/jffs2.nix
../modules/outputs/ubifs.nix
../modules/vlan ../modules/vlan
../modules/wlan.nix ../modules/wlan.nix
]; ];

View file

@ -30,11 +30,6 @@ in rec {
../modules/hostapd ../modules/hostapd
../modules/bridge ../modules/bridge
../modules/ssh ../modules/ssh
../modules/outputs/tftpboot.nix
../modules/outputs/kexecboot.nix
../modules/outputs/flashimage.nix
../modules/outputs/jffs2.nix
../modules/outputs/ubifs.nix
]; ];
hostname = "extneder"; hostname = "extneder";

View file

@ -8,7 +8,6 @@ in rec {
../modules/network ../modules/network
../modules/ssh ../modules/ssh
../modules/vlan ../modules/vlan
../modules/outputs/flashimage.nix
]; ];
boot.tftp = { boot.tftp = {

View file

@ -43,11 +43,6 @@ in rec {
../modules/bridge ../modules/bridge
../modules/ntp ../modules/ntp
../modules/ssh ../modules/ssh
../modules/outputs/tftpboot.nix
../modules/outputs/kexecboot.nix
../modules/outputs/flashimage.nix
../modules/outputs/jffs2.nix
../modules/outputs/ubifs.nix
]; ];
rootfsType = "jffs2"; rootfsType = "jffs2";
hostname = "rotuer"; hostname = "rotuer";

View file

@ -29,8 +29,8 @@
./ramdisk.nix ./ramdisk.nix
./squashfs.nix ./squashfs.nix
./ssh ./ssh
./tftpboot.nix ./outputs/tftpboot.nix
./ubifs.nix ./outputs/ubifs.nix
./users.nix ./users.nix
./vlan ./vlan
./watchdog ./watchdog

View file

@ -3,12 +3,11 @@ let
inherit (pkgs.pseudofile) dir symlink; inherit (pkgs.pseudofile) dir symlink;
in { in {
imports = [ imports = [
../../vanilla-configuration.nix ../../modules/outputs/ext4fs.nix
../../modules/squashfs.nix
../../modules/ext4fs.nix
]; ];
config.rootfsType = "ext4"; config = {
config.filesystem = dir { rootfsType = "ext4";
filesystem = dir {
hello = { hello = {
type = "f"; type = "f";
uid = 7; uid = 7;
@ -16,4 +15,5 @@ in {
file = "hello world"; file = "hello world";
}; };
}; };
};
} }

View file

@ -2,10 +2,5 @@
{ {
imports = [ imports = [
./vanilla-configuration.nix ./vanilla-configuration.nix
./modules/outputs/tftpboot.nix
./modules/outputs/kexecboot.nix
./modules/outputs/flashimage.nix
./modules/outputs/jffs2.nix
./modules/outputs/ubifs.nix
]; ];
} }

View file

@ -5,7 +5,6 @@ let
svc = config.system.service; svc = config.system.service;
in rec { in rec {
imports = [ imports = [
./modules/tftpboot.nix
./modules/wlan.nix ./modules/wlan.nix
./modules/network ./modules/network
./modules/ntp ./modules/ntp