Add basic theme config
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
23
users/common/options/home-manager/matugen/default.nix
Normal file
23
users/common/options/home-manager/matugen/default.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.programs.matugen;
|
||||
in
|
||||
{
|
||||
# https://github.com/Theaninova/matugen/blob/add-home-manager-module/hm-module.nix
|
||||
options.programs.matugen = with lib; with types; {
|
||||
enable = mkEnableOption "matugen";
|
||||
package = mkPackageOption pkgs "matugen" { };
|
||||
settings = mkOption {
|
||||
type = attrs;
|
||||
description = "Settings to write to config.toml.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
xdg.configFile."matugen/config.toml".source = lib.mkIf (cfg.settings != null) (
|
||||
(pkgs.formats.toml { }).generate "matugen" cfg.settings
|
||||
);
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user