-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdarwin-configuration.nix
64 lines (48 loc) · 1.81 KB
/
darwin-configuration.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{ config, pkgs, ... }:
{
imports = [
./home.nix
];
system.defaults.dock.autohide = false;
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = [
pkgs.postman
pkgs.jetbrains.webstorm
];
# 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;
nixpkgs.config.allowUnfree = true;
# Create /etc/bashrc that loads the nix-darwin environment.
programs.zsh.enable = true; # default shell on catalina
programs.zsh.enableBashCompletion = true;
# programs.fish.enable = true;
# GnuPG
programs.gnupg.agent.enable = true;
programs.gnupg.agent.enableSSHSupport = true;
# Fonts
#fonts.fontDir.enable = true;
#fonts.fonts = with pkgs; [
# recursive
# (nerdfonts.override { fonts = [ "Hack" ]; })
#];
# JetBrainsMono
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
system.activationScripts.applications.text = pkgs.lib.mkForce (''
echo "setting up ~/Applications/Nix..."
rm -rf ~/Applications/Nix
mkdir -p ~/Applications/Nix
chown yohannes ~/Applications/Nix
find ${config.system.build.applications}/Applications -maxdepth 1 -type l | while read f; do
src="$(/usr/bin/stat -f%Y $f)"
appname="$(basename $src)"
osascript -e "tell app \"Finder\" to make alias file at POSIX file \"/Users/yohannes/Applications/Nix/\" to POSIX file \"$src\" with properties {name: \"$appname\"}";
done
'');
}