1 { config, lib, pkgs, ... }:
4 cfg = config.services.hardware.argonone;
7 options.services.hardware.argonone = {
8 enable = lib.mkEnableOption "the driver for Argon One Raspberry Pi case fan and power button";
9 package = lib.mkOption {
10 type = lib.types.package;
11 default = pkgs.argononed;
12 defaultText = lib.literalExpression "pkgs.argononed";
14 The package implementing the Argon One driver
19 config = lib.mkIf cfg.enable {
20 hardware.i2c.enable = true;
21 hardware.deviceTree.overlays = [
24 dtboFile = "${cfg.package}/boot/overlays/argonone.dtbo";
27 name = "i2c1-okay-overlay";
32 compatible = "brcm,bcm2711";
43 environment.systemPackages = [ cfg.package ];
44 systemd.services.argononed = {
45 description = "Argon One Raspberry Pi case Daemon Service";
46 wantedBy = [ "multi-user.target" ];
49 ExecStart = "${cfg.package}/bin/argononed";
50 PIDFile = "/run/argononed.pid";
51 Restart = "on-failure";
56 meta.maintainers = with lib.maintainers; [ misterio77 ];