From e78d5212e64899a3d550b6fa5fd240cff96a3744 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sat, 18 Mar 2023 14:45:51 +0000 Subject: [PATCH] move tftp config to base module we need it for flashing from u-boot even when tftp booting is not enabled --- modules/base.nix | 8 ++++++++ modules/tftpboot.nix | 12 ------------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/modules/base.nix b/modules/base.nix index ef7e60d..f24c499 100644 --- 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 index cd11ecb..974614e 100644 --- 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;