-
Notifications
You must be signed in to change notification settings - Fork 149
/
Copy pathhome-manager.nix
105 lines (96 loc) · 3.04 KB
/
home-manager.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{ config, pkgs, lib, home-manager, ... }:
let
user = "dustin";
# Define the content of your file as a derivation
myEmacsLauncher = pkgs.writeScript "emacs-launcher.command" ''
#!/bin/sh
emacsclient -c -n &
'';
sharedFiles = import ../shared/files.nix { inherit config pkgs; };
additionalFiles = import ./files.nix { inherit user config pkgs; };
in
{
imports = [
./dock
];
# It me
users.users.${user} = {
name = "${user}";
home = "/Users/${user}";
isHidden = false;
shell = pkgs.zsh;
};
homebrew = {
# This is a module from nix-darwin
# Homebrew is *installed* via the flake input nix-homebrew
enable = true;
casks = pkgs.callPackage ./casks.nix {};
# These app IDs are from using the mas CLI app
# mas = mac app store
# https://github.com/mas-cli/mas
#
# $ nix shell nixpkgs#mas
# $ mas search <app name>
#
masApps = {
"hidden-bar" = 1452453066;
"wireguard" = 1451685025;
};
};
# Enable home-manager
home-manager = {
useGlobalPkgs = true;
users.${user} = { pkgs, config, lib, ... }:{
home = {
enableNixpkgsReleaseCheck = false;
packages = pkgs.callPackage ./packages.nix {};
file = lib.mkMerge [
sharedFiles
additionalFiles
{ "emacs-launcher.command".source = myEmacsLauncher; }
];
stateVersion = "23.11";
};
programs = {} // import ../shared/home-manager.nix { inherit config pkgs lib; };
# Marked broken Oct 20, 2022 check later to remove this
# https://github.com/nix-community/home-manager/issues/3344
manual.manpages.enable = false;
};
};
# Fully declarative dock using the latest from Nix Store
local = {
dock.enable = true;
dock.entries = [
{ path = "/Applications/Slack.app/"; }
{ path = "/System/Applications/Messages.app/"; }
{ path = "/System/Applications/Facetime.app/"; }
{ path = "/Applications/Telegram.app/"; }
{ path = "${pkgs.alacritty}/Applications/Alacritty.app/"; }
{ path = "/System/Applications/Music.app/"; }
{ path = "/System/Applications/News.app/"; }
{ path = "/System/Applications/Photos.app/"; }
{ path = "/System/Applications/Photo Booth.app/"; }
{ path = "/System/Applications/TV.app/"; }
{ path = "${pkgs.jetbrains.phpstorm}/Applications/PhpStorm.app/"; }
{ path = "/Applications/TablePlus.app/"; }
{ path = "/Applications/Asana.app/"; }
{ path = "/Applications/Drafts.app/"; }
{ path = "/System/Applications/Home.app/"; }
{ path = "/Applications/iPhone Mirroring.app/"; }
{
path = toString myEmacsLauncher;
section = "others";
}
{
path = "${config.users.users.${user}.home}/.local/share/";
section = "others";
options = "--sort name --view grid --display folder";
}
{
path = "${config.users.users.${user}.home}/.local/share/downloads";
section = "others";
options = "--sort name --view grid --display stack";
}
];
};
}