Skip to content

Commit

Permalink
small update
Browse files Browse the repository at this point in the history
  • Loading branch information
lccambiaghi committed Jan 3, 2023
1 parent 2df1ae1 commit fb5d067
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 27 deletions.
11 changes: 7 additions & 4 deletions darwin/brew.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{ ... }:
{ config, ... }:

let
user_name = "luca";

in
{
environment.shellInit = ''
eval "$(${config.homebrew.brewPrefix}/brew shellenv)"
'';

homebrew = {
enable = true;
# onActivation.autoUpdate = false;
onActivation.cleanup = "zap";
global.brewfile = true;
# TODO: newer brew for ARM uses "/opt/homebrew/bin"
brewPrefix = "/usr/local/bin";
# homebrew.global.noLock = true;

brews = [
Expand Down Expand Up @@ -54,6 +56,7 @@ in
"amethyst"
# "dash"
"docker"
"dozer"
# "microsoft-edge"
# "emacs-app-good"
"firefox"
Expand Down Expand Up @@ -91,7 +94,7 @@ in
# "railwaycat/emacsmacport"
];
extraConfig = ''
brew "d12frosted/homebrew-emacs-plus/emacs-plus@28", args: ["with-xwidgets", "with-native-comp", "with-no-titlebar"]
brew "d12frosted/homebrew-emacs-plus/emacs-plus@29", args: ["with-xwidgets", "with-native-comp"]
'';
# cask_args appdir: "~/Applications", require_sha: true
};
Expand Down
5 changes: 3 additions & 2 deletions darwin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
};
extraInit = ''
# install homebrew
command -v brew > /dev/null || ${pkgs.bash}/bin/bash -c "$(${pkgs.curl}/bin/curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
command -v brew > /dev/null || ${pkgs.bash}/bin/bash -c "$(${pkgs.curl}/bin/curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
'';
# loginShell = pkgs.fish;
pathsToLink = [ "/Applications" ];
Expand All @@ -101,7 +101,8 @@
"$HOME/.npm-packages/bin"
"$HOME/.poetry/bin"
# "$HOME/.emacs.d/bin"
"$HOME/git/doom-emacs/bin"
# "$HOME/git/doom-emacs/bin"
"/opt/homebrew/bin"
];
variables = {
EDITOR = "emacsclient";
Expand Down
16 changes: 0 additions & 16 deletions darwin/preferences.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ let
in {

system.activationScripts.postActivation.text = ''
# Enable HiDPI display modes (requires restart)
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true
# Stop iTunes from responding to the keyboard media keys
launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2>/dev/null
Expand Down Expand Up @@ -50,11 +47,6 @@ in {
orientation = "left";
};

loginwindow = {
GuestEnabled = false;
DisableConsoleAccess = true;
};

screencapture.location = "${homeDir}/Desktop";

finder = {
Expand All @@ -63,17 +55,13 @@ in {
FXEnableExtensionChangeWarning = false;
};


LaunchServices.LSQuarantine = false;

trackpad = {
Clicking = true;
TrackpadThreeFingerDrag = true;
TrackpadRightClick = true;
};

NSGlobalDomain = {
# "com.apple.trackpad.scaling" = "3.0";
AppleFontSmoothing = 1;
ApplePressAndHoldEnabled = true;
AppleKeyboardUIMode = 3;
Expand All @@ -89,10 +77,6 @@ in {
NSAutomaticPeriodSubstitutionEnabled = false;
# auto hide menu bar on top
_HIHideMenuBar = false;
NSNavPanelExpandedStateForSaveMode = true;
NSNavPanelExpandedStateForSaveMode2 = true;
# Enable full keyboard access for all controls
# (e.g. enable Tab in modal dialogs)
};

alf = {
Expand Down
1 change: 1 addition & 0 deletions home/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ in
# roboto-mono
ripgrep # grep replacement written in Rust
# rsync
# rustup
# source-code-pro
# sqlite
# tree # Should be included in macOS but it's not
Expand Down
2 changes: 2 additions & 0 deletions home/dotfiles/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ exclude_end: "# End Exclude Linting"
(("default" . ((user-emacs-directory . "~/.emacs.default")))
("rational" . ((user-emacs-directory . "~/git/rational-emacs")
(env . (("RATIONAL_EMACS_HOME" . "~/git/rational-emacs")))))
("crafted" . ((user-emacs-directory . "~/git/crafted-emacs")
(env . (("CRAFTED_EMACS_HOME" . "~/git/crafted-emacs/personal")))))
)
'';
};
Expand Down
8 changes: 5 additions & 3 deletions home/dotfiles/ipython/profile_default/startup/2-pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
try:
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"
from IPython.terminal.interactiveshell import TerminalInteractiveShell
TerminalInteractiveShell.auto_match = True
print("ipython configured")
except:
print("ipython not configured")
print("error while configuring ipython")

try:
import pandas as pd
pd.set_option('display.max_rows', 999)
# pd.set_option('display.max_rows', 999)
pd.set_option('expand_frame_repr', False)
pd.set_option('display.max_columns', 500)
pd.set_option('display.max_columns', 100)
pd.set_option('display.float_format', '{:.2f}'.format)
print("pandas imported and configured")
except:
Expand Down
4 changes: 2 additions & 2 deletions home/programs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ Host *
# userKnownHostsFile = "${xdg.configHome}/ssh/known_hosts";
matchBlocks = {
"w3vm" = {
hostname = "34.77.133.239";
hostname = "35.187.84.239";
# port = 443;
user = "cambiaghi.luca";
# identityFile = "$HOME/.ssh/id_rsa.pub";
};
"prodw3vm" = {
hostname = "34.77.133.239";
hostname = "35.187.84.239";
user = "prod";
};
};
Expand Down

0 comments on commit fb5d067

Please sign in to comment.