run nixfmt

This commit is contained in:
Joakim Repomaa
2025-03-01 13:23:01 +02:00
parent a93d4afbcf
commit 8dfc9b5a6d
51 changed files with 1611 additions and 778 deletions

View File

@@ -1,4 +1,12 @@
{ config, lib, pkgs, inputs, self, ... }: {
{
config,
lib,
pkgs,
inputs,
self,
...
}:
{
nixpkgs.config.allowUnfree = true;
imports = [
../gnome
@@ -83,7 +91,10 @@
home-manager.enable = true;
bat = {
enable = true;
extraPackages = with pkgs.bat-extras; [ batdiff batwatch ];
extraPackages = with pkgs.bat-extras; [
batdiff
batwatch
];
config = {
pager = "less -FR";
};
@@ -277,8 +288,13 @@
bright_white = "#ffffff";
};
component_style = {
playback_metadata = { fg = "#8abeb7"; };
playback_progress_bar = { bg = "#1d1f21"; fg = "#c5c8c6"; };
playback_metadata = {
fg = "#8abeb7";
};
playback_progress_bar = {
bg = "#1d1f21";
fg = "#c5c8c6";
};
};
}
];
@@ -299,6 +315,39 @@
host = "https://bin.freun.dev";
auth_token_file = "${config.xdg.configHome}/hastebin/auth_token";
clipboard_command = "${pkgs.wl-copy-both}/bin/wl-copy";
default_renderers =
let
code = [
"js"
"ts"
"jsx"
"tsx"
"rs"
"nix"
"cr"
"ecr"
"rb"
"erb"
"yaml"
"yml"
"json"
"toml"
"html"
"xml"
"css"
"scss"
"sass"
"less"
"sql"
"sh"
];
in
lib.listToAttrs (
lib.map (name: {
inherit name;
value = "hl";
}) code
);
};
};
zed-editor = {
@@ -334,23 +383,68 @@
paperwm = {
enable = true;
winprops = [
{ wm_class = "vivaldi-stable"; preferredWidth = "67%"; }
{ wm_class = "yubioath-flutter"; scratch_layer = true; }
{ wm_class = "signal"; scratch_layer = true; }
{ wm_class = "Slack"; scratch_layer = true; }
{ wm_class = "Supersonic"; scratch_layer = true; }
{ wm_class = "io.github.seadve.Kooha"; scratch_layer = true; }
{ wm_class = "/.*/"; preferredWidth = "33"; }
{
wm_class = "vivaldi-stable";
preferredWidth = "67%";
}
{
wm_class = "yubioath-flutter";
scratch_layer = true;
}
{
wm_class = "signal";
scratch_layer = true;
}
{
wm_class = "Slack";
scratch_layer = true;
}
{
wm_class = "Supersonic";
scratch_layer = true;
}
{
wm_class = "io.github.seadve.Kooha";
scratch_layer = true;
}
{
wm_class = "/.*/";
preferredWidth = "33";
}
];
keybindings = {
move-down = [ "<Control><Super>Down" "<Shift><Super>j" ];
move-left = [ "<Control><Super>Left" "<Shift><Super>h" ];
move-right = [ "<Control><Super>Right" "<Shift><Super>l" ];
move-up = [ "<Control><Super>Up" "<Shift><Super>k" ];
switch-down = [ "<Super>Down" "<Super>j" ];
switch-left = [ "<Super>Left" "<Super>h" ];
switch-right = [ "<Super>Right" "<Super>l" ];
switch-up = [ "<Super>Up" "<Super>k" ];
move-down = [
"<Control><Super>Down"
"<Shift><Super>j"
];
move-left = [
"<Control><Super>Left"
"<Shift><Super>h"
];
move-right = [
"<Control><Super>Right"
"<Shift><Super>l"
];
move-up = [
"<Control><Super>Up"
"<Shift><Super>k"
];
switch-down = [
"<Super>Down"
"<Super>j"
];
switch-left = [
"<Super>Left"
"<Super>h"
];
switch-right = [
"<Super>Right"
"<Super>l"
];
switch-up = [
"<Super>Up"
"<Super>k"
];
};
};
freon = {

View File

@@ -1,8 +1,17 @@
{ inputs, lib, pkgs, config, ... }:
{
inputs,
lib,
pkgs,
config,
...
}:
let
completion = pkgs.stdenv.mkDerivation {
name = "dnote-completion";
phases = [ "unpackPhase" "installPhase" ];
phases = [
"unpackPhase"
"installPhase"
];
src = inputs.dnote;
installPhase = ''
mkdir -p $out/lib/dnote/zsh-completion/completions

View File

@@ -5,7 +5,13 @@
programs.neovim =
let
toLua = lib.generators.toLua { };
luaMap = rhs: { rhs = rhs; lua = true; options = { silent = true; }; };
luaMap = rhs: {
rhs = rhs;
lua = true;
options = {
silent = true;
};
};
in
{
enable = true;
@@ -50,7 +56,10 @@
filetypes = [ "crystal" ];
globs = [ "*.cr" ];
exe = "${pkgs.crystal}/bin/crystal";
args = file: [ "tool" "format" ];
args = file: [
"tool"
"format"
];
stdin = false;
}
];
@@ -69,7 +78,11 @@
}
{
event = "FileType";
pattern = [ "gitcommit" "gitrebase" "gitconfig" ];
pattern = [
"gitcommit"
"gitrebase"
"gitconfig"
];
command = "set bufhidden=delete";
}
{
@@ -111,17 +124,41 @@
vim-crystal
{
plugin = telescope-nvim;
dependencies = [ plenary-nvim telescope-file-browser-nvim commander-nvim telescope-ui-select-nvim ];
dependencies = [
plenary-nvim
telescope-file-browser-nvim
commander-nvim
telescope-ui-select-nvim
];
config =
let
commands = [
{ cmd = "<cmd>!rails db:migrate<cr>"; desc = "Run rails migrations"; }
{ cmd = "<cmd>!yarn codegen --no-watch<cr>"; desc = "Run yarn codegen"; }
{ cmd = "<cmd>!rails translations:update<cr>"; desc = "Update i18n translations"; }
{ cmd = "<cmd>!deploy staging-v6 -t $(git branch --show-current)<cr>"; desc = "Deploy to staging"; }
{ cmd = "<cmd>!db-restore -d db-prod-inc<cr>"; desc = "Restore db from prod-inc"; }
{
cmd = "<cmd>!rails db:migrate<cr>";
desc = "Run rails migrations";
}
{
cmd = "<cmd>!yarn codegen --no-watch<cr>";
desc = "Run yarn codegen";
}
{
cmd = "<cmd>!rails translations:update<cr>";
desc = "Update i18n translations";
}
{
cmd = "<cmd>!deploy staging-v6 -t $(git branch --show-current)<cr>";
desc = "Deploy to staging";
}
{
cmd = "<cmd>!db-restore -d db-prod-inc<cr>";
desc = "Restore db from prod-inc";
}
];
mappings = { i = { "<c-h>" = "which_key"; }; };
mappings = {
i = {
"<c-h>" = "which_key";
};
};
in
''
local telescope = require('telescope')
@@ -146,27 +183,21 @@
})
'';
mappings = {
normal = (
lib.attrsets.mapAttrs
(key: value: luaMap "require('telescope.builtin').${value}")
{
"<leader>f" = "find_files";
"<leader>r" = "live_grep";
"<leader>b" = "buffers";
"<leader>h" = "help_tags";
"<leader>o" = "oldfiles";
"<leader>s" = "git_status";
"<leader>/" = "current_buffer_fuzzy_find";
"<leader>c" = "git_branches";
}
) // (
lib.attrsets.mapAttrs
(key: value: luaMap "require('telescope').extensions.${value}")
{
"<leader>n" = "file_browser.file_browser";
"<leader>:" = "commander.filter";
}
);
normal =
(lib.attrsets.mapAttrs (key: value: luaMap "require('telescope.builtin').${value}") {
"<leader>f" = "find_files";
"<leader>r" = "live_grep";
"<leader>b" = "buffers";
"<leader>h" = "help_tags";
"<leader>o" = "oldfiles";
"<leader>s" = "git_status";
"<leader>/" = "current_buffer_fuzzy_find";
"<leader>c" = "git_branches";
})
// (lib.attrsets.mapAttrs (key: value: luaMap "require('telescope').extensions.${value}") {
"<leader>n" = "file_browser.file_browser";
"<leader>:" = "commander.filter";
});
};
}
{
@@ -176,17 +207,25 @@
vim.cmd('colorscheme base16-tomorrow-night')
'';
}
{ plugin = octo-nvim; config = "require('octo').setup()"; }
{
plugin = octo-nvim;
config = "require('octo').setup()";
}
{
plugin = gitsigns-nvim;
dependencies = [ plenary-nvim ];
config = ''
require('gitsigns').setup(${toLua {
current_line_blame = true;
}})
require('gitsigns').setup(${
toLua {
current_line_blame = true;
}
})
'';
}
{ plugin = windline-nvim; config = "require('wlsample.airline')"; }
{
plugin = windline-nvim;
config = "require('wlsample.airline')";
}
{
plugin = luasnip;
config = ''
@@ -252,7 +291,10 @@
}
{
plugin = toggleterm-nvim;
dependencies = [ plenary-nvim pkgs.lazygit ];
dependencies = [
plenary-nvim
pkgs.lazygit
];
config = ''
local Terminal = require('toggleterm.terminal').Terminal
local lazygit = Terminal:new({
@@ -277,16 +319,18 @@
}
{
plugin = copilot-cmp;
dependencies = [{
plugin = copilot-lua;
config = ''
require('copilot').setup({
suggestion = { enabled = false },
panel = { enajkbled = false },
copilot_node_command = '${pkgs.nodejs}/bin/node',
})
'';
}];
dependencies = [
{
plugin = copilot-lua;
config = ''
require('copilot').setup({
suggestion = { enabled = false },
panel = { enajkbled = false },
copilot_node_command = '${pkgs.nodejs}/bin/node',
})
'';
}
];
config = ''
require('copilot_cmp').setup()
'';
@@ -318,9 +362,11 @@
''
require('bufferline').setup({ options = ${toLua options} })
'';
dependencies = [{
plugin = nvim-web-devicons;
}];
dependencies = [
{
plugin = nvim-web-devicons;
}
];
}
];
lsp = {
@@ -342,7 +388,11 @@
name = "yamlls";
config = {
settings = {
redhat = { telemetry = { enabled = false; }; };
redhat = {
telemetry = {
enabled = false;
};
};
yaml = {
schemas = {
"https://json.schemastore.org/github-workflow" = ".github/workflows/*.yml";
@@ -351,7 +401,10 @@
"https://json.schemastore.org/prettierrc.yaml" = ".prettierrc.yaml";
"https://json.schemastore.org/prettier.config.yml" = "prettier.config.yml";
"https://json.schemastore.org/prettier.config.yaml" = "prettier.config.yaml";
"https://schema.jokke.space/caddy.json" = [ "*caddy*.yml" "*caddy*.yaml" ];
"https://schema.jokke.space/caddy.json" = [
"*caddy*.yml"
"*caddy*.yaml"
];
};
};
};
@@ -363,7 +416,10 @@
config = {
settings = {
tailwindCSS = {
classAttributes = [ "class" "className" ];
classAttributes = [
"class"
"className"
];
};
};
};
@@ -377,8 +433,14 @@
};
rootPattern = [ "package.json" ];
}
{ name = "eslint"; package = vscode-langservers-extracted; }
{ name = "nixd"; package = nixd; }
{
name = "eslint";
package = vscode-langservers-extracted;
}
{
name = "nixd";
package = nixd;
}
{
name = "bashls";
package = nodePackages.bash-language-server.overrideAttrs (oldAttrs: {