summaryrefslogtreecommitdiff
path: root/users/seth/programs
diff options
context:
space:
mode:
authorseth <[email protected]>2023-02-18 05:13:27 -0500
committerseth <[email protected]>2023-02-18 05:13:27 -0500
commit1d7b04a71c7222153ffa9cd48f73b51ea72204d1 (patch)
tree3d794209be0e2311dc76337c09c2cb39c52f6afb /users/seth/programs
parent8a8059d9889afcbcd8a133b0b186e3a97ce7ac23 (diff)
major refactor
- `mkHost` now accepts an optional `specialArgs` argument to be passed to `nixosSystem()` - the `modules` argument for `mkHMUser` is now optional
Diffstat (limited to 'users/seth/programs')
-rw-r--r--users/seth/programs/default.nix66
-rw-r--r--users/seth/programs/git.nix4
-rw-r--r--users/seth/programs/mangohud/default.nix23
-rw-r--r--users/seth/programs/neovim/default.nix148
-rw-r--r--users/seth/programs/neovim/lua/getchoo/ftdetect.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/ftdetect.lua)0
-rw-r--r--users/seth/programs/neovim/lua/getchoo/init.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/init.lua)7
-rw-r--r--users/seth/programs/neovim/lua/getchoo/keymap.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/keymap.lua)0
-rw-r--r--users/seth/programs/neovim/lua/getchoo/lsp/config/cmp.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/lsp/config/cmp.lua)0
-rw-r--r--users/seth/programs/neovim/lua/getchoo/lsp/config/init.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/lsp/config/init.lua)0
-rw-r--r--users/seth/programs/neovim/lua/getchoo/lsp/config/lsp_config.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/lsp/config/lsp_config.lua)0
-rw-r--r--users/seth/programs/neovim/lua/getchoo/lsp/config/null_ls.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/lsp/config/null_ls.lua)0
-rw-r--r--users/seth/programs/neovim/lua/getchoo/lsp/config/sources.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/lsp/config/sources.lua)0
-rw-r--r--users/seth/programs/neovim/lua/getchoo/lsp/init.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/lsp/init.lua)0
-rw-r--r--users/seth/programs/neovim/lua/getchoo/lsp/keymap.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/lsp/keymap.lua)0
-rw-r--r--users/seth/programs/neovim/lua/getchoo/lsp/server.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/lsp/server.lua)0
-rw-r--r--users/seth/programs/xdg.nix5
16 files changed, 87 insertions, 166 deletions
diff --git a/users/seth/programs/default.nix b/users/seth/programs/default.nix
index d1b8f97..5394515 100644
--- a/users/seth/programs/default.nix
+++ b/users/seth/programs/default.nix
@@ -1,56 +1,26 @@
-{
- config,
- pkgs,
- ...
-}: let
- develPackages =
- if config.seth.devel.enable
- then
- with pkgs; [
- alejandra
- clang
- deadnix
- eclint
- lld
- statix
- ]
- else [];
-
- guiApps =
- if config.seth.desktop != ""
- then
- with pkgs; [
- discord
- element-desktop
- spotify
- steam
- ]
- else [];
- systemPackages =
- if !config.seth.standalone
- then with pkgs; [python311]
- else [];
-in {
+{pkgs, ...}: {
imports = [
./git.nix
- ./mangohud
./neovim
./starship.nix
./vim.nix
- ./xdg.nix
];
- home.packages = with pkgs;
- [
- bat
- exa
- fd
- gh
- rclone
- restic
- ripgrep
- ]
- ++ develPackages
- ++ guiApps
- ++ systemPackages;
+ home.packages = with pkgs; [
+ alejandra
+ bat
+ clang
+ deadnix
+ eclint
+ exa
+ fd
+ gh
+ lld
+ rclone
+ restic
+ ripgrep
+ statix
+ ];
+
+ xdg.enable = true;
}
diff --git a/users/seth/programs/git.nix b/users/seth/programs/git.nix
index 73269fd..8daa18c 100644
--- a/users/seth/programs/git.nix
+++ b/users/seth/programs/git.nix
@@ -1,6 +1,6 @@
-{config, ...}: {
+_: {
programs.git = {
- enable = !config.seth.standalone;
+ enable = true;
extraConfig = {
init = {defaultBranch = "main";};
safe = {directory = "/etc/nixos";};
diff --git a/users/seth/programs/mangohud/default.nix b/users/seth/programs/mangohud/default.nix
index a2f0933..21dde0f 100644
--- a/users/seth/programs/mangohud/default.nix
+++ b/users/seth/programs/mangohud/default.nix
@@ -1,20 +1,7 @@
-{
- config,
- pkgs,
- ...
-}: let
- homePackages =
- if config.seth.desktop != ""
- then with pkgs; [mangohud]
- else [];
- mangohudConf =
- if config.seth.desktop != ""
- then {
- source = ./MangoHud.conf;
- }
- else {};
-in {
- home.packages = homePackages;
+{pkgs, ...}: {
+ home.packages = with pkgs; [mangohud];
- # xdg.configFile.MangoHud = mangohudConf;
+ xdg.configFile.MangoHud = {
+ source = ./MangoHud.conf;
+ };
}
diff --git a/users/seth/programs/neovim/default.nix b/users/seth/programs/neovim/default.nix
index 58d8071..0f814be 100644
--- a/users/seth/programs/neovim/default.nix
+++ b/users/seth/programs/neovim/default.nix
@@ -1,99 +1,71 @@
-{
- config,
- pkgs,
- ...
-}: let
- neovimConfig =
- if config.seth.devel.enable
- then "vim.g.use_lsp_plugins = true"
- else "vim.g.use_lsp_plugins = false";
-
- lspPackages =
- if config.seth.devel.enable
- then
- with pkgs; [
- alejandra
- clang
- codespell
- deadnix
- nodePackages.alex
- nodePackages.bash-language-server
- nodePackages.prettier
- nodePackages.pyright
- pylint
- rust-analyzer
- rustfmt
- statix
- stylua
- sumneko-lua-language-server
- yapf
- ]
- else [];
-
- lspPlugins =
- if config.seth.devel.enable
- then
- with pkgs.vimPlugins; [
- nvim-lspconfig
- null-ls-nvim
- plenary-nvim
- nvim-treesitter.withAllGrammars
- nvim-cmp
- cmp-nvim-lsp
- cmp-buffer
- cmp-path
- cmp-vsnip
- vim-vsnip
- luasnip
- cmp_luasnip
- trouble-nvim
- telescope-nvim
- gitsigns-nvim
- editorconfig-nvim
- ]
- else [];
-in {
+{pkgs, ...}: {
programs.neovim = {
enable = true;
- extraPackages = lspPackages;
- plugins = with pkgs.vimPlugins;
- [
- barbar-nvim
- catppuccin-nvim
- lightspeed-nvim
- lualine-nvim
- nvim-tree-lua
- nvim-web-devicons
- ]
- ++ lspPlugins;
+ extraPackages = with pkgs; [
+ alejandra
+ clang
+ codespell
+ deadnix
+ nodePackages.alex
+ nodePackages.bash-language-server
+ nodePackages.prettier
+ nodePackages.pyright
+ pylint
+ rust-analyzer
+ rustfmt
+ statix
+ stylua
+ sumneko-lua-language-server
+ yapf
+ ];
+ plugins = with pkgs.vimPlugins; [
+ barbar-nvim
+ catppuccin-nvim
+ cmp-nvim-lsp
+ cmp-buffer
+ cmp_luasnip
+ cmp-path
+ cmp-vsnip
+ editorconfig-nvim
+ gitsigns-nvim
+ lightspeed-nvim
+ lualine-nvim
+ luasnip
+ nvim-cmp
+ nvim-lspconfig
+ null-ls-nvim
+ nvim-tree-lua
+ nvim-treesitter.withAllGrammars
+ nvim-web-devicons
+ plenary-nvim
+ telescope-nvim
+ trouble-nvim
+ vim-vsnip
+ ];
};
xdg.configFile.nvim = {
- source = ./config;
+ source = ./lua;
recursive = true;
};
xdg.configFile."nvim/init.lua" = {
- text =
- neovimConfig
- + ''
-
- local cmd = vim.cmd
- local opt = vim.opt
-
- require("getchoo")
-
- -- text options
- opt.tabstop = 2
- opt.shiftwidth = 2
- opt.expandtab = false
- opt.smartindent = true
- opt.wrap = false
+ text = ''
+ local cmd = vim.cmd
+ local opt = vim.opt
+ require("getchoo")
+ vim.g.use_lsp_plugins = true
+ -- text options
+ opt.tabstop = 2
+ opt.shiftwidth = 2
+ opt.expandtab = false
+ opt.smartindent = true
+ opt.wrap = false
- -- appearance
- opt.syntax = "on"
- cmd("filetype plugin indent on")
- opt.termguicolors = true
- vim.api.nvim_command("colorscheme catppuccin")
- '';
+ -- appearance
+ opt.syntax = "on"
+ cmd("filetype plugin indent on")
+ opt.termguicolors = true
+ vim.api.nvim_command("colorscheme catppuccin")
+ '';
};
}
diff --git a/users/seth/programs/neovim/config/lua/getchoo/ftdetect.lua b/users/seth/programs/neovim/lua/getchoo/ftdetect.lua
index c13bdb6..c13bdb6 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/ftdetect.lua
+++ b/users/seth/programs/neovim/lua/getchoo/ftdetect.lua
diff --git a/users/seth/programs/neovim/config/lua/getchoo/init.lua b/users/seth/programs/neovim/lua/getchoo/init.lua
index a719ac3..d73b5ae 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/init.lua
+++ b/users/seth/programs/neovim/lua/getchoo/init.lua
@@ -42,11 +42,8 @@ require("catppuccin").setup(M.catppuccin)
require("lualine").setup(M.lualine)
require("nvim-tree").setup(M.tree)
-if vim.g.use_lsp_plugins then
- require("getchoo.ftdetect")
- require("getchoo.lsp")
-end
-
+require("getchoo.ftdetect")
+require("getchoo.lsp")
require("getchoo.keymap")
return M
diff --git a/users/seth/programs/neovim/config/lua/getchoo/keymap.lua b/users/seth/programs/neovim/lua/getchoo/keymap.lua
index 9a4484c..9a4484c 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/keymap.lua
+++ b/users/seth/programs/neovim/lua/getchoo/keymap.lua
diff --git a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/cmp.lua b/users/seth/programs/neovim/lua/getchoo/lsp/config/cmp.lua
index cef2ad1..cef2ad1 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/cmp.lua
+++ b/users/seth/programs/neovim/lua/getchoo/lsp/config/cmp.lua
diff --git a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/init.lua b/users/seth/programs/neovim/lua/getchoo/lsp/config/init.lua
index f2634d5..f2634d5 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/init.lua
+++ b/users/seth/programs/neovim/lua/getchoo/lsp/config/init.lua
diff --git a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/lsp_config.lua b/users/seth/programs/neovim/lua/getchoo/lsp/config/lsp_config.lua
index 9874820..9874820 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/lsp_config.lua
+++ b/users/seth/programs/neovim/lua/getchoo/lsp/config/lsp_config.lua
diff --git a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/null_ls.lua b/users/seth/programs/neovim/lua/getchoo/lsp/config/null_ls.lua
index 16b1b3c..16b1b3c 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/null_ls.lua
+++ b/users/seth/programs/neovim/lua/getchoo/lsp/config/null_ls.lua
diff --git a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/sources.lua b/users/seth/programs/neovim/lua/getchoo/lsp/config/sources.lua
index bed6361..bed6361 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/sources.lua
+++ b/users/seth/programs/neovim/lua/getchoo/lsp/config/sources.lua
diff --git a/users/seth/programs/neovim/config/lua/getchoo/lsp/init.lua b/users/seth/programs/neovim/lua/getchoo/lsp/init.lua
index f354b2a..f354b2a 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/lsp/init.lua
+++ b/users/seth/programs/neovim/lua/getchoo/lsp/init.lua
diff --git a/users/seth/programs/neovim/config/lua/getchoo/lsp/keymap.lua b/users/seth/programs/neovim/lua/getchoo/lsp/keymap.lua
index 9f34ffa..9f34ffa 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/lsp/keymap.lua
+++ b/users/seth/programs/neovim/lua/getchoo/lsp/keymap.lua
diff --git a/users/seth/programs/neovim/config/lua/getchoo/lsp/server.lua b/users/seth/programs/neovim/lua/getchoo/lsp/server.lua
index f238eb5..f238eb5 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/lsp/server.lua
+++ b/users/seth/programs/neovim/lua/getchoo/lsp/server.lua
diff --git a/users/seth/programs/xdg.nix b/users/seth/programs/xdg.nix
deleted file mode 100644
index 08230ac..0000000
--- a/users/seth/programs/xdg.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{config, ...}: {
- xdg = {
- enable = !config.seth.standalone;
- };
-}