diff options
Diffstat (limited to 'modules/device/default.nix')
| -rw-r--r-- | modules/device/default.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/device/default.nix b/modules/device/default.nix index 23be585..114c68c 100644 --- a/modules/device/default.nix +++ b/modules/device/default.nix @@ -34,6 +34,14 @@ in { default = "kobo"; }; + forceAffiliate = mkOption { + type = types.bool; + default = false; + description = '' + Write the given affiliate to /mnt/onboard/.kobo/affiliate.conf + ''; + }; + hardware = hardware // { default = config._allDevices.${config.device.name}.hardware; }; @@ -48,4 +56,14 @@ in { }; }; }; + + config = { + onboard.file = { + ".kobo/affiliate.conf" = mkIf config.device.forceAffiliate { + text = generators.toINI {} { + General.affiliate = config.device.affiliate; + }; + }; + }; + }; } |
