diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 8a2f8a671..a4af39720 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -245,6 +245,8 @@
/modules/programs/zathura.nix @rprospero
+/modules/programs/zellij.nix @mainrs
+
/modules/programs/zoxide.nix @marsam
/modules/programs/zsh/prezto.nix @NickHu
diff --git a/modules/lib/maintainers.nix b/modules/lib/maintainers.nix
index 13bdb1e0f..aa140243c 100644
--- a/modules/lib/maintainers.nix
+++ b/modules/lib/maintainers.nix
@@ -205,4 +205,10 @@
github = "pinage404";
githubId = 6325757;
};
+ mainrs = {
+ name = "mainrs";
+ email = "5113257+mainrs@users.noreply.github.com";
+ github = "mainrs";
+ githubId = 5113257;
+ };
}
diff --git a/modules/misc/news.nix b/modules/misc/news.nix
index 41fe07cee..ed4c7fb74 100644
--- a/modules/misc/news.nix
+++ b/modules/misc/news.nix
@@ -2403,6 +2403,13 @@ in
A new module is available: 'services.twmn'.
'';
}
+
+ {
+ time = "2022-02-16T23:50:35+00:00";
+ message = ''
+ A new module is available: 'programs.zellij'.
+ '';
+ }
];
};
}
diff --git a/modules/modules.nix b/modules/modules.nix
index 528734dc6..01940f35d 100644
--- a/modules/modules.nix
+++ b/modules/modules.nix
@@ -158,6 +158,7 @@ let
./programs/xmobar.nix
./programs/z-lua.nix
./programs/zathura.nix
+ ./programs/zellij.nix
./programs/zoxide.nix
./programs/zplug.nix
./programs/zsh.nix
diff --git a/modules/programs/zellij.nix b/modules/programs/zellij.nix
new file mode 100644
index 000000000..6fdfb49e7
--- /dev/null
+++ b/modules/programs/zellij.nix
@@ -0,0 +1,51 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+ cfg = config.programs.zellij;
+ yamlFormat = pkgs.formats.yaml { };
+
+in {
+ meta.maintainers = [ hm.maintainers.mainrs ];
+
+ options.programs.zellij = {
+ enable = mkEnableOption "zellij";
+
+ package = mkOption {
+ type = types.package;
+ default = pkgs.zellij;
+ defaultText = literalExpression "pkgs.zellij";
+ description = ''
+ The zellij package to install.
+ '';
+ };
+
+ settings = mkOption {
+ type = yamlFormat.type;
+ default = { };
+ example = literalExpression ''
+ {
+ theme = "custom";
+ themes.custom.fg = 5;
+ }
+ '';
+ description = ''
+ Configuration written to
+ $XDG_CONFIG_HOME/zellij/config.yaml.
+
+ See for the full
+ list of options.
+ '';
+ };
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = [ cfg.package ];
+
+ xdg.configFile."zellij/config.yaml" = mkIf (cfg.settings != { }) {
+ source = yamlFormat.generate "zellij.yaml" cfg.settings;
+ };
+ };
+}