1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

treewide: reformat nixfmt-rfc-style

Reformat repository using new nixfmt-rfc-style.
This commit is contained in:
Austin Horstman 2025-04-07 16:11:29 -05:00
parent 5df48c4255
commit cba2f9ce95
1051 changed files with 37028 additions and 26594 deletions

View file

@ -1,11 +1,24 @@
{ pkgs, lib, config, ... }:
{
pkgs,
lib,
config,
...
}:
let
inherit (lib) mkEnableOption mkIf mkMerge mkOption mkPackageOption types;
inherit (lib)
mkEnableOption
mkIf
mkMerge
mkOption
mkPackageOption
types
;
cfg = config.programs.sesh;
tomlFormat = pkgs.formats.toml { };
in {
in
{
meta.maintainers = [ lib.hm.maintainers.michaelvanstraten ];
options.programs.sesh = {
@ -28,8 +41,7 @@ in {
enableAlias = mkOption {
type = types.bool;
default = true;
description =
"Whether to enable a shell alias `s` to quickly launch sessions.";
description = "Whether to enable a shell alias `s` to quickly launch sessions.";
};
enableTmuxIntegration = mkOption {
@ -48,8 +60,7 @@ in {
config = mkIf cfg.enable (mkMerge [
{
home.packages = [ cfg.package ];
home.file.".config/sesh/sesh.toml".source =
tomlFormat.generate "sesh.toml" cfg.settings;
home.file.".config/sesh/sesh.toml".source = tomlFormat.generate "sesh.toml" cfg.settings;
}
(mkIf cfg.enableAlias {
@ -58,14 +69,14 @@ in {
})
(mkIf cfg.enableTmuxIntegration {
assertions = [{
assertion = config.programs.fzf.tmux.enableShellIntegration;
message =
"To use Tmux integration with sesh, enable `programs.fzf.tmux.enableShellIntegration`.";
}];
assertions = [
{
assertion = config.programs.fzf.tmux.enableShellIntegration;
message = "To use Tmux integration with sesh, enable `programs.fzf.tmux.enableShellIntegration`.";
}
];
home.packages =
lib.mkIf (cfg.zoxidePackage != null) [ cfg.zoxidePackage ];
home.packages = lib.mkIf (cfg.zoxidePackage != null) [ cfg.zoxidePackage ];
programs.tmux.extraConfig = ''
bind-key "${cfg.tmuxKey}" run-shell "sesh connect \"$(