mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
Compare commits
3 commits
9cfae041ae
...
a040e3b5c3
Author | SHA1 | Date | |
---|---|---|---|
|
a040e3b5c3 | ||
|
f9c86ee14d | ||
|
36c7aa8e26 |
3 changed files with 174 additions and 1 deletions
161
nix/darwin-configuration.nix
Normal file
161
nix/darwin-configuration.nix
Normal file
|
@ -0,0 +1,161 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
networking = {
|
||||
hostName = "alymac";
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search by name, run:
|
||||
# $ nix-env -qaP | grep wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
bat
|
||||
bitwarden-cli
|
||||
crystal
|
||||
delta
|
||||
deno
|
||||
exa
|
||||
ffmpeg
|
||||
fzf
|
||||
git
|
||||
gnupg
|
||||
go
|
||||
jq
|
||||
mosh
|
||||
neovim
|
||||
nodePackages.pnpm
|
||||
nodePackages.prettier
|
||||
nodePackages.yarn
|
||||
nodejs-19_x
|
||||
openssl
|
||||
pcre
|
||||
pkg-config
|
||||
rectangle
|
||||
ripgrep
|
||||
ruby_3_1
|
||||
tailscale
|
||||
shards
|
||||
slack
|
||||
slack-term
|
||||
vim
|
||||
wget
|
||||
zig
|
||||
];
|
||||
|
||||
homebrew = {
|
||||
enable = true;
|
||||
onActivation.cleanup = "zap";
|
||||
|
||||
taps = [
|
||||
"homebrew/cask"
|
||||
"drud/ddev"
|
||||
];
|
||||
|
||||
brews = [
|
||||
"composer"
|
||||
"ddev"
|
||||
"sdl2"
|
||||
"pkg-config"
|
||||
];
|
||||
|
||||
casks = [
|
||||
"alt-tab"
|
||||
"amethyst"
|
||||
"discord"
|
||||
"docker"
|
||||
"fig"
|
||||
"firefox"
|
||||
"google-chrome"
|
||||
"iterm2"
|
||||
"nss"
|
||||
"obs"
|
||||
"raycast"
|
||||
"sequel-ace"
|
||||
"shortcat"
|
||||
"shottr"
|
||||
"spotify"
|
||||
"thunderbird"
|
||||
"visual-studio-code"
|
||||
];
|
||||
};
|
||||
|
||||
# Auto upgrade nix package and the daemon service.
|
||||
services.nix-daemon.enable = true;
|
||||
|
||||
# Configuration for nix itself.
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
options = "--delete-older-than 8d";
|
||||
};
|
||||
};
|
||||
|
||||
# Create /etc/zshrc that loads the nix-darwin environment.
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
promptInit = "
|
||||
source ~/.dotfiles/zsh/zshrc
|
||||
";
|
||||
};
|
||||
|
||||
# Used for backwards compatibility, please read the changelog before changing.
|
||||
# $ darwin-rebuild changelog
|
||||
system.stateVersion = 4;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
||||
|
||||
|
||||
# services.yabai = {
|
||||
# enable = true;
|
||||
# enableScriptingAddition = true;
|
||||
# config = {
|
||||
# layout = "bsp";
|
||||
# window_placement = "first_child";
|
||||
# auto_balance = "on";
|
||||
#
|
||||
# focus_follows_mouse = "autoraise";
|
||||
#
|
||||
# window_topmost = "on";
|
||||
#
|
||||
# window_opacity = "on";
|
||||
# active_window_opacity = "1.0";
|
||||
# normal_window_opacity = "0.9";
|
||||
# };
|
||||
#
|
||||
# extraConfig = "
|
||||
# yabai -m signal --add event=dock_did_restart action=\"sudo yabai --load-sa\"
|
||||
# sudo yabai --load-sa
|
||||
# ";
|
||||
# };
|
||||
#
|
||||
# services.skhd = {
|
||||
# enable = true;
|
||||
# skhdConfig = "
|
||||
# # Toggle split
|
||||
# shift + cmd - enter : /run/current-system/sw/bin/yabai -m window --toggle split
|
||||
#
|
||||
# # Focus window
|
||||
# ctrl + cmd - up : /run/current-system/sw/bin/yabai -m window --focus north
|
||||
# ctrl + cmd - right : /run/current-system/sw/bin/yabai -m window --focus east
|
||||
# ctrl + cmd - down : /run/current-system/sw/bin/yabai -m window --focus south
|
||||
# ctrl + cmd - left : /run/current-system/sw/bin/yabai -m window --focus west
|
||||
#
|
||||
# # Move windows
|
||||
# shift + cmd - left : /run/current-system/sw/bin/yabai -m window --warp west
|
||||
# shift + cmd - right : /run/current-system/sw/bin/yabai -m window --warp east
|
||||
#
|
||||
# # Focus monitor
|
||||
# ctrl + alt - z : /run/current-system/sw/bin/yabai -m display --focus prev
|
||||
#
|
||||
# # Increase window size
|
||||
# shift + alt - a : /run/current-system/sw/bin/yabai -m window --resize left:-20:0
|
||||
# shift + alt - w : /run/current-system/sw/bin/yabai -m window --resize top:0:-20
|
||||
#
|
||||
# # Decrease window size
|
||||
# shift + cmd - s : /run/current-system/sw/bin/yabai -m window --resize bottom:0:-20
|
||||
# shift + cmd - w : /run/current-system/sw/bin/yabai -m window --resize top:0:20
|
||||
# ";
|
||||
# };
|
|
@ -29,7 +29,7 @@ let s:plug = funcref('dotfiles#plugman#register')
|
|||
call s:plug('xiyaowong/coc-nvim-lua')
|
||||
call s:plug('alaviss/nim.nvim')
|
||||
if has('unix')
|
||||
call s:plug('nvim-neorg/neorg', { 'branch': 'unstable' }) " dependencies {{{
|
||||
call s:plug('nvim-neorg/neorg') " dependencies {{{
|
||||
call s:plug('nvim-treesitter/nvim-treesitter', { 'do': ':TSUpdate' })
|
||||
" }}}
|
||||
endif
|
||||
|
|
|
@ -1,6 +1,18 @@
|
|||
local ok, parser_configs = pcall(require, 'nvim-treesitter.parsers')
|
||||
if not ok then return end
|
||||
|
||||
-- Should only really run on my Macbook, as it is my only macOS device.
|
||||
-- Apple's C compilers seem to not want to compile any of Treesitter's
|
||||
-- dialects.
|
||||
-- That is, `cc`, `gcc`, `g++`, andsoforth. Funnily enough, they are all
|
||||
-- aliases to the same program.
|
||||
-- So, the nix-darwin configuration specifies the installation of zig as a
|
||||
-- replacement compiler solely so the Treesitter dialects compile. Very
|
||||
-- intuitive.
|
||||
if vim.loop.os_uname().sysname == 'Darwin' then
|
||||
require('nvim-treesitter.install').compilers = { "zig" }
|
||||
end
|
||||
|
||||
local parser_configs = parser_configs.get_parser_configs()
|
||||
|
||||
parser_configs.norg = {
|
||||
|
|
Loading…
Reference in a new issue