Init
This commit is contained in:
29
hosts/cyper-mac/configuration.nix
Normal file
29
hosts/cyper-mac/configuration.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
pkgs,
|
||||
primaryUser,
|
||||
...
|
||||
}:
|
||||
{
|
||||
networking.hostName = "cyper-mac";
|
||||
|
||||
# host-specific homebrew casks
|
||||
#homebrew.casks = [
|
||||
# "slack"
|
||||
#];
|
||||
|
||||
# host-specific home-manager configuration
|
||||
home-manager.users.${primaryUser} = {
|
||||
home.packages = with pkgs; [
|
||||
graphite-cli
|
||||
];
|
||||
|
||||
programs = {
|
||||
zsh = {
|
||||
initContent = ''
|
||||
# Source shell functions
|
||||
source ${./shell-functions.sh}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
13
hosts/cyper-mac/shell-functions.sh
Normal file
13
hosts/cyper-mac/shell-functions.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
# convenient shell functions
|
||||
|
||||
# quick navigation to git repo root
|
||||
function cdroot() {
|
||||
local root
|
||||
root=$(git rev-parse --show-toplevel 2>/dev/null)
|
||||
if [ $? -eq 0 ]; then
|
||||
cd "$root"
|
||||
else
|
||||
echo "Not in a git repository"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user