From 158f0a68137c310359348d7507f05a70f29cd644 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sun, 9 Jun 2024 22:49:30 -0400 Subject: [PATCH] style: change some nix formatting --- common/home/bash/default.nix | 4 +- common/home/git/default.nix | 1 + common/home/neovim/default.nix | 12 ++---- common/home/neovim/git.nix | 4 +- common/home/neovim/langs/bash.nix | 8 ++-- common/home/neovim/langs/clang.nix | 4 +- common/home/neovim/langs/default.nix | 16 ++++---- common/home/neovim/langs/hyprlang.nix | 4 +- common/home/neovim/langs/java.nix | 9 ++-- common/home/neovim/langs/json.nix | 4 +- common/home/neovim/langs/lua.nix | 4 +- common/home/neovim/langs/markdown.nix | 13 ++---- common/home/neovim/langs/nix.nix | 11 +++-- common/home/neovim/langs/python.nix | 4 +- common/home/neovim/langs/rust.nix | 4 +- common/home/neovim/langs/web.nix | 4 +- common/home/neovim/theme.nix | 52 +++++++++++++++--------- common/home/neovim/treesitter.nix | 8 +--- common/home/tmux/default.nix | 4 +- devices/oksys/modules/remote-builder.nix | 4 +- devices/wim/hardware-configuration.nix | 4 +- home/firefox/addons/default.nix | 4 +- home/foot.nix | 4 +- home/theme/qt.nix | 4 +- modules/ags/default.nix | 9 ++-- modules/ags/icons.nix | 4 +- modules/greetd/astal.nix | 4 +- modules/greetd/hyprland.nix | 14 ++----- 28 files changed, 84 insertions(+), 137 deletions(-) diff --git a/common/home/bash/default.nix b/common/home/bash/default.nix index 4850b168..299eb089 100644 --- a/common/home/bash/default.nix +++ b/common/home/bash/default.nix @@ -123,9 +123,7 @@ in { #profileExtra = '' #''; bashrcExtra = - /* - bash - */ + # bash '' # Check if shell is interactive [[ $- == *i* ]] || return 0 diff --git a/common/home/git/default.nix b/common/home/git/default.nix index 382e01d5..a8d915f1 100644 --- a/common/home/git/default.nix +++ b/common/home/git/default.nix @@ -12,6 +12,7 @@ {path = toString self.packages.${pkgs.system}.dracula.git;} { + # FIXME: add https config condition = "hasconfig:remote.*.url:git@github.com:*/**"; contents = { user = { diff --git a/common/home/neovim/default.nix b/common/home/neovim/default.nix index 8ca1b1dd..e07dca1b 100644 --- a/common/home/neovim/default.nix +++ b/common/home/neovim/default.nix @@ -19,9 +19,7 @@ in { package = neovim-nightly.packages.${pkgs.system}.neovim; extraLuaConfig = - /* - lua - */ + # lua '' -- by default, the indent is 2 spaces. vim.opt.smartindent = true; @@ -55,9 +53,7 @@ in { plugin = vimPlugins.todo-comments-nvim; type = "lua"; config = - /* - lua - */ + # lua '' require('todo-comments').setup(); ''; @@ -66,9 +62,7 @@ in { plugin = vimPlugins.mini-nvim; type = "lua"; config = - /* - lua - */ + # lua '' -- TODO: see how this works local ts_input = require('mini.surround').gen_spec.input.treesitter; diff --git a/common/home/neovim/git.nix b/common/home/neovim/git.nix index 9f5528ad..58b605e8 100644 --- a/common/home/neovim/git.nix +++ b/common/home/neovim/git.nix @@ -10,9 +10,7 @@ in { plugin = vimPlugins.gitsigns-nvim; type = "lua"; config = - /* - lua - */ + # lua '' local gitsigns = require("gitsigns"); diff --git a/common/home/neovim/langs/bash.nix b/common/home/neovim/langs/bash.nix index 6e3a91a6..ddd21164 100644 --- a/common/home/neovim/langs/bash.nix +++ b/common/home/neovim/langs/bash.nix @@ -25,13 +25,11 @@ in { extraLuaConfig = lib.mkIf neovimIde - /* - lua - */ + # lua '' vim.api.nvim_create_autocmd('FileType', { - pattern = 'sh', - command = 'setlocal ts=4 sw=4 sts=0 expandtab', + pattern = 'sh', + command = 'setlocal ts=4 sw=4 sts=0 expandtab', }); require('lspconfig').bashls.setup(require('coq').lsp_ensure_capabilities({ diff --git a/common/home/neovim/langs/clang.nix b/common/home/neovim/langs/clang.nix index 8bb8a56b..0c118bb7 100644 --- a/common/home/neovim/langs/clang.nix +++ b/common/home/neovim/langs/clang.nix @@ -17,9 +17,7 @@ in ]; extraLuaConfig = - /* - lua - */ + # lua '' local lsp = require('lspconfig'); local coq = require('coq'); diff --git a/common/home/neovim/langs/default.nix b/common/home/neovim/langs/default.nix index 0ce1ae02..c3a6938c 100644 --- a/common/home/neovim/langs/default.nix +++ b/common/home/neovim/langs/default.nix @@ -25,9 +25,7 @@ in { neovim = { extraLuaConfig = lib.mkBefore - /* - lua - */ + # lua '' -- Get rid of deprecated functions vim.tbl_add_reverse_lookup = function(tbl) @@ -47,12 +45,12 @@ in { -- Start completion / snippet stuff vim.g.coq_settings = { - auto_start = 'shut-up', - keymap = { - recommended = false, - }, - -- https://github.com/NixOS/nixpkgs/issues/168928#issuecomment-1109581739 - xdg = true, + auto_start = 'shut-up', + keymap = { + recommended = false, + }, + -- https://github.com/NixOS/nixpkgs/issues/168928#issuecomment-1109581739 + xdg = true, }; -- Add formatting cmd diff --git a/common/home/neovim/langs/hyprlang.nix b/common/home/neovim/langs/hyprlang.nix index 32227644..24982f50 100644 --- a/common/home/neovim/langs/hyprlang.nix +++ b/common/home/neovim/langs/hyprlang.nix @@ -9,9 +9,7 @@ in programs = { neovim = { extraLuaConfig = - /* - lua - */ + # lua '' vim.filetype.add({ pattern = { ['.*/hypr/.*%.conf'] = 'hyprlang' }, diff --git a/common/home/neovim/langs/java.nix b/common/home/neovim/langs/java.nix index f94ab5c7..45c0498c 100644 --- a/common/home/neovim/langs/java.nix +++ b/common/home/neovim/langs/java.nix @@ -27,9 +27,7 @@ in extraPackages = javaPkgs; extraLuaConfig = - /* - lua - */ + # lua '' vim.api.nvim_create_autocmd('FileType', { pattern = 'java', @@ -43,10 +41,9 @@ in plugin = vimPlugins.nvim-jdtls; type = "lua"; config = - /* - lua - */ + # lua '' + -- local startJdtls = function() local config = require('coq').lsp_ensure_capabilities({ cmd = { '${lib.getExe pkgs.jdt-language-server}' }, diff --git a/common/home/neovim/langs/json.nix b/common/home/neovim/langs/json.nix index 20337742..58169694 100644 --- a/common/home/neovim/langs/json.nix +++ b/common/home/neovim/langs/json.nix @@ -15,9 +15,7 @@ in ]; extraLuaConfig = - /* - lua - */ + # lua '' vim.api.nvim_create_autocmd('FileType', { pattern = 'yaml', diff --git a/common/home/neovim/langs/lua.nix b/common/home/neovim/langs/lua.nix index 364d0498..09296e03 100644 --- a/common/home/neovim/langs/lua.nix +++ b/common/home/neovim/langs/lua.nix @@ -21,9 +21,7 @@ in plugin = vimPlugins.neodev-nvim; type = "lua"; config = - /* - lua - */ + # lua '' vim.api.nvim_create_autocmd('FileType', { pattern = 'lua', diff --git a/common/home/neovim/langs/markdown.nix b/common/home/neovim/langs/markdown.nix index 779f4da1..0e1b2054 100644 --- a/common/home/neovim/langs/markdown.nix +++ b/common/home/neovim/langs/markdown.nix @@ -27,9 +27,7 @@ in ]; extraLuaConfig = - /* - lua - */ + # lua '' local lsp = require('lspconfig'); local coq = require('coq'); @@ -53,9 +51,7 @@ in plugin = buildPlugin "easytables-nvim" vimplugin-easytables-src; type = "lua"; config = - /* - lua - */ + # lua '' require('easytables').setup(); ''; @@ -65,10 +61,9 @@ in plugin = vimPlugins.knap; type = "lua"; config = - /* - lua - */ + # lua '' + -- vim.api.nvim_create_autocmd('FileType', { pattern = 'tex', command = 'setlocal ts=4 sw=4 sts=0 expandtab', diff --git a/common/home/neovim/langs/nix.nix b/common/home/neovim/langs/nix.nix index d37bda56..990a9aaa 100644 --- a/common/home/neovim/langs/nix.nix +++ b/common/home/neovim/langs/nix.nix @@ -47,17 +47,16 @@ in ]; extraLuaConfig = - /* - lua - */ + # lua '' require('lspconfig').nixd.setup(require('coq').lsp_ensure_capabilities({ filetypes = { 'nix', 'in.nix' }, settings = { nixd = { - formatting = { - command = { '${lib.getExe pkgs.alejandra}' }, - }, + formatting = { + -- TODO: Try to find .formatter + command = { '${lib.getExe pkgs.alejandra}' }, + }, }, }, })); diff --git a/common/home/neovim/langs/python.nix b/common/home/neovim/langs/python.nix index dd998966..190c7a39 100644 --- a/common/home/neovim/langs/python.nix +++ b/common/home/neovim/langs/python.nix @@ -16,9 +16,7 @@ in ]; extraLuaConfig = - /* - lua - */ + # lua '' require('lspconfig').basedpyright.setup( require('coq').lsp_ensure_capabilities({})); diff --git a/common/home/neovim/langs/rust.nix b/common/home/neovim/langs/rust.nix index e01d18ba..15ee5834 100644 --- a/common/home/neovim/langs/rust.nix +++ b/common/home/neovim/langs/rust.nix @@ -17,9 +17,7 @@ in ]; extraLuaConfig = - /* - lua - */ + # lua '' vim.api.nvim_create_autocmd('FileType', { pattern = { 'rust' }, diff --git a/common/home/neovim/langs/web.nix b/common/home/neovim/langs/web.nix index 099fc94e..d04a0050 100644 --- a/common/home/neovim/langs/web.nix +++ b/common/home/neovim/langs/web.nix @@ -30,9 +30,7 @@ in ]; extraLuaConfig = - /* - lua - */ + # lua '' vim.api.nvim_create_autocmd('FileType', { pattern = { 'javascript', 'typescript', 'css', 'scss' }, diff --git a/common/home/neovim/theme.nix b/common/home/neovim/theme.nix index 72544f98..549b57c2 100644 --- a/common/home/neovim/theme.nix +++ b/common/home/neovim/theme.nix @@ -23,9 +23,7 @@ in { }; type = "lua"; config = - /* - lua - */ + # lua '' -- set dot icon in place of trailing whitespaces vim.opt.listchars = { @@ -48,10 +46,9 @@ in { plugin = vimPlugins.indent-blankline-nvim; type = "lua"; config = - /* - lua - */ + # lua '' + -- local highlight = { "RainbowRed", "RainbowYellow", @@ -100,10 +97,9 @@ in { plugin = vimPlugins.codewindow-nvim; type = "lua"; config = - /* - lua - */ + # lua '' + -- local codewindow = require('codewindow'); codewindow.setup({ @@ -130,19 +126,35 @@ in { plugin = vimPlugins.transparent-nvim; type = "lua"; config = - /* - lua - */ + # lua '' - require("transparent").setup({ + require('transparent').setup({ groups = { - 'Normal', 'NormalNC', 'Comment', 'Constant', - 'Special', 'Identifier', 'Statement', 'PreProc', - 'Type', 'Underlined', 'Todo', 'String', 'Function', - 'Conditional', 'Repeat', 'Operator', 'Structure', - 'LineNr', 'NonText', 'SignColumn', 'CursorLine', - 'CursorLineNr', 'StatusLine', 'StatusLineNC', - 'EndOfBuffer', + 'Normal', + 'NormalNC', + 'Comment', + 'Constant', + 'Special', + 'Identifier', + 'Statement', + 'PreProc', + 'Type', + 'Underlined', + 'Todo', + 'String', + 'Function', + 'Conditional', + 'Repeat', + 'Operator', + 'Structure', + 'LineNr', + 'NonText', + 'SignColumn', + 'CursorLine', + 'CursorLineNr', + 'StatusLine', + 'StatusLineNC', + 'EndOfBuffer', }, extra_groups = {}, exclude_groups = {}, diff --git a/common/home/neovim/treesitter.nix b/common/home/neovim/treesitter.nix index f344b12c..974fbedd 100644 --- a/common/home/neovim/treesitter.nix +++ b/common/home/neovim/treesitter.nix @@ -8,9 +8,7 @@ in { plugin = vimPlugins.nvim-treesitter-context; type = "lua"; config = - /* - lua - */ + # lua '' require('treesitter-context').setup({ enable = true, @@ -28,9 +26,7 @@ in { plugin = vimPlugins.nvim-treesitter.withAllGrammars; type = "lua"; config = - /* - lua - */ + # lua '' require('nvim-treesitter.configs').setup({ highlight = { enable = true }, diff --git a/common/home/tmux/default.nix b/common/home/tmux/default.nix index 88378c06..aec2bac0 100644 --- a/common/home/tmux/default.nix +++ b/common/home/tmux/default.nix @@ -14,9 +14,7 @@ plugins = with pkgs.tmuxPlugins; [dracula]; extraConfig = - /* - bash - */ + # bash '' bind-key -n Home send Escape "OH" bind-key -n End send Escape "OF" diff --git a/devices/oksys/modules/remote-builder.nix b/devices/oksys/modules/remote-builder.nix index 4e810129..776e61f7 100644 --- a/devices/oksys/modules/remote-builder.nix +++ b/devices/oksys/modules/remote-builder.nix @@ -4,9 +4,7 @@ in { # https://nixos.wiki/wiki/Distributed_build home-manager.users.root = { home.file.".ssh/config".text = - /* - ssh_config - */ + # ssh_config '' Host ${servivi} # Prevent using ssh-agent or another keyfile, useful for testing diff --git a/devices/wim/hardware-configuration.nix b/devices/wim/hardware-configuration.nix index 7d421c89..98cacf58 100644 --- a/devices/wim/hardware-configuration.nix +++ b/devices/wim/hardware-configuration.nix @@ -119,9 +119,7 @@ power-profiles-daemon.enable = false; udev.extraRules = - /* - udev - */ + # udev '' # give permanent path to keyboard XF86* binds SUBSYSTEMS=="input", ATTRS{id/product}=="0006", ATTRS{id/vendor}=="0000", SYMLINK += "video-bus" diff --git a/home/firefox/addons/default.nix b/home/firefox/addons/default.nix index fc75dfd1..4adfd5b7 100644 --- a/home/firefox/addons/default.nix +++ b/home/firefox/addons/default.nix @@ -25,9 +25,7 @@ allowSubstitutes = true; buildCommand = - /* - bash - */ + # bash '' dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" mkdir -p "$dst" diff --git a/home/foot.nix b/home/foot.nix index 3372bf1d..368c07f7 100644 --- a/home/foot.nix +++ b/home/foot.nix @@ -8,9 +8,7 @@ in { programs = { # https://codeberg.org/dnkl/foot/wiki#spawning-new-terminal-instances-in-the-current-working-directory bash.bashrcExtra = - /* - bash - */ + # bash '' osc7_cwd() { local strlen=''${#PWD} diff --git a/home/theme/qt.nix b/home/theme/qt.nix index 5455375b..0b69d782 100644 --- a/home/theme/qt.nix +++ b/home/theme/qt.nix @@ -21,9 +21,7 @@ in { xdg.configFile = let floatFont = lib.strings.floatToString fontSize; qtconf = - /* - ini - */ + # ini '' [Fonts] fixed="Sans Serif,${floatFont},-1,5,50,0,0,0,0,0" diff --git a/modules/ags/default.nix b/modules/ags/default.nix index b6126c4e..12ef08c9 100644 --- a/modules/ags/default.nix +++ b/modules/ags/default.nix @@ -34,9 +34,7 @@ in { inherit (lib) hasPrefix mdDoc optionals removePrefix; configJs = - /* - javascript - */ + # javascript '' import { transpileTypeScript } from './js/utils.js'; @@ -88,10 +86,9 @@ in { "${agsConfigDir}/config/config.js".text = configJs; "${agsConfigDir}/config/ts/lockscreen/vars.ts".text = - /* - javascript - */ + # javascript '' + // export default { mainMonitor: '${mainMonitor}', dupeLockscreen: ${boolToString greetdDupe}, diff --git a/modules/ags/icons.nix b/modules/ags/icons.nix index 46f89917..f955ef16 100644 --- a/modules/ags/icons.nix +++ b/modules/ags/icons.nix @@ -9,9 +9,7 @@ }; "${agsConfigDir}/config/icons/nixos-logo-symbolic.svg".text = - /* - xml - */ + # xml '' diff --git a/modules/greetd/astal.nix b/modules/greetd/astal.nix index b5dde9d3..75482357 100644 --- a/modules/greetd/astal.nix +++ b/modules/greetd/astal.nix @@ -37,9 +37,7 @@ in { }; "astal/config.js".text = - /* - javascript - */ + # javascript '' import { transpileTypeScript } from './js/utils.js'; diff --git a/modules/greetd/hyprland.nix b/modules/greetd/hyprland.nix index a4f09099..26d42e75 100644 --- a/modules/greetd/hyprland.nix +++ b/modules/greetd/hyprland.nix @@ -44,9 +44,7 @@ in { hyprConf = pkgs.writeText "greetd-hypr-config" ( (optionalString config.nvidia.enable - /* - hyprlang - */ + # hyprlang '' env = LIBVA_DRIVER_NAME,nvidia env = XDG_SESSION_TYPE,wayland @@ -56,11 +54,8 @@ in { '') + (concatStringsSep "\n" (map (x: "monitor=${x}") monitors)) + - /* - hyprlang - */ + # hyprlang '' - misc { ${mkHyprBlock misc} } @@ -74,10 +69,9 @@ in { '' + - /* - hyprlang - */ + # hyprlang '' + # env = XCURSOR_SIZE,24 exec-once = hyprctl setcursor Dracula-cursors 24