summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--default.nix28
-rw-r--r--flake.nix10
-rw-r--r--module.nix28
3 files changed, 33 insertions, 33 deletions
diff --git a/default.nix b/default.nix
index 6d329d8..a1c5718 100644
--- a/default.nix
+++ b/default.nix
@@ -1,21 +1,21 @@
-{ pkgs ? (import <nixpkgs> {}) }:
+{ pkgs ? (import <nixpkgs> { }) }:
let
rustPlatform = pkgs.rustPlatform;
makeWrapper = pkgs.makeWrapper;
-in
- rustPlatform.buildRustPackage rec {
- name = "batteriewarner-${version}";
- version = "2017-09-15";
- src = ./.;
+in
+rustPlatform.buildRustPackage rec {
+ name = "batteriewarner-${version}";
+ version = "2017-09-15";
+ src = ./.;
- cargoSha256 = "sha256:1rf1sckjpjwdvllx3aapw646wl522j9cn7zx4bah805d6ak9plls";
+ cargoSha256 = "sha256:1rf1sckjpjwdvllx3aapw646wl522j9cn7zx4bah805d6ak9plls";
- buildInputs = [ makeWrapper ];
+ buildInputs = [ makeWrapper ];
- meta = {
- description = "Display low battery status using the power led of Thinkpads X-series";
- homepage = https://github.com/yvesf/batteriewarner;
- platforms = pkgs.lib.platforms.all;
- };
- }
+ meta = {
+ description = "Display low battery status using the power led of Thinkpads X-series";
+ homepage = https://github.com/yvesf/batteriewarner;
+ platforms = pkgs.lib.platforms.all;
+ };
+}
diff --git a/flake.nix b/flake.nix
index 99411cb..87e4b9c 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,10 +1,10 @@
{
inputs.nixpkgs.url = "nixpkgs/nixos-20.09";
outputs = { self, nixpkgs }:
- with import nixpkgs { system = "x86_64-linux"; };
- {
- defaultPackage.x86_64-linux = callPackage ./. {};
- nixosModule = { config }: { imports = [ ./module.nix ]; };
- };
+ with import nixpkgs { system = "x86_64-linux"; };
+ {
+ defaultPackage.x86_64-linux = callPackage ./. { };
+ nixosModule = { config }: { imports = [ ./module.nix ]; };
+ };
}
diff --git a/module.nix b/module.nix
index 88bc2fd..c08a64a 100644
--- a/module.nix
+++ b/module.nix
@@ -1,21 +1,21 @@
{ config, lib, pkgs, ... }:
let
- package = pkgs.callPackage ./. {};
+ package = pkgs.callPackage ./. { };
cfg = config.programs.batteriewarner;
in
- {
- options.programs.batteriewarner = {
- enable = lib.mkEnableOption "Batteriewarner";
- };
- config = lib.mkIf cfg.enable {
- systemd.services.batteriewarner = {
- enable = true;
- description = "Batteriewarner";
- wantedBy = [ "multi-user.target" ];
- serviceConfig = {
- ExecStart = "${package}/bin/batteriewarner";
- };
+{
+ options.programs.batteriewarner = {
+ enable = lib.mkEnableOption "Batteriewarner";
+ };
+ config = lib.mkIf cfg.enable {
+ systemd.services.batteriewarner = {
+ enable = true;
+ description = "Batteriewarner";
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig = {
+ ExecStart = "${package}/bin/batteriewarner";
};
};
- }
+ };
+}