Skip to content

Commit

Permalink
ops: push changes to fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
romelBen committed Jul 21, 2024
1 parent 47dad02 commit 3befbbe
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 6 deletions.
35 changes: 35 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.POSIX:
.PHONY: default build update

default: build

/nix:
curl -L https://nixos.org/nix/install | sh
# TODO https://github.com/LnL7/nix-darwin/issues/149
sudo rm /etc/nix/nix.conf

/run/current-system/sw/bin/darwin-rebuild:
/nix/var/nix/profiles/default/bin/nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
yes | ./result/bin/darwin-installer

/opt/homebrew/bin/brew:
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh -o /tmp/brew-install.sh
NONINTERACTIVE=1 bash /tmp/brew-install.sh

~/.ssh/id_ed25519:
ssh-keygen -t ed25519 -f "$@"

~/.git: ~/.ssh/id_ed25519
cd ~ \
&& git init \
&& git config status.showUntrackedFiles no \
&& git remote add origin https://github.com/romelben/dotfiles \
&& git pull origin master \
&& git remote set-url origin git@github.com:romelben/dotfiles

build: /nix /run/current-system/sw/bin/darwin-rebuild /opt/homebrew/bin/brew ~/.git
/run/current-system/sw/bin/nix --experimental-features 'nix-command flakes' build ./\#darwinConfigurations.$(shell hostname -s).system
./result/sw/bin/darwin-rebuild switch --flake .

update:
nix flake update
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ This repo encapsulates a range of Nix goodies that I use to declutter and bring
- Shell aliases and helper scripts

## Before You Begin
Setup your environment:
Before you move forward, you will receive an error on `--extra-experimental-features` on `nix-command`. What you will need to do the following:
- Add `experimental-features = nix-command flakes` onto `/etc/nix/nix.conf`
- Make sure to change the username from `romelben` to your own in the `flake.nix`. This would be located in the root directory.
You must change the following:
- Change the username and hostname to your specs in `flake.nix` and `./home-manager/*.nix`. Username would be your name you have assigned to your local computer and hostname is already done but to understand what is being pulled, run the following command: `hostname -s` or `scutil --get LocalHostName`.

### Using `nix develop`
> [!IMPORTANT]
Expand Down
5 changes: 3 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@
default =
let
reload = pkgs.writeScriptBin "reload" ''
FLAKE_OUTPUT=".#darwinConfigurations.romelbenavides-aarch64-darwin.system"
${pkgs.nixFlakes}/bin/nix build "''${FLAKE_OUTPUT}" --extra-experimental-features nix-command --extra-experimental-features flakes && \
CONFIG_NAME=$(scutil --get LocalHostName)
FLAKE_OUTPUT=".#darwinConfigurations.''${CONFIG_NAME}.system"
${pkgs.nixFlakes}/bin/nix build "''${FLAKE_OUTPUT}" && \
./result/sw/bin/darwin-rebuild activate && \
${pkgs.zsh}/bin/zsh -c "source ${pkgs.homeDirectory}/.zshrc"
'';
Expand Down
45 changes: 45 additions & 0 deletions home-manager/config/alacritty.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
window:
decorations: none
startup_mode: Maximized
option_as_alt: OnlyLeft

scrolling:
multiplier: 1

cursor:
style:
blinking: On

font:
normal:
family: FiraCode Nerd Font Mono
style: Regular
size: 12.0

colors:
normal:
black: '#21252b'
red: '#be5046'
green: '#98c379'
yellow: '#d19a66'
blue: '#61afef'
magenta: '#c678dd'
cyan: '#56b6c2'
white: '#828997'
bright:
black: '#5c6370'
red: '#e06c75'
green: '#98c379'
yellow: '#e5c07b'
blue: '#61afef'
magenta: '#c678dd'
cyan: '#56b6c2'
white: '#abb2bf'
primary:
background: '#282c34'
foreground: '#abb2bf'

key_bindings:
- { key: F, mods: Command|Shift, action: ToggleSimpleFullscreen }
- { key: C, mods: Control|Shift, action: Copy }
- { key: V, mods: Control|Shift, action: Paste }
21 changes: 21 additions & 0 deletions home-manager/config/kitty.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Fonts

font_family Monaco
font_size 12

# Keymaps

kitty_mod cmd

map cmd+c copy_to_clipboard
map cmd+v paste_from_clipboard

map cmd+equal change_font_size all +1.0
map cmd+minus change_font_size all -1.0
map cmd+0 change_font_size all 0

# macOS specific tweaks

hide_window_decorations titlebar-only
macos_option_as_alt yes
macos_quit_when_last_window_closed yes

0 comments on commit 3befbbe

Please sign in to comment.