about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorFelix Buehler2024-08-24 22:05:42 +0200
committerFelix Buehler2024-08-30 23:00:17 +0200
commit078a6f8d496f9fcf40ea57a998f5ee4e388b306a (patch)
tree8fab509caa5e774d354f4b8955ca9eaa114cebe8 /nixos
parentdf640cd6add5ab85bad9846d45f2d13baf4485cf (diff)
nixos/services.dwm-status: remove `with lib;`
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/misc/dwm-status.nix21
1 files changed, 9 insertions, 12 deletions
diff --git a/nixos/modules/services/misc/dwm-status.nix b/nixos/modules/services/misc/dwm-status.nix
index 081451f2ace9..927561270a79 100644
--- a/nixos/modules/services/misc/dwm-status.nix
+++ b/nixos/modules/services/misc/dwm-status.nix
@@ -1,11 +1,8 @@
 { config, lib, pkgs, ... }:
-
-with lib;
-
 let
   cfg = config.services.dwm-status;
 
-  order = concatMapStringsSep "," (feature: ''"${feature}"'') cfg.order;
+  order = lib.concatMapStringsSep "," (feature: ''"${feature}"'') cfg.order;
 
   configFile = pkgs.writeText "dwm-status.toml" ''
     order = [${order}]
@@ -22,21 +19,21 @@ in
 
     services.dwm-status = {
 
-      enable = mkEnableOption "dwm-status user service";
+      enable = lib.mkEnableOption "dwm-status user service";
 
-      package = mkPackageOption pkgs "dwm-status" {
+      package = lib.mkPackageOption pkgs "dwm-status" {
         example = "dwm-status.override { enableAlsaUtils = false; }";
       };
 
-      order = mkOption {
-        type = types.listOf (types.enum [ "audio" "backlight" "battery" "cpu_load" "network" "time" ]);
+      order = lib.mkOption {
+        type = lib.types.listOf (lib.types.enum [ "audio" "backlight" "battery" "cpu_load" "network" "time" ]);
         description = ''
           List of enabled features in order.
         '';
       };
 
-      extraConfig = mkOption {
-        type = types.lines;
+      extraConfig = lib.mkOption {
+        type = lib.types.lines;
         default = "";
         description = ''
           Extra config in TOML format.
@@ -50,9 +47,9 @@ in
 
   ###### implementation
 
-  config = mkIf cfg.enable {
+  config = lib.mkIf cfg.enable {
 
-    services.upower.enable = elem "battery" cfg.order;
+    services.upower.enable = lib.elem "battery" cfg.order;
 
     systemd.user.services.dwm-status = {
       description = "Highly performant and configurable DWM status service";