aboutsummaryrefslogtreecommitdiff
path: root/modules/device/default.nix
diff options
context:
space:
mode:
authorChris Wells <chris@mathematicaster.org>2024-09-11 10:50:30 -0500
committerChris Wells <chris@mathematicaster.org>2024-09-11 10:50:30 -0500
commitc3052ddc4e54092bfc9220d550ab4d8fcba166de (patch)
tree836e2f11242afe8911e9eabd644c9a20ab668f3d /modules/device/default.nix
parent4f471484b3a1e16230979a8406503a220b9101f4 (diff)
downloadkobo-manager-c3052ddc4e54092bfc9220d550ab4d8fcba166de.tar
kobo-manager-c3052ddc4e54092bfc9220d550ab4d8fcba166de.tar.gz
kobo-manager-c3052ddc4e54092bfc9220d550ab4d8fcba166de.tar.bz2
kobo-manager-c3052ddc4e54092bfc9220d550ab4d8fcba166de.tar.lz
kobo-manager-c3052ddc4e54092bfc9220d550ab4d8fcba166de.tar.xz
kobo-manager-c3052ddc4e54092bfc9220d550ab4d8fcba166de.tar.zst
kobo-manager-c3052ddc4e54092bfc9220d550ab4d8fcba166de.zip
The modules seem fairly solid now. Now to write the cli
Diffstat (limited to 'modules/device/default.nix')
-rw-r--r--modules/device/default.nix18
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;
+ };
+ };
+ };
+ };
}