nixos/services.ihaskell: remove with lib;

This commit is contained in:
Felix Buehler 2024-08-24 22:05:45 +02:00
parent 2270873952
commit 7065336804

View File

@ -1,7 +1,4 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
with lib;
let let
cfg = config.services.ihaskell; cfg = config.services.ihaskell;
@ -14,17 +11,17 @@ in
{ {
options = { options = {
services.ihaskell = { services.ihaskell = {
enable = mkOption { enable = lib.mkOption {
type = types.bool; type = lib.types.bool;
default = false; default = false;
description = "Autostart an IHaskell notebook service."; description = "Autostart an IHaskell notebook service.";
}; };
extraPackages = mkOption { extraPackages = lib.mkOption {
type = types.functionTo (types.listOf types.package); type = lib.types.functionTo (lib.types.listOf lib.types.package);
default = haskellPackages: []; default = haskellPackages: [];
defaultText = literalExpression "haskellPackages: []"; defaultText = lib.literalExpression "haskellPackages: []";
example = literalExpression '' example = lib.literalExpression ''
haskellPackages: [ haskellPackages: [
haskellPackages.wreq haskellPackages.wreq
haskellPackages.lens haskellPackages.lens
@ -39,7 +36,7 @@ in
}; };
}; };
config = mkIf cfg.enable { config = lib.mkIf cfg.enable {
users.users.ihaskell = { users.users.ihaskell = {
group = config.users.groups.ihaskell.name; group = config.users.groups.ihaskell.name;