Add initial flake
This commit is contained in:
11
aliases
11
aliases
@@ -16,9 +16,12 @@ alias wthr='curl wttr.in/san_luis_obispo'
|
||||
alias nf='cl && neofetch && shownetinfo && batt'
|
||||
alias hekate='python3 /Users/smparkin/Development/fusee-launcher/fusee-launcher.py /Users/smparkin/Development/fusee-launcher/hekate/hekate.bin'
|
||||
alias src='omz reload'
|
||||
alias python='python3'
|
||||
|
||||
# Music
|
||||
alias amp='python3 ~/Development/abandoned/SSiTerm/music.py play'
|
||||
alias amn='python3 ~/Development/abandoned/SSiTerm/music.py next'
|
||||
alias amr='python3 ~/Development/abandoned/SSiTerm/music.py prev'
|
||||
alias amv='python3 ~/Development/abandoned/SSiTerm/music.py playback --volume '
|
||||
alias amp='python3 ~/Developer/abandoned/SSiTerm/music.py play'
|
||||
alias amn='python3 ~/Developer/abandoned/SSiTerm/music.py next'
|
||||
alias amr='python3 ~/Developer/abandoned/SSiTerm/music.py prev'
|
||||
alias amv='python3 ~/Developer/abandoned/SSiTerm/music.py playback --volume '
|
||||
|
||||
alias fps='[[ $(launchctl getenv MTL_HUD_ENABLED) -eq 1 ]]&&launchctl unsetenv MTL_HUD_ENABLED||launchctl setenv MTL_HUD_ENABLED 1'
|
||||
|
||||
167
nix/flake.lock
generated
Normal file
167
nix/flake.lock
generated
Normal file
@@ -0,0 +1,167 @@
|
||||
{
|
||||
"nodes": {
|
||||
"brew-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1727016223,
|
||||
"narHash": "sha256-iZqd91Cp4O02BU6/eBZ0UZgJN8AlwH+0geQUpqF176E=",
|
||||
"owner": "Homebrew",
|
||||
"repo": "brew",
|
||||
"rev": "916044581862c32fc2365e8e9ff0b1507a98925e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Homebrew",
|
||||
"ref": "4.3.24",
|
||||
"repo": "brew",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731454423,
|
||||
"narHash": "sha256-TtwvgFxUa0wyptLhQbKaixgNW1UXf3+TDqfX3Kp63oM=",
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "6c71c49e2448e51ad830ed211024e6d0edc50116",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1716329735,
|
||||
"narHash": "sha256-ap51w+VqG21vuzyQ04WrhI2YbWHd3UGz0e7dc/QQmoA=",
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "eac4f25028c1975a939c8f8fba95c12f8a25e01c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-homebrew": {
|
||||
"inputs": {
|
||||
"brew-src": "brew-src",
|
||||
"flake-utils": "flake-utils",
|
||||
"nix-darwin": "nix-darwin_2",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731434956,
|
||||
"narHash": "sha256-WmEUrnmLxqUg1ltf1x0LKb9RZr4mrqu9OtHKlVC1m7s=",
|
||||
"owner": "zhaofengli-wip",
|
||||
"repo": "nix-homebrew",
|
||||
"rev": "2ed1e70db2448bd997b7b0c52f7bef42ac7a51a7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "zhaofengli-wip",
|
||||
"repo": "nix-homebrew",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1687274257,
|
||||
"narHash": "sha256-TutzPriQcZ8FghDhEolnHcYU2oHIG5XWF+/SUBNnAOE=",
|
||||
"path": "/nix/store/22qgs3skscd9bmrxv9xv4q5d4wwm5ppx-source",
|
||||
"rev": "2c9ecd1f0400076a4d6b2193ad468ff0a7e7fdc5",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1716330097,
|
||||
"narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1731245184,
|
||||
"narHash": "sha256-vmLS8+x+gHRv1yzj3n+GTAEObwmhxmkkukB2DwtJRdU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "aebe249544837ce42588aa4b2e7972222ba12e8f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nix-homebrew": "nix-homebrew",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
139
nix/flake.nix
Normal file
139
nix/flake.nix
Normal file
@@ -0,0 +1,139 @@
|
||||
{
|
||||
description = "smparkin Darwin system flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
nix-darwin.url = "github:LnL7/nix-darwin";
|
||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nix-darwin, nixpkgs, nix-homebrew }:
|
||||
let
|
||||
configuration = { pkgs, config, ... }: {
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search by name, run:
|
||||
# $ nix-env -qaP | grep wget
|
||||
environment.systemPackages =
|
||||
[
|
||||
pkgs.fastfetch
|
||||
pkgs.coreutils
|
||||
pkgs.mkalias
|
||||
pkgs.openjdk17
|
||||
pkgs.openjdk21
|
||||
pkgs.appcleaner
|
||||
pkgs.discord
|
||||
pkgs.docker
|
||||
pkgs.iina
|
||||
pkgs.iterm2
|
||||
pkgs.obsidian
|
||||
pkgs.ollama
|
||||
pkgs.openscad
|
||||
pkgs.prismlauncher
|
||||
pkgs.qbittorrent
|
||||
pkgs.rectangle
|
||||
pkgs.vscode
|
||||
];
|
||||
|
||||
homebrew = {
|
||||
enable = true;
|
||||
casks = [
|
||||
"alfred"
|
||||
"balenaetcher"
|
||||
"bambu-studio"
|
||||
"daisydisk"
|
||||
"firefox"
|
||||
"font-sf-mono"
|
||||
"istat-menus"
|
||||
"protonvpn"
|
||||
"raspberry-pi-imager"
|
||||
"scroll-reverser"
|
||||
"sf-symbols"
|
||||
"steam"
|
||||
];
|
||||
brews = [
|
||||
"asitop"
|
||||
"bpytop"
|
||||
"mas"
|
||||
];
|
||||
masApps = {
|
||||
"Broadcasts" = 1469995354;
|
||||
"Callsheet" = 1672356376;
|
||||
"Developer" = 640199958;
|
||||
"Infuse" = 1136220934;
|
||||
"Noir" = 1592917505;
|
||||
"Overcast" = 888422857;
|
||||
"SponsorBlock" = 1573461917;
|
||||
"TestFlight" = 899247664;
|
||||
"TheUnarchiver" = 425424353;
|
||||
"Unread" = 1363637349;
|
||||
"WiFiMan" = 1385561119;
|
||||
"Wipr" = 1320666476;
|
||||
"Xcode" = 497799835;
|
||||
"WireGuard" = 1451685025;
|
||||
};
|
||||
onActivation.cleanup = "zap";
|
||||
};
|
||||
|
||||
# Auto upgrade nix package and the daemon service.
|
||||
services.nix-daemon.enable = true;
|
||||
# nix.package = pkgs.nix;
|
||||
|
||||
# Necessary for using flakes on this system.
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
|
||||
system.activationScripts.applications.text = let
|
||||
env = pkgs.buildEnv {
|
||||
name = "system-applications";
|
||||
paths = config.environment.systemPackages;
|
||||
pathsToLink = "/Applications";
|
||||
};
|
||||
in
|
||||
pkgs.lib.mkForce ''
|
||||
# Set up applications.
|
||||
echo "setting up /Applications..." >&2
|
||||
rm -rf /Applications/Nix\ Apps
|
||||
mkdir -p /Applications/Nix\ Apps
|
||||
find ${env}/Applications -maxdepth 1 -type l -exec readlink '{}' + |
|
||||
while read -r src; do
|
||||
app_name=$(basename "$src")
|
||||
echo "copying $src" >&2
|
||||
${pkgs.mkalias}/bin/mkalias "$src" "/Applications/Nix Apps/$app_name"
|
||||
done
|
||||
'';
|
||||
|
||||
# Set Git commit hash for darwin-version.
|
||||
system.configurationRevision = self.rev or self.dirtyRev or null;
|
||||
|
||||
# Used for backwards compatibility, please read the changelog before changing.
|
||||
# $ darwin-rebuild changelog
|
||||
system.stateVersion = 5;
|
||||
|
||||
# The platform the configuration will be used on.
|
||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||
};
|
||||
in
|
||||
{
|
||||
# Build darwin flake using:
|
||||
# $ darwin-rebuild build --flake .#simple
|
||||
darwinConfigurations."macbook" = nix-darwin.lib.darwinSystem {
|
||||
modules = [
|
||||
configuration
|
||||
nix-homebrew.darwinModules.nix-homebrew
|
||||
{
|
||||
nix-homebrew = {
|
||||
enable = true;
|
||||
enableRosetta = true;
|
||||
user = "smparkin";
|
||||
autoMigrate = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# Expose the package set, including overlays, for convenience.
|
||||
darwinPackages = self.darwinConfigurations."macbook".pkgs;
|
||||
};
|
||||
}
|
||||
20
zshrc
20
zshrc
@@ -30,26 +30,9 @@ if [ "$OSTYPE" = "Darwin" ]; then
|
||||
source ~/.iterm2_shell_integration.zsh
|
||||
fi
|
||||
|
||||
# configure homebrew for arm and x86
|
||||
if [ "$OSTYPE" = "Darwin" ]; then
|
||||
ARCH=$(uname -m)
|
||||
if [ "$ARCH" = "arm64" ]; then
|
||||
export EDITOR="/opt/homebrew/bin/vim"
|
||||
export PATH="/opt/homebrew/bin:$PATH"
|
||||
export PATH="/opt/homebrew/sbin:$PATH"
|
||||
export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
export EDITOR="/usr/local/bin/vim"
|
||||
export PATH="/usr/local/bin:$PATH"
|
||||
export PATH="/usr/local/sbin:$PATH"
|
||||
fi
|
||||
export EDITOR="/usr/bin/vim"
|
||||
fi
|
||||
export PATH="/Users/smparkin/Library/Python/2.7/bin:$PATH"
|
||||
export PATH="/Users/smparkin/Library/Python/3.9/bin:$PATH"
|
||||
export PATH="/opt/devkitpro/pacman/bin:$PATH"
|
||||
export DEVKITPRO="/opt/devkitpro"
|
||||
export DEVKITARM="/opt/devkitpro/devkitARM"
|
||||
export DEVKITPPC="/opt/devkitpro/devkitPPC"
|
||||
|
||||
shownetinfo
|
||||
if [ "$OSTYPE" = "Linux" ]; then
|
||||
@@ -63,3 +46,4 @@ elif [ "$OSTYPE" = "Darwin" ]; then
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user