Skip to content

Commit

Permalink
Latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lccambiaghi committed Apr 6, 2021
1 parent 42e4939 commit cc950e1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 28 deletions.
8 changes: 6 additions & 2 deletions darwin/brew.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,12 @@ in
taps = [
"homebrew/cask"
"borkdude/brew"
# "homebrew/cask-fonts"
# "crescentrose/sunshine"
"railwaycat/emacsmacport"
];
extraConfig = ''
cask_args appdir: "~/Applications", require_sha: true
# brew "railwaycat/emacsmacport/emacs-mac", args: ["with-modules", "with-mac-metal" "with-no-title-bars"]
brew "railwaycat/emacsmacport/emacs-mac", args: ["with-modules", "with-mac-metal"]
'';
};
}
1 change: 1 addition & 0 deletions darwin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
# systemPackages = [ ];
systemPath = [
"/run/current-system/sw/bin/" # TODO how to avoid hardcoding?
"$HOME/.npm-packages/bin"
"$HOME/.poetry/bin"
# "$HOME/.emacs.d/bin"
"$HOME/git/doom-emacs/bin"
Expand Down
2 changes: 1 addition & 1 deletion home/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ in
# nyxt
pandoc
pinentry_mac # Necessary for GPG
# python37Packages.poetry
python37Packages.poetry
customPython
# pre-commit # Pre-commit CI hook tool
stable.procs
Expand Down
31 changes: 6 additions & 25 deletions home/shells/fish.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ let
kdl= "kubectl delete ";
kds= "kubectl describe ";
pj= "python $HOME/bin/pretty_json.py";
hms = "home-manager switch";
cljclr="mono $CLOJURE_LOAD_PATH/Clojure.Main.exe";

pipde = "poetry run pip install debugpy";
Expand All @@ -41,15 +40,15 @@ let
reload = "cd ~/git/nixpkgs && darwin-rebuild switch --flake . && cd -";

# Nix garbage collection
garbage = "nix-collect-garbage -d && docker image prune --all --force";
garbage = "sudo nix-collect-garbage -d && docker image prune --all --force";

# See which Nix packages are installed
installed = "nix-env --query --installed";

# emacs
emacs="/Applications/Emacs.app/Contents/MacOS/Emacs";
emacsclient="/Applications/Emacs.app/Contents/MacOS/bin/emacsclient";
em="emacsclient -n ";
# emacs="/Applications/Emacs.app/Contents/MacOS/Emacs";
# emacsclient="/Applications/Emacs.app/Contents/MacOS/bin/emacsclient";
em="emacsclient -a \"\" -n";
};
in {
# echo "$HOME/.nix-profile/bin/fish" | sudo tee -a /etc/shells
Expand All @@ -60,23 +59,12 @@ in {
shellInit = ''
direnv hook fish | source
direnv export fish | source
if test (date "+%H") -le 15 # TODO how to sync with Emacs?
set -x BAT_THEME 'ansi-light'
end
'';
loginShellInit = ''
if test -e /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
fenv source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
end
if test -e /nix/var/nix/profiles/default/etc/profile.d/nix.sh
fenv source /nix/var/nix/profiles/default/etc/profile.d/nix.sh
end
# automatically change kitty colors based on time of day
if test -n "$KITTY_WINDOW_ID"
if test (date "+%H") -le 15 # TODO how to sync with Emacs?
# TODO "defaults read -g AppleInterfaceStyle" is better
if test (date "+%H") -le 18
lightk
else
darkk
Expand All @@ -94,13 +82,6 @@ in {
# erase with set --erase --universal fish_user_paths if you screw up
# fish_user_paths /usr/local/bin $fish_user_paths
# switch (sunshine -s "@55 12")
# case 'day'
# lightk
# case 'night'
# darkk
# end
'';

functions = {
Expand Down

0 comments on commit cc950e1

Please sign in to comment.