2020-12-18 17:03:27 -08:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
2022-07-29 17:07:08 -07:00
|
|
|
|
2022-04-14 21:00:41 -07:00
|
|
|
nixpkgs.config.allowUnfree = true;
|
2020-12-18 17:03:27 -08:00
|
|
|
# List packages installed in system profile. To search by name, run:
|
|
|
|
|
# $ nix-env -qaP | grep wget
|
|
|
|
|
environment.systemPackages =
|
|
|
|
|
[
|
2022-07-29 17:07:08 -07:00
|
|
|
pkgs.git-lfs
|
2022-04-14 12:57:06 -07:00
|
|
|
pkgs.vim
|
|
|
|
|
pkgs.iterm2
|
2022-04-14 21:00:41 -07:00
|
|
|
pkgs.obsidian
|
|
|
|
|
pkgs.syncthing
|
|
|
|
|
pkgs.slack
|
|
|
|
|
pkgs._1password
|
2023-04-07 10:07:00 -07:00
|
|
|
pkgs.tailscale
|
2022-07-01 11:41:16 -07:00
|
|
|
# wishlist
|
|
|
|
|
# LICEcap
|
|
|
|
|
# keycastr
|
2022-04-14 21:00:41 -07:00
|
|
|
# todo (unsupported on aarch64-darwin):
|
|
|
|
|
# pkgs.spotify
|
|
|
|
|
# pkgs.firefox
|
|
|
|
|
# pkgs.google-chrome
|
2020-12-18 17:03:27 -08:00
|
|
|
];
|
|
|
|
|
|
2023-04-07 10:07:00 -07:00
|
|
|
services.tailscale.enable = true;
|
2022-04-14 21:00:41 -07:00
|
|
|
|
2020-12-18 17:03:27 -08:00
|
|
|
# Use a custom configuration.nix location.
|
|
|
|
|
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
|
|
|
|
|
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
|
|
|
|
|
|
|
|
|
|
# Auto upgrade nix package and the daemon service.
|
|
|
|
|
services.nix-daemon.enable = true;
|
|
|
|
|
# nix.package = pkgs.nix;
|
|
|
|
|
|
|
|
|
|
# Create /etc/bashrc that loads the nix-darwin environment.
|
2022-04-14 12:57:06 -07:00
|
|
|
programs.zsh.enable = true; # default shell on catalina
|
2020-12-18 17:03:27 -08:00
|
|
|
# programs.fish.enable = true;
|
|
|
|
|
|
2022-04-14 12:57:06 -07:00
|
|
|
# We need this snippet to allow spotlight to find the applications installed
|
|
|
|
|
# by nix-darwin
|
|
|
|
|
system.activationScripts.applications.text = pkgs.lib.mkForce (
|
|
|
|
|
''
|
|
|
|
|
rm -rf ~/Applications/Nix\ Apps
|
|
|
|
|
mkdir -p ~/Applications/Nix\ Apps
|
|
|
|
|
for app in $(find ${config.system.build.applications}/Applications -maxdepth 1 -type l); do
|
|
|
|
|
src="$(/usr/bin/stat -f%Y "$app")"
|
|
|
|
|
cp -r "$src" ~/Applications/Nix\ Apps
|
|
|
|
|
done
|
|
|
|
|
''
|
|
|
|
|
);
|
|
|
|
|
|
2023-05-17 22:24:58 -07:00
|
|
|
launchd.user.agents.syncthing = {
|
|
|
|
|
path = [ pkgs.syncthing ];
|
|
|
|
|
command = "syncthing serve";
|
|
|
|
|
serviceConfig = {
|
|
|
|
|
ProcessType = "Background";
|
|
|
|
|
KeepAlive = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2022-04-14 12:57:06 -07:00
|
|
|
system.keyboard = {
|
|
|
|
|
enableKeyMapping = true;
|
|
|
|
|
remapCapsLockToEscape = true;
|
|
|
|
|
};
|
|
|
|
|
|
2022-07-29 17:07:08 -07:00
|
|
|
system.defaults = {
|
|
|
|
|
finder.AppleShowAllExtensions = true;
|
2023-05-17 22:24:58 -07:00
|
|
|
|
|
|
|
|
dock = {
|
|
|
|
|
autohide = true;
|
|
|
|
|
mru-spaces = false;
|
|
|
|
|
showhidden = true;
|
|
|
|
|
};
|
2022-07-29 17:07:08 -07:00
|
|
|
};
|
|
|
|
|
|
2020-12-18 17:03:27 -08:00
|
|
|
# Used for backwards compatibility, please read the changelog before changing.
|
|
|
|
|
# $ darwin-rebuild changelog
|
|
|
|
|
system.stateVersion = 4;
|
|
|
|
|
}
|