add option to turn off migration service

This commit is contained in:
Travis Staton 2023-06-23 20:00:03 -04:00
parent 23faa56e6c
commit 6e0da67830

View file

@ -4,8 +4,21 @@
{
imports = [ ../sd-image ./config.nix ./i2c.nix ];
options = with lib; {
raspberry-pi-nix = {
firmware-migration-service = {
enable = mkOption {
default = true;
type = types.bool;
};
};
};
};
config = {
systemd.services = {
"raspberry-pi-firmware-migrate" = {
"raspberry-pi-firmware-migrate" =
lib.mkIf config.raspberry-pi-nix.firmware-migration-service.enable {
description = "update the firmware partition";
wantedBy = [ "multi-user.target" ];
serviceConfig =
@ -188,4 +201,6 @@
KERNEL=="gpiochip*", GROUP="gpio", MODE="0660"
'';
};
};
}