style: change some nix formatting
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-06-09 22:49:30 -04:00
parent 7ea031e84e
commit 158f0a6813
28 changed files with 84 additions and 137 deletions

View file

@ -123,9 +123,7 @@ in {
#profileExtra = '' #profileExtra = ''
#''; #'';
bashrcExtra = bashrcExtra =
/* # bash
bash
*/
'' ''
# Check if shell is interactive # Check if shell is interactive
[[ $- == *i* ]] || return 0 [[ $- == *i* ]] || return 0

View file

@ -12,6 +12,7 @@
{path = toString self.packages.${pkgs.system}.dracula.git;} {path = toString self.packages.${pkgs.system}.dracula.git;}
{ {
# FIXME: add https config
condition = "hasconfig:remote.*.url:git@github.com:*/**"; condition = "hasconfig:remote.*.url:git@github.com:*/**";
contents = { contents = {
user = { user = {

View file

@ -19,9 +19,7 @@ in {
package = neovim-nightly.packages.${pkgs.system}.neovim; package = neovim-nightly.packages.${pkgs.system}.neovim;
extraLuaConfig = extraLuaConfig =
/* # lua
lua
*/
'' ''
-- by default, the indent is 2 spaces. -- by default, the indent is 2 spaces.
vim.opt.smartindent = true; vim.opt.smartindent = true;
@ -55,9 +53,7 @@ in {
plugin = vimPlugins.todo-comments-nvim; plugin = vimPlugins.todo-comments-nvim;
type = "lua"; type = "lua";
config = config =
/* # lua
lua
*/
'' ''
require('todo-comments').setup(); require('todo-comments').setup();
''; '';
@ -66,9 +62,7 @@ in {
plugin = vimPlugins.mini-nvim; plugin = vimPlugins.mini-nvim;
type = "lua"; type = "lua";
config = config =
/* # lua
lua
*/
'' ''
-- TODO: see how this works -- TODO: see how this works
local ts_input = require('mini.surround').gen_spec.input.treesitter; local ts_input = require('mini.surround').gen_spec.input.treesitter;

View file

@ -10,9 +10,7 @@ in {
plugin = vimPlugins.gitsigns-nvim; plugin = vimPlugins.gitsigns-nvim;
type = "lua"; type = "lua";
config = config =
/* # lua
lua
*/
'' ''
local gitsigns = require("gitsigns"); local gitsigns = require("gitsigns");

View file

@ -25,13 +25,11 @@ in {
extraLuaConfig = extraLuaConfig =
lib.mkIf neovimIde lib.mkIf neovimIde
/* # lua
lua
*/
'' ''
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd('FileType', {
pattern = 'sh', pattern = 'sh',
command = 'setlocal ts=4 sw=4 sts=0 expandtab', command = 'setlocal ts=4 sw=4 sts=0 expandtab',
}); });
require('lspconfig').bashls.setup(require('coq').lsp_ensure_capabilities({ require('lspconfig').bashls.setup(require('coq').lsp_ensure_capabilities({

View file

@ -17,9 +17,7 @@ in
]; ];
extraLuaConfig = extraLuaConfig =
/* # lua
lua
*/
'' ''
local lsp = require('lspconfig'); local lsp = require('lspconfig');
local coq = require('coq'); local coq = require('coq');

View file

@ -25,9 +25,7 @@ in {
neovim = { neovim = {
extraLuaConfig = extraLuaConfig =
lib.mkBefore lib.mkBefore
/* # lua
lua
*/
'' ''
-- Get rid of deprecated functions -- Get rid of deprecated functions
vim.tbl_add_reverse_lookup = function(tbl) vim.tbl_add_reverse_lookup = function(tbl)
@ -47,12 +45,12 @@ in {
-- Start completion / snippet stuff -- Start completion / snippet stuff
vim.g.coq_settings = { vim.g.coq_settings = {
auto_start = 'shut-up', auto_start = 'shut-up',
keymap = { keymap = {
recommended = false, recommended = false,
}, },
-- https://github.com/NixOS/nixpkgs/issues/168928#issuecomment-1109581739 -- https://github.com/NixOS/nixpkgs/issues/168928#issuecomment-1109581739
xdg = true, xdg = true,
}; };
-- Add formatting cmd -- Add formatting cmd

View file

@ -9,9 +9,7 @@ in
programs = { programs = {
neovim = { neovim = {
extraLuaConfig = extraLuaConfig =
/* # lua
lua
*/
'' ''
vim.filetype.add({ vim.filetype.add({
pattern = { ['.*/hypr/.*%.conf'] = 'hyprlang' }, pattern = { ['.*/hypr/.*%.conf'] = 'hyprlang' },

View file

@ -27,9 +27,7 @@ in
extraPackages = javaPkgs; extraPackages = javaPkgs;
extraLuaConfig = extraLuaConfig =
/* # lua
lua
*/
'' ''
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd('FileType', {
pattern = 'java', pattern = 'java',
@ -43,10 +41,9 @@ in
plugin = vimPlugins.nvim-jdtls; plugin = vimPlugins.nvim-jdtls;
type = "lua"; type = "lua";
config = config =
/* # lua
lua
*/
'' ''
--
local startJdtls = function() local startJdtls = function()
local config = require('coq').lsp_ensure_capabilities({ local config = require('coq').lsp_ensure_capabilities({
cmd = { '${lib.getExe pkgs.jdt-language-server}' }, cmd = { '${lib.getExe pkgs.jdt-language-server}' },

View file

@ -15,9 +15,7 @@ in
]; ];
extraLuaConfig = extraLuaConfig =
/* # lua
lua
*/
'' ''
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd('FileType', {
pattern = 'yaml', pattern = 'yaml',

View file

@ -21,9 +21,7 @@ in
plugin = vimPlugins.neodev-nvim; plugin = vimPlugins.neodev-nvim;
type = "lua"; type = "lua";
config = config =
/* # lua
lua
*/
'' ''
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd('FileType', {
pattern = 'lua', pattern = 'lua',

View file

@ -27,9 +27,7 @@ in
]; ];
extraLuaConfig = extraLuaConfig =
/* # lua
lua
*/
'' ''
local lsp = require('lspconfig'); local lsp = require('lspconfig');
local coq = require('coq'); local coq = require('coq');
@ -53,9 +51,7 @@ in
plugin = buildPlugin "easytables-nvim" vimplugin-easytables-src; plugin = buildPlugin "easytables-nvim" vimplugin-easytables-src;
type = "lua"; type = "lua";
config = config =
/* # lua
lua
*/
'' ''
require('easytables').setup(); require('easytables').setup();
''; '';
@ -65,10 +61,9 @@ in
plugin = vimPlugins.knap; plugin = vimPlugins.knap;
type = "lua"; type = "lua";
config = config =
/* # lua
lua
*/
'' ''
--
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd('FileType', {
pattern = 'tex', pattern = 'tex',
command = 'setlocal ts=4 sw=4 sts=0 expandtab', command = 'setlocal ts=4 sw=4 sts=0 expandtab',

View file

@ -47,17 +47,16 @@ in
]; ];
extraLuaConfig = extraLuaConfig =
/* # lua
lua
*/
'' ''
require('lspconfig').nixd.setup(require('coq').lsp_ensure_capabilities({ require('lspconfig').nixd.setup(require('coq').lsp_ensure_capabilities({
filetypes = { 'nix', 'in.nix' }, filetypes = { 'nix', 'in.nix' },
settings = { settings = {
nixd = { nixd = {
formatting = { formatting = {
command = { '${lib.getExe pkgs.alejandra}' }, -- TODO: Try to find <flake>.formatter
}, command = { '${lib.getExe pkgs.alejandra}' },
},
}, },
}, },
})); }));

View file

@ -16,9 +16,7 @@ in
]; ];
extraLuaConfig = extraLuaConfig =
/* # lua
lua
*/
'' ''
require('lspconfig').basedpyright.setup( require('lspconfig').basedpyright.setup(
require('coq').lsp_ensure_capabilities({})); require('coq').lsp_ensure_capabilities({}));

View file

@ -17,9 +17,7 @@ in
]; ];
extraLuaConfig = extraLuaConfig =
/* # lua
lua
*/
'' ''
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd('FileType', {
pattern = { 'rust' }, pattern = { 'rust' },

View file

@ -30,9 +30,7 @@ in
]; ];
extraLuaConfig = extraLuaConfig =
/* # lua
lua
*/
'' ''
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd('FileType', {
pattern = { 'javascript', 'typescript', 'css', 'scss' }, pattern = { 'javascript', 'typescript', 'css', 'scss' },

View file

@ -23,9 +23,7 @@ in {
}; };
type = "lua"; type = "lua";
config = config =
/* # lua
lua
*/
'' ''
-- set dot icon in place of trailing whitespaces -- set dot icon in place of trailing whitespaces
vim.opt.listchars = { vim.opt.listchars = {
@ -48,10 +46,9 @@ in {
plugin = vimPlugins.indent-blankline-nvim; plugin = vimPlugins.indent-blankline-nvim;
type = "lua"; type = "lua";
config = config =
/* # lua
lua
*/
'' ''
--
local highlight = { local highlight = {
"RainbowRed", "RainbowRed",
"RainbowYellow", "RainbowYellow",
@ -100,10 +97,9 @@ in {
plugin = vimPlugins.codewindow-nvim; plugin = vimPlugins.codewindow-nvim;
type = "lua"; type = "lua";
config = config =
/* # lua
lua
*/
'' ''
--
local codewindow = require('codewindow'); local codewindow = require('codewindow');
codewindow.setup({ codewindow.setup({
@ -130,19 +126,35 @@ in {
plugin = vimPlugins.transparent-nvim; plugin = vimPlugins.transparent-nvim;
type = "lua"; type = "lua";
config = config =
/* # lua
lua
*/
'' ''
require("transparent").setup({ require('transparent').setup({
groups = { groups = {
'Normal', 'NormalNC', 'Comment', 'Constant', 'Normal',
'Special', 'Identifier', 'Statement', 'PreProc', 'NormalNC',
'Type', 'Underlined', 'Todo', 'String', 'Function', 'Comment',
'Conditional', 'Repeat', 'Operator', 'Structure', 'Constant',
'LineNr', 'NonText', 'SignColumn', 'CursorLine', 'Special',
'CursorLineNr', 'StatusLine', 'StatusLineNC', 'Identifier',
'EndOfBuffer', 'Statement',
'PreProc',
'Type',
'Underlined',
'Todo',
'String',
'Function',
'Conditional',
'Repeat',
'Operator',
'Structure',
'LineNr',
'NonText',
'SignColumn',
'CursorLine',
'CursorLineNr',
'StatusLine',
'StatusLineNC',
'EndOfBuffer',
}, },
extra_groups = {}, extra_groups = {},
exclude_groups = {}, exclude_groups = {},

View file

@ -8,9 +8,7 @@ in {
plugin = vimPlugins.nvim-treesitter-context; plugin = vimPlugins.nvim-treesitter-context;
type = "lua"; type = "lua";
config = config =
/* # lua
lua
*/
'' ''
require('treesitter-context').setup({ require('treesitter-context').setup({
enable = true, enable = true,
@ -28,9 +26,7 @@ in {
plugin = vimPlugins.nvim-treesitter.withAllGrammars; plugin = vimPlugins.nvim-treesitter.withAllGrammars;
type = "lua"; type = "lua";
config = config =
/* # lua
lua
*/
'' ''
require('nvim-treesitter.configs').setup({ require('nvim-treesitter.configs').setup({
highlight = { enable = true }, highlight = { enable = true },

View file

@ -14,9 +14,7 @@
plugins = with pkgs.tmuxPlugins; [dracula]; plugins = with pkgs.tmuxPlugins; [dracula];
extraConfig = extraConfig =
/* # bash
bash
*/
'' ''
bind-key -n Home send Escape "OH" bind-key -n Home send Escape "OH"
bind-key -n End send Escape "OF" bind-key -n End send Escape "OF"

View file

@ -4,9 +4,7 @@ in {
# https://nixos.wiki/wiki/Distributed_build # https://nixos.wiki/wiki/Distributed_build
home-manager.users.root = { home-manager.users.root = {
home.file.".ssh/config".text = home.file.".ssh/config".text =
/* # ssh_config
ssh_config
*/
'' ''
Host ${servivi} Host ${servivi}
# Prevent using ssh-agent or another keyfile, useful for testing # Prevent using ssh-agent or another keyfile, useful for testing

View file

@ -119,9 +119,7 @@
power-profiles-daemon.enable = false; power-profiles-daemon.enable = false;
udev.extraRules = udev.extraRules =
/* # udev
udev
*/
'' ''
# give permanent path to keyboard XF86* binds # give permanent path to keyboard XF86* binds
SUBSYSTEMS=="input", ATTRS{id/product}=="0006", ATTRS{id/vendor}=="0000", SYMLINK += "video-bus" SUBSYSTEMS=="input", ATTRS{id/product}=="0006", ATTRS{id/vendor}=="0000", SYMLINK += "video-bus"

View file

@ -25,9 +25,7 @@
allowSubstitutes = true; allowSubstitutes = true;
buildCommand = buildCommand =
/* # bash
bash
*/
'' ''
dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
mkdir -p "$dst" mkdir -p "$dst"

View file

@ -8,9 +8,7 @@ in {
programs = { programs = {
# https://codeberg.org/dnkl/foot/wiki#spawning-new-terminal-instances-in-the-current-working-directory # https://codeberg.org/dnkl/foot/wiki#spawning-new-terminal-instances-in-the-current-working-directory
bash.bashrcExtra = bash.bashrcExtra =
/* # bash
bash
*/
'' ''
osc7_cwd() { osc7_cwd() {
local strlen=''${#PWD} local strlen=''${#PWD}

View file

@ -21,9 +21,7 @@ in {
xdg.configFile = let xdg.configFile = let
floatFont = lib.strings.floatToString fontSize; floatFont = lib.strings.floatToString fontSize;
qtconf = qtconf =
/* # ini
ini
*/
'' ''
[Fonts] [Fonts]
fixed="Sans Serif,${floatFont},-1,5,50,0,0,0,0,0" fixed="Sans Serif,${floatFont},-1,5,50,0,0,0,0,0"

View file

@ -34,9 +34,7 @@ in {
inherit (lib) hasPrefix mdDoc optionals removePrefix; inherit (lib) hasPrefix mdDoc optionals removePrefix;
configJs = configJs =
/* # javascript
javascript
*/
'' ''
import { transpileTypeScript } from './js/utils.js'; import { transpileTypeScript } from './js/utils.js';
@ -88,10 +86,9 @@ in {
"${agsConfigDir}/config/config.js".text = configJs; "${agsConfigDir}/config/config.js".text = configJs;
"${agsConfigDir}/config/ts/lockscreen/vars.ts".text = "${agsConfigDir}/config/ts/lockscreen/vars.ts".text =
/* # javascript
javascript
*/
'' ''
//
export default { export default {
mainMonitor: '${mainMonitor}', mainMonitor: '${mainMonitor}',
dupeLockscreen: ${boolToString greetdDupe}, dupeLockscreen: ${boolToString greetdDupe},

View file

@ -9,9 +9,7 @@
}; };
"${agsConfigDir}/config/icons/nixos-logo-symbolic.svg".text = "${agsConfigDir}/config/icons/nixos-logo-symbolic.svg".text =
/* # xml
xml
*/
'' ''
<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs> <defs>

View file

@ -37,9 +37,7 @@ in {
}; };
"astal/config.js".text = "astal/config.js".text =
/* # javascript
javascript
*/
'' ''
import { transpileTypeScript } from './js/utils.js'; import { transpileTypeScript } from './js/utils.js';

View file

@ -44,9 +44,7 @@
in { in {
hyprConf = pkgs.writeText "greetd-hypr-config" ( hyprConf = pkgs.writeText "greetd-hypr-config" (
(optionalString config.nvidia.enable (optionalString config.nvidia.enable
/* # hyprlang
hyprlang
*/
'' ''
env = LIBVA_DRIVER_NAME,nvidia env = LIBVA_DRIVER_NAME,nvidia
env = XDG_SESSION_TYPE,wayland env = XDG_SESSION_TYPE,wayland
@ -56,11 +54,8 @@ in {
'') '')
+ (concatStringsSep "\n" (map (x: "monitor=${x}") monitors)) + (concatStringsSep "\n" (map (x: "monitor=${x}") monitors))
+ +
/* # hyprlang
hyprlang
*/
'' ''
misc { misc {
${mkHyprBlock misc} ${mkHyprBlock misc}
} }
@ -74,10 +69,9 @@ in {
'' ''
+ +
/* # hyprlang
hyprlang
*/
'' ''
#
env = XCURSOR_SIZE,24 env = XCURSOR_SIZE,24
exec-once = hyprctl setcursor Dracula-cursors 24 exec-once = hyprctl setcursor Dracula-cursors 24