-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
157 lines (151 loc) · 5.04 KB
/
Copy pathflake.nix
File metadata and controls
157 lines (151 loc) · 5.04 KB
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
{ config, lib, pkgs, ... }:
{
description = "minimal flake for my macos setup";
inputs = {
# monorepo with all derivations for building sw
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
# manage and generate configurations in home dir
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
};
# function with inputs as parameters
outputs = inputs @ { nixpkgs, home-manager, darwin, ... }: {
darwinConfigurations.bernardo = inputs.darwin.lib.darwinSystem {
system = "aarch64-darwin";
pkgs = import inputs.nixpkgs { system = "aarch64-darwin"; };
modules = [
# accepts pkgs and whatever else is passed to the function
({ pkgs, ... }: {
programs.zsh.enable = true;
environment = {
shells = [ pkgs.bash pkgs.zsh ];
loginShell = pkgs.zsh;
systemPackages = [ pkgs.coreutils ];
systemPath = [ "/opt/homebrew/bin" ];
pathsToLink = [ "/Applications" ];
};
nix.extraOptions = "experimental-features = nix-command flakes";
system.keyboard.enableKeyMapping = true;
fonts = {
fontDir.enable = false; # disable if installed fonts outside
fonts.fonts = [ pkgs.nerdfonts ];
};
services.nix-daemon.enable = true;
system.defaults = {
finder = {
AppleShowAllExtensions = true;
_FXShowPosixPathInTitle = true;
};
dock.autohide = true;
NSGlobalDomain = {
AppleShowAllExtensions = true;
InitialKeyRepeat = 14;
KeyRepeat = 1;
};
};
# backwards compat; don't change
system.stateVersion = 4;
homebrew = {
enable = true;
caskArgs.no_quarantine = true;
global.brewfile = true;
masApps = { };
casks = [
"dropbox"
"firefox"
"flameshot"
"font-hack-nerd-font"
"font-inconsolata-lgc-nerd-font"
"font-mononoki"
"inkscape"
"megasync"
"sage"
"spotify"
"stats"
"thunderbird"
"vlc"
];
taps = [
"koekeishiya/formulae"
"zegervdv/zathura"
"felixkratz/formulae"
"d12frosted/emacs-plus"
];
brews = [
"emacs-plus"
"sketchybar"
"zathura"
"girara"
"zathura-pdf-poppler"
];
};
inputs.home-manager.darwinModules.home-manager = {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.bernardo.imports = [
({ pkgs, ... }: {
# don't change this when you change package input
home.stateVersion = "22.11";
# home-manager configurations
home.packages = [
pkgs.ripgrep
pkgs.fd
pkgs.curl
pkgs.less
inputs.pwnvim.packages."aarch64-darwin".default
];
# home.sessionVariables = {
# PAGER = "less";
# CLICLOLOR = 1;
# EDITOR = "nvim";
# };
programs = {
bat = {
enable = true;
config.theme = "TwoDark";
};
fzf = {
enable = true;
enableZshIntegration = true;
};
exa.enable = true;
git.enable = true;
zsh = {
enable = true;
enableCompletion = true;
enableAutosuggestions = true;
enableSyntaxHighlighting = true;
shellAliases = {
ls = "ls --color=auto -F";
la = "ls -a";
ll = "ls -l";
kakapo = "curl parrot.live";
};
};
starship = {
enable = true;
enableZshIntegration = true;
};
};
home.file.".inputrc".text = ''
set show-all-if-ambiguous on
set completion-ignore-case on
set mark-directories on
set mark-symlinked-directories on
set match-hidden-files off
set visible-stats on
set keymap vi
set editing-mode vi-insert
'';
})
];
};
};
})
];
};
};
}