parent
ccd7df836e
commit
0b491b460f
200 changed files with 2421 additions and 2817 deletions
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue