format: formatting all files
This commit is contained in:
parent
ee565ff88f
commit
fa791cd360
35 changed files with 333 additions and 263 deletions
|
|
@ -1,8 +1,11 @@
|
|||
{ ... }:
|
||||
{
|
||||
config.dendritic.features.editor-neovim.homeModules = [
|
||||
({ pkgs, ... }: {
|
||||
home.packages = with pkgs; [ neovim ];
|
||||
})
|
||||
(
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [ neovim ];
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,95 +1,98 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
config.dendritic.features.editor-neovim.homeModules = [
|
||||
({ pkgs, lib, ... }: {
|
||||
imports = [
|
||||
inputs.nvf.homeManagerModules.default
|
||||
../home/programs/neovim/options.nix
|
||||
../home/programs/neovim/languages.nix
|
||||
../home/programs/neovim/picker.nix
|
||||
../home/programs/neovim/snacks.nix
|
||||
../home/programs/neovim/keymaps.nix
|
||||
../home/programs/neovim/utils.nix
|
||||
../home/programs/neovim/mini.nix
|
||||
];
|
||||
(
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.nvf.homeManagerModules.default
|
||||
../home/programs/neovim/options.nix
|
||||
../home/programs/neovim/languages.nix
|
||||
../home/programs/neovim/picker.nix
|
||||
../home/programs/neovim/snacks.nix
|
||||
../home/programs/neovim/keymaps.nix
|
||||
../home/programs/neovim/utils.nix
|
||||
../home/programs/neovim/mini.nix
|
||||
];
|
||||
|
||||
programs.nvf = {
|
||||
enable = true;
|
||||
programs.nvf = {
|
||||
enable = true;
|
||||
|
||||
settings.vim = {
|
||||
startPlugins = with pkgs; [
|
||||
vimPlugins.grug-far-nvim
|
||||
vimPlugins.image-nvim
|
||||
vimPlugins.vim-hoogle
|
||||
vimPlugins.telescope_hoogle
|
||||
vimPlugins.zk-nvim
|
||||
vimPlugins.cyberdream-nvim
|
||||
vimPlugins.octo-nvim
|
||||
settings.vim = {
|
||||
startPlugins = with pkgs; [
|
||||
vimPlugins.grug-far-nvim
|
||||
vimPlugins.image-nvim
|
||||
vimPlugins.vim-hoogle
|
||||
vimPlugins.telescope_hoogle
|
||||
vimPlugins.zk-nvim
|
||||
vimPlugins.cyberdream-nvim
|
||||
vimPlugins.octo-nvim
|
||||
];
|
||||
|
||||
luaConfigRC.colorscheme = ''
|
||||
vim.cmd.colorscheme("cyberdream-light")
|
||||
'';
|
||||
|
||||
luaConfigRC.zk_nvim = ''
|
||||
local ok, zk = pcall(require, "zk")
|
||||
if not ok then return end
|
||||
|
||||
zk.setup({
|
||||
picker = "select",
|
||||
lsp = {
|
||||
config = {
|
||||
name = "zk",
|
||||
cmd = { "zk", "lsp" },
|
||||
filetypes = { "markdown" },
|
||||
},
|
||||
auto_attach = { enabled = true },
|
||||
},
|
||||
})
|
||||
'';
|
||||
};
|
||||
|
||||
settings.vim.augroups = [
|
||||
{ name = "SwiftSetup"; }
|
||||
];
|
||||
|
||||
luaConfigRC.colorscheme = ''
|
||||
vim.cmd.colorscheme("cyberdream-light")
|
||||
'';
|
||||
settings.vim.autocmds = [
|
||||
{
|
||||
event = [ "FileType" ];
|
||||
pattern = [ "swift" ];
|
||||
group = "SwiftSetup";
|
||||
desc = "Start sourcekit-lsp for Swift files";
|
||||
callback = lib.generators.mkLuaInline ''
|
||||
function()
|
||||
local lspconfig = require("lspconfig")
|
||||
for _, client in pairs(vim.lsp.get_active_clients()) do
|
||||
if client.name == "sourcekit" then return end
|
||||
end
|
||||
lspconfig.sourcekit.setup({
|
||||
cmd = { "sourcekit-lsp" },
|
||||
filetypes = { "swift", "swiftpm" },
|
||||
root_dir = lspconfig.util.root_pattern("Package.swift", ".git"),
|
||||
})
|
||||
end
|
||||
'';
|
||||
}
|
||||
|
||||
luaConfigRC.zk_nvim = ''
|
||||
local ok, zk = pcall(require, "zk")
|
||||
if not ok then return end
|
||||
|
||||
zk.setup({
|
||||
picker = "select",
|
||||
lsp = {
|
||||
config = {
|
||||
name = "zk",
|
||||
cmd = { "zk", "lsp" },
|
||||
filetypes = { "markdown" },
|
||||
},
|
||||
auto_attach = { enabled = true },
|
||||
},
|
||||
})
|
||||
'';
|
||||
{
|
||||
event = [ "BufWritePost" ];
|
||||
pattern = [ "*.swift" ];
|
||||
group = "SwiftSetup";
|
||||
desc = "Format Swift files on save";
|
||||
callback = lib.generators.mkLuaInline ''
|
||||
function()
|
||||
if vim.fn.executable("swift-format") == 1 then
|
||||
vim.cmd("silent! noautocmd !swift-format -i %")
|
||||
vim.cmd("checktime")
|
||||
end
|
||||
end
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
settings.vim.augroups = [
|
||||
{ name = "SwiftSetup"; }
|
||||
];
|
||||
|
||||
settings.vim.autocmds = [
|
||||
{
|
||||
event = [ "FileType" ];
|
||||
pattern = [ "swift" ];
|
||||
group = "SwiftSetup";
|
||||
desc = "Start sourcekit-lsp for Swift files";
|
||||
callback = lib.generators.mkLuaInline ''
|
||||
function()
|
||||
local lspconfig = require("lspconfig")
|
||||
for _, client in pairs(vim.lsp.get_active_clients()) do
|
||||
if client.name == "sourcekit" then return end
|
||||
end
|
||||
lspconfig.sourcekit.setup({
|
||||
cmd = { "sourcekit-lsp" },
|
||||
filetypes = { "swift", "swiftpm" },
|
||||
root_dir = lspconfig.util.root_pattern("Package.swift", ".git"),
|
||||
})
|
||||
end
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
event = [ "BufWritePost" ];
|
||||
pattern = [ "*.swift" ];
|
||||
group = "SwiftSetup";
|
||||
desc = "Format Swift files on save";
|
||||
callback = lib.generators.mkLuaInline ''
|
||||
function()
|
||||
if vim.fn.executable("swift-format") == 1 then
|
||||
vim.cmd("silent! noautocmd !swift-format -i %")
|
||||
vim.cmd("checktime")
|
||||
end
|
||||
end
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
})
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
home.packages = with pkgs; [
|
||||
vhs
|
||||
libqalculate
|
||||
];
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2,33 +2,39 @@
|
|||
{
|
||||
config.dendritic.features = {
|
||||
secrets-home-sops.homeModules = [
|
||||
({ inputs, config, ... }: {
|
||||
imports = [
|
||||
inputs.sops-nix.homeModules.sops
|
||||
];
|
||||
(
|
||||
{ inputs, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.sops-nix.homeModules.sops
|
||||
];
|
||||
|
||||
sops.defaultSopsFile = ../../secrets/users/${config.dendritic.current.primaryUser}.yaml;
|
||||
sops.defaultSopsFormat = "yaml";
|
||||
sops.age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
|
||||
sops.defaultSopsFile = ../../secrets/users/${config.dendritic.current.primaryUser}.yaml;
|
||||
sops.defaultSopsFormat = "yaml";
|
||||
sops.age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
|
||||
|
||||
sops.secrets."user/test" = {
|
||||
path = ".config/secrets/test";
|
||||
};
|
||||
})
|
||||
sops.secrets."user/test" = {
|
||||
path = ".config/secrets/test";
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
secrets-system-sops.nixosModules = [
|
||||
({ inputs, config, ... }: {
|
||||
imports = [
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
(
|
||||
{ inputs, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
|
||||
sops.defaultSopsFile = ../../secrets/hosts/${config.dendritic.current.hostName}.yaml;
|
||||
sops.defaultSopsFormat = "yaml";
|
||||
sops.age.keyFile = "/home/${config.dendritic.current.primaryUser}/.config/sops/age/keys.txt";
|
||||
sops.defaultSopsFile = ../../secrets/hosts/${config.dendritic.current.hostName}.yaml;
|
||||
sops.defaultSopsFormat = "yaml";
|
||||
sops.age.keyFile = "/home/${config.dendritic.current.primaryUser}/.config/sops/age/keys.txt";
|
||||
|
||||
sops.secrets."system/example" = { };
|
||||
})
|
||||
sops.secrets."system/example" = { };
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue