formatted

This commit is contained in:
atagen 2023-04-21 01:58:39 +10:00
parent ba1684c8d4
commit 737ca01e49
24 changed files with 468 additions and 411 deletions

View file

@ -1,10 +1,12 @@
{ config, lib, pkgs, ... }:
with lib;
let
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.programs.fuzzel;
iniFormat = pkgs.formats.ini { };
iniFormat = pkgs.formats.ini {};
in {
options = {
programs.fuzzel = {
@ -19,7 +21,7 @@ in {
settings = mkOption {
type = iniFormat.type;
default = { };
default = {};
example = literalExpression ''
{
window.dimensions = {
@ -45,18 +47,17 @@ in {
config = mkMerge [
(mkIf cfg.enable {
home.packages = [ cfg.package ];
home.packages = [cfg.package];
xdg.configFile."fuzzel/fuzzel.ini" = mkIf (cfg.settings != { }) {
xdg.configFile."fuzzel/fuzzel.ini" = mkIf (cfg.settings != {}) {
# TODO: Replace by the generate function but need to figure out how to
# handle the escaping first.
#
# source = yamlFormat.generate "alacritty.yml" cfg.settings;
text =
replaceStrings [ "\\\\" ] [ "\\" ] (builtins.toJSON cfg.settings);
replaceStrings ["\\\\"] ["\\"] (builtins.toJSON cfg.settings);
};
})
];
}