mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-06 00:51:04 +01:00
parent
48bbe7bc48
commit
aa2c7ac404
7 changed files with 78 additions and 0 deletions
9
modules/misc/news/2025-04-20_00-39-01.nix
Normal file
9
modules/misc/news/2025-04-20_00-39-01.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
time = "2025-04-20T05:39:01+00:00";
|
||||
condition = true;
|
||||
message = ''
|
||||
A new module is available: 'programs.wallust'.
|
||||
|
||||
Wallust generates colors from an images, similar to pywal.
|
||||
'';
|
||||
}
|
||||
|
|
@ -286,6 +286,7 @@ let
|
|||
./programs/vscode/haskell.nix
|
||||
./programs/pywal.nix
|
||||
./programs/rbenv.nix
|
||||
./programs/wallust.nix
|
||||
./programs/watson.nix
|
||||
./programs/waylogout.nix
|
||||
./programs/waybar.nix
|
||||
|
|
|
|||
46
modules/programs/wallust.nix
Normal file
46
modules/programs/wallust.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib)
|
||||
mkEnableOption
|
||||
mkPackageOption
|
||||
mkOption
|
||||
mkIf
|
||||
literalExpression
|
||||
;
|
||||
cfg = config.programs.wallust;
|
||||
tomlFormat = pkgs.formats.toml { };
|
||||
in
|
||||
{
|
||||
meta.maintainers = with lib.hm.maintainers; [ kiara ];
|
||||
|
||||
options.programs.wallust = {
|
||||
enable = mkEnableOption "Wallust color scheme generator";
|
||||
package = mkPackageOption pkgs "wallust" { };
|
||||
settings = mkOption {
|
||||
type = tomlFormat.type;
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
palette = "softdark";
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
Configuration written to {file}`$XDG_CONFIG_HOME/wallust/wallust.toml`.
|
||||
See <https://explosion-mental.codeberg.page/wallust/config/> for
|
||||
documentation.
|
||||
'';
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
xdg.configFile."wallust/wallust.toml" = mkIf (cfg.settings != { }) {
|
||||
source = tomlFormat.generate "wallust.toml" cfg.settings;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue