From 0fb3e72df209e68f0f8a193a2da138ee9be85b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Wed, 29 Jul 2020 08:16:28 +0100 Subject: [PATCH] port new home manager config to work laptop --- nixos/git/default.nix | 28 +++++----------------------- nixos/git/home.nix | 24 ++++++++++++++++++++++++ nixos/home-other-os.nix | 3 ++- 3 files changed, 31 insertions(+), 24 deletions(-) create mode 100644 nixos/git/home.nix diff --git a/nixos/git/default.nix b/nixos/git/default.nix index ca7591ad..2c4065d1 100644 --- a/nixos/git/default.nix +++ b/nixos/git/default.nix @@ -1,26 +1,8 @@ { config, pkgs, lib, ... }: { home-manager.users.cyryl = {...}: { - programs.git = { - enable = true; - lfs.enable = true; - userName = "Cyryl PÅ‚otnicki"; - userEmail = "cyplo@cyplo.net"; - extraConfig = { - credential = { helper ="cache"; }; - core = { pager = "cat"; }; - pager = { - diff = "${pkgs.gitAndTools.diff-so-fancy}/bin/diff-so-fancy | less --tabs=1,5 -RFX"; - show = "${pkgs.gitAndTools.diff-so-fancy}/bin/diff-so-fancy | less --tabs=1,5 -RFX"; - }; - }; - aliases = - { - tree = "log --show-signature --color --decorate --date=short --all --graph -n 3"; - newbranch = "!git checkout master && git fetch -p && git reset --hard origin/master && git checkout -b $2"; - head = "log HEAD -n1"; - vacuum = "!git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs -r git branch -D && git gc --aggressive --auto"; - }; - }; - }; - } + imports = [ + ./home.nix + ]; + }; +} diff --git a/nixos/git/home.nix b/nixos/git/home.nix new file mode 100644 index 00000000..0052aa90 --- /dev/null +++ b/nixos/git/home.nix @@ -0,0 +1,24 @@ +{ config, pkgs, ... }: +{ + programs.git = { + enable = true; + lfs.enable = true; + userName = "Cyryl PÅ‚otnicki"; + userEmail = "cyplo@cyplo.net"; + extraConfig = { + credential = { helper ="cache"; }; + core = { pager = "cat"; }; + pager = { + diff = "${pkgs.gitAndTools.diff-so-fancy}/bin/diff-so-fancy | less --tabs=1,5 -RFX"; + show = "${pkgs.gitAndTools.diff-so-fancy}/bin/diff-so-fancy | less --tabs=1,5 -RFX"; + }; + }; + aliases = + { + tree = "log --show-signature --color --decorate --date=short --all --graph -n 3"; + newbranch = "!git checkout master && git fetch -p && git reset --hard origin/master && git checkout -b $2"; + head = "log HEAD -n1"; + vacuum = "!git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs -r git branch -D && git gc --aggressive --auto"; + }; + }; + } diff --git a/nixos/home-other-os.nix b/nixos/home-other-os.nix index f241a16a..ee91aa97 100644 --- a/nixos/home-other-os.nix +++ b/nixos/home-other-os.nix @@ -22,6 +22,7 @@ in home.file.".config/i3/status.toml".source = ~/dev/dotfiles/.config/i3/status-single-bat.toml; imports = [ - ./home-common.nix + ./home-manager/default.nix + ./git/home.nix ]; }