nixos/services.arbtt: remove with lib;

This commit is contained in:
Felix Buehler 2024-08-30 00:46:54 +02:00
parent 3fa1cc4f5f
commit 7123ef8458

View File

@ -1,18 +1,15 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.arbtt;
in {
options = {
services.arbtt = {
enable = mkEnableOption "Arbtt statistics capture service";
enable = lib.mkEnableOption "Arbtt statistics capture service";
package = mkPackageOption pkgs [ "haskellPackages" "arbtt" ] { };
package = lib.mkPackageOption pkgs [ "haskellPackages" "arbtt" ] { };
logFile = mkOption {
type = types.str;
logFile = lib.mkOption {
type = lib.types.str;
default = "%h/.arbtt/capture.log";
example = "/home/username/.arbtt-capture.log";
description = ''
@ -20,8 +17,8 @@ in {
'';
};
sampleRate = mkOption {
type = types.int;
sampleRate = lib.mkOption {
type = lib.types.int;
default = 60;
example = 120;
description = ''
@ -31,7 +28,7 @@ in {
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
systemd.user.services.arbtt = {
description = "arbtt statistics capture service";
wantedBy = [ "graphical-session.target" ];