From 6a73a0aca934dd4fff87a4d5eeeb86bfab44bfb0 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Fri, 30 Aug 2024 00:46:42 +0200 Subject: [PATCH] nixos/services.preload: remove `with lib;` --- nixos/modules/services/misc/preload.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/nixos/modules/services/misc/preload.nix b/nixos/modules/services/misc/preload.nix index d26e2c3d383e..4dadd0e26b16 100644 --- a/nixos/modules/services/misc/preload.nix +++ b/nixos/modules/services/misc/preload.nix @@ -1,25 +1,22 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.preload; in { meta = { maintainers = pkgs.preload.meta.maintainers; }; options.services.preload = { - enable = mkEnableOption "preload"; - package = mkPackageOption pkgs "preload" { }; + enable = lib.mkEnableOption "preload"; + package = lib.mkPackageOption pkgs "preload" { }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.preload = { description = "Loads data into ram during idle time of CPU."; wantedBy = [ "multi-user.target" ]; serviceConfig = { EnvironmentFile = "${cfg.package}/etc/conf.d/preload"; - ExecStart = "${getExe cfg.package} -l '' --foreground $PRELOAD_OPTS"; + ExecStart = "${lib.getExe cfg.package} -l '' --foreground $PRELOAD_OPTS"; Type = "simple"; # Only preload data during CPU idle time IOSchedulingClass = 3;