treewide: remove with lib (#6735)

Continuation of `with lib;` cleanup.
This commit is contained in:
Austin Horstman 2025-03-31 22:32:16 -05:00 committed by GitHub
parent ccd7df836e
commit 0b491b460f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
200 changed files with 2421 additions and 2817 deletions

View file

@ -1,6 +1,4 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.tiny;
format = pkgs.formats.yaml { };
@ -9,19 +7,19 @@ let
else
"${config.xdg.configHome}/tiny";
in {
meta.maintainers = [ hm.maintainers.kmaasrud ];
meta.maintainers = [ lib.hm.maintainers.kmaasrud ];
options = {
programs.tiny = {
enable = mkEnableOption "tiny, a TUI IRC client written in Rust";
enable = lib.mkEnableOption "tiny, a TUI IRC client written in Rust";
package = lib.mkPackageOption pkgs "tiny" { };
settings = mkOption {
settings = lib.mkOption {
type = format.type;
default = { };
defaultText = literalExpression "{ }";
example = literalExpression ''
defaultText = lib.literalExpression "{ }";
example = lib.literalExpression ''
{
servers = [
{
@ -50,10 +48,10 @@ in {
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
home.packages = [ cfg.package ];
home.file."${configDir}/config.yml" = mkIf (cfg.settings != { }) {
home.file."${configDir}/config.yml" = lib.mkIf (cfg.settings != { }) {
source = format.generate "tiny-config" cfg.settings;
};
};