mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-19 15:31:22 +02:00
feat: simplify flake.nix
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
{pkgs, ...}: let
|
||||
buildTmuxPlugin = pkgs.tmuxPlugins.mkTmuxPlugin;
|
||||
in
|
||||
{
|
||||
in {
|
||||
draculaTheme = buildTmuxPlugin {
|
||||
pluginName = "dracula";
|
||||
version = "v2.2.0";
|
||||
src = builtins.fetchTarball {
|
||||
name = "dracula-tmux-v2.2.0";
|
||||
url = "https://github.com/dracula/tmux/archive/refs/tags/v2.2.0.tar.gz";
|
||||
name = "dracula-tmux-v2.2.0";
|
||||
url = "https://github.com/dracula/tmux/archive/refs/tags/v2.2.0.tar.gz";
|
||||
sha256 = "sha256:0v2k994yy4xx2iw8qxg7qphw46gq2qmg496i3a3h9b6jgwxqm7zn";
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
plugins = pkgs.tmuxPlugins // pkgs.callPackage ./custom-plugins.nix {};
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
plugins = pkgs.tmuxPlugins // pkgs.callPackage ./custom-plugins.nix {};
|
||||
in {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
shell = "${pkgs.nushell}/bin/nu";
|
||||
|
||||
# Resize the window to the size of the smallest session for which it is the current window.
|
||||
#
|
||||
#
|
||||
aggressiveResize = true;
|
||||
|
||||
# https://github.com/tmux-plugins/tmux-sensible
|
||||
# tmux-sensible overwrites default tmux shortcuts, makes them more sane.
|
||||
sensibleOnTop = true;
|
||||
|
||||
|
||||
# extraConfig = builtins.readFile ./tmux.conf;
|
||||
# keyMode = "vi"; # default is emacs
|
||||
|
||||
|
||||
baseIndex = 1; # start index from 1
|
||||
escapeTime = 0; # do not wait for escape key
|
||||
terminal = "xterm-256color";
|
||||
@@ -31,8 +32,8 @@ in
|
||||
plugin = continuum;
|
||||
extraConfig = ''
|
||||
set -g @continuum-save-interval '15'
|
||||
|
||||
# Option to display current status of tmux continuum in tmux status line.
|
||||
|
||||
# Option to display current status of tmux continuum in tmux status line.
|
||||
set -g status-right 'Continuum status: #{continuum_status}'
|
||||
'';
|
||||
}
|
||||
@@ -41,7 +42,7 @@ in
|
||||
# Manually persists tmux environment across system restarts.
|
||||
# prefix + Ctrl-s - save
|
||||
# prefix + Ctrl-r - restore
|
||||
#
|
||||
#
|
||||
plugin = resurrect;
|
||||
# Restore Neovim sessions
|
||||
extraConfig = "set -g @resurrect-strategy-nvim 'session'";
|
||||
|
||||
Reference in New Issue
Block a user