nixos/services.zrepl: remove with lib;

This commit is contained in:
Felix Buehler 2024-08-28 21:18:55 +02:00 committed by Jörg Thalheim
parent 8a7d699812
commit 561d58c49c

View File

@ -1,27 +1,25 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
with lib;
let let
cfg = config.services.zrepl; cfg = config.services.zrepl;
format = pkgs.formats.yaml { }; format = pkgs.formats.yaml { };
configFile = format.generate "zrepl.yml" cfg.settings; configFile = format.generate "zrepl.yml" cfg.settings;
in in
{ {
meta.maintainers = with maintainers; [ cole-h ]; meta.maintainers = with lib.maintainers; [ cole-h ];
options = { options = {
services.zrepl = { services.zrepl = {
enable = mkEnableOption "zrepl"; enable = lib.mkEnableOption "zrepl";
package = mkPackageOption pkgs "zrepl" { }; package = lib.mkPackageOption pkgs "zrepl" { };
settings = mkOption { settings = lib.mkOption {
default = { }; default = { };
description = '' description = ''
Configuration for zrepl. See <https://zrepl.github.io/configuration.html> Configuration for zrepl. See <https://zrepl.github.io/configuration.html>
for more information. for more information.
''; '';
type = types.submodule { type = lib.types.submodule {
freeformType = format.type; freeformType = format.type;
}; };
}; };
@ -30,7 +28,7 @@ in
### Implementation ### ### Implementation ###
config = mkIf cfg.enable { config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ]; environment.systemPackages = [ cfg.package ];
# zrepl looks for its config in this location by default. This # zrepl looks for its config in this location by default. This