nixos/sourcehut: remove usages of 'with lib;'
Inherit library attributes at a finer granularity, instead.
This commit is contained in:
parent
ba6817ed22
commit
9e6f9c6d83
2 changed files with 16 additions and 2 deletions
|
@ -1,6 +1,15 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
with lib;
|
|
||||||
let
|
let
|
||||||
|
inherit (builtins) head tail;
|
||||||
|
inherit (lib) generators maintainers types;
|
||||||
|
inherit (lib.attrsets) attrValues filterAttrs mapAttrs mapAttrsToList recursiveUpdate;
|
||||||
|
inherit (lib.lists) flatten optional optionals;
|
||||||
|
inherit (lib.options) literalExpression mkEnableOption mkOption;
|
||||||
|
inherit (lib.strings) concatMapStringsSep concatStringsSep optionalString versionOlder;
|
||||||
|
inherit (lib.trivial) mapNullable;
|
||||||
|
inherit (lib.modules) mkBefore mkDefault mkForce mkIf mkMerge
|
||||||
|
mkRemovedOptionModule mkRenamedOptionModule;
|
||||||
inherit (config.services) nginx postfix postgresql redis;
|
inherit (config.services) nginx postfix postgresql redis;
|
||||||
inherit (config.users) users groups;
|
inherit (config.users) users groups;
|
||||||
cfg = config.services.sourcehut;
|
cfg = config.services.sourcehut;
|
||||||
|
|
|
@ -11,8 +11,13 @@ srv:
|
||||||
}:
|
}:
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
let
|
||||||
|
inherit (lib) types;
|
||||||
|
inherit (lib.attrsets) mapAttrs optionalAttrs;
|
||||||
|
inherit (lib.lists) optional;
|
||||||
|
inherit (lib.modules) mkBefore mkDefault mkForce mkIf mkMerge;
|
||||||
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
|
inherit (lib.strings) concatStringsSep hasSuffix optionalString;
|
||||||
inherit (config.services) postgresql;
|
inherit (config.services) postgresql;
|
||||||
redis = config.services.redis.servers."sourcehut-${srvsrht}";
|
redis = config.services.redis.servers."sourcehut-${srvsrht}";
|
||||||
inherit (config.users) users;
|
inherit (config.users) users;
|
||||||
|
|
Loading…
Reference in a new issue