diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
index 5208671e4dab..8ef398e25fd0 100644
--- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
+++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
@@ -146,6 +146,14 @@
a kernel module for mounting the Apple File System (APFS).
+
+
+ argonone,
+ a replacement daemon for the Raspberry Pi Argon One power
+ button and cooler. Available at
+ services.hardware.argonone.
+
+
ArchiSteamFarm,
diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md
index faf941f56996..d83eb18f5141 100644
--- a/nixos/doc/manual/release-notes/rl-2205.section.md
+++ b/nixos/doc/manual/release-notes/rl-2205.section.md
@@ -61,6 +61,8 @@ In addition to numerous new and upgraded packages, this release has the followin
- [apfs](https://github.com/linux-apfs/linux-apfs-rw), a kernel module for mounting the Apple File System (APFS).
+- [argonone](https://gitlab.com/DarkElvenAngel/argononed), a replacement daemon for the Raspberry Pi Argon One power button and cooler. Available at [services.hardware.argonone](options.html#opt-services.hardware.argonone.enable).
+
- [ArchiSteamFarm](https://github.com/JustArchiNET/ArchiSteamFarm), a C# application with primary purpose of idling Steam cards from multiple accounts simultaneously. Available as [services.archisteamfarm](#opt-services.archisteamfarm.enable).
- [BaGet](https://loic-sharma.github.io/BaGet/), a lightweight NuGet and symbol server. Available at [services.baget](#opt-services.baget.enable).
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index b0fd06e66e02..8ba609e99834 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -430,6 +430,7 @@
./services/games/terraria.nix
./services/hardware/acpid.nix
./services/hardware/actkbd.nix
+ ./services/hardware/argonone.nix
./services/hardware/auto-cpufreq.nix
./services/hardware/bluetooth.nix
./services/hardware/bolt.nix
diff --git a/nixos/modules/services/hardware/argonone.nix b/nixos/modules/services/hardware/argonone.nix
new file mode 100644
index 000000000000..638181b1b12e
--- /dev/null
+++ b/nixos/modules/services/hardware/argonone.nix
@@ -0,0 +1,58 @@
+{ config, lib, pkgs, ... }:
+
+let
+ cfg = config.services.hardware.argonone;
+in
+{
+ options.services.hardware.argonone = {
+ enable = lib.mkEnableOption "the driver for Argon One Raspberry Pi case fan and power button";
+ package = lib.mkOption {
+ type = lib.types.package;
+ default = pkgs.argononed;
+ defaultText = "pkgs.argononed";
+ description = ''
+ The package implementing the Argon One driver
+ '';
+ };
+ };
+
+ config = lib.mkIf cfg.enable {
+ hardware.i2c.enable = true;
+ hardware.deviceTree.overlays = [
+ {
+ name = "argononed";
+ dtboFile = "${cfg.package}/boot/overlays/argonone.dtbo";
+ }
+ {
+ name = "i2c1-okay-overlay";
+ dtsText = ''
+ /dts-v1/;
+ /plugin/;
+ / {
+ compatible = "brcm,bcm2711";
+ fragment@0 {
+ target = <&i2c1>;
+ __overlay__ {
+ status = "okay";
+ };
+ };
+ };
+ '';
+ }
+ ];
+ environment.systemPackages = [ cfg.package ];
+ systemd.services.argononed = {
+ description = "Argon One Raspberry Pi case Daemon Service";
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig = {
+ Type = "forking";
+ ExecStart = "${cfg.package}/bin/argononed";
+ PIDFile = "/run/argononed.pid";
+ Restart = "on-failure";
+ };
+ };
+ };
+
+ meta.maintainers = with lib.maintainers; [ misterio77 ];
+
+}