From 08f1e99c34d9236fb1a2447b178ac33f899ddbca Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 29 Dec 2024 21:50:39 +0100 Subject: [PATCH] nixos/services.localtimed: remove `with lib;` --- nixos/modules/services/system/localtimed.nix | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/system/localtimed.nix b/nixos/modules/services/system/localtimed.nix index 745d767d0744..404cdaba7b42 100644 --- a/nixos/modules/services/system/localtimed.nix +++ b/nixos/modules/services/system/localtimed.nix @@ -4,9 +4,6 @@ pkgs, ... }: - -with lib; - let cfg = config.services.localtimed; in @@ -15,8 +12,8 @@ in options = { services.localtimed = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Enable `localtimed`, a simple daemon for keeping the @@ -29,12 +26,12 @@ in to make the choice deliberate. An error will be presented otherwise. ''; }; - package = mkPackageOption pkgs "localtime" { }; - geoclue2Package = mkPackageOption pkgs "Geoclue2" { default = "geoclue2-with-demo-agent"; }; + package = lib.mkPackageOption pkgs "localtime" { }; + geoclue2Package = lib.mkPackageOption pkgs "Geoclue2" { default = "geoclue2-with-demo-agent"; }; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { # This will give users an error if they have set an explicit time # zone, rather than having the service silently override it. time.timeZone = null;