nixos/services.felix: remove with lib;

This commit is contained in:
Felix Buehler 2024-08-24 22:05:43 +02:00
parent 9d570bce41
commit df4cacf262

View File

@ -1,8 +1,5 @@
# Felix server # Felix server
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib;
let let
cfg = config.services.felix; cfg = config.services.felix;
@ -17,23 +14,23 @@ in
services.felix = { services.felix = {
enable = mkEnableOption "the Apache Felix OSGi service"; enable = lib.mkEnableOption "the Apache Felix OSGi service";
bundles = mkOption { bundles = lib.mkOption {
type = types.listOf types.package; type = lib.types.listOf lib.types.package;
default = [ pkgs.felix_remoteshell ]; default = [ pkgs.felix_remoteshell ];
defaultText = literalExpression "[ pkgs.felix_remoteshell ]"; defaultText = lib.literalExpression "[ pkgs.felix_remoteshell ]";
description = "List of bundles that should be activated on startup"; description = "List of bundles that should be activated on startup";
}; };
user = mkOption { user = lib.mkOption {
type = types.str; type = lib.types.str;
default = "osgi"; default = "osgi";
description = "User account under which Apache Felix runs."; description = "User account under which Apache Felix runs.";
}; };
group = mkOption { group = lib.mkOption {
type = types.str; type = lib.types.str;
default = "osgi"; default = "osgi";
description = "Group account under which Apache Felix runs."; description = "Group account under which Apache Felix runs.";
}; };
@ -45,7 +42,7 @@ in
###### implementation ###### implementation
config = mkIf cfg.enable { config = lib.mkIf cfg.enable {
users.groups.osgi.gid = config.ids.gids.osgi; users.groups.osgi.gid = config.ids.gids.osgi;
users.users.osgi = users.users.osgi =