Add neovim config; Remove things
This commit is contained in:
57
nix/common.nix
Normal file
57
nix/common.nix
Normal file
@ -0,0 +1,57 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./user/sh.nix
|
||||
./user/tmux.nix
|
||||
./user/git.nix
|
||||
./user/dev.nix
|
||||
./user/nvim.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# neovim
|
||||
|
||||
(pkgs.nerdfonts.override { fonts = [ "FiraCodeMono" ]; })
|
||||
|
||||
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||
# echo "Hello, ${config.home.username}!"
|
||||
# '')
|
||||
];
|
||||
|
||||
home.file = {
|
||||
# ".screenrc".source = dotfiles/screenrc;
|
||||
|
||||
# ".gradle/gradle.properties".text = ''
|
||||
# org.gradle.console=verbose
|
||||
# org.gradle.daemon.idletimeout=3600000
|
||||
# '';
|
||||
};
|
||||
|
||||
# Home Manager can also manage your environment variables through
|
||||
# 'home.sessionVariables'. If you don't want to manage your shell through Home
|
||||
# Manager then you have to manually source 'hm-session-vars.sh' located at
|
||||
# either
|
||||
#
|
||||
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# /etc/profiles/per-user/moustachioed/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
#home.sessionVariables = {
|
||||
# EDITOR = "nvim";
|
||||
#};
|
||||
|
||||
#home.shellAliases = {
|
||||
# "ll" = "ls -la";
|
||||
#};
|
||||
|
||||
news.display = "silent";
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
48
nix/flake.lock
generated
Normal file
48
nix/flake.lock
generated
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1712212014,
|
||||
"narHash": "sha256-s+lbaf3nLRn1++/X2eXwY9mYCA/m9l8AvyG8beeOaXE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "7e91f2a0ba4b62b88591279d54f741a13e36245b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1712163089,
|
||||
"narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "fd281bd6b7d3e32ddfa399853946f782553163b5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
38
nix/flake.nix
Normal file
38
nix/flake.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
description = "Home Manager configuration of moustachioed";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, ... }:
|
||||
let
|
||||
system = "x86_64-darwin";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
homeConfigurations = {
|
||||
"moustachioed" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
modules = [
|
||||
./user/profiles/moustachioedBook.nix
|
||||
./common.nix
|
||||
./user/task.nix
|
||||
];
|
||||
};
|
||||
"work" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
modules = [
|
||||
./user/profiles/work.nix
|
||||
./common.nix
|
||||
./user/task.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
11
nix/user/dev.nix
Normal file
11
nix/user/dev.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.ripgrep.enable = true;
|
||||
}
|
||||
27
nix/user/git.nix
Normal file
27
nix/user/git.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
aliases = {
|
||||
st = "status";
|
||||
ci = "commit";
|
||||
co = "checkout";
|
||||
br = "branch";
|
||||
pl = "pull";
|
||||
ps = "push";
|
||||
mno =" merge --no-ff";
|
||||
lg = "log --color --graph --pretty=format:'%cred%h%creset -%c(yellow)%d%creset %s %cgreen(%cr)%c(bold blue)<%an>%creset' --abbrev-commit";
|
||||
};
|
||||
|
||||
difftastic.enable = true;
|
||||
|
||||
extraConfig = {
|
||||
core = {
|
||||
editor = "nvim";
|
||||
};
|
||||
push.default = "matching";
|
||||
};
|
||||
};
|
||||
}
|
||||
50
nix/user/nvim.nix
Normal file
50
nix/user/nvim.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
|
||||
defaultEditor = true;
|
||||
vimAlias = true;
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-commentary
|
||||
vim-repeat
|
||||
vim-surround
|
||||
targets-vim
|
||||
delimitMate
|
||||
vim-startify
|
||||
vim-windowswap
|
||||
vim-nix
|
||||
plenary-nvim
|
||||
telescope-nvim
|
||||
telescope-fzf-native-nvim
|
||||
yanky-nvim
|
||||
lualine-nvim
|
||||
undotree
|
||||
vim-vsnip
|
||||
nvim-cmp
|
||||
cmp-vsnip
|
||||
cmp-buffer
|
||||
cmp-path
|
||||
cmp-cmdline
|
||||
cmp-nvim-lsp
|
||||
cmp_yanky
|
||||
cmp-git
|
||||
nvim-lspconfig
|
||||
lspkind-nvim
|
||||
(nvim-treesitter.withPlugins (p: [ p.awk p.bash p.c p.c_sharp p.cpp p.css p.diff p.dockerfile p.doxygen p.git_config p.gitcommit p.go p.gomod p.gosum p.gotmpl p.helm p.haskell p.html p.http p.java p.javascript p.json p.latex p.lua p.markdown p.markdown_inline p.matlab p.nix p.printf p.python p.regex p.rust p.sql p.strace p.supercollider p.svelte p.swift p.terraform p.tmux p.toml p.typescript p.vim p.xml p.yaml p.zig ]))
|
||||
];
|
||||
|
||||
# extraConfig = ''
|
||||
# set t_vb=
|
||||
# '';
|
||||
|
||||
extraLuaConfig = builtins.concatStringsSep "\n" [
|
||||
(lib.strings.fileContents ../../nvim/base.lua)
|
||||
(lib.strings.fileContents ../../nvim/keymaps.lua)
|
||||
(lib.strings.fileContents ../../nvim/plugins.lua)
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
13
nix/user/profiles/moustachioedBook.nix
Normal file
13
nix/user/profiles/moustachioedBook.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.username = "moustachioed";
|
||||
home.homeDirectory = "/Users/moustachioed";
|
||||
|
||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||
|
||||
programs.git = {
|
||||
userName = "Martin";
|
||||
userEmail = "git@pander-on.de";
|
||||
};
|
||||
}
|
||||
13
nix/user/profiles/work.nix
Normal file
13
nix/user/profiles/work.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.username = "moustachioed";
|
||||
home.homeDirectory = "/Users/moustachioed";
|
||||
|
||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||
|
||||
programs.git = {
|
||||
userName = "Martin Pander";
|
||||
userEmail = "martin.pander@knowtion.de";
|
||||
};
|
||||
}
|
||||
74
nix/user/sh.nix
Normal file
74
nix/user/sh.nix
Normal file
@ -0,0 +1,74 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
history.size = 500000;
|
||||
#history.path = "${config.xdg.dataHome}/zsh/history";
|
||||
prezto = {
|
||||
enable = true;
|
||||
caseSensitive = true;
|
||||
color = true;
|
||||
editor = {
|
||||
dotExpansion = true;
|
||||
keymap = "vi";
|
||||
};
|
||||
pmodules = [
|
||||
"environment"
|
||||
"terminal"
|
||||
"editor"
|
||||
"history"
|
||||
"directory"
|
||||
"spectrum"
|
||||
"utility"
|
||||
"completion"
|
||||
"syntax-highlighting"
|
||||
"history-substring-search"
|
||||
"prompt"
|
||||
"git"
|
||||
];
|
||||
prompt.theme = "minimal";
|
||||
syntaxHighlighting.highlighters = [
|
||||
"main"
|
||||
"brackets"
|
||||
"pattern"
|
||||
"line"
|
||||
"cursor"
|
||||
"root"
|
||||
];
|
||||
tmux = {
|
||||
autoStartLocal = true;
|
||||
itermIntegration = true;
|
||||
};
|
||||
};
|
||||
|
||||
initExtra = ''
|
||||
HISTCONTROL='erasedups:ignoreboth'
|
||||
HISTIGNORE='&:[ ]*:exit:ls:bg:fg:history:clear'
|
||||
unsetopt beep
|
||||
'';
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
programs.lsd = {
|
||||
enable = true;
|
||||
enableAliases = true;
|
||||
};
|
||||
|
||||
programs.bat.enable = true;
|
||||
programs.ripgrep.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
fd
|
||||
du-dust
|
||||
#nerdfonts
|
||||
];
|
||||
}
|
||||
16
nix/user/task.nix
Normal file
16
nix/user/task.nix
Normal file
@ -0,0 +1,16 @@
|
||||
{config, pkgs, ...}:
|
||||
|
||||
{
|
||||
programs.taskwarrior = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
taskwarrior-tui
|
||||
];
|
||||
|
||||
home.shellAliases = {
|
||||
t = "task";
|
||||
tt = "taskwarrior-tui";
|
||||
};
|
||||
}
|
||||
59
nix/user/tmux.nix
Normal file
59
nix/user/tmux.nix
Normal file
@ -0,0 +1,59 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
shortcut = "a";
|
||||
mouse = true;
|
||||
keyMode = "vi";
|
||||
escapeTime = 0;
|
||||
extraConfig = ''
|
||||
set -g default-terminal "screen-256color"
|
||||
set -g display-time 1500
|
||||
|
||||
unbind S
|
||||
bind S command-prompt "switch -t %1"
|
||||
|
||||
bind-key -n M-K switch-client -p
|
||||
bind-key -n M-J switch-client -n
|
||||
|
||||
bind-key -n M-L next-window
|
||||
bind-key -n M-H previous-window
|
||||
|
||||
bind '"' split-window -c "#{pane_current_path}"
|
||||
bind % split-window -h -c "#{pane_current_path}"
|
||||
bind c new-window -a -c "#{pane_current_path}"
|
||||
|
||||
#######################################
|
||||
# status line
|
||||
#######################################
|
||||
set -g status-justify centre
|
||||
|
||||
set -g status-left "#[bg=#808080,fg=#ffffff,bold] #S #[default]#[bg=#BCBCBC] #{-30:pane_title} "
|
||||
set -g status-left-length 40
|
||||
|
||||
set -g status-right "#[bg=#BCBCBC] %H:%M #[bg=#808080,fg=#ffffff] %d.%m.%y "
|
||||
|
||||
# setw -g window-status-format " #W#F "
|
||||
# setw -g window-status-current-format " #W#F "
|
||||
setw -g window-status-format " #W "
|
||||
setw -g window-status-current-format " #W "
|
||||
setw -g window-status-separator ""
|
||||
|
||||
#######################################
|
||||
# colors, taken from vim-lucius
|
||||
#######################################
|
||||
set -g status-style "bg=#DADADA,fg=#000000"
|
||||
|
||||
setw -g window-status-style "bg=#BCBCBC,fg=#000000"
|
||||
setw -g window-status-current-style "bg=#808080,fg=#ffffff"
|
||||
|
||||
setw -g window-status-activity-style "bg=#AFD7AF,fg=#000000"
|
||||
setw -g window-status-bell-style "bg=#AFD7AF,fg=#000000"
|
||||
#setw -g window-status-content-style "bg=#AFD7AF,fg=#000000"
|
||||
|
||||
set -g pane-active-border-style "bg=#eeeeee,fg=#006699"
|
||||
set -g pane-border-style "bg=#eeeeee,fg=#999999"
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user