main
Zynh Ludwig 2024-05-29 23:34:10 -07:00
parent ab1f001742
commit 5990c5d258
5 changed files with 21 additions and 3 deletions

View File

@ -1,4 +1,5 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
let let
cfg = config.snowhawk.alacritty; cfg = config.snowhawk.alacritty;
in in

View File

@ -1,4 +1,5 @@
{ lib, ... }: { lib, ... }:
{ {
imports = [ imports = [
./neovim.nix ./neovim.nix

View File

@ -1,4 +1,5 @@
{ pkgs, inputs, config, lib, ... }: { pkgs, inputs, config, lib, ... }:
let let
cfg = config.snowhawk.fish; cfg = config.snowhawk.fish;
in in
@ -6,6 +7,7 @@ in
options.snowhawk.fish = { options.snowhawk.fish = {
enable = lib.mkEnableOption "fish"; enable = lib.mkEnableOption "fish";
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
programs.bash = { programs.bash = {
enable = true; enable = true;

View File

@ -1,4 +1,5 @@
{ lib, config, ... }: { lib, config, ... }:
let let
cfg = config.snowhawk.git; cfg = config.snowhawk.git;
in in
@ -6,14 +7,17 @@ in
options.snowhawk.git = { options.snowhawk.git = {
enable = lib.mkEnableOption "git"; enable = lib.mkEnableOption "git";
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
programs.git = { programs.git = {
enable = true; enable = true;
userName = "Zynh Ludwig"; userName = "Zynh Ludwig";
userEmail = "zynh0722@gmail.com"; userEmail = "zynh0722@gmail.com";
ignores = [ ignores = [
"Session.vim" "Session.vim"
]; ];
aliases = { aliases = {
co = "checkout"; co = "checkout";
ci = "commit"; ci = "commit";
@ -24,18 +28,22 @@ in
dump = "cat-file -p"; dump = "cat-file -p";
graph = "log --graph --decorate --pretty=oneline --abbrev-commit"; graph = "log --graph --decorate --pretty=oneline --abbrev-commit";
}; };
extraConfig = { extraConfig = {
init.defaultBranch = "main"; init.defaultBranch = "main";
core = { core = {
editor = "nvim"; editor = "nvim";
autocrlf = "input"; autocrlf = "input";
safecrlf = true; safecrlf = true;
}; };
credential = { credential = {
helper = [ helper = [
"cache --timeout 7200" "cache --timeout 7200"
"oauth" "oauth"
]; ];
"https://git.zynh.me" = { "https://git.zynh.me" = {
oauthClientId = "13d5b95d-565d-4264-8961-c45cc38eaa8a"; oauthClientId = "13d5b95d-565d-4264-8961-c45cc38eaa8a";
oauthScopes = "read_repository write_repository"; oauthScopes = "read_repository write_repository";

View File

@ -1,10 +1,12 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
let let
cfg = config.snowhawk.neovim; cfg = config.snowhawk.neovim;
in in
{ {
options.snowhawk.neovim = { options.snowhawk.neovim = {
enable = lib.mkEnableOption "neovim"; enable = lib.mkEnableOption "neovim";
package = lib.mkPackageOption pkgs "neovim" { package = lib.mkPackageOption pkgs "neovim" {
default = [ "neovim-unwrapped" ]; default = [ "neovim-unwrapped" ];
}; };
@ -33,6 +35,11 @@ in
enable = true; enable = true;
coc.enable = false; coc.enable = false;
package = cfg.package; package = cfg.package;
withNodeJs = true;
withPython3 = true;
withRuby = true;
# TODO: nvim config nix import
extraLuaConfig = '' extraLuaConfig = ''
-- bootstrap lazy.nvim, LazyVim and your plugins -- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy") require("config.lazy")
@ -41,18 +48,17 @@ in
vim.opt.runtimepath:append ("${treesitter-parsers}") vim.opt.runtimepath:append ("${treesitter-parsers}")
''; '';
plugins = [ plugins = [
treesitterWithGrammars treesitterWithGrammars
]; ];
extraPackages = with pkgs; [ extraPackages = with pkgs; [
nil nil
nixpkgs-fmt nixpkgs-fmt
rustup rustup
lua-language-server lua-language-server
]; ];
withNodeJs = true;
withPython3 = true;
withRuby = true;
}; };
}; };
} }