Created
July 30, 2023 15:52
-
-
Save punnie/1e881d8f8b181561e658a155c602bec0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
allowUnfree = true; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
{ | |
# List packages installed in system profile. To search by name, run: | |
# $ nix-env -qaP | grep wget | |
environment.systemPackages = with pkgs; [ | |
git | |
mas | |
unbound | |
vim | |
zsh | |
]; | |
environment.shells = with pkgs; [ zsh ]; | |
environment.variables = { | |
EDITOR = "vim"; | |
VISUAL = "vim"; | |
}; | |
networking = { | |
computerName = "carbon"; | |
hostName = "carbon"; | |
}; | |
users.users.pedro = { | |
home = "/Users/pedro"; | |
shell = pkgs.zsh; | |
}; | |
homebrew = { | |
enable = true; | |
onActivation = { | |
autoUpdate = false; | |
upgrade = false; | |
cleanup = "zap"; | |
}; | |
brews = []; | |
casks = [ | |
"blender" | |
"firefox" | |
"google-chrome" | |
"kitty" | |
"obsidian" | |
"spotify" | |
]; | |
taps = [ | |
"homebrew/bundle" | |
"homebrew/cask" | |
"homebrew/core" | |
]; | |
}; | |
launchd.daemons.unbound = { | |
serviceConfig.RunAtLoad = true; | |
serviceConfig.KeepAlive = true; | |
serviceConfig.StandardOutPath = "/tmp/launchd-unbound.log"; | |
serviceConfig.StandardErrorPath = "/tmp/launchd-unbound.error"; | |
serviceConfig.ProgramArguments = [ | |
"${pkgs.unbound}/bin/unbound" | |
"-d" | |
"-c" | |
"/etc/unbound/unbound.conf" | |
]; | |
}; | |
fonts.fontDir.enable = true; | |
fonts.fonts = with pkgs; [ | |
recursive | |
(nerdfonts.override { fonts = [ "JetBrainsMono" "FiraCode" "Hack" ]; }) | |
]; | |
nix = { | |
package = pkgs.nix; | |
gc = { | |
automatic = true; | |
interval.Day = 7; | |
options = "--delete-older-than 7d"; | |
}; | |
extraOptions = '' | |
auto-optimise-store = true | |
experimental-features = nix-command flakes | |
''; | |
}; | |
# Use a custom configuration.nix location. | |
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin.nix | |
environment.darwinConfig = "$HOME/.config/nixpkgs/darwin.nix"; | |
# Auto upgrade nix package and the daemon service. | |
services.nix-daemon.enable = true; | |
# nix.package = pkgs.nix; | |
# Create /etc/zshrc that loads the nix-darwin environment. | |
programs.zsh.enable = true; # default shell on catalina | |
# programs.fish.enable = true; | |
# Used for backwards compatibility, please read the changelog before changing. | |
# $ darwin-rebuild changelog | |
system.stateVersion = 4; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
{ | |
# Home Manager needs a bit of information about you and the | |
# paths it should manage. | |
home.username = "pedro"; | |
home.homeDirectory = "/Users/pedro"; | |
home.packages = with pkgs; [ | |
autojump | |
bat | |
bottom | |
btop | |
curl | |
ffmpeg | |
fzf | |
git | |
git-lfs | |
htop | |
imagemagick | |
jq | |
ncdu | |
neovim | |
qrencode | |
restic | |
ripgrep | |
tree | |
watch | |
wget | |
youtube-dl | |
]; | |
home.sessionVariables = { | |
EDITOR = "nvim"; | |
PAGER = "less -FirSwX"; | |
MANPAGER = "sh -c 'col -bx | ${pkgs.bat}/bin/bat -l man -p'"; | |
}; | |
programs = { | |
zsh = { | |
enable = true; | |
enableCompletion = true; | |
enableAutosuggestions = true; | |
enableSyntaxHighlighting = true; | |
history.size = 10000; | |
shellAliases = { | |
tailscale = "/Applications/Tailscale.app/Contents/MacOS/Tailscale"; | |
}; | |
oh-my-zsh = { | |
enable = true; | |
plugins = [ "git" ]; | |
theme = "gentoo"; | |
}; | |
}; | |
git = { | |
enable = true; | |
lfs.enable = true; | |
userName = "Pedro Coelho"; | |
userEmail = "[email protected]"; | |
ignores = ["*~" "*.swp"]; | |
aliases = { | |
prettylog = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(r) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"; | |
root = "rev-parse --show-toplevel"; | |
}; | |
extraConfig = { | |
branch.autosetuprebase = "always"; | |
color.ui = true; | |
github.user = "punnie"; | |
init.defaultBranch = "main"; | |
}; | |
}; | |
autojump = { | |
enable = true; | |
}; | |
}; | |
# This value determines the Home Manager release that your | |
# configuration is compatible with. This helps avoid breakage | |
# when a new Home Manager release introduces backwards | |
# incompatible changes. | |
# | |
# You can update Home Manager without changing this value. See | |
# the Home Manager release notes for a list of state version | |
# changes in each release. | |
home.stateVersion = "22.05"; | |
# Let Home Manager install and manage itself. | |
programs.home-manager.enable = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment