Move some (all) files around
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
30
hosts/common/user/configs/gui/matugen/options.nix
Normal file
30
hosts/common/user/configs/gui/matugen/options.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
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 = attrsOf anything;
|
||||
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