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

View File

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

View File

@ -21,11 +21,29 @@
# Terminal # Terminal
git git
micro micro
# Containers
colima
docker-client
docker-compose
# Video
ffmpeg
# Spotify
spicetify-cli
# Java
checkstyle
]; ];
}; };
programs = { 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 = { services = {
@ -34,16 +52,29 @@
homebrew = { homebrew = {
enable = true; enable = true;
autoUpdate = true; # Auto update packages onActivation = {
cleanup = "zap"; # Uninstall not listed packages and casks # Auto update packages
autoUpdate = true;
# Uninstall not listed packages and casks
cleanup = "zap";
# Upgrade outdated formulae on activation
upgrade = true;
};
brews = [ brews = [
"cocoapods"
"openjdk@17"
"bash" # Required for nix-shell to function properly
]; ];
casks = [ casks = [
"hiddenbar"
"android-platform-tools"
"mactex"
]; ];
}; };
nixpkgs = { nixpkgs = {
config.allowBroken = true; # Workaround for pyopenssl being marked broken # Workaround for pyopenssl being marked broken
config.allowBroken = true;
}; };
nix = { nix = {
@ -57,10 +88,12 @@
auto-optimise-store = true auto-optimise-store = true
experimental-features = nix-command flakes experimental-features = nix-command flakes
''; '';
settings.auto-optimise-store = false;
}; };
system = { 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; stateVersion = 4;
}; };
} }

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, inputs, ... }:
{ {
imports = [ imports = [
../../modules/zsh.nix ../../modules/zsh.nix
@ -11,6 +11,26 @@
bitwarden-cli 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"; programs.git.extraConfig.credential.helper = "osxkeychain";
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.

View File

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