add icecube and git config
This commit is contained in:
parent
e767060559
commit
8a9b1f2529
8 changed files with 70 additions and 30 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
||||||
.direnv
|
.direnv
|
||||||
|
result/
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,9 @@
|
||||||
ori = mkHomeConfiguration (import ./hosts/ori/home.nix) {
|
ori = mkHomeConfiguration (import ./hosts/ori/home.nix) {
|
||||||
extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = { inherit inputs; };
|
||||||
};
|
};
|
||||||
|
icecube = mkHomeConfiguration (import ./hosts/icecube/home.nix) {
|
||||||
|
extraSpecialArgs = { inherit inputs; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit home-manager;
|
inherit home-manager;
|
||||||
|
|
|
||||||
12
hosts/icecube/home.nix
Normal file
12
hosts/icecube/home.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
home.stateVersion = "24.05";
|
||||||
|
home.username = "jonathan";
|
||||||
|
home.homeDirectory = "/home/jonathan";
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
../../programs/nvim
|
||||||
|
../../programs/zsh
|
||||||
|
../../programs/tmux
|
||||||
|
../../programs/git
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -9,16 +9,17 @@
|
||||||
../../programs/kanata
|
../../programs/kanata
|
||||||
../../programs/kitty
|
../../programs/kitty
|
||||||
../../programs/tmux
|
../../programs/tmux
|
||||||
|
../../programs/git
|
||||||
];
|
];
|
||||||
|
|
||||||
# use the system-installed version of kitty on arch
|
# use the system-installed version of kitty on arch
|
||||||
# something graphics related crashes otherwise
|
# something graphics related crashes otherwise
|
||||||
programs.kitty.package = pkgs.stdenv.mkDerivation {
|
programs.kitty.package = pkgs.stdenv.mkDerivation {
|
||||||
name = "kitty";
|
name = "kitty";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
echo "#!/usr/bin/env bash\nexec /usr/bin/kitty" > $out/bin/kitty;
|
echo "#!/usr/bin/env bash\nexec /usr/bin/kitty" > $out/bin/kitty;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,11 @@
|
||||||
home.stateVersion = "24.05";
|
home.stateVersion = "24.05";
|
||||||
home.username = "jonathan";
|
home.username = "jonathan";
|
||||||
home.homeDirectory = "/home/jonathan";
|
home.homeDirectory = "/home/jonathan";
|
||||||
imports = [
|
imports = [
|
||||||
../../programs/gnome
|
../../programs/gnome
|
||||||
../../programs/nvim
|
../../programs/nvim
|
||||||
../../programs/zsh
|
../../programs/zsh
|
||||||
|
../../programs/git
|
||||||
];
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
|
@ -41,20 +42,4 @@
|
||||||
programs.firefox = { enable = true; };
|
programs.firefox = { enable = true; };
|
||||||
|
|
||||||
services.syncthing = { enable = true; };
|
services.syncthing = { enable = true; };
|
||||||
|
|
||||||
programs.git = {
|
|
||||||
enable = true;
|
|
||||||
extraConfig = {
|
|
||||||
init.defaultBranch = "main";
|
|
||||||
pull.rebase = false;
|
|
||||||
# merge.tool = "meld";
|
|
||||||
# mergetool.meld.cmd = ''
|
|
||||||
# ${pkgs.meld}/bin/meld "$LOCAL" "$BASE" "$REMOTE" --output "$MERGED"
|
|
||||||
# '';
|
|
||||||
push = { autoSetupRemote = true; };
|
|
||||||
};
|
|
||||||
aliases = { amend = "commit --amend"; };
|
|
||||||
userName = "Jonathan Dönszelmann";
|
|
||||||
userEmail = "jonathan@donsz.nl";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
25
programs/git/default.nix
Normal file
25
programs/git/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
_: {
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userEmail = "jonathan@donsz.nl";
|
||||||
|
userName = "Jonathan Dönszelmann";
|
||||||
|
signing.key = "~/.ssh/id_ed25519.pub";
|
||||||
|
signing.signByDefault = true;
|
||||||
|
|
||||||
|
delta.enable = true;
|
||||||
|
delta.options = {
|
||||||
|
navigate = true;
|
||||||
|
light = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = {
|
||||||
|
push.autoSetupRemote = true;
|
||||||
|
pull.rebase = true;
|
||||||
|
init.defaultBranch = "main";
|
||||||
|
gpg.format = "ssh";
|
||||||
|
diff.colorMoved = true;
|
||||||
|
rerere.enabled = true;
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -38,6 +38,11 @@ cmp.setup {
|
||||||
completion = cmp.config.window.bordered(),
|
completion = cmp.config.window.bordered(),
|
||||||
documentation = cmp.config.window.bordered(),
|
documentation = cmp.config.window.bordered(),
|
||||||
},
|
},
|
||||||
|
view = {
|
||||||
|
docs = {
|
||||||
|
auto_open = false
|
||||||
|
}
|
||||||
|
},
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
|
@ -45,6 +50,14 @@ cmp.setup {
|
||||||
['<C-e>'] = cmp.mapping.abort(),
|
['<C-e>'] = cmp.mapping.abort(),
|
||||||
-- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
-- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||||
|
|
||||||
|
['<C-g>'] = function()
|
||||||
|
if cmp.visible_docs() then
|
||||||
|
cmp.close_docs()
|
||||||
|
else
|
||||||
|
cmp.open_docs()
|
||||||
|
end
|
||||||
|
end
|
||||||
}),
|
}),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ let
|
||||||
"add" = "${pkgs.git}/bin/git add";
|
"add" = "${pkgs.git}/bin/git add";
|
||||||
"patch" = "${pkgs.git}/bin/git add -p";
|
"patch" = "${pkgs.git}/bin/git add -p";
|
||||||
"amend" = "${pkgs.git}/bin/git commit --amend";
|
"amend" = "${pkgs.git}/bin/git commit --amend";
|
||||||
"log" = "${pkgs.git}/bin/git log --graph --oneline --format=format:'%C(auto)%h %s%d %C(green)%cr %C(bold blue)<%an>%C(auto)'";
|
"log" = "${pkgs.git}/bin/git log --all --graph --decorate";
|
||||||
};
|
};
|
||||||
# extracting any compressed format
|
# extracting any compressed format
|
||||||
extract = ''
|
extract = ''
|
||||||
|
|
@ -54,12 +54,12 @@ in
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
syntaxHighlighting.enable = true;
|
syntaxHighlighting.enable = true;
|
||||||
completionInit = ''
|
completionInit = ''
|
||||||
autoload -Uz compinit
|
autoload -Uz compinit
|
||||||
if [[ -n ''${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then
|
if [[ -n ''${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then
|
||||||
compinit;
|
compinit;
|
||||||
else
|
else
|
||||||
compinit -C;
|
compinit -C;
|
||||||
fi;
|
fi;
|
||||||
'';
|
'';
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
source "${pkgs.grml-zsh-config}/etc/zsh/zshrc"
|
source "${pkgs.grml-zsh-config}/etc/zsh/zshrc"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue