some alejandra formatting

This commit is contained in:
Your Name 2024-05-31 06:27:28 +03:00
parent 45f355646b
commit 49aa311802
6 changed files with 63 additions and 52 deletions

2
.envrc
View file

@ -1 +1 @@
use flake
gitleaks detect -v

View file

@ -77,6 +77,8 @@
"editor.formatOnSave" = false;
"editor.formatOnType" = false;
};
"nixfmt.path" = "${pkgs.alejandra}/bin/alejandra"; #alejandra addon is broken so i just use nixfmt addon with alejandra lol
"nix.formatterPath" = "${pkgs.alejandra}/bin/alejandra";
};
};

View file

@ -1,9 +1,5 @@
{ pkgs, inputs, config, ... }:
{
pkgs,
inputs,
config,
...
}: {
imports = [
inputs.home-manager.nixosModules.home-manager
];

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./hypr
./anyrun

View file

@ -1,5 +1,4 @@
{ config, lib, pkgs, inputs, stable, ... }:
{
imports = [
inputs.home-manager.nixosModules.home-manager
@ -10,7 +9,22 @@
programs.hyprland.enable = true;
programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.hyprland;
users.users.delta.packages = with pkgs; [
swww stable.waybar stable.swaynotificationcenter cliphist fzf hyprshot slurp grim swaylock hypridle libnotify brightnessctl pamixer python3 grimblast networkmanagerapplet
swww
stable.waybar
stable.swaynotificationcenter
cliphist
fzf
hyprshot
slurp
grim
swaylock
hypridle
libnotify
brightnessctl
pamixer
python3
grimblast
networkmanagerapplet
];
# environment.systemPackages = [
# inputs.hyprland-contrib.packages.${pkgs.system}.grimblast.override { license = licenses.gpl3; }
@ -51,4 +65,4 @@
# ];
};
};
}
}

View file

@ -1,11 +1,13 @@
{ pkgs, lib, ... }:
{
pkgs,
lib,
...
}: {
programs.yazi = {
enable = true;
# enableFishIntegration = true;
};
home.file.".config/yazi/yazi.toml".text = ''
home.file.".config/yazi/yazi.toml".text = ''
[[manager.prepend_keymap]]
on = [ "l" ]
run = "plugin --sync smart-enter"
@ -24,51 +26,49 @@
'';
home.file.".config/yazi/plugins/smart-enter.yazi/init.lua".text = ''
return {
entry = function()
local h = cx.active.current.hovered
ya.manager_emit(h and h.cha.is_dir and "enter" or "open", { hovered = true })
end,
}
return {
entry = function()
local h = cx.active.current.hovered
ya.manager_emit(h and h.cha.is_dir and "enter" or "open", { hovered = true })
end,
}
'';
home.file.".config/yazi/plugins/smart-paste.yazi/init.lua".text = ''
return {
entry = function()
local h = cx.active.current.hovered
if h and h.cha.is_dir then
ya.manager_emit("enter", {})
ya.manager_emit("paste", {})
ya.manager_emit("leave", {})
else
ya.manager_emit("paste", {})
end
end,
}
return {
entry = function()
local h = cx.active.current.hovered
if h and h.cha.is_dir then
ya.manager_emit("enter", {})
ya.manager_emit("paste", {})
ya.manager_emit("leave", {})
else
ya.manager_emit("paste", {})
end
end,
}
'';
home.file.".config/yazi/plugins/max-preview.yazi/init.lua".text = ''
local function entry(st)
if st.old then
Manager.layout, st.old = st.old, nil
else
st.old = Manager.layout
Manager.layout = function(self, area)
self.area = area
local function entry(st)
if st.old then
Manager.layout, st.old = st.old, nil
else
st.old = Manager.layout
Manager.layout = function(self, area)
self.area = area
return ui.Layout()
:direction(ui.Layout.HORIZONTAL)
:constraints({
ui.Constraint.Percentage(0),
ui.Constraint.Percentage(0),
ui.Constraint.Percentage(100),
})
:split(area)
return ui.Layout()
:direction(ui.Layout.HORIZONTAL)
:constraints({
ui.Constraint.Percentage(0),
ui.Constraint.Percentage(0),
ui.Constraint.Percentage(100),
})
:split(area)
end
end
ya.app_emit("resize", {})
end
ya.app_emit("resize", {})
end
return { entry = entry }
return { entry = entry }
'';
}