mirror of https://github.com/wlcx/home.git
Add home manager standalone config for macos
Refactor pkgs into groups, reuse in both home manager and system configs Port across some more dotfiles stuff into home.nix
This commit is contained in:
parent
472be721da
commit
1f0f6e7973
41
home.nix
41
home.nix
|
@ -1,27 +1,52 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
let mypkgs = (import ./modules/pkgs.nix { inherit pkgs; });
|
||||||
home.stateVersion = "21.11";
|
in {
|
||||||
|
home.packages = mypkgs.all;
|
||||||
programs = {
|
programs = {
|
||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
git = {
|
git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = "Sam Willcocks";
|
userName = "Sam Willcocks";
|
||||||
userEmail = "sam@wlcx.cc";
|
userEmail = "sam@wlcx.cc";
|
||||||
|
|
||||||
|
delta = { # Better diffs
|
||||||
|
enable = true;
|
||||||
|
options = { line-numbers = true; };
|
||||||
|
};
|
||||||
|
|
||||||
aliases = {
|
aliases = {
|
||||||
st = "status";
|
|
||||||
co = "checkout";
|
|
||||||
d = "diff";
|
|
||||||
cim = "commit -m";
|
|
||||||
a = "add";
|
a = "add";
|
||||||
ap = "add -p";
|
ap = "add -p";
|
||||||
|
c = "commit";
|
||||||
|
can = "commit --amend --no-edit";
|
||||||
|
cm = "commit -m";
|
||||||
|
co = "checkout";
|
||||||
|
d = "diff";
|
||||||
|
dc = "diff --cached";
|
||||||
|
r = "rebase --autostash";
|
||||||
|
ri = "rebase --autostash --interactive";
|
||||||
|
st = "status";
|
||||||
|
|
||||||
|
gone = ''
|
||||||
|
! "git fetch -p && git for-each-ref --format '%(refname:short) %(upstream:track)' | a
|
||||||
|
│ wk '$2 == \"[gone]\" {print $1}' | xargs -r git branch -D"'';
|
||||||
|
};
|
||||||
|
extraConfig = {
|
||||||
|
branch.sort = "-committerdate";
|
||||||
|
log.showSignature = true;
|
||||||
|
push.default = "current";
|
||||||
|
include.path = "~/.gitconfig.local";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
fzf.enable = true;
|
fzf.enable = true;
|
||||||
zsh = {
|
zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shellAliases = { g = "git"; };
|
shellAliases = {
|
||||||
|
g = "git";
|
||||||
|
cat = "bat";
|
||||||
|
hmswitch = ''home-manager switch --flake ".#$(hostname -s)"'';
|
||||||
|
};
|
||||||
prezto = {
|
prezto = {
|
||||||
enable = true;
|
enable = true;
|
||||||
prompt.theme = "giddie";
|
prompt.theme = "giddie";
|
||||||
|
|
Loading…
Reference in New Issue