Skip to content

A Nix wrapper for the Argon40's case configuration scripts

Notifications You must be signed in to change notification settings

Guusvanmeerveld/argon40-nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Argon40 scripts for NixOS

This flake aims to package the Argon40 install script for NixOS so that it can be easily installed on a Raspberry Pi running NixOS. The install script was written for Raspberry Pi OS and its derivatives and thus expects to be run in an FHS compliant environment. This flake was written using the install script as a main inspiration. Using this flake also has the advantage of declaritively specifying the fan speed mappings of the case, which is preferable when using NixOS. I personally have the Argon ONE M.2 Case for Raspberry Pi 4 and thus have only been able to test this flake on that case.

Installation

With flakes

Add the following into the desired flake.nix file.

{
    inputs.argon40-nix.url = "github:guusvanmeerveld/argon40-nix";
}

Usage

Module import

Simply import the NixOS module as follows:

{ inputs, ... }: {
    imports = [inputs.argon40-nix.nixosModules.default];
}

Example config for Argon ONE

{ inputs, ... }: {
    imports = [inputs.argon40-nix.nixosModules.default];

    config = {
        programs.argon.one = {
            enable = true;

            settings = {
                # Is 'celsius' by default, can also be set to 'fahrenheit'
                displayUnits = "celsius";

                # This is the same config as the original Argon40 config.
                # This is also the default config for this flake.
                fanspeed = [
                    {
                        # This the temperature threshold at which this fan speed will activate.
                        # The temperature is in the above specified unit.
                        temperature = 55;
                        # This is speed percentage at which the fan will spin.
                        speed = 30;
                    }
                    {
                        temperature = 60;
                        speed = 55;
                    }
                    {
                        temperature = 65;
                        speed = 100;
                    }
                ];
            };
        };
    };
}

Thanks to

  • Argon40 for providing such an awesome case, continiously providing updates and open sourcing their projects.
  • okunze's repo containing an up to date version of the argon40 install script.

About

A Nix wrapper for the Argon40's case configuration scripts

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published