-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mkForce, mkDefault etc, stripped from modules ? #125
Comments
i was able to use mkForce normally to overide a default package option, which indicates to me that i'm either somehow using it wrong in the above example, or that perhaps there's just some issue with it from module to system config, but i'm not sure so i'll leave this open for now |
can you link your config? |
i would suggest creating an option with a default {
lib,
config,
namespace,
...
}:
let
cfg = config.${namespace}.boot;
in {
options.${namespace}.boot.supportedFilesystems = lib.mkOption {
type = types.listOf types.str;
default = [ "bcachefs" ];
};
boot.supportedFilesystems = cfg.supportedFilesystems;
boot.loader.systemd-boot.enable = true;
boot.consoleLogLevel = 3;
boot.kernelParams = [ "quiet" ];
boot.loader.timeout = 1;
boot.loader.systemd-boot.configurationLimit = 5;
boot.initrd.systemd.enable = true;
boot.plymouth.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
} and then setting it in your system config like this { lib, namespace, ... }:
{
${namespace}.boot.supportedFilesystems = ["ext4"];
} |
|
ah, it should be within @@ -11,5 +11,7 @@ in {
type = lib.types.listOf lib.types.str;
default = [ "bcachefs" ];
};
- boot.supportedFilesystems = cfg.supportedFilesystems;
+ config = {
+ boot.supportedFilesystems = cfg.supportedFilesystems;
+ };
} |
i get the same error, not sure if i did something wrong or not
|
nvm i figured it out; i had extra config not in the "config" option, nix is weird |
i'm trying to set something as mkDefault in a module, and then mkForce the same option in the system config, but the error message prints out no mkDefault, and simply says the option was defined twice, is some stripping being done or am i just using mkForce wrong ?
for reference, the option i was trying to set was boot.supportedFilesystems = mkDefault [ "bcachefs" ];
The text was updated successfully, but these errors were encountered: