users/foo-dogsquared: modularize terminal multiplexer config

This commit is contained in:
Gabriel Arazas 2023-12-12 09:46:07 +08:00
parent a70b8ad5d6
commit ed5f37ec48
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
3 changed files with 25 additions and 5 deletions

View File

@ -18,6 +18,7 @@
keys.gpg.enable = true;
keys.ssh.enable = true;
shell.enable = true;
terminal-multiplexer.enable = true;
};
services.desktop.enable = true;
@ -50,11 +51,6 @@
};
};
# Making my favorite terminal multiplexer right now.
programs.zellij.settings = {
default_layout = "editor";
layout_dir = builtins.toString ./config/zellij/layouts;
};
# My custom modules.
profiles = {
editors = {

View File

@ -9,6 +9,7 @@
./programs/git.nix
./programs/keys.nix
./programs/shell.nix
./programs/terminal-multiplexer.nix
./services/desktop.nix
];

View File

@ -0,0 +1,23 @@
{ config, lib, pkgs, ... }:
let
userCfg = config.users.foo-dogsquared;
cfg = userCfg.programs.terminal-multiplexer;
in
{
options.users.foo-dogsquared.programs.terminal-multiplexer.enable =
lib.mkEnableOption "foo-dogsquared's terminal multiplexer setup";
config = lib.mkIf cfg.enable {
programs.zellij = {
enable = true;
settings = {
mouse_mode = false;
copy_on_select = false;
pane_frames = false;
default_layout = "editor";
layout_dir = builtins.toString ../../config/zellij/layouts;
};
};
};
}