Massive nixfmt reformatting

This commit is contained in:
Natsu Kagami 2025-04-03 13:59:50 +02:00
parent fe4492f004
commit b29ddd5e65
Signed by: nki
GPG key ID: 55A032EB38B49ADB
109 changed files with 4323 additions and 2368 deletions

View file

@ -1,9 +1,15 @@
{ pkgs, config, lib, ... }:
{
pkgs,
config,
lib,
...
}:
let
cfg = config.nki.programs.kitty;
cmd = "cmd";
in
with lib; {
with lib;
{
programs.kitty = mkIf (cfg.enable && pkgs.stdenv.isDarwin) {
# Darwin-specific setup
@ -24,4 +30,3 @@ with lib; {
};
};
}

View file

@ -1,21 +1,41 @@
{ pkgs, config, lib, ... }:
{
pkgs,
config,
lib,
...
}:
let
cfg = config.nki.programs.kitty;
theme = { lib, options, config, ... }: {
programs.kitty = lib.mkIf config.nki.programs.kitty.enable (
if builtins.hasAttr "themeFile" options.programs.kitty then {
themeFile = "ayu_light";
} else {
theme = "Ayu Light";
}
);
};
theme =
{
lib,
options,
config,
...
}:
{
programs.kitty = lib.mkIf config.nki.programs.kitty.enable (
if builtins.hasAttr "themeFile" options.programs.kitty then
{
themeFile = "ayu_light";
}
else
{
theme = "Ayu Light";
}
);
};
in
with lib;
{
imports = [ theme ./darwin.nix ./linux.nix ./tabs.nix ];
imports = [
theme
./darwin.nix
./linux.nix
./tabs.nix
];
options.nki.programs.kitty = {
enable = mkEnableOption "Enable kitty";
@ -73,14 +93,17 @@ with lib;
let
# Background color and transparency
background =
if isNull cfg.background then {
background_opacity = "0.93";
dynamic_background_opacity = true;
} else {
background_image = "${cfg.background}";
background_image_layout = "scaled";
background_tint = "0.85";
};
if isNull cfg.background then
{
background_opacity = "0.93";
dynamic_background_opacity = true;
}
else
{
background_image = "${cfg.background}";
background_image_layout = "scaled";
background_tint = "0.85";
};
in
mkMerge [
background
@ -123,4 +146,3 @@ with lib;
'';
};
}

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
cfg = config.nki.programs.kitty;
in

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
cfg = config.nki.programs.kitty;
@ -7,33 +12,33 @@ in
with lib;
{
programs.kitty = mkIf cfg.enableTabs {
keybindings = {
"${cmd}+t" = "new_tab_with_cwd";
"${cmd}+shift+t" = "new_tab";
"${cmd}+shift+o" = "launch --cwd=current --location=vsplit";
"${cmd}+o" = "launch --cwd=current --location=hsplit";
"${cmd}+r" = "start_resizing_window";
"${cmd}+shift+r" = "layout_action rotate";
## Move the active window in the indicated direction
"${cmd}+shift+h" = "move_window left";
"${cmd}+shift+k" = "move_window up";
"${cmd}+shift+j" = "move_window down";
"${cmd}+shift+l" = "move_window right";
## Switch focus to the neighboring window in the indicated direction
"${cmd}+h" = "neighboring_window left";
"${cmd}+k" = "neighboring_window up";
"${cmd}+j" = "neighboring_window down ";
"${cmd}+l" = "neighboring_window right";
## Detach window to its own tab
"${cmd}+shift+d" = "detach_window new-tab";
## Change layout to fullscreen (stack) and back
"${cmd}+f" = "toggle_layout stack";
}
# Tab bindings
// builtins.listToAttrs
(map
(x: attrsets.nameValuePair "${cmd}+${toString x}" "goto_tab ${toString x}")
(lists.range 1 9));
keybindings =
{
"${cmd}+t" = "new_tab_with_cwd";
"${cmd}+shift+t" = "new_tab";
"${cmd}+shift+o" = "launch --cwd=current --location=vsplit";
"${cmd}+o" = "launch --cwd=current --location=hsplit";
"${cmd}+r" = "start_resizing_window";
"${cmd}+shift+r" = "layout_action rotate";
## Move the active window in the indicated direction
"${cmd}+shift+h" = "move_window left";
"${cmd}+shift+k" = "move_window up";
"${cmd}+shift+j" = "move_window down";
"${cmd}+shift+l" = "move_window right";
## Switch focus to the neighboring window in the indicated direction
"${cmd}+h" = "neighboring_window left";
"${cmd}+k" = "neighboring_window up";
"${cmd}+j" = "neighboring_window down ";
"${cmd}+l" = "neighboring_window right";
## Detach window to its own tab
"${cmd}+shift+d" = "detach_window new-tab";
## Change layout to fullscreen (stack) and back
"${cmd}+f" = "toggle_layout stack";
}
# Tab bindings
// builtins.listToAttrs (
map (x: attrsets.nameValuePair "${cmd}+${toString x}" "goto_tab ${toString x}") (lists.range 1 9)
);
settings = {
# Tab settings
tab_bar_edge = "top";