-
Notifications
You must be signed in to change notification settings - Fork 0
/
\
281 lines (234 loc) · 5.6 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
{ pkgs, lib, ... }:
{
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
# Add additional package names here
"vscode"
];
imports =
[ # Include the results of the hardware scan.
# ./home-manager
<home-manager/nixos>
./hardware-configuration.nix
./nixos-hardware/common/cpu/amd
./nixos-hardware/common/gpu/amd
./nixos-hardware/common/cpu/amd/pstate.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelParams = [
"video=DP-1:3840x2160@60"
"video=HDMI-A-1:3840x2160@60"
];
networking.hostName = "nixos"; # Define your hostname.
nix.settings.experimental-features = ["nix-command" "flakes"];
time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
liberation_ttf
fira-code
fira-code-symbols
mplus-outline-fonts.githubRelease
dina-font
proggyfonts
];
services.xserver = {
excludePackages = [pkgs.xterm];
enable = true;
videoDrivers = [ "displaylink" "modesetting" "amdgpu"];
dpi = 180;
windowManager = {
xmonad = {
enable = true;
enableContribAndExtras = true;
extraPackages = hpkgs: [
hpkgs.xmobar
];
};
};
xrandrHeads = [
{
output = "HDMI-1";
}
{
output = "DP-3";
primary = true;
}
];
displayManager = {
defaultSession = "none+xmonad";
lightdm.enable = true;
lightdm.greeters.enso = {
enable = true;
blur = true;
};
startx.enable = true;
};
xkb.layout = "us";
# displayManager.sessionCommands = ''
# ${lib.getBin pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource 1 0
# '';
};
services.printing.enable = true;
environment.pantheon.excludePackages = with pkgs.pantheon; [
elementary-music
elementary-photos
elementary-videos
epiphany
];
sound.enable = true;
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
#jack.enable = true;
};
services.tailscale.enable = false;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.geoff = {
isNormalUser = true;
description = "geoff";
extraGroups = [ "networkmanager" "wheel" "docker" "root" "podman"];
shell = pkgs.zsh;
packages = with pkgs; [
home-manager
];
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
appeditor
formatter
gnome.simple-scan
indicator-application-gtk3
wget
curl
bind
git
vifm-full
zsh
oh-my-zsh
alacritty
gnumake
fzf
arandr
dmenu
nixpkgs-fmt
trayer
haskellPackages.xmonad
haskellPackages.xmobar
neovim
libclang
cmake
gcc
zig
ripgrep
stack
nix-index
helix
feh
moreutils
linuxHeaders
stalonetray
xorg.xmodmap
];
environment.variables = {
GDK_SCALE = "2";
GDK_DPI_SCALE = "0.5";
};
programs.neovim = {
viAlias = true;
vimAlias = true;
};
programs.noisetorch.enable = true;
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
# programs.ssh.extraConfig = ''
# IdentityFile /home/geoff/.ssh/id_rsa_github
# '';
programs.zsh = {
enable = true;
enableCompletion = true;
ohMyZsh.theme = "lambda";
ohMyZsh.enable = true;
ohMyZsh.plugins = [ "git" ];
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
};
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.avahi = {
enable = false;
publish.enable = true;
};
# Open ports in the firewall.
# Or disable the firewall altogether.
networking.networkmanager.enable = false;
networking.firewall.enable = false;
systemd.services.NetworkManager-wait-online.enable = false;
system.stateVersion = "24.05";
virtualisation = {
podman = {
enable = true;
# Create a `docker` alias for podman, to use it as a drop-in replacement
dockerCompat = true;
dockerSocket.enable = true;
# Required for containers under podman-compose to be able to talk to each other.
defaultNetwork.settings.dns_enabled = true;
};
};
networking.nftables = {
enable = true;
ruleset = ''
table ip nat {
chain PREROUTING {
type nat hook prerouting priority dstnat; policy accept;
iifname "enp2s0" tcp dport 80 dnat to 192.168.49.2
}
}
'';
};
networking.nat = {
enable = true;
internalInterfaces = [ "enp2s0" ];
externalInterface = "br-a86e09d74a1a";
forwardPorts = [
{
sourcePort = 80;
proto = "tcp";
destination = "10.100.0.3:80";
}
];
};
networking.extraHosts =
''
192.168.0.106 nixos
127.0.0.1 tunnel
127.0.0.1 hasura
127.0.0.1 backend
127.0.0.1 api
127.0.0.1 web
127.0.0.1 oathkeeper
192.168.49.2 mail.test.info
192.168.49.2 ory.test.info
192.168.49.2 ory-admin.test.info
192.168.49.2 pdf.test.info
'';
}