move tftp config to base module

we need it for flashing from u-boot even when tftp booting
is not enabled
module-based-network
Daniel Barlow 2023-03-18 14:45:51 +00:00
parent ce05f4e44c
commit e78d5212e6
2 changed files with 8 additions and 12 deletions

View File

@ -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 = {

View File

@ -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;