mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-31 04:04:32 +00:00
Merge a9315d8510
into 22a36aa709
This commit is contained in:
commit
6d5a1bed56
8 changed files with 84 additions and 0 deletions
|
@ -395,6 +395,12 @@
|
|||
githubId = 56614642;
|
||||
name = "Ilan Joselevich";
|
||||
};
|
||||
kiara = {
|
||||
name = "kiara";
|
||||
email = "cinereal@riseup.net";
|
||||
github = "KiaraGrouwstra";
|
||||
githubId = 3059397;
|
||||
};
|
||||
mager = {
|
||||
email = "andreas@mager.eu";
|
||||
github = "AndreasMager";
|
||||
|
|
|
@ -2140,6 +2140,15 @@ in {
|
|||
you can use `lib.mkOrder` to specify the order of the content you want to insert.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2025-03-";
|
||||
message = ''
|
||||
A new module is available: 'programs.wallust'.
|
||||
|
||||
Wallust generates colors from an images, similar to pywal.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -267,6 +267,7 @@ let
|
|||
./programs/vscode/haskell.nix
|
||||
./programs/pywal.nix
|
||||
./programs/rbenv.nix
|
||||
./programs/wallust.nix
|
||||
./programs/watson.nix
|
||||
./programs/waybar.nix
|
||||
./programs/wezterm.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;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -394,6 +394,7 @@ in import nmtSrc {
|
|||
./modules/programs/vifm
|
||||
./modules/programs/vim-vint
|
||||
./modules/programs/vscode
|
||||
./modules/programs/wallust
|
||||
./modules/programs/watson
|
||||
./modules/programs/wezterm
|
||||
./modules/programs/yazi
|
||||
|
|
3
tests/modules/programs/wallust/default.nix
Normal file
3
tests/modules/programs/wallust/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
wallust = ./wallust.nix;
|
||||
}
|
2
tests/modules/programs/wallust/expected.toml
Normal file
2
tests/modules/programs/wallust/expected.toml
Normal file
|
@ -0,0 +1,2 @@
|
|||
backend = "fastresize"
|
||||
color_space = "lchmixed"
|
16
tests/modules/programs/wallust/wallust.nix
Normal file
16
tests/modules/programs/wallust/wallust.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
home.enableNixpkgsReleaseCheck = false;
|
||||
programs.wallust = {
|
||||
enable = true;
|
||||
backend = "full";
|
||||
settings = {
|
||||
backend = "fastresize";
|
||||
color_space = "lchmixed";
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/wallust/wallust.toml
|
||||
assertFileContent home-files/.config/wallust/wallust.toml ${./expected.toml}
|
||||
'';
|
||||
}
|
Loading…
Add table
Reference in a new issue