/Solaar-Flake

This Repo is the official Flake of Solaar for NixOS

Primary LanguageNix

Nix Flakes Ready Built With Snowfall

Solaar-Flake

This Repo is a Flake of Solaar for NixOS.

See also the FlakeHub release.

Version Mapping

Flake version Solaar version
0.1.1 1.1.13

How to use?

Import

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
    solaar = {
      url = "https://flakehub.com/f/Svenum/Solaar-Flake/*.tar.gz" # For latest stable version
      #url = "https://flakehub.com/f/Svenum/Solaar-Flake/0.1.1.tar.gz" # uncomment line for solaar version 1.1.13
      #url = "github:Svenum/Solaar-Flake/main"; # Uncomment line for latest unstable version
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };
  outputs = {nixpkgs, solaar}: {
    nixosConfigurations.foo = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
          solaar.nixosModules.default
        ./configuration.nix
      ];
    };
  }
}

Then enable it by putting:

...
    services.solaar.enable = true;
...

in configuration.nix

Configuration

The configuration is done in the configuration.nix file. The following options are available:

{
  services.solaar = {
    enable = true; # Enable the service
    package = pkgs.solaar; # The package to use
    window = "hide"; # Show the window on startup (show, *hide*, only [window only])
    batteryIcons = "regular"; # Which battery icons to use (*regular*, symbolic, solaar)
    extraArgs = ""; # Extra arguments to pass to solaar on startup
  };
}