Merge pull request #1 from tmayoff/macos

Add macos
This commit is contained in:
Tyler 2025-01-10 22:03:22 -05:00 committed by GitHub
commit 2e6b113eee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 145 additions and 91 deletions

View file

@ -127,11 +127,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1735834308,
"narHash": "sha256-dklw3AXr3OGO4/XT1Tu3Xz9n/we8GctZZ75ZWVqAVhk=",
"lastModified": 1733212471,
"narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "6df24922a1400241dae323af55f30e4318a6ca65",
"rev": "55d15ad12a74eb7d4646254e13638ad0c4128776",
"type": "github"
},
"original": {
@ -158,16 +158,16 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1735563628,
"narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=",
"lastModified": 1733412085,
"narHash": "sha256-FillH0qdWDt/nlO6ED7h4cmN+G9uXwGjwmCnHs0QVYM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798",
"rev": "4dc2fc4e62dbf62b84132fe526356fbac7b03541",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.05",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}

View file

@ -2,7 +2,7 @@
description = "Home manager flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
@ -10,6 +10,7 @@
};
nixgl.url = "github:nix-community/nixGL";
helix.url = "github:helix-editor/helix/25.01";
darwin.url = "github:lnl7/nix-darwin";
};
outputs = {
@ -17,20 +18,24 @@
nixpkgs,
nixpkgs-unstable,
home-manager,
darwin,
helix,
...
} @ inputs: let
inherit (self) outputs;
system = "x86_64-linux";
in rec {
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
systems = [
"x86_64-linux"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
allPkgs = forAllSystems (system: import nixpkgs {inherit system;});
in {
overlays = import ./overlays {inherit inputs;};
defaultPackage.${system} = home-manager.defaultPackage.${system};
defaultPackage = forAllSystems (system: home-manager.defaultPackage.${system});
nixosConfigurations = {
mal = nixpkgs.lib.nixosSystem {
@ -39,24 +44,36 @@
};
};
darwinConfigurations."MAC-C57KK2TC69" = darwin.lib.darwinSystem {
specialArgs = {inherit inputs outputs;};
modules = [./home/hinge/darwin.nix];
};
homeConfigurations = {
"tyler@guidebolt" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
pkgs = allPkgs."x86_64-linux";
extraSpecialArgs = {inherit inputs outputs;};
modules = [./home/guidebolt/guidebolt.nix];
};
"tyler@wash" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
pkgs = allPkgs."x86_64-linux";
extraSpecialArgs = {inherit inputs outputs;};
modules = [./home/wash/wash.nix];
};
"tyler@mal" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
pkgs = allPkgs;
extraSpecialArgs = {inherit inputs outputs;};
modules = [./home/mal/mal.nix];
};
"tyler.mayoff@MAC-C57KK2TC69" = home-manager.lib.homeManagerConfiguration {
pkgs = allPkgs."aarch64-darwin";
extraSpecialArgs = {inherit inputs outputs;};
modules = [./home/hinge/hinge.nix];
};
};
};
}

View file

@ -31,11 +31,9 @@
];
};
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
# Fonts
(nerdfonts.override {fonts = ["JetBrainsMono"];})
#(nerdfonts.override {fonts = ["JetBrainsMono"];})
unstable.nix-output-monitor
@ -47,15 +45,7 @@
restic
libnotify
distrobox
wl-clipboard
usbutils
yadm
# Shell
bash
starship
btop
ripgrep
@ -64,6 +54,7 @@
glow
gitoxide
lnav
git
fzf
zoxide
@ -123,37 +114,6 @@
shellWrapperName = "y";
};
services.darkman = {
enable = true;
package = pkgs.unstable.darkman;
settings = {
lat = 45.408;
lng = -74.159;
};
darkModeScripts = {
helix-editor = ''
sed -i 's/theme = ".*"/theme = "catppuccin_macchiato"/' $HOME/.config/helix/config.toml
'';
alacritty = ''
ln -fs ~/.config/alacritty/themes/catppuccin_macchiato.toml ~/.config/alacritty/themes/_active.toml
touch ~/.config/alacritty/alacritty.toml
'';
};
lightModeScripts = {
helix-editor = ''
sed -i 's/theme = ".*"/theme = "catppuccin_latte"/' $HOME/.config/helix/config.toml
'';
alacritty = ''
ln -fs ~/.config/alacritty/themes/catppuccin_latte.toml ~/.config/alacritty/themes/_active.toml
touch ~/.config/alacritty/alacritty.toml
'';
};
};
home.stateVersion = "23.11";
programs.home-manager.enable = true;
}

View file

