From 498c188e62a879c128aa4210f3e1031a6afe4916 Mon Sep 17 00:00:00 2001 From: mainrs <5113257+mainrs@users.noreply.github.com> Date: Wed, 2 Feb 2022 16:46:23 +0100 Subject: [PATCH] eww: add module Closes #2682 --- .github/CODEOWNERS | 2 ++ modules/misc/news.nix | 7 +++++++ modules/modules.nix | 1 + modules/programs/eww.nix | 39 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+) create mode 100644 modules/programs/eww.nix diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a4af39720..75ab3984a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -76,6 +76,8 @@ /modules/programs/emacs.nix @rycee +/modules/programs/eww.nix @mainrs + /modules/programs/exa.nix @kalhauge /modules/programs/firefox.nix @rycee diff --git a/modules/misc/news.nix b/modules/misc/news.nix index ed4c7fb74..831e8d450 100644 --- a/modules/misc/news.nix +++ b/modules/misc/news.nix @@ -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'. + ''; + } ]; }; } diff --git a/modules/modules.nix b/modules/modules.nix index 01940f35d..cf101a359 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -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 diff --git a/modules/programs/eww.nix b/modules/programs/eww.nix new file mode 100644 index 000000000..b6951b22d --- /dev/null +++ b/modules/programs/eww.nix @@ -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 + $XDG_CONFIG_HOME/eww. + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + xdg.configFile."eww".source = cfg.configDir; + }; +}