various mac configuration updates

This commit is contained in:
Michael Thomas 2023-02-09 12:25:44 -05:00
parent 7c94360cb1
commit ccaa44abc6
5 changed files with 249 additions and 193 deletions

56
flake.lock generated
View File

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1651916036,
"narHash": "sha256-UuD9keUGm4IuVEV6wdSYbuRm7CwfXE63hVkzKDjVsh4=",
"lastModified": 1673295039,
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "2f2bdf658d2b79bada78dc914af99c53cad37cba",
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
"type": "github"
},
"original": {
@ -24,11 +24,11 @@
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
@ -39,11 +39,11 @@
},
"flake-utils": {
"locked": {
"lastModified": 1653893745,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
@ -59,11 +59,11 @@
]
},
"locked": {
"lastModified": 1654113405,
"narHash": "sha256-VpK+0QaWG2JRgB00lw77N9TjkE3ec0iMYIX1TzGpxa4=",
"lastModified": 1667907331,
"narHash": "sha256-bHkAwkYlBjkupPUFcQjimNS8gxWSWjOTevEuwdnp5m0=",
"owner": "rycee",
"repo": "home-manager",
"rev": "ac2287df5a2d6f0a44bbcbd11701dbbf6ec43675",
"rev": "6639e3a837fc5deb6f99554072789724997bc8e5",
"type": "github"
},
"original": {
@ -82,11 +82,11 @@
]
},
"locked": {
"lastModified": 1655723343,
"narHash": "sha256-J95qdF7m30dEioJZE8fsmaOusqIp57SMJyG4U/ZKfJk=",
"lastModified": 1675351082,
"narHash": "sha256-4Oi4k4Qp1vOvKoACHDcz0xiVj7DuMaCL57fP3W77eA0=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "e178b6df72d79324a8446cd175d9d091223585ae",
"rev": "52cadf92e1bfdef235d5cd77b9a4b2ab848baa8a",
"type": "github"
},
"original": {
@ -97,26 +97,26 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1655456688,
"narHash": "sha256-j2trI5gv2fnHdfUQFBy957avCPxxzCqE8R+TOYHPSRE=",
"lastModified": 1675757258,
"narHash": "sha256-pIRer8vdsoherlRKpzfnHbMZ5TsAcvRlXHCIaHkIUbg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d17a56d90ecbd1b8fc908d49598fb854ef188461",
"rev": "af96094e9b8eb162d70a84fa3b39f4b7a8b264d2",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-22.05",
"ref": "nixos-22.11",
"type": "indirect"
}
},
"nur": {
"locked": {
"lastModified": 1655739339,
"narHash": "sha256-ykV5RQgltIJl5EXbGdndf6IcncfCP8RnyH57TyKFazE=",
"lastModified": 1675950569,
"narHash": "sha256-v6p+D8e7GVcAlVoJGrAqjwjfAglKS9+GzbQFxd8d0Rc=",
"owner": "nix-community",
"repo": "NUR",
"rev": "0cadcae82c23de1ec4b4a5bbe1e2f75e59752317",
"rev": "1ed7701bc2f5c91454027067872037272812e7a3",
"type": "github"
},
"original": {
@ -138,11 +138,11 @@
},
"unstable": {
"locked": {
"lastModified": 1655567057,
"narHash": "sha256-Cc5hQSMsTzOHmZnYm8OSJ5RNUp22bd5NADWLHorULWQ=",
"lastModified": 1675763311,
"narHash": "sha256-bz0Q2H3mxsF1CUfk26Sl9Uzi8/HFjGFD/moZHz1HebU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e0a42267f73ea52adc061a64650fddc59906fc99",
"rev": "fab09085df1b60d6a0870c8a89ce26d5a4a708c2",
"type": "github"
},
"original": {
@ -153,11 +153,11 @@
},
"utils": {
"locked": {
"lastModified": 1653893745,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {

View File

@ -2,7 +2,7 @@
description = "Michael Thomas's NixOS configuration";
inputs = {
nixpkgs.url = "nixpkgs/nixos-22.05";
nixpkgs.url = "nixpkgs/nixos-22.11";
unstable.url = "nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
@ -95,8 +95,8 @@
system = "aarch64-darwin";
specialArgs = { inherit inputs; };
modules = [
self.overlaysModule
home-manager.darwinModules.home-manager {
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.michael = import ./user/environments/mac/home.nix;

View File

@ -21,11 +21,29 @@
# Terminal
git
micro
# Containers
colima
docker-client
docker-compose
# Video
ffmpeg
# Spotify
spicetify-cli
# Java
checkstyle
];
};
programs = {
zsh.enable = true;
zsh = {
enable = true;
# Make zsh installation work properly with macOS path
loginShellInit = ''
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
'';
};
};
services = {
@ -34,16 +52,29 @@
homebrew = {
enable = true;
autoUpdate = true; # Auto update packages
cleanup = "zap"; # Uninstall not listed packages and casks
onActivation = {
# Auto update packages
autoUpdate = true;
# Uninstall not listed packages and casks
cleanup = "zap";
# Upgrade outdated formulae on activation
upgrade = true;
};
brews = [
"cocoapods"
"openjdk@17"
"bash" # Required for nix-shell to function properly
];
casks = [
"hiddenbar"
"android-platform-tools"
"mactex"
];
};
nixpkgs = {
config.allowBroken = true; # Workaround for pyopenssl being marked broken
# Workaround for pyopenssl being marked broken
config.allowBroken = true;
};
nix = {
@ -57,10 +88,12 @@
auto-optimise-store = true
experimental-features = nix-command flakes
'';
settings.auto-optimise-store = false;
};
system = {
activationScripts.postActivation.text = ''sudo chsh -s ${pkgs.zsh}/bin/zsh''; # Since it's not possible to declare default shell, run this command after build
# Since it's not possible to declare default shell, run this command after build
activationScripts.postActivation.text = ''sudo chsh -s ${pkgs.zsh}/bin/zsh'';
stateVersion = 4;
};
}

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, pkgs, inputs, ... }:
{
imports = [
../../modules/zsh.nix
@ -11,6 +11,26 @@
bitwarden-cli
];
# Add homebrew applications to path
programs.zsh = {
profileExtra = ''
PATH=/opt/homebrew/bin:$PATH
'';
prezto.pmodules = [
"osx"
];
};
# iterm2 integration
home.file = {
".zprezto/contrib/zsh-iterm2".source = pkgs.fetchFromGitHub {
owner = "laggardkernel";
repo = "zsh-iterm2";
rev = "6f9d8951b3330593ceb66972a71a067793b0981e";
hash = "sha256-wh9Rltajlb5FlxW1WKGdufnPkikn4gRJZ+fbPO3rVWc=";
};
};
programs.git.extraConfig.credential.helper = "osxkeychain";
# Let Home Manager install and manage itself.

View File

@ -1,4 +1,4 @@
{ config, pkgs, libs, ... }:
{ pkgs, ... }:
{
home.packages = with pkgs; [
# Javascript
@ -7,11 +7,14 @@
nodePackages.pnpm
# PHP
php
# Python
python3
# Kubernetes
azure-cli
kubectl
kubernetes-helm
# Nix
rnix-lsp
nixpkgs-fmt
];
}