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
# paths it should manage.
home.username = builtins.getEnv "USER";
home.homeDirectory = builtins.getEnv "HOME";
# home.username = builtins.getEnv "USER";
# 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; [
cmake
direnv
docker
docker-compose
fd
git
gitAndTools.gh
htop
jq
mr
pinentry
ripgrep
sqlite
@ -32,11 +39,15 @@
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
initExtra = ''
unset RPS1
'';
oh-my-zsh = {
enable = true;
plugins = [
"direnv"
"docker"
"docker-compose"
"git"
"ssh-agent"
"tmux"
@ -46,12 +57,46 @@
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 = {
enable = true;
userName = "James Walker";
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 = {
key = "8896FEC44D47A81C";
signByDefault = true;
@ -68,6 +113,9 @@
tmux = {
enable = true;
extraConfig = ''
set -g set-titles on
set -g set-titles-string "[#S] #W@#h (#I)"
set -g status-bg black
set -g status-fg white
'';
@ -81,17 +129,23 @@
};
};
services = {
lorri.enable = true;
gpg-agent = {
enable = true;
enableSshSupport = true;
extraConfig = ''
allow-emacs-pinentry
allow-loopback-pinentry
'';
};
};
services =
if (pkgs.stdenv.isLinux) then
{
lorri.enable = true;
syncthing.enable = true;
gpg-agent = {
enable = true;
enableSshSupport = true;
extraConfig = ''
allow-emacs-pinentry
allow-loopback-pinentry
'';
};
}
else
{};
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage

View File

@ -1,99 +1,47 @@
# ~/.Brewfile
cask_args appdir: '/Applications'
# taps
tap 'homebrew/cask-drivers'
tap 'homebrew/cask-fonts'
tap 'homebrew/cask-versions'
tap 'heroku/brew'
tap 'd12frosted/emacs-plus'
# brews
brew 'asdf'
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 'emacs-plus'
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
cask '1password'
cask 'adoptopenjdk8'
cask 'alfred'
cask 'android-studio'
cask 'brave-browser'
cask 'dash'
cask 'discord'
cask 'docker'
cask 'dropbox'
cask 'fantastical'
cask 'figma'
cask 'firefox'
cask 'font-hack'
cask 'font-hack-nerd-font'
cask 'google-chrome'
cask 'google-cloud-sdk'
cask 'gpg-suite'
cask 'hazel'
cask 'iterm2'
cask 'keybase'
cask 'microsoft-office'
cask 'ngrok'
cask 'postman'
cask 'rescuetime'
cask 'rocket'
cask 'sequel-pro'
cask 'sketch'
cask 'microsoft-edge'
cask 'slack'
cask 'sonos'
cask 'spotify'
cask 'stats'
cask 'syncthing'
cask 'synology-drive'
cask 'vagrant'
cask 'virtualbox'
cask 'virtualbox-extension-pack'
cask 'viscosity'
cask 'visual-studio-code'
cask 'zoomus'
# mac app store
mas 'Bumpr', id: 1166066070
mas 'Cyberduck', id: 409222199
mas 'Day One', id: 1055511498
mas 'Drafts', id: 1435957248
mas 'Keynote', id: 409183694
mas 'Magnet', id: 441258766
mas 'Notability', id: 736189492
mas 'Pages', id: 409201541
mas 'Parcel', id: 639968404
mas 'Pocket', id: 568494494
mas 'Reeder', id: 1529448980
mas 'Todoist', id: 585829637
mas 'Tweetbot', id: 1384080005
mas 'UlyssesMac', id: 1225570693
mas 'Xcode', id: 497799835