@ -5,12 +5,18 @@
set -gx EDITOR hx
set -gx GIT_EDITOR $EDITOR
set -gx DEBEMAIL "tyler@tylermayoff.com"
fish_add_path $HOME/.local/bin
source $HOME/.config/fish/variables-$(hostname).fish
fish_add_path $HOME/.local/bin
fish_add_path /opt/homebrew/bin
fish_add_path /opt/homebrew/opt/llvm@18/bin
if test -e $HOME/.config/fish/variables-$(hostname)fish
source $HOME/.config/fish/variables-$(hostname).fish
end
bind \cz 'fg 2>/dev/null; commandline -f repaint'
export GPG_TTY=$(tty)
zoxide init fish | source
'';
@ -22,17 +28,11 @@
set -xg XDG_DATA_DIRS "$HOME/.nix-profile/share:$XDG_DATA_DIRS"
fish_add_path $HOME/.local/bin
source $HOME/.config/fish/variables-$(hostname).fish
if test -e $HOME/.config/fish/variables-$(hostname)fish
source $HOME/.config/fish/variables-$(hostname).fish
end
'';
# functions = {
# yupdate = {
# body = ''
# echo "Hello world"
# '';
# };
# };
plugins = [
{
name = "forgit";
@ -60,8 +60,8 @@
# yac = "yadm add . && yadm commit";
# yacp = "yac && yadm push";
yc = "pushd $HOME/.local/share/yadm/repo.git && git-forgit add && yadm commit && popd";
yd = "pushd $HOME/.local/share/yadm/repo.git && git-forgit diff && popd";
# yc = "pushd $HOME/.local/share/yadm/repo.git && git-forgit add && yadm commit && popd";
# yd = "pushd $HOME/.local/share/yadm/repo.git && git-forgit diff && popd";
# nix
flake = "nix flake";

View file

@ -5,6 +5,7 @@
...
}: {
imports = [
./kitty.nix
];
nixGL.packages = inputs.nixgl.packages;
@ -24,21 +25,6 @@
# programs.vscode.enable = true;
programs.kitty = {
enable = true;
package = config.lib.nixGL.wrap pkgs.kitty;
font = {
name = "JetBrainsMono Nerd Font";
# package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];};
};
settings = {
disable_ligatures = "cursor";
};
themeFile = "Catppuccin-Macchiato";
};
programs.alacritty = {
enable = true;
package = config.lib.nixGL.wrap pkgs.alacritty;

View file

@ -0,0 +1,8 @@
{
inputs,
outputs,
lib,
...
}: {
# services.aerospace.enable = true;
}

View file

@ -0,0 +1,50 @@
{
lib,
pkgs,
...
}: let
# mac-app-util-src = builtins.fetchTarball {
# url = "https://github.com/hraban/mac-app-util/archive/master.tar.gz";
# sha256 = "1w80vjcnaysjlzxsp3v4pxq4yswbjvxs8ann2bk0m7rkjljnzz6m";
# };
# mac-app-util = import mac-app-util-src {};
in rec {
imports = [
../common.nix
../kitty.nix
# mac-app-util.homeManagerModules.default
];
home = {
username = lib.mkForce "tyler.mayoff";
homeDirectory = lib.mkForce "/Users/tyler.mayoff";
packages = with pkgs; [
bazel_7
cmake
# clang
# biome
deno
swiftlint
unstable.helix-gpt
unstable.lsp-ai
python312Packages.python-lsp-server
typescript-language-server
cmake-language-server
jdt-language-server
ffmpeg
sccache
just
yarn
cocoapods
# android-tools
jdk17
];
sessionVariables = {
ANDROID_HOME = "/Users/tyler.mayoff/Library/Android/sdk";
PATH = "$PATH:/Users/tyler.mayoff/Library/Android/sdk/platform-tools";
};
};
}

View file

@ -0,0 +1,33 @@
{
pkgs,
config,
...
}: {
programs.kitty = {
enable = true;
package = config.lib.nixGL.wrap pkgs.kitty;
font = {
name = "JetBrainsMono Nerd Font";
package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];};
};
settings = {
disable_ligatures = "cursor";
};
extraConfig = ''
map super+1 goto_tab 1
map super+2 goto_tab 2
map super+3 goto_tab 3
map super+4 goto_tab 4
map super+5 goto_tab 5
map super+6 goto_tab 6
map super+7 goto_tab 7
map super+8 goto_tab 8
map super+9 goto_tab 9
map super+0 goto_tab 10
'';
themeFile = "Catppuccin-Macchiato";
};
}

View file

@ -1,7 +1,7 @@
#!/bin/sh
if [ ! -f "/home/tyler/.config/chezmoi/key.txt" ]; then
mkdir -p "/home/tyler/.config/chezmoi"
mkdir -p "${HOME}/.config/chezmoi"
chezmoi age decrypt --output "${HOME}/.config/chezmoi/key.txt" --passphrase "{{ .chezmoi.sourceDir }}/key.txt.age"
chmod 600 "/home/tyler/.config/chezmoi/key.txt"
chmod 600 "${HOME}/.config/chezmoi/key.txt"
fi