Merge pull request #167907 from Misterio77/argonone-module
nixos/argonone: init
This commit is contained in:
commit
66e8dceabc
@ -146,6 +146,14 @@
|
|||||||
a kernel module for mounting the Apple File System (APFS).
|
a kernel module for mounting the Apple File System (APFS).
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<link xlink:href="https://gitlab.com/DarkElvenAngel/argononed">argonone</link>,
|
||||||
|
a replacement daemon for the Raspberry Pi Argon One power
|
||||||
|
button and cooler. Available at
|
||||||
|
<link xlink:href="options.html#opt-services.hardware.argonone.enable">services.hardware.argonone</link>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<link xlink:href="https://github.com/JustArchiNET/ArchiSteamFarm">ArchiSteamFarm</link>,
|
<link xlink:href="https://github.com/JustArchiNET/ArchiSteamFarm">ArchiSteamFarm</link>,
|
||||||
|
@ -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).
|
- [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).
|
- [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).
|
- [BaGet](https://loic-sharma.github.io/BaGet/), a lightweight NuGet and symbol server. Available at [services.baget](#opt-services.baget.enable).
|
||||||
|
@ -430,6 +430,7 @@
|
|||||||
./services/games/terraria.nix
|
./services/games/terraria.nix
|
||||||
./services/hardware/acpid.nix
|
./services/hardware/acpid.nix
|
||||||
./services/hardware/actkbd.nix
|
./services/hardware/actkbd.nix
|
||||||
|
./services/hardware/argonone.nix
|
||||||
./services/hardware/auto-cpufreq.nix
|
./services/hardware/auto-cpufreq.nix
|
||||||
./services/hardware/bluetooth.nix
|
./services/hardware/bluetooth.nix
|
||||||
./services/hardware/bolt.nix
|
./services/hardware/bolt.nix
|
||||||
|
58
nixos/modules/services/hardware/argonone.nix
Normal file
58
nixos/modules/services/hardware/argonone.nix
Normal file
@ -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 ];
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user