diff options
-rw-r--r-- | default.nix | 28 | ||||
-rw-r--r-- | flake.nix | 10 | ||||
-rw-r--r-- | module.nix | 28 |
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; + }; +} @@ -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 ]; }; + }; } @@ -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"; }; }; - } + }; +} |