eww: add module

Closes #2682
This commit is contained in:
mainrs 2022-02-02 16:46:23 +01:00 committed by Robert Helgesson
parent 2116fe6b50
commit 498c188e62
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
4 changed files with 49 additions and 0 deletions

2
.github/CODEOWNERS vendored
View file

@ -76,6 +76,8 @@
/modules/programs/emacs.nix @rycee
/modules/programs/eww.nix @mainrs
/modules/programs/exa.nix @kalhauge
/modules/programs/firefox.nix @rycee

View file

@ -2410,6 +2410,13 @@ in
A new module is available: 'programs.zellij'.
'';
}
{
time = "2022-02-17T17:12:46+00:00";
message = ''
A new module is available: 'programs.eww'.
'';
}
];
};
}

View file

@ -60,6 +60,7 @@ let
./programs/direnv.nix
./programs/eclipse.nix
./programs/emacs.nix
./programs/eww.nix
./programs/exa.nix
./programs/feh.nix
./programs/firefox.nix

39
modules/programs/eww.nix Normal file
View file

@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.eww;
in {
meta.maintainers = [ maintainers.mainrs ];
options.programs.eww = {
enable = mkEnableOption "eww";
package = mkOption {
type = types.package;
default = pkgs.eww;
defaultText = literalExpression "pkgs.eww";
example = literalExpression "pkgs.eww";
description = ''
The eww package to install.
'';
};
configDir = mkOption {
type = types.path;
example = literalExpression "./eww-config-dir";
description = ''
The directory that gets symlinked to
<filename>$XDG_CONFIG_HOME/eww</filename>.
'';
};
};
config = mkIf cfg.enable {
home.packages = [ cfg.package ];
xdg.configFile."eww".source = cfg.configDir;
};
}