liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit e78d5212e64899a3d550b6fa5fd240cff96a3744
parent ce05f4e44cb797f33248341ad028bcd0b8df3bc3
Author: Daniel Barlow <dan@telent.net>
Date:   Sat, 18 Mar 2023 14:45:51 +0000

move tftp config to base module

we need it for flashing from u-boot even when tftp booting
is not enabled

Diffstat:
Mmodules/base.nix | 8++++++++
Mmodules/tftpboot.nix | 12------------
2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/modules/base.nix b/modules/base.nix @@ -42,6 +42,14 @@ in { type = types.listOf types.nonEmptyStr; default = []; }; + tftp = { + loadAddress = mkOption { type = types.str; }; + # These names match the uboot environment variables. I reserve + # the right to change them if I think of better ones. + ipaddr = mkOption { type = types.str; }; + serverip = mkOption { type = types.str; }; + enable = mkOption { type = types.boolean; }; + }; }; }; config = { diff --git a/modules/tftpboot.nix b/modules/tftpboot.nix @@ -8,18 +8,6 @@ let inherit (lib) mkOption types concatStringsSep; cfg = config.boot.tftp; in { - options = { - boot = { - tftp = { - loadAddress = mkOption { type = types.str; }; - # These names match the uboot environment variables. I reserve - # the right to change them if I think of better ones. - ipaddr = mkOption { type = types.str; }; - serverip = mkOption { type = types.str; }; - enable = mkOption { type = types.boolean; }; - }; - }; - }; imports = [ ./ramdisk.nix ]; config = { boot.ramdisk.enable = true;