formatted all files with nixfmt, added env variable to hold secrets

This commit is contained in:
pagedmov
2024-11-09 16:20:27 -05:00
parent d38da56ba2
commit 2a1ba18c09
93 changed files with 948 additions and 1254 deletions

View File

@@ -1,6 +1,7 @@
{lib, config, ...}: {
{ lib, config, ... }: {
options = {
movOpts.programConfigs.autojumpConfig.enable = lib.mkEnableOption "enables my autojump options";
movOpts.programConfigs.autojumpConfig.enable =
lib.mkEnableOption "enables my autojump options";
};
config = lib.mkIf config.movOpts.programConfigs.autojumpConfig.enable {
programs.autojump = {

View File

@@ -1,13 +1,12 @@
{lib, config, inputs, ...}: {
{ lib, config, inputs, ... }: {
options = {
movOpts.programConfigs.batConfig.enable = lib.mkEnableOption "enables my bat options";
movOpts.programConfigs.batConfig.enable =
lib.mkEnableOption "enables my bat options";
};
config = lib.mkIf config.movOpts.programConfigs.batConfig.enable {
programs.bat = {
enable = true;
config = {
pager = "less -FR";
};
config = { pager = "less -FR"; };
};
};
}

View File

@@ -1,6 +1,7 @@
{lib, config, pkgs, ...}: {
{ lib, config, pkgs, ... }: {
options = {
movOpts.programConfigs.btopConfig.enable = lib.mkEnableOption "enables my btop config";
movOpts.programConfigs.btopConfig.enable =
lib.mkEnableOption "enables my btop config";
};
config = lib.mkIf config.movOpts.programConfigs.btopConfig.enable {
programs.btop = {
@@ -19,6 +20,6 @@
};
};
home.packages = with pkgs; [nvtopPackages.intel];
home.packages = with pkgs; [ nvtopPackages.intel ];
};
}

View File

@@ -1,10 +1,9 @@
{lib, config, inputs, pkgs, ... }: {
{ lib, config, inputs, pkgs, ... }: {
options = {
movOpts.programConfigs.cavaConfig.enable = lib.mkEnableOption "enables my cava settings";
movOpts.programConfigs.cavaConfig.enable =
lib.mkEnableOption "enables my cava settings";
};
config = lib.mkIf config.movOpts.programConfigs.cavaConfig.enable {
programs.cava = {
enable = true;
};
programs.cava = { enable = true; };
};
}

View File

@@ -1,27 +1,9 @@
{
host,
nur,
nixvim,
self,
inputs,
username,
config,
home-manager,
...
}:
{
imports =
[(import ./btop.nix)]
++ [(import ./yazi.nix)]
++ [(import ./kitty.nix)]
++ [(import ./fuzzel.nix)]
++ [(import ./eza.nix)]
++ [(import ./cava.nix)]
++ [(import ./bat.nix)]
++ [(import ./fzf.nix)]
++ [(import ./git.nix)]
++ [(import ./password-store.nix)]
++ [(import ./autojump.nix)]
++ [(import ./firefox.nix)]
++ [(import ./nixvim)];
{ env, host, nur, nixvim, self, inputs, username, config, home-manager, ... }: {
imports = [ (import ./btop.nix) ] ++ [ (import ./yazi.nix) ]
++ [ (import ./kitty.nix) ] ++ [ (import ./fuzzel.nix) ]
++ [ (import ./eza.nix) ] ++ [ (import ./cava.nix) ]
++ [ (import ./bat.nix) ] ++ [ (import ./fzf.nix) ]
++ [ (import ./git.nix) ] ++ [ (import ./password-store.nix) ]
++ [ (import ./autojump.nix) ] ++ [ (import ./firefox.nix) ]
++ [ (import ./nixvim) ];
}

View File

@@ -1,12 +1,13 @@
{lib, config, ...}: {
{ lib, config, ... }: {
options = {
movOpts.programConfigs.ezaConfig.enable = lib.mkEnableOption "enables my eza options";
movOpts.programConfigs.ezaConfig.enable =
lib.mkEnableOption "enables my eza options";
};
config = lib.mkIf config.movOpts.programConfigs.ezaConfig.enable {
programs.eza = {
enable = true;
enableZshIntegration = false;
extraOptions = ["-1" "-h" "--group-directories-first"];
extraOptions = [ "-1" "-h" "--group-directories-first" ];
icons = "auto";
git = true;
};

View File

@@ -1,6 +1,7 @@
{lib, config, nur, username, self, pkgs, ... }: {
{ lib, config, nur, username, self, pkgs, ... }: {
options = {
movOpts.programConfigs.firefoxConfig.enable = lib.mkEnableOption "enables my firefox configuration";
movOpts.programConfigs.firefoxConfig.enable =
lib.mkEnableOption "enables my firefox configuration";
};
config = lib.mkIf config.movOpts.programConfigs.firefoxConfig.enable {
programs.firefox = {
@@ -22,7 +23,8 @@
OverridePostUpdatePage = "";
DontCheckDefaultBrowser = true;
DisplayBookmarksToolbar = "always"; # alternatives: "always" or "newtab"
DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
DisplayMenuBar =
"default-off"; # alternatives: "always", "never" or "default-on"
SearchBar = "unified"; # alternative: "separate" isDefault = true;
};
profiles.${username} = {

View File

@@ -1,6 +1,7 @@
{config, lib, ...}: {
{ config, lib, ... }: {
options = {
movOpts.programConfigs.fuzzelConfig.enable = lib.mkEnableOption "enables my fuzzel configuration";
movOpts.programConfigs.fuzzelConfig.enable =
lib.mkEnableOption "enables my fuzzel configuration";
};
config = lib.mkIf config.movOpts.programConfigs.fuzzelConfig.enable {
programs.fuzzel = {

View File

@@ -1,6 +1,7 @@
{lib, config, ...}: {
{ lib, config, ... }: {
options = {
movOpts.programConfigs.fzfConfig.enable = lib.mkEnableOption "enables my fzf options";
movOpts.programConfigs.fzfConfig.enable =
lib.mkEnableOption "enables my fzf options";
};
config = lib.mkIf config.movOpts.programConfigs.fzfConfig.enable {
programs.fzf = {

View File

@@ -1,6 +1,7 @@
{lib, config, username, ...}: {
{ lib, config, username, ... }: {
options = {
movOpts.programConfigs.gitConfig.enable = lib.mkEnableOption "enables my git configuration";
movOpts.programConfigs.gitConfig.enable =
lib.mkEnableOption "enables my git configuration";
};
config = lib.mkIf config.movOpts.programConfigs.gitConfig.enable {
programs.git = {

View File

@@ -1,6 +1,7 @@
{lib, config, pkgs, ... }: {
{ lib, config, pkgs, ... }: {
options = {
movOpts.programConfigs.kittyConfig.enable = lib.mkEnableOption "enables my kitty configuration";
movOpts.programConfigs.kittyConfig.enable =
lib.mkEnableOption "enables my kitty configuration";
};
config = lib.mkIf config.movOpts.programConfigs.kittyConfig.enable {
programs.kitty = {

View File

@@ -1,34 +1,37 @@
{...}: {
{ ... }: {
programs.nixvim = {
autoCmd = [
{
command = "FloatermNew --wintype=float --name=shadeterm --position=topright --autoclose=0 --silent --cwd=<buffer> --titleposition=left zsh";
event = ["VimEnter"];
pattern = ["*"];
command =
"FloatermNew --wintype=float --name=shadeterm --position=topright --autoclose=0 --silent --cwd=<buffer> --titleposition=left zsh";
event = [ "VimEnter" ];
pattern = [ "*" ];
desc = "Create a floating terminal, placed in the top right";
}
{
command = "silent! mkview";
event = ["BufWinLeave"];
pattern = ["*"];
desc = "Save session window settings to be loaded next time the file is opened";
event = [ "BufWinLeave" ];
pattern = [ "*" ];
desc =
"Save session window settings to be loaded next time the file is opened";
}
{
command = "silent! !aplay ~/sound/sys/cd.wav > /dev/null 2>&1 &";
event = ["BufWinLeave"];
pattern = ["*"];
event = [ "BufWinLeave" ];
pattern = [ "*" ];
desc = "Play a neat little sound effect when you close neovim";
}
{
command = "silent! loadview";
event = ["BufWinEnter"];
pattern = ["*"];
desc = "Load previous session window settings for the opened file (folds, cursor pos, etc)";
event = [ "BufWinEnter" ];
pattern = [ "*" ];
desc =
"Load previous session window settings for the opened file (folds, cursor pos, etc)";
}
{
command = "setlocal textwidth=135";
event = ["BufWinEnter" "BufEnter"];
pattern = ["*.md" "*.wiki" "*.txt"];
event = [ "BufWinEnter" "BufEnter" ];
pattern = [ "*.md" "*.wiki" "*.txt" ];
desc = "Set automatic linebreaks in plain text file formats";
}
];

View File

@@ -1,14 +1,3 @@
{
config,
pkgs,
host,
self,
...
}: {
imports = [
./plugins
./options.nix
./keymaps.nix
./autocmd.nix
];
{ env, config, pkgs, host, self, ... }: {
imports = [ ./plugins ./options.nix ./keymaps.nix ./autocmd.nix ];
}

View File

@@ -1,12 +1,7 @@
{
config,
...
}:
{ config, ... }:
let
scheme = config.lib.stylix.colors;
in
{
let scheme = config.lib.stylix.colors;
in {
programs.nixvim = {
colorschemes.base16 = {
enable = true;

View File

@@ -2,9 +2,7 @@
programs.nixvim = {
plugins.barbar = {
enable = false;
settings = {
auto_hide = 1;
};
settings = { auto_hide = 1; };
};
};
}

View File

@@ -2,11 +2,8 @@
programs.nixvim = {
plugins.cmp = {
autoEnableSources = true;
settings.sources = [
{name = "nvim_lsp";}
{name = "path";}
{name = "buffer";}
];
settings.sources =
[ { name = "nvim_lsp"; } { name = "path"; } { name = "buffer"; } ];
};
plugins.cmp-nvim-lsp.enable = true;
plugins.cmp-nvim-lsp-document-symbol.enable = true;

View File

@@ -2,9 +2,7 @@
programs.nixvim = {
plugins.coq-nvim = {
enable = true;
settings = {
auto_start = false;
};
settings = { auto_start = false; };
};
};
}

View File

@@ -1,4 +1,4 @@
{ host, self, pkgs, ... }:
{ host, self, pkgs, env, ... }:
{
imports = [

View File

@@ -1,4 +1,4 @@
{pkgs, ...}: {
{ pkgs, ... }: {
programs.nixvim = {
extraPlugins = [
(pkgs.vimUtils.buildVimPlugin {

View File

@@ -3,9 +3,7 @@
enable = true;
notification = {
overrideVimNotify = true;
window = {
border = "rounded";
};
window = { border = "rounded"; };
};
};
}

View File

@@ -1,4 +1,4 @@
{pkgs, ...}: {
{ pkgs, ... }: {
programs.nixvim = {
extraPlugins = [
(pkgs.vimUtils.buildVimPlugin {
@@ -11,8 +11,6 @@
};
})
];
plugins = {
haskell-scope-highlighting.enable = true;
};
plugins = { haskell-scope-highlighting.enable = true; };
};
}

View File

@@ -1,81 +1,81 @@
{
programs.nixvim = {
plugins = {
cmp-snippy.enable = true;
cmp = {
enable = true;
settings = {
mapping = {
__raw = ''
cmp.mapping.preset.insert({
['<C-o>'] = cmp.mapping.close_docs(),
['<C-i>'] = cmp.mapping.open_docs(),
['<C-j>'] = cmp.mapping.scroll_docs(-4),
['<C-k>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = function(fallback)
if cmp.visible() then
cmp.confirm()
else
fallback()
end
end, -- Added a comma here
['<Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end, -- Added a comma here
['<S-Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end -- No comma needed for the last item
})
'';
};
window = {
completion.border = "rounded";
};
{
programs.nixvim = {
plugins = {
cmp-snippy.enable = true;
cmp = {
enable = true;
settings = {
mapping = {
__raw = ''
cmp.mapping.preset.insert({
['<C-o>'] = cmp.mapping.close_docs(),
['<C-i>'] = cmp.mapping.open_docs(),
['<C-j>'] = cmp.mapping.scroll_docs(-4),
['<C-k>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = function(fallback)
if cmp.visible() then
cmp.confirm()
else
fallback()
end
end, -- Added a comma here
['<Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end, -- Added a comma here
['<S-Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end -- No comma needed for the last item
})
'';
};
window = { completion.border = "rounded"; };
};
lsp = {
enable = true;
servers = {
bashls.enable = true;
ccls.enable = true;
clangd.enable = true;
cmake.enable = true;
html.enable = true;
jsonls.enable = true;
lua_ls.enable = true;
marksman.enable = true;
nixd = {
enable = true;
settings = {
nixd = {
nixpkgs.expr = "import <nixpkgs> { }";
formatting.command = "nixfmt";
};
options = {
# uses Xenon config because it has every option exposed to it
nixos.expr = "(builtins.getFlake \"github:pagedMov/nixos-config\").nixosConfigurations.xenon.options";
home.expr = "(builtins.getFlake \"github:pagedMov/nixos-config\").homeConfigurations.xenonHome.options";
};
};
lsp = {
enable = true;
servers = {
bashls.enable = true;
ccls.enable = true;
clangd.enable = true;
cmake.enable = true;
html.enable = true;
jsonls.enable = true;
lua_ls.enable = true;
marksman.enable = true;
nixd = {
enable = true;
settings = {
nixd = {
nixpkgs.expr = "import <nixpkgs> { }";
formatting.command = "nixfmt";
};
options = {
# uses Xenon config because it has every option exposed to it
nixos.expr = ''
(builtins.getFlake "github:pagedMov/nixos-config").nixosConfigurations.xenon.options'';
home.expr = ''
(builtins.getFlake "github:pagedMov/nixos-config").homeConfigurations.xenonHome.options'';
};
};
pyright.enable = true;
sqls.enable = true;
hls = {
enable = true;
installGhc = true;
};
};
pyright.enable = true;
sqls.enable = true;
hls = {
enable = true;
installGhc = true;
};
};
};
};
}
};
}

View File

@@ -23,20 +23,20 @@
};
};
sections = {
lualine_a = ["mode"];
lualine_b = ["buffers"];
lualine_c = [];
lualine_x = ["searchcount" "fileformat" "filetype"];
lualine_y = ["branch" "diff" "diagnostics"];
lualine_z = ["location"];
lualine_a = [ "mode" ];
lualine_b = [ "buffers" ];
lualine_c = [ ];
lualine_x = [ "searchcount" "fileformat" "filetype" ];
lualine_y = [ "branch" "diff" "diagnostics" ];
lualine_z = [ "location" ];
};
inactive_sections = {
lualine_a = [];
lualine_b = [];
lualine_c = ["filename"];
lualine_x = ["location"];
lualine_y = [];
lualine_z = [];
lualine_a = [ ];
lualine_b = [ ];
lualine_c = [ "filename" ];
lualine_x = [ "location" ];
lualine_y = [ ];
lualine_z = [ ];
};
};
};

View File

@@ -2,7 +2,8 @@
programs.nixvim.plugins.neocord = {
enable = true;
settings = {
logo = "https://styles.redditmedia.com/t5_30kix/styles/communityIcon_n2hvyn96zwk81.png";
logo =
"https://styles.redditmedia.com/t5_30kix/styles/communityIcon_n2hvyn96zwk81.png";
logo_tooltip = "Neovim";
buttons = [
{

View File

@@ -2,9 +2,7 @@
programs.nixvim.plugins.nvim-lightbulb = {
enable = true;
settings = {
virtual_text = {
enable = true;
};
virtual_text = { enable = true; };
autocmd.enabled = true;
};
};

View File

@@ -0,0 +1 @@
{ programs.nixvim.plugins.chatgpt = { enable = true; }; }

View File

@@ -2,13 +2,7 @@
programs.nixvim = {
plugins.telescope = {
enable = true;
settings = {
pickers = {
find_files = {
hidden = true;
};
};
};
settings = { pickers = { find_files = { hidden = true; }; }; };
};
};
}

View File

@@ -10,9 +10,7 @@
};
matchParen = {
hiSurroundAlways = true;
offscreen = {
method = "popup";
};
offscreen = { method = "popup"; };
};
treesitterIntegration = {
enable = true;

View File

@@ -1,15 +1,14 @@
{lib, config, username, ...}: let
home = "/home/${username}";
{ lib, config, username, ... }:
let home = "/home/${username}";
in {
options = {
movOpts.programConfigs.passConfig.enable = lib.mkEnableOption "enables my pass config";
movOpts.programConfigs.passConfig.enable =
lib.mkEnableOption "enables my pass config";
};
config = lib.mkIf config.movOpts.programConfigs.passConfig.enable {
programs.password-store = {
enable = true;
settings = {
PASSWORD_STORE_DIR = "${home}/.password-store";
};
settings = { PASSWORD_STORE_DIR = "${home}/.password-store"; };
};
};
}

View File

@@ -1,6 +1,7 @@
{lib, config, ...}: {
{ lib, config, ... }: {
options = {
movOpts.programConfigs.yaziConfig.enable = lib.mkEnableOption "enables my yazi config";
movOpts.programConfigs.yaziConfig.enable =
lib.mkEnableOption "enables my yazi config";
};
config = lib.mkIf config.movOpts.programConfigs.yaziConfig.enable {
programs.yazi = {