diff --git a/nixos/modules/services/system/cachix-watch-store.nix b/nixos/modules/services/system/cachix-watch-store.nix index 3505fe3a9a09..32fc5eec3964 100644 --- a/nixos/modules/services/system/cachix-watch-store.nix +++ b/nixos/modules/services/system/cachix-watch-store.nix @@ -4,9 +4,6 @@ lib, ... }: - -with lib; - let cfg = config.services.cachix-watch-store; in @@ -17,56 +14,56 @@ in ]; options.services.cachix-watch-store = { - enable = mkEnableOption "Cachix Watch Store: https://docs.cachix.org"; + enable = lib.mkEnableOption "Cachix Watch Store: https://docs.cachix.org"; - cacheName = mkOption { - type = types.str; + cacheName = lib.mkOption { + type = lib.types.str; description = "Cachix binary cache name"; }; - cachixTokenFile = mkOption { - type = types.path; + cachixTokenFile = lib.mkOption { + type = lib.types.path; description = '' Required file that needs to contain the cachix auth token. ''; }; - signingKeyFile = mkOption { - type = types.nullOr types.path; + signingKeyFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; description = '' Optional file containing a self-managed signing key to sign uploaded store paths. ''; default = null; }; - compressionLevel = mkOption { - type = types.nullOr types.int; + compressionLevel = lib.mkOption { + type = lib.types.nullOr lib.types.int; description = "The compression level for ZSTD compression (between 0 and 16)"; default = null; }; - jobs = mkOption { - type = types.nullOr types.int; + jobs = lib.mkOption { + type = lib.types.nullOr lib.types.int; description = "Number of threads used for pushing store paths"; default = null; }; - host = mkOption { - type = types.nullOr types.str; + host = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; description = "Cachix host to connect to"; }; - verbose = mkOption { - type = types.bool; + verbose = lib.mkOption { + type = lib.types.bool; description = "Enable verbose output"; default = false; }; - package = mkPackageOption pkgs "cachix" { }; + package = lib.mkPackageOption pkgs "cachix" { }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.cachix-watch-store-agent = { description = "Cachix watch store Agent"; wants = [ "network-online.target" ];