-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhome.nix
581 lines (509 loc) · 14.9 KB
/
home.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
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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
{
config,
pkgs,
pkgs-stable,
# pkgs-kdenlive,
userSettings,
lib,
...
}: {
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = userSettings.username;
home.homeDirectory = "/home/" + userSettings.username;
nixpkgs.overlays = [(self: super: {utillinux = super.util-linux;})];
dconf = {
enable = true;
settings."org/gnome/shell" = {
disable-user-extensions = false;
enabled-extensions = with pkgs.gnomeExtensions; [
add-username-to-top-panel.extensionUuid
alphabetical-app-grid.extensionUuid
appindicator.extensionUuid
auto-move-windows.extensionUuid
blur-my-shell.extensionUuid
burn-my-windows.extensionUuid
caffeine.extensionUuid
clipboard-indicator.extensionUuid
coverflow-alt-tab.extensionUuid
dash-to-panel.extensionUuid
desktop-icons-ng-ding.extensionUuid
extension-list.extensionUuid
forge.extensionUuid
gsconnect.extensionUuid
hibernate-status-button.extensionUuid
ip-finder.extensionUuid
just-perfection.extensionUuid
lan-ip-address.extensionUuid
lock-keys.extensionUuid
logo-menu.extensionUuid
media-controls.extensionUuid
open-bar.extensionUuid
places-status-indicator.extensionUuid
removable-drive-menu.extensionUuid
settingscenter.extensionUuid
tweaks-in-system-menu.extensionUuid
user-themes.extensionUuid
vitals.extensionUuid
workspace-indicator.extensionUuid
applications-menu.extensionUuid
native-window-placement.extensionUuid
];
};
settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
};
programs.home-manager.enable = true;
# home-manager.backupFileExtension = "backup";
imports = [
(./. + "../../../user/wm" + ("/" + userSettings.wm + "/" + userSettings.wm) + ".nix") # My window manager selected from flake
../../user/shell/sh.nix # My zsh and bash config
../../user/app/nushell/nushell.nix # My nushell config
../../user/app/terminal/ghostty.nix
../../user/app/zed/zed.nix
../../user/shell/cli-collection.nix # Useful CLI apps
#../../user/app/doom-emacs/doom.nix # My doom emacs config
# Change neovim configs by selecting a different config ID:
# over here --------------o
# |
# v
../../user/app/nvim-config2/neovim.nix
#../../user/app/emacsng # Me experimenting with emacsng and a vanilla config
../../user/app/ranger/ranger.nix # My ranger file manager config
../../user/app/git/git.nix # My git config
../../user/app/bat/bat.nix # My bat config
../../user/app/manual/manual.nix # My manpages config
../../user/app/keepass/keepass.nix # My password manager
(./. + "../../../user/app/browser" + ("/" + userSettings.browser) + ".nix") # My default browser selected from flake
../../user/app/virtualization/virtualization.nix # Virtual machines
#../../user/app/flatpak/flatpak.nix # Flatpaks
../../user/style/stylix.nix # Styling and themes for my apps
../../user/lang/cc/cc.nix # C and C++ tools
../../user/lang/godot/godot.nix # Game development
#../../user/pkgs/blockbench.nix # Blockbench ## marked as insecure
../../user/hardware/bluetooth.nix # Bluetooth
];
home.file = {
# To test whether home manager works
"foo.txt".text = "bar";
".icons/bibata".source = "${pkgs.bibata-cursors}/share/icons/Bibata-Modern-Classic";
"Wallpapers".source = /home/rudra/.dotfiles/profiles/work/Wallpapers;
# ".zshrc".source = ./dotfiles/zshrc/.zshrc;
# ".config/wezterm".source = ./dotfiles/wezterm;
".config/starship".source = /home/rudra/.dotfiles/profiles/work/dotfiles/starship;
".config/zellij".source = /home/rudra/.dotfiles/profiles/work/dotfiles/zellij;
# ".config/nvim".source = ./dotfiles/nvim;
# ".config/gh".source = ./dotfiles/gh;
# ".config/nushell/config.nu".source = ./dotfiles/nushell/config.nu;
# ".config/nushell/env.nu".source = ./dotfiles/nushell/env.nu;
# ".config/nix".source = ./dotfiles/nix;
# ".config/nix-darwin".source = ./dotfiles/nix-darwin;
".config/tmux".source = /home/rudra/.dotfiles/profiles/work/dotfiles/tmux;
# ".config/ghostty".source = /home/rudra/.dotfiles/profiles/work/dotfiles/ghostty;
};
home.stateVersion = "22.11"; # Please read the comment before changing.
home.packages = with pkgs; [
# Core
zsh
alacritty
brave
vivaldi
vivaldi-ffmpeg-codecs
qutebrowser
git
syncthing
vscode
code-cursor
vscode-runner
vscode-js-debug
vscode-langservers-extracted
openvscode-server
nvrh
htop
tmux
metasploit
yakuake
# Office
nextcloud-client
libreoffice-fresh
mate.atril
openboard
xournalpp
adwaita-icon-theme
shared-mime-info
glib
newsflash
foliate
nautilus
gnome-calendar
seahorse
gnome-maps
openvpn
protonmail-bridge
texliveSmall
numbat
element-desktop-wayland
juno-theme
openai-whisper-cpp
dockerfile-language-server-nodejs
# Testing
kmonad # keybaord
sassc
gtk-engine-murrine
gnome-themes-extra
# Web Browsers:
brave
firefox
microsoft-edge
opera
vivaldi
kdenlive
# File Managers & Addons:
xfce.catfish
mate.caja-with-extensions
ranger
fzf
# Music:
clementine
sayonara
# Basics
terminator # Konsole
warp-terminal
bitwarden # PW Manager
wezterm
tmux
zellij
cowsay
fortune
# Productivity:
autokey
flameshot
fsearch
gpick # Colorpicker x11
eyedropper
piper-tts
scrcpy # Screen Record
tree # directory structure hierarchies
joplin-desktop # Notes
bazecor
github-desktop
waynergy
# Self Hosting:
docker-compose
cloudflared
rustdesk
rustdesk-server
# Programming:
android-tools
dockerfile-language-server-nodejs
#melos #A tool for managing Dart projects with multiple packages. With IntelliJ and Vscode IDE support. Supports automated versioning, changelogs & publishing via Conventional Commits.
#neovim-unwrapped
# vscodium # Text Editor
vscode
vscode-runner
vscode-js-debug
vscode-langservers-extracted
code-cursor
openvscode-server
ghz # gRPC benchmarking and load testing
ghc # Glasgow Haskell compiler
# ghdl # VHDL 2008/93/87 simulator
ghdl-llvm # VHDL 2008/93/87 simulator
ghcid # GHCi based bare bones IDE
ghciwatch # Ghci-based file watching recompiler for Haskell development
gh-ost # Triggerless online schema migration solution for MySQL
ghosttohugo
ghostscript
ghunt
ghost
ghostunnel
ghidra
ghauri
#github
gh
ghr
ghq
ghorg
gh-poi
gh2md
ghfetch
ghp-import
ghdorker
ghrepo-stats
ghostie # Github notifications
#shell
zoxide
carapace
atuin
#nushell
# Editing:
gimp-with-plugins
obs-studio
# Virtual:
distrobox
virt-manager
# TUI:
bottom
# cava
cmatrix
fastfetch
figlet # ASVII Generator
glava
glow
neofetch
hello
# Other
ferdium
gparted
gthumb # Pic Viewer
gtk4
jumpapp
localsend
lsof
megacmd
playerctl
polybarFull
protonvpn-gui
scrot # Screenshot
starship
syncthing
tmux
wine
xarchiver
xclip
xdotool
xvfb-run
yt-dlp
zenity # Prompt for new Files
# fonts
font-awesome
nerdfonts
unifont
# Soulseek
nicotine-plus
slskd
# Messaging
discord
telegram-desktop
#JETBRAINS
jetbrains-mono
jetbrains-toolbox
jetbrains.writerside
jetbrains.webstorm
jetbrains.rust-rover
jetbrains.ruby-mine
jetbrains.rider
jetbrains.pycharm-professional
jetbrains.pycharm-community-bin
jetbrains.phpstorm
jetbrains.mps
jetbrains.jdk
jetbrains.jcef
jetbrains.idea-ultimate
jetbrains.idea-community-bin
jetbrains.goland
jetbrains.gateway
jetbrains.dataspell
jetbrains.datagrip
jetbrains.clion
jetbrains.aqua
#Kotlin
kotlin
kotlin-interactive-shell
kotlin-language-server
kotlin-native
# Jellyfin Programs
#jellyfin
#jellyfin-ffmpeg
#jellyfin-web
wine
bottles
# The following requires 64-bit FL Studio (FL64) to be installed to a bottle
# With a bottle name of "FL Studio"
(pkgs.writeShellScriptBin "flstudio" ''
#!/bin/sh
if [ -z "$1" ]
then
bottles-cli run -b "FL Studio" -p FL64
#flatpak run --command=bottles-cli com.usebottles.bottles run -b FL\ Studio -p FL64
else
filepath=$(winepath --windows "$1")
echo \'"$filepath"\'
bottles-cli run -b "FL Studio" -p "FL64" --args \'"$filepath"\'
#flatpak run --command=bottles-cli com.usebottles.bottles run -b FL\ Studio -p FL64 -args "$filepath"
fi
'')
(pkgs.makeDesktopItem {
name = "flstudio";
desktopName = "FL Studio 64";
exec = "flstudio %U";
terminal = false;
type = "Application";
icon = "flstudio";
mimeTypes = ["application/octet-stream"];
})
(stdenv.mkDerivation {
name = "flstudio-icon";
# icon from https://www.reddit.com/r/MacOS/comments/jtmp7z/i_made_icons_for_discord_spotify_and_fl_studio_in/
src = [../../user/pkgs/flstudio.png];
unpackPhase = ''
for srcFile in $src; do
# Copy file into build dir
cp $srcFile ./
done
'';
installPhase = ''
mkdir -p $out $out/share $out/share/pixmaps
ls $src
ls
cp $src $out/share/pixmaps/flstudio.png
'';
})
# Media
krita
pinta
inkscape
(pkgs-stable.lollypop.override {youtubeSupport = false;})
vlc
mpv
yt-dlp
blender-hip
libresprite
(pkgs.appimageTools.wrapType2 {
name = "Cura";
src = fetchurl {
url = "/~https://github.com/Ultimaker/Cura/releases/download/5.8.1/UltiMaker-Cura-5.8.1-linux-X64.AppImage";
hash = "sha256-VLd+V00LhRZYplZbKkEp4DXsqAhA9WLQhF933QAZRX0=";
};
# extraPkgs = pkgs: with pkgs; [];
})
#(pkgs-stable.cura.overrideAttrs (oldAttrs: {
# postInstall = oldAttrs.postInstall + ''cp -rf ${(pkgs.makeDesktopItem {
# name = "com.ultimaker.cura";
# icon = "cura-icon";
# desktopName = "Cura";
# exec = "env QT_QPA_PLATFORM=xcb ${pkgs-stable.cura}/bin/cura %F";
# tryExec = "env QT_QPA_PLATFORM=xcb ${pkgs-stable.cura}/bin/cura";
# terminal = false;
# type = "Application";
# categories = ["Graphics"];
# mimeTypes = ["model/stl" "application/vnd.ms-3mfdocument" "application/prs.wavefront-obj"
# "image/bmp" "image/gif" "image/jpeg" "image/png" "text/x-gcode" "application/x-amf"
# "application/x-ply" "application/x-ctm" "model/vnd.collada+xml" "model/gltf-binary"
# "model/gltf+json" "model/vnd.collada+xml+zip"];
# })}/share/applications $out/share'';
#}))
#(pkgs.writeShellScriptBin "curax" ''env QT_QPA_PLATFORM=xcb ${pkgs-stable.cura}/bin/cura $@'')
(pkgs-stable.curaengine_stable)
openscad
(stdenv.mkDerivation {
name = "cura-slicer";
version = "0.0.7";
src = fetchFromGitHub {
owner = "Spiritdude";
repo = "Cura-CLI-Wrapper";
rev = "ff076db33cfefb770e1824461a6336288f9459c7";
sha256 = "sha256-BkvdlqUqoTYEJpCCT3Utq+ZBU7g45JZFJjGhFEXPXi4=";
};
phases = "installPhase";
installPhase = ''
mkdir -p $out $out/bin $out/share $out/share/cura-slicer
cp $src/cura-slicer $out/bin
cp $src/settings/fdmprinter.def.json $out/share/cura-slicer
cp $src/settings/base.ini $out/share/cura-slicer
sed -i 's+#!/usr/bin/perl+#! /usr/bin/env nix-shell\n#! nix-shell -i perl -p perl538 perl538Packages.JSON+g' $out/bin/cura-slicer
sed -i 's+/usr/share+/home/${userSettings.username}/.nix-profile/share+g' $out/bin/cura-slicer
'';
propagatedBuildInputs = with pkgs-stable; [
curaengine_stable
];
})
obs-studio
ffmpeg
(pkgs.writeScriptBin "kdenlive-accel" ''
#!/bin/sh
DRI_PRIME=0 kdenlive "$1"
'')
movit
mediainfo
libmediainfo
audio-recorder
cheese
ardour
rosegarden
tenacity
# Various dev packages
remmina
sshfs
texinfo
libffi
zlib
nodePackages.ungit
ventoy
kdenlive
];
home.sessionPath = [
# no need for a bare $PATH item; these are all appended to any base
# PATH you already have
# and /usr/bin isn't a thing on NixOS (all it should ever contain is
# `env`, as a concession to shell scripts that haven't been fixup-ed
# by a Nix derivation)
"$HOME/.local/bin"
"$HOME/rudra-app-repo"
];
home.file.".local/share/pixmaps/nixos-snowflake-stylix.svg".source = config.lib.stylix.colors {
template = builtins.readFile ../../user/pkgs/nixos-snowflake-stylix.svg.mustache;
extension = "svg";
};
services.syncthing.enable = true;
services.nextcloud-client = {
enable = true;
startInBackground = true;
};
xdg.enable = true;
xdg.userDirs = {
enable = true;
createDirectories = true;
music = "${config.home.homeDirectory}/Media/Music";
videos = "${config.home.homeDirectory}/Media/Videos";
pictures = "${config.home.homeDirectory}/Media/Pictures";
templates = "${config.home.homeDirectory}/Templates";
download = "${config.home.homeDirectory}/Downloads";
documents = "${config.home.homeDirectory}/Documents";
desktop = null;
publicShare = null;
extraConfig = {
XDG_DOTFILES_DIR = "${config.home.homeDirectory}/.dotfiles";
XDG_ARCHIVE_DIR = "${config.home.homeDirectory}/Archive";
XDG_VM_DIR = "${config.home.homeDirectory}/Machines";
XDG_ORG_DIR = "${config.home.homeDirectory}/Org";
XDG_PODCAST_DIR = "${config.home.homeDirectory}/Media/Podcasts";
XDG_BOOK_DIR = "${config.home.homeDirectory}/Media/Books";
};
};
xdg.mime.enable = true;
xdg.mimeApps.enable = true;
xdg.mimeApps.associations.added = {
# TODO fix mime associations, most of them are totally broken :(
"application/octet-stream" = "flstudio.desktop;";
};
home.sessionVariables = {
EDITOR = lib.mkDefault userSettings.editor;
SPAWNEDITOR = userSettings.spawnEditor;
TERM = userSettings.term;
BROWSER = userSettings.browser;
};
# Set cursor size and dpi for 4k monitor
xresources.properties = {
"Xcursor.size" = 22;
# "Xft.dpi" = 172;
};
news.display = "silent";
gtk.iconTheme = {
package = pkgs.papirus-icon-theme;
name =
if (config.stylix.polarity == "dark")
then "Papirus-Dark"
else "Papirus-Light";
};
services.pasystray.enable = true;
}