From c3052ddc4e54092bfc9220d550ab4d8fcba166de Mon Sep 17 00:00:00 2001 From: Chris Wells Date: Wed, 11 Sep 2024 10:50:30 -0500 Subject: The modules seem fairly solid now. Now to write the cli --- modules/device/default.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'modules/device/default.nix') 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; + }; + }; + }; + }; } -- cgit v1.2.3