nix everywhere! (or at least my laptop)

pruned Brewfile to match... more to do still
This commit is contained in:
James Walker 2020-11-23 22:09:23 -05:00
parent bc57bf0a0b
commit ccc8e9de6d
Signed by: walkah
GPG Key ID: 3C127179D6086E93
3 changed files with 121 additions and 77 deletions

42
darwin/configuration.nix Normal file
View File

@ -0,0 +1,42 @@
{ config, pkgs, ... }:
{
imports = [ <home-manager/nix-darwin> ];
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [ ];
# Use a custom configuration.nix location.
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
nix.package = pkgs.nix;
# Create /etc/bashrc that loads the nix-darwin environment.
programs.zsh.enable = true; # default shell on catalina
# programs.fish.enable = true;
users.users.walkah = {
home = "/Users/walkah";
shell = pkgs.zsh;
};
home-manager.users.walkah = import ../home.nix;
services.lorri.enable = true;
system = {
defaults = {
dock = {
autohide = true;
orientation = "left";
};
};
};
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
}

View File

@ -5,18 +5,25 @@
# Home Manager needs a bit of information about you and the # Home Manager needs a bit of information about you and the
# paths it should manage. # paths it should manage.
home.username = builtins.getEnv "USER"; # home.username = builtins.getEnv "USER";
home.homeDirectory = builtins.getEnv "HOME"; # home.homeDirectory = builtins.getEnv "HOME";
xdg.configFile."starship.toml".source = ./home/.config/starship.toml; home.sessionPath = [
"$HOME/.local/bin"
"$HOME/.emacs.d/bin"
];
home.packages = with pkgs; [ home.packages = with pkgs; [
cmake cmake
direnv direnv
docker docker
docker-compose docker-compose
fd
git git
gitAndTools.gh
htop htop
jq
mr
pinentry pinentry
ripgrep ripgrep
sqlite sqlite
@ -32,11 +39,15 @@
enable = true; enable = true;
enableAutosuggestions = true; enableAutosuggestions = true;
enableCompletion = true; enableCompletion = true;
initExtra = ''
unset RPS1
'';
oh-my-zsh = { oh-my-zsh = {
enable = true; enable = true;
plugins = [ plugins = [
"direnv" "direnv"
"docker" "docker"
"docker-compose"
"git" "git"
"ssh-agent" "ssh-agent"
"tmux" "tmux"
@ -46,12 +57,46 @@
EDITOR = "vim"; EDITOR = "vim";
}; };
}; };
starship.enable = true;
starship = {
enable = true;
enableZshIntegration = true;
settings = {
character = {
success_symbol = "[»](bold green) ";
error_symbol = "[](bold red) ";
};
directory = {
fish_style_pwd_dir_length = 1;
truncation_length = 1;
};
hostname = {
ssh_only = false;
format = "[$hostname]($style):";
};
kubernetes = {
disabled = false;
};
username = {
format = "[$user]($style)@";
};
};
};
git = { git = {
enable = true; enable = true;
userName = "James Walker"; userName = "James Walker";
userEmail = "walkah@walkah.net"; userEmail = "walkah@walkah.net";
aliases = {
lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit ";
st = "status -s";
};
extraConfig = {
pull.rebase = true;
};
signing = { signing = {
key = "8896FEC44D47A81C"; key = "8896FEC44D47A81C";
signByDefault = true; signByDefault = true;
@ -68,6 +113,9 @@
tmux = { tmux = {
enable = true; enable = true;
extraConfig = '' extraConfig = ''
set -g set-titles on
set -g set-titles-string "[#S] #W@#h (#I)"
set -g status-bg black set -g status-bg black
set -g status-fg white set -g status-fg white
''; '';
@ -81,17 +129,23 @@
}; };
}; };
services = { services =
lorri.enable = true; if (pkgs.stdenv.isLinux) then
gpg-agent = { {
enable = true; lorri.enable = true;
enableSshSupport = true; syncthing.enable = true;
extraConfig = '' gpg-agent = {
allow-emacs-pinentry enable = true;
allow-loopback-pinentry enableSshSupport = true;
''; extraConfig = ''
}; allow-emacs-pinentry
}; allow-loopback-pinentry
'';
};
}
else
{};
# This value determines the Home Manager release that your # This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage # configuration is compatible with. This helps avoid breakage

View File

@ -1,99 +1,47 @@
# ~/.Brewfile # ~/.Brewfile
cask_args appdir: '/Applications'
# taps # taps
tap 'homebrew/cask-drivers' tap 'homebrew/cask-drivers'
tap 'homebrew/cask-fonts' tap 'homebrew/cask-fonts'
tap 'homebrew/cask-versions' tap 'd12frosted/emacs-plus'
tap 'heroku/brew'
# brews # brews
brew 'asdf' brew 'emacs-plus'
brew 'autoconf'
brew 'autojump'
brew 'automake'
brew 'awscli'
brew 'cmake'
brew 'coreutils'
brew 'dnsmasq'
brew 'exercism'
brew 'fd'
brew 'gcc'
brew 'git'
brew 'gsl'
brew 'heroku'
brew 'htop'
brew 'just'
brew 'kubernetes-cli'
brew 'libtool'
brew 'libvterm'
brew 'libxslt'
brew 'libyaml'
brew 'mackup'
brew 'mas' brew 'mas'
brew 'mr'
brew 'mtr'
brew 'openssl'
brew 'pcre'
brew 'postgresql'
brew 'pwgen'
brew 'readline'
brew 'reattach-to-user-namespace'
brew 'ssh-copy-id'
brew 'starship'
brew 'stack'
brew 'tmux'
brew 'wget'
brew 'zlib'
brew 'zsh-autosuggestions'
# casks # casks
cask '1password' cask '1password'
cask 'adoptopenjdk8'
cask 'alfred' cask 'alfred'
cask 'android-studio'
cask 'brave-browser' cask 'brave-browser'
cask 'dash' cask 'dash'
cask 'discord'
cask 'docker' cask 'docker'
cask 'dropbox'
cask 'fantastical' cask 'fantastical'
cask 'figma' cask 'figma'
cask 'firefox' cask 'firefox'
cask 'font-hack'
cask 'font-hack-nerd-font' cask 'font-hack-nerd-font'
cask 'google-chrome' cask 'google-chrome'
cask 'google-cloud-sdk'
cask 'gpg-suite'
cask 'hazel' cask 'hazel'
cask 'iterm2' cask 'iterm2'
cask 'keybase' cask 'keybase'
cask 'microsoft-office' cask 'microsoft-edge'
cask 'ngrok'
cask 'postman'
cask 'rescuetime'
cask 'rocket'
cask 'sequel-pro'
cask 'sketch'
cask 'slack' cask 'slack'
cask 'sonos' cask 'sonos'
cask 'spotify' cask 'spotify'
cask 'stats' cask 'stats'
cask 'syncthing'
cask 'synology-drive' cask 'synology-drive'
cask 'vagrant'
cask 'virtualbox'
cask 'virtualbox-extension-pack'
cask 'viscosity'
cask 'visual-studio-code' cask 'visual-studio-code'
cask 'zoomus' cask 'zoomus'
# mac app store # mac app store
mas 'Bumpr', id: 1166066070 mas 'Bumpr', id: 1166066070
mas 'Cyberduck', id: 409222199
mas 'Day One', id: 1055511498 mas 'Day One', id: 1055511498
mas 'Drafts', id: 1435957248 mas 'Drafts', id: 1435957248
mas 'Keynote', id: 409183694
mas 'Magnet', id: 441258766 mas 'Magnet', id: 441258766
mas 'Notability', id: 736189492
mas 'Pages', id: 409201541
mas 'Parcel', id: 639968404 mas 'Parcel', id: 639968404
mas 'Pocket', id: 568494494
mas 'Reeder', id: 1529448980 mas 'Reeder', id: 1529448980
mas 'Todoist', id: 585829637 mas 'Todoist', id: 585829637
mas 'Tweetbot', id: 1384080005
mas 'UlyssesMac', id: 1225570693 mas 'UlyssesMac', id: 1225570693
mas 'Xcode', id: 497799835 mas 'Xcode', id: 497799835