├── .git-crypt
├── .gitattributes
└── keys
│ └── default
│ └── 0
│ └── C99B526F055AD6216135658FA5184C828749DC26.gpg
├── .gitattributes
├── README.md
├── configs
├── aerospace
│ └── aerospace.toml
├── aws
│ ├── config
│ └── credentials
├── dooit
│ └── config.py
├── dunst
│ └── dunstrc
├── fish
│ ├── config.fish
│ ├── quick_scripts.fish
│ └── utils.fish
├── gdrive
│ ├── account.json
│ └── kraanzu@gmail.com
│ │ ├── secret.json
│ │ └── tokens.json
├── git
│ ├── config
│ └── gitignore
├── ipython
│ └── profile_default
│ │ └── startup
│ │ └── cp_imports.py
├── nvim
│ ├── after
│ │ └── plugin
│ │ │ └── tcss.lua
│ ├── init.lua
│ ├── lua
│ │ ├── basics.lua
│ │ ├── config
│ │ │ ├── cmp.lua
│ │ │ ├── lsp.lua
│ │ │ └── telescope.lua
│ │ ├── plugins.lua
│ │ └── plugins
│ │ │ ├── auto_pairs.lua
│ │ │ ├── cmp.lua
│ │ │ ├── colorscheme.lua
│ │ │ ├── essentials.lua
│ │ │ ├── eye_candy.lua
│ │ │ ├── formatter.lua
│ │ │ ├── git.lua
│ │ │ ├── helpers.lua
│ │ │ ├── indent_blankline.lua
│ │ │ ├── languages.lua
│ │ │ ├── line.lua
│ │ │ ├── lsp.lua
│ │ │ ├── lspkind.lua
│ │ │ ├── mason.lua
│ │ │ ├── oil.lua
│ │ │ ├── telescope.lua
│ │ │ ├── treesitter.lua
│ │ │ └── useful.lua
│ └── plugin
│ │ ├── remaps.vim
│ │ └── sets.vim
├── qBittorrent
│ └── nord.qbtheme
├── qtile-extras
│ └── github.token
├── qtile
│ ├── .gitignore
│ ├── README.md
│ ├── bars
│ │ ├── __init__.py
│ │ ├── all_widget_imports.py
│ │ ├── base.py
│ │ └── simple.py
│ ├── base_config.py
│ ├── config.py
│ ├── utils
│ │ ├── __init__.py
│ │ ├── colors.py
│ │ ├── group_bindings.py
│ │ └── keybinds.py
│ └── vars.py
├── sketchybar
│ ├── bar.lua
│ ├── colors.lua
│ ├── default.lua
│ ├── icons.lua
│ ├── init.lua
│ ├── items
│ │ ├── battery.lua
│ │ ├── date.lua
│ │ ├── init.lua
│ │ ├── spaces.lua
│ │ ├── time.lua
│ │ ├── volume.lua
│ │ └── window_count.lua
│ ├── settings.lua
│ ├── sketchybarrc
│ └── utils.lua
├── starship.toml
├── textual-web
│ ├── auth.json
│ └── ganglion.toml
├── tmux
│ └── tmux.conf
├── vsnip
│ ├── cpp.json
│ └── python.json
├── wezterm
│ ├── keys.lua
│ ├── mux.lua
│ ├── startup.lua
│ ├── tab_bar_left.lua
│ ├── tab_extras.lua
│ ├── utils.lua
│ └── wezterm.lua
├── zathura
│ └── zathurarc
└── zed
│ ├── keymap.json
│ ├── settings.json
│ ├── tasks.json
│ └── themes
│ └── Nord.json
├── flake.lock
├── flake.nix
├── homes
├── aarch64-darwin
│ └── kraanzu@macos
│ │ └── default.nix
└── x86_64-linux
│ └── kraanzu@nzxt
│ └── default.nix
├── lib
└── module
│ └── default.nix
├── modules
├── home
│ ├── browsers
│ │ └── default.nix
│ ├── desktop
│ │ ├── dunst
│ │ │ └── default.nix
│ │ ├── nord_theme
│ │ │ └── default.nix
│ │ ├── picom
│ │ │ └── default.nix
│ │ ├── rofi
│ │ │ ├── default.nix
│ │ │ └── rofi-theme.nix
│ │ └── wallpapers
│ │ │ └── default.nix
│ ├── dev
│ │ ├── apps
│ │ │ └── default.nix
│ │ └── lang
│ │ │ └── default.nix
│ ├── media
│ │ └── default.nix
│ ├── privacy
│ │ └── default.nix
│ ├── projects
│ │ └── default.nix
│ ├── sec
│ │ ├── apps
│ │ │ └── default.nix
│ │ ├── bforce
│ │ │ └── default.nix
│ │ ├── default.nix
│ │ ├── networking
│ │ │ └── default.nix
│ │ ├── recon
│ │ │ └── default.nix
│ │ └── redkit
│ │ │ └── default.nix
│ └── utils
│ │ └── default.nix
└── nixos
│ ├── apps
│ ├── droidcam
│ │ └── default.nix
│ └── openrgb
│ │ ├── default.nix
│ │ └── profile.orp
│ ├── cli
│ ├── docker
│ │ └── default.nix
│ └── openvpn
│ │ ├── default.nix
│ │ ├── lab_htb.ovpn
│ │ └── sp_htb.ovpn
│ ├── desktop
│ ├── addons
│ │ └── utilities
│ │ │ └── default.nix
│ ├── login
│ │ └── default.nix
│ └── qtile
│ │ └── default.nix
│ ├── hardware
│ └── amdgpu
│ │ └── default.nix
│ ├── home
│ └── default.nix
│ ├── system
│ ├── boot
│ │ └── default.nix
│ ├── fonts
│ │ └── default.nix
│ ├── locale
│ │ └── default.nix
│ ├── misc
│ │ └── default.nix
│ ├── shell
│ │ └── default.nix
│ ├── sound
│ │ └── default.nix
│ ├── usb
│ │ └── default.nix
│ └── xkb
│ │ └── default.nix
│ └── user
│ └── default.nix
├── packages
├── dooit
│ └── default.nix
├── firefox-nordic-theme
│ └── default.nix
├── rofi-audio-switcher
│ ├── default.nix
│ └── rofi-audio-switcher
└── smassh
│ └── default.nix
├── shells
├── archlinux
│ └── default.nix
└── qtile
│ └── default.nix
└── systems
├── aarch64-darwin
└── macos
│ └── default.nix
└── x86_64-linux
└── nzxt
├── default.nix
├── drives.nix
├── hardware-configuration.nix
├── htb.nix
└── monitors.nix
/.git-crypt/.gitattributes:
--------------------------------------------------------------------------------
1 | # Do not edit this file. To specify the files to encrypt, create your own
2 | # .gitattributes file in the directory where your files are.
3 | * !filter !diff
4 | *.gpg binary
5 |
--------------------------------------------------------------------------------
/.git-crypt/keys/default/0/C99B526F055AD6216135658FA5184C828749DC26.gpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kraanzu/.dotfiles/da007ef7322e8303f2d27bb26a47852e498de172/.git-crypt/keys/default/0/C99B526F055AD6216135658FA5184C828749DC26.gpg
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | secrets/** filter=git-crypt diff=git-crypt
2 | configs/aws/** filter=git-crypt diff=git-crypt
3 | configs/gdrive/** filter=git-crypt diff=git-crypt
4 | configs/qtile-extras/** filter=git-crypt diff=git-crypt
5 | configs/textual-web/** filter=git-crypt diff=git-crypt
6 | *.ovpn filter=git-crypt diff=git-crypt
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 | 
3 |
4 |
5 | # Kraanzu's NixOS Dotfiles
6 |
7 |
8 | ## 🖼️ NixOS Desktop
9 |
10 | > [!NOTE]
11 | >
12 | > **System Information:**
13 | >
14 | > - **OS:** NixOS
15 | > - **Window Manager:** Qtile
16 | > - **Shell:** Fish
17 | > - **Terminal:** Wezterm
18 | > - **Editor:** Neovim / Zed
19 |
20 |
21 | 
22 |
--------------------------------------------------------------------------------
/configs/aerospace/aerospace.toml:
--------------------------------------------------------------------------------
1 | after-login-command = []
2 | after-startup-command = []
3 | exec-on-workspace-change = []
4 | on-focus-changed = []
5 |
6 | start-at-login = true
7 |
8 | # Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization
9 | enable-normalization-flatten-containers = true
10 | enable-normalization-opposite-orientation-for-nested-containers = true
11 |
12 | # stack layout padding
13 | accordion-padding = 0
14 | default-root-container-layout = 'accordion'
15 | default-root-container-orientation = 'auto'
16 | on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
17 | automatically-unhide-macos-hidden-apps = true
18 |
19 | [gaps]
20 | inner.horizontal = 0
21 | inner.vertical = 0
22 | outer.left = 0
23 | outer.bottom = 0
24 | outer.top = 0
25 | outer.right = 0
26 |
27 | [workspace-to-monitor-force-assignment]
28 | 1 = 'main' # Main monitor
29 | 2 = 'main' # Main monitor
30 | 3 = 'main' # Main monitor
31 | 4 = 'main' # Main monitor
32 | 5 = 'main' # Main monitor
33 | 6 = '^built-in retina display$' # Case insensitive regex match
34 |
35 | [mode.main.binding]
36 | alt-slash = 'layout tiles horizontal vertical'
37 | alt-comma = 'layout accordion horizontal vertical'
38 |
39 | alt-h = 'focus left'
40 | alt-j = 'focus down'
41 | alt-k = 'focus up'
42 | alt-l = 'focus right'
43 |
44 | # See: https://nikitabobko.github.io/AeroSpace/commands#move
45 | alt-shift-h = 'move left'
46 | alt-shift-j = 'move down'
47 | alt-shift-k = 'move up'
48 | alt-shift-l = 'move right'
49 |
50 | alt-minus = 'resize smart -50'
51 | alt-equal = 'resize smart +50'
52 |
53 | alt-1 = 'workspace 1'
54 | alt-2 = 'workspace 2'
55 | alt-3 = 'workspace 3'
56 | alt-4 = 'workspace 4'
57 | alt-5 = 'workspace 5'
58 | alt-6 = 'workspace 6'
59 |
60 | alt-shift-1 = 'move-node-to-workspace 1'
61 | alt-shift-2 = 'move-node-to-workspace 2'
62 | alt-shift-3 = 'move-node-to-workspace 3'
63 | alt-shift-4 = 'move-node-to-workspace 4'
64 | alt-shift-5 = 'move-node-to-workspace 5'
65 | alt-shift-6 = 'move-node-to-workspace 6'
66 |
67 | alt-left = 'workspace --wrap-around prev'
68 | alt-right = 'workspace --wrap-around next'
69 |
70 | alt-tab = 'workspace-back-and-forth'
71 | alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
72 | alt-semicolon = 'mode service'
73 |
74 | cmd-down = 'volume down'
75 | cmd-up = 'volume up'
76 |
77 | alt-f = 'macos-native-fullscreen'
78 | cmd-q = 'close'
79 |
80 | [mode.service.binding]
81 | esc = ['reload-config', 'mode main']
82 | shift-down = ['volume set 0', 'mode main']
83 |
84 | # Assign apps to workspaces
85 |
86 | # Main screen
87 | [[on-window-detected]]
88 | if.app-id = 'org.mozilla.firefox'
89 | run = 'move-node-to-workspace 1'
90 |
91 | [[on-window-detected]]
92 | if.app-id = 'com.google.Chrome'
93 | run = 'move-node-to-workspace 1'
94 |
95 | [[on-window-detected]]
96 | if.app-id = 'com.googlecode.iterm2'
97 | run = 'move-node-to-workspace 3'
98 |
99 | [[on-window-detected]]
100 | if.app-id = 'com.github.wez.wezterm'
101 | run = 'move-node-to-workspace 3'
102 |
103 | # Secondary screen
104 | [[on-window-detected]]
105 | if.app-id = 'us.zoom.xos'
106 | run = 'move-node-to-workspace 6'
107 |
108 | [[on-window-detected]]
109 | if.app-id = 'com.spotify.client'
110 | run = 'move-node-to-workspace 6'
111 |
--------------------------------------------------------------------------------
/configs/aws/config:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kraanzu/.dotfiles/da007ef7322e8303f2d27bb26a47852e498de172/configs/aws/config
--------------------------------------------------------------------------------
/configs/aws/credentials:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kraanzu/.dotfiles/da007ef7322e8303f2d27bb26a47852e498de172/configs/aws/credentials
--------------------------------------------------------------------------------
/configs/dooit/config.py:
--------------------------------------------------------------------------------
1 | # from dooit.ui.api import DooitAPI, subscribe
2 | # from dooit.ui.api.events import Startup
3 | # from rich.style import Style
4 | # from dooit_extras.formatters import *
5 | # from dooit_extras.bar_widgets import *
6 | # from dooit_extras.scripts import *
7 | # from rich.text import Text
8 | #
9 | #
10 | # @subscribe(Startup)
11 | # def setup_formatters(api: DooitAPI, _):
12 | # fmt = api.formatter
13 | # theme = api.vars.theme
14 | #
15 | # # ------- WORKSPACES -------
16 | # format = Text(" ({}) ", style=theme.primary).markup
17 | # fmt.workspaces.description.add(description_children_count(format))
18 | #
19 | # # --------- TODOS ---------
20 | # # status formatter
21 | # fmt.todos.status.add(status_icons(completed=" ", pending=" ", overdue=" "))
22 | #
23 | # # urgency formatte
24 | # u_icons = {1: " ", 2: " ", 3: " ", 4: " "}
25 | # fmt.todos.urgency.add(urgency_icons(icons=u_icons))
26 | #
27 | # # due formatter
28 | # fmt.todos.due.add(due_casual_format())
29 | # fmt.todos.due.add(due_icon(completed=" ", pending=" ", overdue=" "))
30 | #
31 | # # description formatter
32 | # format = Text(" {completed_count}/{total_count}", style=theme.green).markup
33 | # fmt.todos.description.add(todo_description_progress(fmt=format))
34 | # fmt.todos.description.add(description_highlight_tags(fmt=" {}"))
35 | #
36 | #
37 | # @subscribe(Startup)
38 | # def setup_bar(api: DooitAPI, _):
39 | # theme = api.vars.theme
40 | #
41 | # widgets = [
42 | # Mode(api),
43 | # Spacer(api, width=0),
44 | # StatusIcons(api, bg=theme.background2),
45 | # TextBox(api, text=" ", bg=theme.primary),
46 | # TextBox(api, text=" -4°C ", fg=theme.foreground3, bg=theme.background3),
47 | # TextBox(api, text=" ", bg=theme.primary),
48 | # Clock(api, format="%I:%M %p", fg=theme.foreground3, bg=theme.background3),
49 | # ]
50 | # api.bar.set(widgets)
51 | #
52 | #
53 | # @subscribe(Startup)
54 | # def setup_dashboard(api: DooitAPI, _):
55 | # from datetime import datetime
56 | #
57 | # theme = api.vars.theme
58 | #
59 | # now = datetime.now()
60 | # formatted_date = now.strftime(" %A, %d %b ")
61 | #
62 | # header = Text(
63 | # "I alone shall stand against the darkness of my overdue tasks",
64 | # style=Style(color=theme.primary, bold=True, italic=True),
65 | # )
66 | #
67 | # ascii_art = r"""
68 | # .
69 | # / V\
70 | # / ` /
71 | # << |
72 | # / |
73 | # / |
74 | # / |
75 | # / \ \ /
76 | # ( ) | |
77 | # ________| _/_ | |
78 | # <__________\______)\__)
79 | # """
80 | #
81 | # items = [
82 | # header,
83 | # "",
84 | # Text(ascii_art, style=api.vars.theme.primary),
85 | # "",
86 | # Text(
87 | # formatted_date,
88 | # style=Style(color=theme.secondary, bold=True, italic=True),
89 | # ),
90 | # ]
91 | # api.dashboard.set(items)
92 | #
93 |
--------------------------------------------------------------------------------
/configs/dunst/dunstrc:
--------------------------------------------------------------------------------
1 | [global]
2 | alignment="left"
3 | always_run_script=yes
4 | class="Dunst"
5 | corner_radius=0
6 | ellipsize="middle"
7 | enable_recursive_icon_lookup=yes
8 | follow="mouse"
9 | font="JetBrainsMono Nerd Font 12"
10 | format="%s%b"
11 | frame_width=2
12 | gap_size=0
13 | height=100
14 | hide_duplicate_count=no
15 | history_length=20
16 | horizontal_padding=15
17 | icon_position="left"
18 | idle_threshold=120
19 | ignore_newline=no
20 | indicate_hidden=yes
21 | line_height=2
22 | markup="full"
23 | max_icon_size=48
24 | min_icon_size=24
25 | monitor=0
26 | mouse_left_click="close_current"
27 | mouse_middle_click=do_action close_current
28 | mouse_right_click="close_all"
29 | notification_limit=0
30 | offset="20x20"
31 | origin="top-right"
32 | padding=15
33 | progress_bar=yes
34 | progress_bar_frame_width=2
35 | progress_bar_height=80
36 | progress_bar_max_width=300
37 | progress_bar_min_width=300
38 | scale=0
39 | separator_color="frame"
40 | separator_height=2
41 | show_age_threshold=60
42 | show_indicators=yes
43 | sort=yes
44 | stack_duplicates=yes
45 | sticky_history=yes
46 | text_icon_padding=0
47 | title="Dunst"
48 | transparency=0
49 | vertical_alignment="center"
50 | width=350
51 |
52 | [urgency_critical]
53 | background="#252a34"
54 | foreground="#BF616A"
55 | frame_color="#BF616A"
56 | timeout=0
57 |
58 | [urgency_low]
59 | background="#252a34"
60 | foreground="#D8DEE9"
61 | frame_color="#81A1C1"
62 | timeout=2
63 |
64 | [urgency_normal]
65 | background="#252a34"
66 | foreground="#D8DEE9"
67 | frame_color="#81A1C1"
68 | timeout=5
69 |
70 | [skip-rule]
71 | appname="Spotify"
72 | skip_display=true
73 |
--------------------------------------------------------------------------------
/configs/fish/config.fish:
--------------------------------------------------------------------------------
1 | # -------SOURCE SECRETS-----------------
2 | source $HOME/.config/fish/secrets.fish 2> /dev/null
3 | source $HOME/.config/fish/utils.fish
4 | source $HOME/.config/fish/quick_scripts.fish
5 | source $HOME/.conda/etc/fish/conf.d/conda.fish 2> /dev/null
6 |
7 | #----------------------------- BASICS -----------------------------------
8 | fish_vi_key_bindings
9 | fish_config theme choose Nord
10 |
11 | set fish_greeting # Supresses fish's intro message
12 | set TERM xterm-256color
13 | set EDITOR nvim
14 | set VISUAL nvim
15 |
16 | #----------------------------- ALIASES --------------------------------
17 |
18 | alias ..='cd ..'
19 | alias ...='cd ../..'
20 |
21 | alias vim='nvim'
22 | alias tmux='tmux -u'
23 | alias mv='mv -i'
24 | alias rm='rm -rfi'
25 | alias cp='cp -r'
26 |
27 | alias ls='exa -F --color=always --group-directories-first' # my preferred listing
28 | alias la='exa -a --color=always --group-directories-first' # all files and dirs
29 | alias ll='exa -l --color=always --group-directories-first' # long format
30 | alias lt='exa -aT --color=always --group-directories-first' # tree listing
31 | alias df='df -h | grep -e "^/dev"' # human-readable sizes
32 | alias free='free -m' # show sizes in MB
33 | alias yts='yt-dlp --extract-audio --audio-format opus' # download youtube video as mp3
34 | alias cat='bat -pp --theme=Nord'
35 | alias grep='grep --color=auto'
36 | alias cb='xclip -selection clipboard'
37 |
38 | export LANG=en_IN.UTF-8
39 | export TERM=xterm-256color
40 | export PYTHONDONTWRITEBYTECODE=1
41 | export GOPATH=$HOME/.local/go
42 | export IPYTHONDIR=~/.config/ipython
43 |
44 | # Extra programs
45 | syncthing install-completions | source 2> /dev/null
46 | zoxide init fish | source 2> /dev/null
47 |
48 | starship init fish | source
49 |
--------------------------------------------------------------------------------
/configs/fish/quick_scripts.fish:
--------------------------------------------------------------------------------
1 | # compile and run c/c++
2 | function com
3 | g++ $argv[1] && ./a.out
4 | end
5 |
6 | # git diff for last commit
7 | function gdiff
8 | set COMMIT $argv[1]
9 | git diff $COMMIT~ $COMMIT
10 | end
11 |
12 | # push to android
13 | function apush
14 | adb push $argv[1] /sdcard/AAA
15 | end
16 |
17 | # MISC
18 | alias dclean='docker system prune -a --volumes'
19 | alias kayo='gdrive files download --recursive --destination ~/HDD/anime/'
20 |
--------------------------------------------------------------------------------
/configs/fish/utils.fish:
--------------------------------------------------------------------------------
1 | function ext
2 | set destination $argv[-1]
3 |
4 | for file in $argv[1..-2]
5 | if string match -q '*.tar' $file
6 | tar -xf $file -C $destination
7 | else if string match -q '*.tar.gz' $file
8 | tar -xzf $file -C $destination
9 | else if string match -q '*.tgz' $file
10 | tar -xzf $file -C $destination
11 | else if string match -q '*.zip' $file
12 | unzip $file -d $destination
13 | else if string match -q '*.rar' $file
14 | unrar x $file $destination
15 | else
16 | echo "Unsupported archive type for file: $file"
17 | end
18 | end
19 | end
20 |
21 | # merge develop branch and push
22 | function mmm
23 | git checkout main
24 | git merge develop
25 | git push
26 | git checkout develop
27 | end
28 |
29 | function shell
30 | if test ! -d .venv
31 | python3 -m venv .venv
32 | end
33 |
34 | source .venv/bin/activate.fish
35 | end
36 |
--------------------------------------------------------------------------------
/configs/gdrive/account.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kraanzu/.dotfiles/da007ef7322e8303f2d27bb26a47852e498de172/configs/gdrive/account.json
--------------------------------------------------------------------------------
/configs/gdrive/kraanzu@gmail.com/secret.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kraanzu/.dotfiles/da007ef7322e8303f2d27bb26a47852e498de172/configs/gdrive/kraanzu@gmail.com/secret.json
--------------------------------------------------------------------------------
/configs/gdrive/kraanzu@gmail.com/tokens.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kraanzu/.dotfiles/da007ef7322e8303f2d27bb26a47852e498de172/configs/gdrive/kraanzu@gmail.com/tokens.json
--------------------------------------------------------------------------------
/configs/git/config:
--------------------------------------------------------------------------------
1 | [alias]
2 | aa = "add --all"
3 | br = "branch"
4 | ci = "commit"
5 | cm = "commit -m"
6 | co = "checkout"
7 | d = "diff"
8 | dc = "diff --cached"
9 | last = "log -1 HEAD"
10 | lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
11 | pullr = "pull --rebase"
12 | pushf = "push --force-with-lease"
13 | s = "status -s"
14 | st = "status"
15 |
16 | uncommit = reset HEAD~1
17 | recommit = commit --amend --no-edit
18 | gl = log --all --graph --pretty=format:'%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n'
19 |
20 | [user]
21 | email = "kraanzu@gmail.com"
22 | name = "kraanzu"
23 |
24 | [core]
25 | excludesFile = ~/.config/git/gitignore
26 | [push]
27 | autoSetupRemote = true
28 | [advice]
29 | defaultBranchName = false
30 | statusHints = false
31 | pushNonFastForward = false
32 |
--------------------------------------------------------------------------------
/configs/git/gitignore:
--------------------------------------------------------------------------------
1 | pyrightconfig.json
2 | CLAUDE.md
3 | .claude/
4 | .zed/
5 |
--------------------------------------------------------------------------------
/configs/ipython/profile_default/startup/cp_imports.py:
--------------------------------------------------------------------------------
1 | from bisect import *
2 | from collections import *
3 | from itertools import *
4 | from functools import *
5 |
6 |
--------------------------------------------------------------------------------
/configs/nvim/after/plugin/tcss.lua:
--------------------------------------------------------------------------------
1 | vim.api.nvim_command("autocmd BufNewFile,BufRead *.tcss set filetype=tcss")
2 |
3 | local client = vim.lsp.start_client({
4 | name = "tcss-lsp-v1",
5 | cmd = { "/home/kraanzu/Projects/tcss-lsp/wrapper.sh" },
6 | filetypes = { "tcss", "python" },
7 | root_dir = vim.fn.getcwd(),
8 | autostart = true,
9 | })
10 |
11 | if client then
12 | vim.api.nvim_create_autocmd("FileType", {
13 | pattern = "tcss",
14 | callback = function()
15 | vim.lsp.buf_attach_client(0, client)
16 | end,
17 | })
18 | else
19 | print("Failed to start tcss-lsp")
20 | end
21 |
--------------------------------------------------------------------------------
/configs/nvim/init.lua:
--------------------------------------------------------------------------------
1 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
2 | if not vim.loop.fs_stat(lazypath) then
3 | vim.fn.system({
4 | "git",
5 | "clone",
6 | "--filter=blob:none",
7 | "https://github.com/folke/lazy.nvim.git",
8 | "--branch=stable", -- latest stable release
9 | lazypath,
10 | })
11 | end
12 | vim.opt.rtp:prepend(lazypath)
13 |
14 | require("basics")
15 | require("lazy").setup("plugins")
16 |
--------------------------------------------------------------------------------
/configs/nvim/lua/basics.lua:
--------------------------------------------------------------------------------
1 | vim.opt.termguicolors = true
2 | vim.opt.termsync = false
3 | vim.g.gitgutter_terminal_reports_focus = 0
4 | vim.g.mapleader = " "
5 | vim.g.maplocalleader = " "
6 | vim.g.vsnip_snippet_dir = "~/.config/vsnip"
7 | vim.api.nvim_set_keymap("n", "", ":w", { noremap = true, silent = true })
8 | vim.api.nvim_create_autocmd("TextYankPost", {
9 | group = vim.api.nvim_create_augroup("highlight_yank", {}),
10 | desc = "Hightlight selection on yank",
11 | pattern = "*",
12 | callback = function()
13 | vim.highlight.on_yank({ higroup = "IncSearch", timeout = 500 })
14 | end,
15 | })
16 |
--------------------------------------------------------------------------------
/configs/nvim/lua/config/cmp.lua:
--------------------------------------------------------------------------------
1 | local cmp = require("cmp")
2 | local lspkind = require("lspkind")
3 |
4 | cmp.setup({
5 | formatting = {
6 | format = lspkind.cmp_format({
7 | mode = "symbol_text",
8 | menu = {
9 | buffer = "[Buffer]",
10 | nvim_lsp = "[LSP]",
11 | luasnip = "[LuaSnip]",
12 | nvim_lua = "[Lua]",
13 | latex_symbols = "[Latex]",
14 | },
15 | }),
16 | },
17 | snippet = {
18 | expand = function(args)
19 | vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
20 | end,
21 | },
22 | mapping = cmp.mapping.preset.insert({
23 | [""] = cmp.mapping.select_next_item(),
24 | [""] = cmp.mapping.scroll_docs(-4),
25 | [""] = cmp.mapping.scroll_docs(4),
26 | [""] = cmp.mapping.complete(),
27 | [""] = cmp.mapping.abort(),
28 | [""] = cmp.mapping.confirm({ select = true }),
29 | }),
30 | sources = cmp.config.sources({
31 | { name = "nvim_lsp" },
32 | { name = "vsnip" },
33 | }, {
34 | { name = "buffer" },
35 | }),
36 | })
37 |
38 | cmp.setup.cmdline(":", {
39 | mapping = cmp.mapping.preset.cmdline(),
40 | sources = cmp.config.sources({
41 | { name = "path" },
42 | }, {
43 | { name = "cmdline" },
44 | }),
45 | })
46 |
47 | local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
48 |
--------------------------------------------------------------------------------
/configs/nvim/lua/config/lsp.lua:
--------------------------------------------------------------------------------
1 | local opts = { noremap = true, silent = true }
2 | vim.api.nvim_set_keymap("n", "[d", "lua vim.diagnostic.goto_prev()", opts)
3 | vim.api.nvim_set_keymap("n", "]d", "lua vim.diagnostic.goto_next()", opts)
4 |
5 | local on_attach = function(_, bufnr)
6 | vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")
7 |
8 | vim.api.nvim_buf_set_keymap(bufnr, "n", "gD", "lua vim.lsp.buf.declaration()", opts)
9 | vim.api.nvim_buf_set_keymap(bufnr, "n", "gd", "lua vim.lsp.buf.definition()", opts)
10 | vim.api.nvim_buf_set_keymap(bufnr, "n", "K", "lua vim.lsp.buf.hover()", opts)
11 | vim.api.nvim_buf_set_keymap(bufnr, "n", "gi", "lua vim.lsp.buf.implementation()", opts)
12 | vim.api.nvim_buf_set_keymap(
13 | bufnr,
14 | "n",
15 | "wl",
16 | "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))",
17 | opts
18 | )
19 | vim.api.nvim_buf_set_keymap(bufnr, "n", "D", "lua vim.lsp.buf.type_definition()", opts)
20 | vim.api.nvim_buf_set_keymap(bufnr, "n", "rn", "lua vim.lsp.buf.rename()", opts)
21 | vim.api.nvim_buf_set_keymap(bufnr, "n", "ca", "lua vim.lsp.buf.code_action()", opts)
22 | vim.api.nvim_buf_set_keymap(bufnr, "n", "gr", "lua vim.lsp.buf.references()", opts)
23 | vim.api.nvim_buf_set_keymap(bufnr, "n", "f", "lua vim.lsp.buf.formatting()", opts)
24 | end
25 |
26 | vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
27 | virtual_text = true,
28 | signs = true,
29 | update_in_insert = true,
30 | severity_sort = true,
31 | })
32 |
33 | local capabilities = vim.lsp.protocol.make_client_capabilities()
34 | capabilities.textDocument.completion.completionItem.snippetSupport = true
35 | capabilities.textDocument.completion.completionItem.resolveSupport = {
36 | properties = {
37 | "documentation",
38 | "detail",
39 | "additionalTextEdits",
40 | "update_in_insert",
41 | },
42 | }
43 |
44 | local servers = { "pyright", "marksman", "lua_ls", "rust_analyzer", "gopls", "zls", "nixd" }
45 | for _, lsp in pairs(servers) do
46 | require("lspconfig")[lsp].setup({
47 | on_attach = on_attach,
48 | capabilities = capabilities,
49 | })
50 | end
51 |
52 | require("lspconfig").lua_ls.setup({
53 | cmd = { "lua-lsp" },
54 | settings = {
55 | Lua = {
56 | diagnostics = {
57 | globals = { "vim" },
58 | },
59 | },
60 | },
61 | })
62 |
--------------------------------------------------------------------------------
/configs/nvim/lua/config/telescope.lua:
--------------------------------------------------------------------------------
1 | local builtin = require("telescope.builtin")
2 |
3 | vim.keymap.set("n", "tp", builtin.git_files, {})
4 | vim.keymap.set("n", "tr", builtin.live_grep, {})
5 | vim.keymap.set("n", "tb", builtin.buffers, {})
6 |
7 | require("telescope").setup({
8 | defaults = {
9 | prompt_prefix = " ",
10 | selection_caret = " ",
11 | entry_prefix = " ",
12 | initial_mode = "insert",
13 | layout_strategy = "horizontal",
14 | layout_config = {
15 | horizontal = {
16 | prompt_position = "top",
17 | preview_width = 0.55,
18 | results_width = 0.8,
19 | },
20 | vertical = {
21 | mirror = false,
22 | },
23 | width = 0.99,
24 | height = 0.99,
25 | preview_cutoff = 120,
26 | },
27 | },
28 | })
29 |
--------------------------------------------------------------------------------
/configs/nvim/lua/plugins.lua:
--------------------------------------------------------------------------------
1 | return {}
2 |
--------------------------------------------------------------------------------
/configs/nvim/lua/plugins/auto_pairs.lua:
--------------------------------------------------------------------------------
1 | return {
2 | "windwp/nvim-autopairs",
3 | event = "InsertEnter",
4 | opts = {}, -- this is equalent to setup({}) function
5 | }
6 |
--------------------------------------------------------------------------------
/configs/nvim/lua/plugins/cmp.lua:
--------------------------------------------------------------------------------
1 | return {
2 | {
3 | "hrsh7th/cmp-nvim-lsp",
4 | config = function() require("config.cmp") end,
5 | },
6 | {
7 | "ray-x/lsp_signature.nvim",
8 | config = function() require("lsp_signature").setup({}) end,
9 | event = "BufWrite",
10 | },
11 | { "hrsh7th/nvim-cmp", event = "BufRead" },
12 | { "hrsh7th/cmp-buffer", event = "BufRead" },
13 | { "hrsh7th/vim-vsnip", event = "BufRead" },
14 | { "hrsh7th/cmp-cmdline" },
15 | }
16 |
--------------------------------------------------------------------------------
/configs/nvim/lua/plugins/colorscheme.lua:
--------------------------------------------------------------------------------
1 | return {
2 | {
3 | "gbprod/nord.nvim",
4 | config = function()
5 | require("nord").setup({})
6 | vim.cmd.colorscheme("nord")
7 | end,
8 | },
9 | }
10 |
--------------------------------------------------------------------------------
/configs/nvim/lua/plugins/essentials.lua:
--------------------------------------------------------------------------------
1 | return {
2 | "nvim-lua/plenary.nvim",
3 | "mfussenegger/nvim-dap",
4 | }
5 |
--------------------------------------------------------------------------------
/configs/nvim/lua/plugins/eye_candy.lua:
--------------------------------------------------------------------------------
1 | return {
2 | -- EYE CANDY
3 | {
4 | "norcalli/nvim-colorizer.lua",
5 | event = "BufRead",
6 | config = function()
7 | require("colorizer").setup()
8 | end,
9 | },
10 | {
11 | "stevearc/dressing.nvim",
12 | },
13 | }
14 |
--------------------------------------------------------------------------------
/configs/nvim/lua/plugins/formatter.lua:
--------------------------------------------------------------------------------
1 | return {
2 | "stevearc/conform.nvim",
3 | event = { "BufWritePre" },
4 | cmd = { "ConformInfo" },
5 | keys = {
6 | {
7 | "ff",
8 | function()
9 | require("conform").format({ async = true })
10 | end,
11 | mode = "",
12 | desc = "Format buffer",
13 | },
14 | },
15 | opts = {
16 | formatters_by_ft = {
17 | python = { "ruff_format" },
18 | nix = { "alejandra" },
19 | lua = { "stylua" },
20 | typescript = { "prettierd" },
21 | },
22 | default_format_opts = {
23 | lsp_format = "fallback",
24 | },
25 | formatters = {
26 | shfmt = {
27 | prepend_args = { "-i", "2" },
28 | },
29 | },
30 | },
31 | init = function()
32 | vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
33 | end,
34 | }
35 |
--------------------------------------------------------------------------------
/configs/nvim/lua/plugins/git.lua:
--------------------------------------------------------------------------------
1 | return {
2 | -- GIT STUFF
3 | { "tpope/vim-fugitive", cmd = "G" },
4 | {
5 | "lewis6991/gitsigns.nvim",
6 | event = "BufRead",
7 | config = function()
8 | require("gitsigns").setup({
9 | current_line_blame = true,
10 | })
11 | end,
12 | },
13 | {
14 | "TimUntersberger/neogit",
15 | tag = "v0.0.1",
16 | cmd = "Neogit",
17 | config = function()
18 | require("neogit").setup()
19 | end,
20 | },
21 | }
22 |
--------------------------------------------------------------------------------
/configs/nvim/lua/plugins/helpers.lua:
--------------------------------------------------------------------------------
1 | return {
2 | { "tomtom/tcomment_vim", event = "BufRead" },
3 | }
4 |
--------------------------------------------------------------------------------
/configs/nvim/lua/plugins/indent_blankline.lua:
--------------------------------------------------------------------------------
1 | return {
2 | {
3 | "lukas-reineke/indent-blankline.nvim",
4 | tag = "v2.20.8",
5 | event = "BufRead",
6 | config = function()
7 | vim.opt.list = true
8 | vim.opt.listchars:append("eol:↴")
9 | require("indent_blankline").setup({
10 | space_char_blankline = " ",
11 | show_current_context = true,
12 | })
13 | end,
14 | },
15 | }
16 |
--------------------------------------------------------------------------------
/configs/nvim/lua/plugins/languages.lua:
--------------------------------------------------------------------------------
1 | return {
2 | { "dag/vim-fish", ft = { "fish" } },
3 | { "cespare/vim-toml", ft = { "toml" } },
4 | { "rust-lang/rust.vim", ft = { "rs" } },
5 | {
6 | "simrat39/rust-tools.nvim",
7 | ft = { "rs" },
8 | config = function()
9 | require("rust-tools").setup({})
10 | end,
11 | },
12 | }
13 |
--------------------------------------------------------------------------------
/configs/nvim/lua/plugins/line.lua:
--------------------------------------------------------------------------------
1 | return {
2 | {
3 | "nvim-lualine/lualine.nvim",
4 | dependencies = { "kyazdani42/nvim-web-devicons" },
5 | config = function()
6 | require("lualine").setup({
7 | options = {
8 | section_separators = { left = "", right = "" },
9 | component_separators = { left = "", right = "" },
10 | },
11 | sections = {
12 | lualine_a = { "mode" },
13 | lualine_b = { "branch", "diagnostics" },
14 | lualine_c = {},
15 | lualine_x = { "filetype" },
16 | lualine_y = {},
17 | lualine_z = { "location" },
18 | },
19 | tabline = {
20 | lualine_a = {
21 | {
22 | "buffers",
23 | show_filename_only = true, -- Shows shortened relative path when set to false.
24 | hide_filename_extension = false, -- Hide filename extension when set to true.
25 | show_modified_status = true, -- Shows indicator when the buffer is modified.
26 | buffers_color = {
27 | active = { bg = "#2e3440", fg = "#8fbcbb", gui = "bold" },
28 | inactive = { bg = "#2e3440", fg = "#4c566a", gui = "bold" },
29 | },
30 | mode = 0, -- 0: Shows buffer name
31 | symbols = {
32 | modified = " ●", -- Text to show when the buffer is modified
33 | alternate_file = "", -- Text to show to identify the alternate file
34 | directory = "", -- Text to show when the buffer is a directory
35 | },
36 | },
37 | },
38 | },
39 | })
40 | end,
41 | },
42 | }
43 |
--------------------------------------------------------------------------------
/configs/nvim/lua/plugins/lsp.lua:
--------------------------------------------------------------------------------
1 | return {
2 | -- LSP
3 | {
4 | "neovim/nvim-lspconfig",
5 | dependencies = {
6 | "williamboman/mason.nvim",
7 | "williamboman/mason-lspconfig.nvim",
8 | },
9 | config = function()
10 | require("config.lsp")
11 | end,
12 | },
13 | }
14 |
--------------------------------------------------------------------------------
/configs/nvim/lua/plugins/lspkind.lua:
--------------------------------------------------------------------------------
1 | return {
2 | {
3 | "onsails/lspkind.nvim",
4 | event = "BufRead",
5 | config = function()
6 | require("lspkind").init({})
7 | end,
8 | },
9 | }
10 |
--------------------------------------------------------------------------------
/configs/nvim/lua/plugins/mason.lua:
--------------------------------------------------------------------------------
1 | return {
2 | {
3 | "williamboman/mason.nvim",
4 | config = function()
5 | require("mason").setup()
6 | end,
7 | cmd = "Mason",
8 | },
9 | }
10 |
--------------------------------------------------------------------------------
/configs/nvim/lua/plugins/oil.lua:
--------------------------------------------------------------------------------
1 | return {
2 | "stevearc/oil.nvim",
3 | dependencies = { "nvim-tree/nvim-web-devicons" },
4 | config = function()
5 | require("oil").setup({})
6 | vim.keymap.set("n", "-", "Oil", { desc = "Open parent directory" })
7 | end,
8 | }
9 |
--------------------------------------------------------------------------------
/configs/nvim/lua/plugins/telescope.lua:
--------------------------------------------------------------------------------
1 | return {
2 | {
3 | "nvim-telescope/telescope.nvim",
4 | -- tag = "0.1.2",
5 | config = function()
6 | require("config.telescope")
7 | end,
8 | },
9 | }
10 |
--------------------------------------------------------------------------------
/configs/nvim/lua/plugins/treesitter.lua:
--------------------------------------------------------------------------------
1 | return {
2 | "nvim-treesitter/nvim-treesitter",
3 | event = "BufRead",
4 | config = function()
5 | require("nvim-treesitter.configs").setup({ highlight = { enable = true } })
6 | end,
7 | }
8 |
--------------------------------------------------------------------------------
/configs/nvim/lua/plugins/useful.lua:
--------------------------------------------------------------------------------
1 | return {
2 | { "preservim/tagbar", cmd = "TagbarToggle" },
3 | }
4 |
--------------------------------------------------------------------------------
/configs/nvim/plugin/remaps.vim:
--------------------------------------------------------------------------------
1 | noremap :Neogit
2 | noremap
3 | noremap
4 | noremap :G push
5 |
6 | " clear highlights as well
7 | noremap :nohlsearch
8 |
9 | imap vsnip#available(1) ? '(vsnip-expand-or-jump)' : ''
10 | smap vsnip#available(1) ? '(vsnip-expand-or-jump)' : ''
11 |
12 | " Buffer stuff
13 | noremap :bn
14 | noremap :bp
15 | noremap :bd
16 | nmap :TagbarToggle
17 |
18 | " keeping it centered
19 | nnoremap n nzzzv
20 | nnoremap N Nzzzv
21 | nnoremap J mzJ`z
22 |
23 | " Undo Break Points
24 | inoremap , ,u
25 | inoremap . .u
26 | inoremap ? ?u
27 |
28 | "Jumplist Mutations
29 | nnoremap j (v:count > 5 ? "m'" . v:count : "") . 'j'
30 | nnoremap k (v:count > 5 ? "m'" . v:count : "") . 'k'
31 |
32 | vnoremap J :m '>+1gv=gv
33 | vnoremap K :m '<-2gv=gv
34 |
--------------------------------------------------------------------------------
/configs/nvim/plugin/sets.vim:
--------------------------------------------------------------------------------
1 | set nocompatible
2 | set number
3 | set cursorline
4 | set backspace=indent,eol,start
5 | set showmode
6 | set relativenumber
7 | set mouse=a
8 | set scrolloff=8
9 | set tabstop=4
10 | set shiftwidth=2
11 | set expandtab
12 | set hidden
13 | set smartcase
14 | set encoding=utf-8
15 | set shell=bash
16 | set completeopt=menu,menuone,noselect
17 | set noshowmode " to get rid of thing like --INSERT--
18 | set noshowcmd " to get rid of display of last command
19 |
20 | set undofile
21 | set undodir=~/.undodir
22 | set updatetime=100
23 |
24 | " Always draw sign column. Prevent buffer moving when adding/deleting sign.
25 | set signcolumn=yes
26 |
27 | " Jump to start and end of line using the home row keys
28 | map H ^
29 | map L $
30 |
--------------------------------------------------------------------------------
/configs/qBittorrent/nord.qbtheme:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kraanzu/.dotfiles/da007ef7322e8303f2d27bb26a47852e498de172/configs/qBittorrent/nord.qbtheme
--------------------------------------------------------------------------------
/configs/qtile-extras/github.token:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kraanzu/.dotfiles/da007ef7322e8303f2d27bb26a47852e498de172/configs/qtile-extras/github.token
--------------------------------------------------------------------------------
/configs/qtile/.gitignore:
--------------------------------------------------------------------------------
1 | __pycache__/
2 | .vscode/
3 |
--------------------------------------------------------------------------------
/configs/qtile/README.md:
--------------------------------------------------------------------------------
1 | # qtile-config
2 |
--------------------------------------------------------------------------------
/configs/qtile/bars/__init__.py:
--------------------------------------------------------------------------------
1 | from .simple import simple_bar
2 |
3 | __all__ = ["simple_bar"]
4 |
--------------------------------------------------------------------------------
/configs/qtile/bars/all_widget_imports.py:
--------------------------------------------------------------------------------
1 | from libqtile.backend.x11.window import Window
2 | from libqtile.widget.windowtabs import *
3 |
4 | from qtile_extras.widget import (
5 | TextBox,
6 | GroupBox,
7 | GroupBox2,
8 | GenPollText,
9 | Systray,
10 | StatusNotifier,
11 | Clock,
12 | Memory,
13 | Spacer,
14 | PulseVolume,
15 | WidgetBox,
16 | DoNotDisturb,
17 | WindowName,
18 | GithubNotifications,
19 | )
20 |
21 |
22 | class MaxWindows(WindowTabs):
23 | @staticmethod
24 | def get_window_name(w: Window) -> str:
25 | def get_split(name, separator):
26 | return name.split(separator)[-1].strip()
27 |
28 | if w.get_wm_role() == "pop-up":
29 | name = get_split(w.name, "-")
30 | else:
31 | name = w.get_wm_class()
32 | if name:
33 | name = name[-1]
34 | name = get_split(name, ".")
35 |
36 | return f" {str(name).title()} "
37 |
38 | def update(self, *args):
39 | names = []
40 |
41 | self.text = ""
42 | for w in self.bar.screen.group.windows:
43 | name = self.get_window_name(w)
44 | task = pangocffi.markup_escape_text(name)
45 |
46 | if w is self.bar.screen.group.current_window:
47 | task = task.join(self.selected)
48 |
49 | names.append(task)
50 | self.text = self.separator.join(names)
51 |
52 | self.bar.draw()
53 |
54 |
55 | __all__ = [
56 | "TextBox",
57 | "GroupBox",
58 | "GroupBox2",
59 | "GenPollText",
60 | "Systray",
61 | "StatusNotifier",
62 | "Clock",
63 | "Memory",
64 | "Spacer",
65 | "PulseVolume",
66 | "WidgetBox",
67 | "DoNotDisturb",
68 | "WindowName",
69 | "WindowTabs",
70 | "MaxWindows",
71 | "GithubNotifications",
72 | ]
73 |
--------------------------------------------------------------------------------
/configs/qtile/bars/base.py:
--------------------------------------------------------------------------------
1 | from libqtile import qtile
2 | from collections import defaultdict
3 | from qtile_extras.widget import Spacer, Sep
4 | from utils.colors import color
5 | from vars import DARK, LOCATION
6 | from .all_widget_imports import *
7 |
8 |
9 | # ----------------- CONSTANTS ------------------
10 |
11 | PAD = Spacer(length=4)
12 | SEP1 = Sep(linewidth=2, size_percent=65, foreground=color.dark3)
13 |
14 | ICON_WIDGET_DEFAULTS = {
15 | "fontsize": 23,
16 | }
17 |
18 | # ---------------- DEFAULTS -----------------
19 |
20 | DEFAULT_CONFIGS = defaultdict(dict)
21 |
22 | DEFAULT_CONFIGS["systray"] = dict(
23 | icon_size=20,
24 | foreground=color[DARK],
25 | )
26 |
27 | DEFAULT_CONFIGS["battery"] = dict(
28 | format="{percent:2.0%}",
29 | )
30 |
31 | DEFAULT_CONFIGS["wifi"] = dict(
32 | format="{essid} ",
33 | disconnected_message=" Disconnected ",
34 | )
35 |
36 | DEFAULT_CONFIGS["clock"] = dict(
37 | format="%H:%M",
38 | )
39 |
40 | DEFAULT_CONFIGS["date"] = dict(
41 | format="%a, %b %d",
42 | )
43 |
44 | DEFAULT_CONFIGS["memory"] = dict(
45 | measure_mem="G",
46 | format="{MemUsed:.1f} GB ",
47 | )
48 |
49 | DEFAULT_CONFIGS["disk"] = dict(
50 | format="{uf} G",
51 | partition="/home",
52 | measure="G",
53 | visible_on_warn=False,
54 | )
55 |
56 | DEFAULT_CONFIGS["netspeed"] = dict(
57 | format="{down}↓ {up}↑",
58 | )
59 |
60 | DEFAULT_CONFIGS["weather"] = dict(
61 | location={LOCATION: LOCATION},
62 | format="%t",
63 | )
64 |
65 | DEFAULT_CONFIGS["cpu"] = dict(
66 | format="{load_percent}%",
67 | )
68 |
69 | DEFAULT_CONFIGS["volume"] = dict(
70 | fmt="{} ",
71 | )
72 |
73 | DEFAULT_CONFIGS["do_not_disturb"] = dict(
74 | enabled_icon=" ",
75 | disabled_icon=" ",
76 | )
77 |
78 | DEFAULT_CONFIGS["window_name"] = dict(format="{class}")
79 |
80 | DEFAULT_CONFIGS["max_windows"] = dict(
81 | selected = (f'', ''),
82 | )
83 |
84 | DEFAULT_CONFIGS["github_notifications"] = dict(
85 | icon_size=18,
86 | update_interval=60,
87 | active_colour=color.cyan,
88 | )
89 |
90 | DEFAULT_CONFIGS["groupbox"] = dict(
91 | this_current_screen_border=color.blue,
92 | this_screen_border=color.blue,
93 | active=color.light3,
94 | inactive=color.grey,
95 | highlight_color=color.dark2,
96 | highlight_method="text",
97 | inactive_highlight_method="text",
98 | foreground=color.light1,
99 | urgent_border=color.red,
100 | disable_drag=True,
101 | fontsize=30,
102 | )
103 |
104 |
105 | class Widget:
106 | def __init__(self, common_attrs={}, icon_attrs={}):
107 | self.common_attrs = common_attrs
108 | self.icon_attrs = icon_attrs
109 |
110 | def get_config(self, widget_name):
111 | return DEFAULT_CONFIGS[widget_name] | self.common_attrs
112 |
113 | def groupbox(self, **kwargs):
114 | vars = self.get_config("groupbox") | kwargs
115 | return GroupBox2(**vars)
116 |
117 | def memory(self, **kwargs):
118 | vars = self.get_config("memory") | kwargs
119 | return Memory(**vars)
120 |
121 | def volume(self, **kwargs):
122 | vars = self.get_config("volume") | kwargs
123 | return PulseVolume(**vars)
124 |
125 | def clock(self, **kwargs):
126 | vars = self.get_config("clock") | kwargs
127 | return Clock(**vars)
128 |
129 | def date(self, **kwargs):
130 | vars = self.get_config("date") | kwargs
131 | return Clock(**vars)
132 |
133 | def systray(self, **kwargs):
134 | vars = self.get_config("systray") | kwargs
135 | return Systray(**vars)
136 |
137 | def widget_box(self, widgets=[], **kwargs):
138 | vars = self.get_config("widget_box") | kwargs
139 | return WidgetBox(widgets=widgets, **vars)
140 |
141 | def do_not_disturb(self, **kwargs):
142 | vars = self.get_config("do_not_disturb") | kwargs
143 | return DoNotDisturb(**vars)
144 |
145 | def window_name(self, **kwargs):
146 | vars = self.get_config("window_name") | kwargs
147 | return WindowName(**vars)
148 |
149 | def github_notifications(self, **kwargs):
150 | vars = self.get_config("github_notifications") | kwargs
151 | return GithubNotifications(**vars)
152 |
153 | def max_windows(self, **kwargs):
154 | vars = self.get_config("max_windows") | kwargs
155 | return MaxWindows(**vars)
156 |
157 | def text(self, **kwargs):
158 | vars = self.common_attrs | kwargs
159 | return TextBox(**vars)
160 |
161 | # --------------------------------------------------
162 |
163 | def icon(self, text, **kwargs):
164 | vars = ICON_WIDGET_DEFAULTS | self.common_attrs | self.icon_attrs | kwargs
165 | return TextBox(text=text, **vars)
166 |
167 | def pad(self, length=4, **kwargs):
168 | return Spacer(length=length, **kwargs)
169 |
170 | def spacer(self):
171 | return Spacer()
172 |
173 | def line_separator(self):
174 | return Sep(linewidth=2, size_percent=65, foreground=color.dark3)
175 |
--------------------------------------------------------------------------------
/configs/qtile/bars/simple.py:
--------------------------------------------------------------------------------
1 | from libqtile import bar, lazy
2 | from qtile_extras.widget.decorations import RectDecoration, BorderDecoration
3 | from qtile_extras.widget.groupbox2 import Box, GroupBoxRule
4 | from utils.colors import color
5 | from bars.base import *
6 | from bars.base import Widget
7 |
8 | COMMON_ATTRS = {
9 | "padding": 0,
10 | "decorations": [
11 | RectDecoration(
12 | colour=color.dark2,
13 | radius=1,
14 | filled=True,
15 | padding_y=6.5,
16 | group=True,
17 | border_width=5,
18 | ),
19 | BorderDecoration(
20 | border_width=3,
21 | colour=color.dark4,
22 | padding_y=6,
23 | group=True,
24 | ),
25 | ],
26 | }
27 |
28 | dnd_decoration = dict(
29 | foreground=color.dark2,
30 | decorations=[
31 | RectDecoration(
32 | colour=color.cyan,
33 | radius=1,
34 | filled=True,
35 | padding_y=6.5,
36 | group=True,
37 | border_width=5,
38 | ),
39 | ],
40 | )
41 |
42 | widget = Widget(common_attrs=COMMON_ATTRS)
43 |
44 | # ----------------- EXTRA -----------------
45 |
46 |
47 | def draw_main_box(box: Box):
48 | w = 20
49 | h = 25
50 | x = (box.size - w) // 2
51 | y = (box.bar.height - h) // 2
52 | box.drawer.ctx.rectangle(x, y, w, h)
53 | box.drawer.set_source_rgb(color.cyan)
54 | box.drawer.ctx.fill()
55 |
56 |
57 | def set_label_color(rule: GroupBoxRule, box: Box):
58 | if box.focused:
59 | rule.text_colour = color.dark1
60 | elif box.occupied:
61 | rule.text_colour = color.light1
62 | else:
63 | rule.text_colour = color.dark5
64 |
65 | return True
66 |
67 |
68 | groupbox_config = dict(
69 | fontsize=20,
70 | rounded=False,
71 | this_current_screen_border=color.cyan,
72 | padding_x=6,
73 | padding_y=10,
74 | rules=[
75 | GroupBoxRule(custom_draw=draw_main_box).when(focused=True),
76 | GroupBoxRule().when(func=set_label_color),
77 | ],
78 | )
79 |
80 |
81 | # ---------------- ACTUAL BAR -----------------
82 |
83 | bar_left = [
84 | widget.pad(length=6),
85 | widget.pad(**COMMON_ATTRS),
86 | widget.groupbox(**groupbox_config),
87 | widget.pad(**COMMON_ATTRS),
88 | ]
89 |
90 | bar_middle = [
91 | widget.pad(length=15),
92 | widget.max_windows(),
93 | widget.pad(length=6),
94 | ]
95 |
96 | bar_right = [
97 | widget.widget_box(
98 | [
99 | widget.pad(length=6),
100 | widget.systray(decorations=[]),
101 | widget.pad(length=6),
102 | ],
103 | text_closed=" ",
104 | text_open=" ",
105 | close_button_location="right",
106 | ),
107 | widget.pad(length=6),
108 | widget.memory(fmt=" {}"),
109 | widget.pad(length=6),
110 | widget.volume(fmt=" {} "),
111 | widget.pad(length=8),
112 | widget.clock(fmt=" {} "),
113 | widget.pad(length=8),
114 | widget.date(fmt=" {} "),
115 | widget.pad(length=6),
116 | widget.do_not_disturb(**dnd_decoration),
117 | widget.pad(length=6),
118 | ]
119 |
120 | simple_bar = bar.Bar(
121 | bar_left + bar_middle + bar_right,
122 | size=40,
123 | )
124 |
--------------------------------------------------------------------------------
/configs/qtile/base_config.py:
--------------------------------------------------------------------------------
1 | from collections import defaultdict
2 | from pathlib import Path
3 | import os
4 | from typing import List
5 | from libqtile.backend.base.window import Window
6 | from libqtile.layout.xmonad import MonadTall
7 | from libqtile.layout.stack import Stack
8 | from libqtile.layout.floating import Floating
9 | from libqtile.layout.max import Max
10 | from libqtile.config import DropDown, ScratchPad, Group
11 | from libqtile import hook, qtile
12 | from vars import *
13 | from utils import key_bindings
14 | from utils.group_bindings import create_workspace_bindings
15 | from utils.colors import color
16 | import qtile_extras.hook
17 | import requests
18 |
19 | # ------------------- USER CONSTANTS ---------------------
20 |
21 | FLOATING_WINS = ["feh", "flameshot", "openrgb", "popsicle"]
22 | WORKSPACES = ["1", "2", "3", "4", "5"]
23 | SCRATCHPAD = ScratchPad(
24 | name="scratchpad",
25 | dropdowns=[DropDown(name="term", cmd=scratch_terminal, height=0.9, opacity=1)],
26 | )
27 |
28 |
29 | def configure_workspaces(workspaces: list[str] = WORKSPACES):
30 | groups = []
31 |
32 | for index, workspace in enumerate(workspaces, 1):
33 | groups.append(
34 | Group(
35 | str(index),
36 | layout=LAYOUTS.get(index, "monadtall"),
37 | label=workspace,
38 | )
39 | )
40 |
41 | return groups
42 |
43 |
44 | # -------------------- DEFAULTS ------------------------
45 |
46 | widget_defaults = dict(
47 | font=FONT,
48 | fontsize=16, # 16 for text, 25 for icons
49 | padding=3,
50 | background=color.extra_dark,
51 | )
52 |
53 | layout_defaults = dict(
54 | border_width=3,
55 | border_focus=color.blue,
56 | border_normal=color.dark2,
57 | )
58 |
59 | # ---------------- QTILE CONSTANTS -------------------------
60 |
61 | keys = key_bindings + create_workspace_bindings()
62 | groups: List[ScratchPad | Group] = [SCRATCHPAD]
63 | floating_layout = Floating(None, None, **layout_defaults)
64 | layouts = [
65 | MonadTall(**layout_defaults),
66 | Max(**layout_defaults),
67 | Stack(**layout_defaults),
68 | ]
69 |
70 | # ------------------- QTILE HOOKS ---------------------
71 |
72 | @hook.subscribe.client_new
73 | def func(win: Window):
74 | # FLOAT
75 | wm_class = [c.lower() for c in win.get_wm_class()]
76 | if wm_class:
77 | if any(app.lower() in FLOATING_WINS for app in wm_class):
78 | func = win.cmd_enable_floating
79 | if callable(func):
80 | func()
81 |
82 | for workspace, apps in MATCHES.items():
83 | if any(app.lower() in wm_class for app in apps):
84 | win.togroup(str(workspace))
85 | break
86 |
87 |
88 | @hook.subscribe.startup_once
89 | def start_once():
90 | # Mimeapps needs to be explicitly set: https://github.com/NixOS/nixpkgs/issues/189851
91 | commands = """
92 | xfce4-clipman
93 | wezterm-mux-server --daemonize
94 | nm-applet
95 | caffeine
96 | sct 4700
97 | syncthing --no-browser
98 | Telegram -startintray
99 | discord --start-minimized
100 | systemctl --user import-environment PATH && systemctl --user restart xdg-desktop-portal.service
101 | """
102 |
103 | for cmd in commands.splitlines():
104 | os.system(cmd + " &")
105 |
106 |
107 | @qtile_extras.hook.subscribe.ghn_new_notification
108 | def ghn_notification():
109 | token_location = Path("~/.config/qtile-extras/github.token").expanduser()
110 | if not token_location.exists():
111 | return
112 |
113 | token = token_location.read_text().strip()
114 | url = "https://api.github.com/notifications"
115 | headers = {
116 | "Authorization": f"token {token}",
117 | "Accept": "application/vnd.github.v3+json",
118 | }
119 |
120 | response = requests.get(url, headers=headers)
121 |
122 | if response.status_code != 200:
123 | return
124 |
125 | def stylize(text: str, bold: bool = True, fg=color.dark1, bg=color.dark1):
126 | stylized = f" {text} "
127 | if bold:
128 | return f"{stylized}"
129 |
130 | return stylized
131 |
132 | for notification in response.json():
133 | title = notification["subject"]["title"]
134 |
135 | notification_color = defaultdict(lambda: color.cyan)
136 | notification_color.update({"Issue": color.red, "PullRequest": color.green})
137 |
138 | notification_type = notification["subject"]["type"]
139 | notification_type = stylize(
140 | notification_type, bg=notification_color[notification_type]
141 | )
142 |
143 | repo = " " + notification["repository"]["full_name"]
144 | repo = stylize(repo, bold=True, bg=color.blue)
145 |
146 | qtile.spawn(
147 | f"""notify-send -t 20000 "Github" "{repo} {notification_type}\n{title}" """
148 | )
149 |
150 | return response.json()
151 |
--------------------------------------------------------------------------------
/configs/qtile/config.py:
--------------------------------------------------------------------------------
1 | from base_config import *
2 | from libqtile.config import Screen
3 | from libqtile import bar
4 | from bars import simple_bar
5 |
6 |
7 | workspaces = ["1", "2", "3", "4", "5", "6"]
8 | wallpaper = "the_great_wave"
9 |
10 | groups.extend(
11 | configure_workspaces(workspaces),
12 | )
13 |
14 | wallpaper = f"{wallpaper_path}/{wallpaper}.png"
15 |
16 | screens = [
17 | Screen(
18 | top=bar.Gap(1),
19 | bottom=simple_bar,
20 | left=bar.Gap(1),
21 | right=bar.Gap(1),
22 | wallpaper=wallpaper,
23 | wallpaper_mode="fill",
24 | )
25 | ]
26 |
--------------------------------------------------------------------------------
/configs/qtile/utils/__init__.py:
--------------------------------------------------------------------------------
1 | from .keybinds import key_bindings
2 |
3 | __all__ = [
4 | "key_bindings",
5 | ]
6 |
--------------------------------------------------------------------------------
/configs/qtile/utils/colors.py:
--------------------------------------------------------------------------------
1 | class Color:
2 | extra_dark = "#272c36"
3 |
4 | dark1 = "#2e3440"
5 | dark2 = "#3b4252"
6 | dark3 = "#434c5e"
7 | dark4 = "#4c566a"
8 | dark5 = "#6a7894"
9 |
10 | light1 = "#d8dee9"
11 | light2 = "#e5e9f0"
12 | light3 = "#e5e9f0"
13 |
14 | red = "#bf616a"
15 | green = "#a3be8c"
16 | yellow = "#ebcb8b"
17 | magenta = "#b48ead"
18 | grey = "#4c566a"
19 | orange = "#d08770"
20 | cyan = "#8fbcbb"
21 | cyan2 = "#88c0d0"
22 | blue = "#84A7C0"
23 | blue2 = "#5e81ac"
24 |
25 | def __getitem__(self, item):
26 | return getattr(self, item)
27 |
28 |
29 | color = Color()
30 |
--------------------------------------------------------------------------------
/configs/qtile/utils/group_bindings.py:
--------------------------------------------------------------------------------
1 | from typing import List
2 | from libqtile.config import EzKey as Keybind
3 | from libqtile.lazy import lazy
4 |
5 | def create_workspace_bindings(total_groups: int = 6) -> List[Keybind]:
6 | group_bindings = []
7 | for index in range(1, total_groups + 1):
8 | index = str(index)
9 |
10 | group_bindings.extend(
11 | [
12 | Keybind(
13 | f"M-{index}",
14 | lazy.group[str(index)].toscreen(toggle = True),
15 | desc="Focus this desktop",
16 | ),
17 | Keybind(
18 | f"M-S-{index}",
19 | lazy.window.togroup(str(index)),
20 | desc="Move focused window to another group",
21 | ),
22 | ]
23 | )
24 | group_bindings.extend(
25 | [
26 | Keybind(
27 | "M-",
28 | lazy.screen.next_group(),
29 | desc="Move to next Group",
30 | ),
31 | Keybind(
32 | "M-",
33 | lazy.screen.prev_group(),
34 | desc="Move to previous Group",
35 | ),
36 | ]
37 | )
38 |
39 | return group_bindings
40 |
--------------------------------------------------------------------------------
/configs/qtile/utils/keybinds.py:
--------------------------------------------------------------------------------
1 | from libqtile.config import EzKey as Keybind
2 | from libqtile.lazy import lazy
3 |
4 | terminal = "wezterm-gui connect unix --workspace main"
5 | scratch = "wezterm-gui connect unix --workspace extra"
6 |
7 |
8 | key_bindings = [
9 | Keybind(
10 | "M-S-",
11 | lazy.spawn("rofi -show drun"),
12 | desc="Launch rofi app-launcer",
13 | ),
14 | Keybind(
15 | "M-S-b",
16 | lazy.spawn("rofi-bluetooth"),
17 | desc="Launch rofi bluetooth",
18 | ),
19 | Keybind(
20 | "M-S-o",
21 | lazy.spawn("rofi-audio-switcher"),
22 | desc="Launch rofi audio-switcher",
23 | ),
24 | Keybind(
25 | "C-A-e",
26 | lazy.spawn("evince"),
27 | desc="Launces Evince PDF Reader",
28 | ),
29 | Keybind(
30 | "M-",
31 | lazy.spawn("flameshot gui"),
32 | desc="Take Screen Snip",
33 | ),
34 | Keybind(
35 | "A-",
36 | lazy.spawn(scratch),
37 | desc="Launches Terminal",
38 | ),
39 | Keybind(
40 | "M-",
41 | lazy.spawn(terminal),
42 | desc="Launches Terminal",
43 | ),
44 | Keybind(
45 | "M-s",
46 | lazy.group["scratchpad"].dropdown_toggle("term"),
47 | desc="Launches Terminal Scratchpad",
48 | ),
49 | Keybind(
50 | "M-x",
51 | lazy.spawn("rofi -show power-menu"),
52 | desc="Shows rofi power-menu",
53 | ),
54 | Keybind(
55 | "M-",
56 | lazy.spawn("pactl -- set-sink-volume 0 +5%"),
57 | desc="Increase Volume",
58 | ),
59 | Keybind(
60 | "M-",
61 | lazy.spawn("pactl -- set-sink-volume 0 -5%"),
62 | desc="Decrease Volume",
63 | ),
64 | Keybind(
65 | "",
66 | lazy.spawn("playerctl play-pause"),
67 | desc="Play/Pause player",
68 | ),
69 | Keybind(
70 | "",
71 | lazy.spawn("playerctl next"),
72 | desc="Skip to next",
73 | ),
74 | Keybind(
75 | "",
76 | lazy.spawn("playerctl previous"),
77 | desc="Skip to previous",
78 | ),
79 | Keybind(
80 | "M-S-",
81 | lazy.spawn("pactl -- set-sink-volume 0 +2%"),
82 | ),
83 | Keybind(
84 | "M-S-",
85 | lazy.spawn("pactl -- set-sink-volume 0 -2%"),
86 | ),
87 | Keybind(
88 | "M-q",
89 | lazy.window.kill(),
90 | desc="Kill/Quit active window ",
91 | ),
92 | Keybind(
93 | "M-S-r",
94 | lazy.reload_config(),
95 | desc="Soft Reload",
96 | ),
97 | Keybind(
98 | "M-S-q",
99 | lazy.shutdown(),
100 | desc="Shutdown Qtile",
101 | ),
102 | # Window controls
103 | Keybind(
104 | "M-h",
105 | lazy.layout.grow(),
106 | desc="Increase Window Size",
107 | ),
108 | Keybind(
109 | "M-l",
110 | lazy.layout.shrink(),
111 | desc="Decrease Window Size",
112 | ),
113 | Keybind(
114 | "M-n",
115 | lazy.layout.normalize(),
116 | desc="Normalize window size ratios",
117 | ),
118 | Keybind(
119 | "M-S-f",
120 | lazy.window.toggle_floating(),
121 | desc="Toggle floating state",
122 | ),
123 | Keybind(
124 | "M-S-m",
125 | lazy.window.toggle_fullscreen(),
126 | desc="Toggle fullscreen",
127 | ),
128 | # Stack controls
129 | Keybind(
130 | "A-",
131 | lazy.next_layout(),
132 | desc="Switch Stack",
133 | ),
134 | Keybind(
135 | "M-S-",
136 | lazy.layout.rotate(),
137 | lazy.layout.flip(),
138 | desc="Switch which side main pane occupies (MonadTall)",
139 | ),
140 | Keybind(
141 | "M-",
142 | lazy.layout.next(),
143 | desc="Switch window focus to other pane(s) of stack",
144 | ),
145 | ]
146 |
--------------------------------------------------------------------------------
/configs/qtile/vars.py:
--------------------------------------------------------------------------------
1 | import os
2 |
3 | # GLOBALS
4 | LOCATION = "Kolkata" # Your location for weather
5 | DARK = "dark3" # Your default value for dark
6 |
7 |
8 | # WIDGET FONTS
9 | FONT = "JetBrainsMono Nerd Font"
10 |
11 | # TERMINALS
12 | terminal = "wezterm-gui connect unix --workspace main"
13 | extra_terminal = "wezterm-gui connect unix --workspace extra"
14 | scratch_terminal = "wezterm-gui"
15 |
16 | # PATHS
17 | home = os.path.expanduser("~")
18 | wallpaper_path = home + "/.wallpapers"
19 |
20 | # EXTRA WORKSPACE
21 | secondary_apps = "discord telegram chrome microsoft".split()
22 |
23 | MATCHES = {
24 | 3: ["dev.zed.Zed"],
25 | 4: ["vlc"],
26 | 5: ["discord", "telegram"],
27 | 6: ["spotify", "google-chrome", "microsoft-edge"],
28 | }
29 |
30 | LAYOUTS = {
31 | 1: "max",
32 | 5: "max",
33 | 6: "max",
34 | }
35 |
--------------------------------------------------------------------------------
/configs/sketchybar/bar.lua:
--------------------------------------------------------------------------------
1 | local colors = require("colors")
2 |
3 | -- Equivalent to the --bar domain
4 | sbar.bar({
5 | height = 30,
6 | color = colors.bar.bg,
7 | border_color = colors.bar.border,
8 | shadow = true,
9 | sticky = true,
10 | padding_right = 10,
11 | padding_left = 10,
12 | blur_radius=20,
13 | topmost="window",
14 | position="bottom",
15 | display="main",
16 | })
17 |
--------------------------------------------------------------------------------
/configs/sketchybar/colors.lua:
--------------------------------------------------------------------------------
1 | return {
2 | black = 0xff2e3440,
3 | white = 0xffeceff4,
4 | red = 0xffbf616a,
5 | green = 0xffa3be8c,
6 | blue = 0xff5e81ac,
7 | yellow = 0xffebcb8b,
8 | orange = 0xffd08770,
9 | magenta = 0xffb48ead,
10 | grey = 0xff4c566a,
11 | transparent = 0x00000000,
12 | cyan = 0xff8fbcbb,
13 |
14 | bar = {
15 | bg = 0xd02e3440,
16 | border = 0xff4c566a,
17 | },
18 | popup = {
19 | bg = 0xff2e3440,
20 | border = 0xffeceff4
21 | },
22 | bg1 = 0x803b4252,
23 | bg2 = 0xff4c566a,
24 | }
25 |
--------------------------------------------------------------------------------
/configs/sketchybar/default.lua:
--------------------------------------------------------------------------------
1 | local settings = require("settings")
2 | local colors = require("colors")
3 |
4 | -- Equivalent to the --default domain
5 | sbar.default({
6 | updates = "when_shown",
7 | icon = {
8 | font = {
9 | family = settings.font,
10 | style = "Bold",
11 | size = 14.0
12 | },
13 | color = colors.white,
14 | padding_left = settings.paddings,
15 | padding_right = settings.paddings,
16 | },
17 | label = {
18 | font = {
19 | family = settings.font,
20 | style = "Semibold",
21 | size = 13.0
22 | },
23 | color = colors.white,
24 | padding_left = settings.paddings,
25 | padding_right = settings.paddings,
26 | },
27 | background = {
28 | height = 26,
29 | corner_radius = 9,
30 | border_width = 2,
31 | },
32 | popup = {
33 | background = {
34 | border_width = 2,
35 | corner_radius = 9,
36 | border_color = colors.popup.border,
37 | color = colors.popup.bg,
38 | shadow = { drawing = true },
39 | },
40 | blur_radius = 20,
41 | },
42 | padding_left = 5,
43 | padding_right = 5
44 | })
45 |
46 |
--------------------------------------------------------------------------------
/configs/sketchybar/icons.lua:
--------------------------------------------------------------------------------
1 | return {
2 | loading = "L",
3 | preferences = "P",
4 |
5 | volume = {
6 | _100=" ",
7 | _0=" ",
8 | },
9 | battery = {
10 | _100 = "",
11 | _75 = "",
12 | _50 = "",
13 | _25 = "",
14 | _0 = "",
15 | charging = "",
16 | },
17 | }
18 |
--------------------------------------------------------------------------------
/configs/sketchybar/init.lua:
--------------------------------------------------------------------------------
1 | require("bar")
2 | require("default")
3 | require("items")
4 |
--------------------------------------------------------------------------------
/configs/sketchybar/items/battery.lua:
--------------------------------------------------------------------------------
1 | local icons = require("icons")
2 | local colors = require("colors")
3 |
4 | local battery = sbar.add("item", {
5 | position = "right",
6 | icon = {
7 | string = icons.battery._100,
8 | },
9 | label = {
10 | string = "100%",
11 | },
12 | update_freq = 120,
13 | })
14 |
15 | local function battery_update()
16 | sbar.exec("pmset -g batt", function(batt_info)
17 | local icon = icons.battery._100
18 | local percentage = "100%"
19 |
20 | if (string.find(batt_info, 'AC Power')) then
21 | icon = icons.battery.charging
22 | local found, _, charge = batt_info:find("(%d+)%%")
23 | if found then
24 | percentage = charge .. "%"
25 | end
26 | else
27 | local found, _, charge = batt_info:find("(%d+)%%")
28 | if found then
29 | charge = tonumber(charge)
30 | percentage = charge .. "%"
31 |
32 | if charge > 80 then
33 | icon = icons.battery._100
34 | elseif charge > 60 then
35 | icon = icons.battery._75
36 | elseif charge > 40 then
37 | icon = icons.battery._50
38 | elseif charge > 20 then
39 | icon = icons.battery._25
40 | else
41 | icon = icons.battery._0
42 | end
43 | end
44 | end
45 |
46 | battery:set({
47 | icon = { string = icon },
48 | label = { string = percentage }
49 | })
50 | end)
51 | end
52 |
53 | battery:subscribe({"routine", "power_source_change", "system_woke"}, battery_update)
54 |
55 | sbar.add("bracket", {battery.name}, {
56 | background = {
57 | color = colors.bg1,
58 | border_color = colors.bg2,
59 | corner_radius = 0
60 | }
61 | })
--------------------------------------------------------------------------------
/configs/sketchybar/items/date.lua:
--------------------------------------------------------------------------------
1 | local colors = require("colors")
2 | local utils = require("utils")
3 |
4 | local date = sbar.add("item", {
5 | position = "right",
6 | icon = {
7 | string = " ",
8 | },
9 | label = {
10 | string = utils.format_date(),
11 | },
12 | update_freq = 60,
13 | })
14 |
15 | local function date_update()
16 | date:set({
17 | label = { string = utils.format_date() }
18 | })
19 | end
20 |
21 | date:subscribe({"routine"}, date_update)
22 |
23 | sbar.add("bracket", {date.name}, {
24 | background = {
25 | color = colors.bg1,
26 | border_color = colors.bg2,
27 | corner_radius = 0
28 | }
29 | })
--------------------------------------------------------------------------------
/configs/sketchybar/items/init.lua:
--------------------------------------------------------------------------------
1 | local utils = require("utils")
2 |
3 | require("items.spaces")
4 | require("items.window_count")
5 | require("items.date")
6 | sbar.add("item", utils.padding())
7 | require("items.volume")
8 | sbar.add("item", utils.padding())
9 | require("items.battery")
10 | sbar.add("item", utils.padding())
11 | require("items.time")
--------------------------------------------------------------------------------
/configs/sketchybar/items/spaces.lua:
--------------------------------------------------------------------------------
1 | local colors = require("colors")
2 |
3 | -- Static display of workspaces - no event handling
4 | local workspace_list = {}
5 | local handle = io.popen("aerospace list-workspaces --all")
6 | if handle then
7 | local result = handle:read("*a")
8 | handle:close()
9 | for workspace in result:gmatch("%S+") do
10 | table.insert(workspace_list, workspace)
11 | end
12 | end
13 |
14 | local spaces = {}
15 | function handle_space_change(env)
16 | local space_name = env.NAME
17 |
18 | if "space."..env.FOCUSED_WORKSPACE == space_name then
19 | sbar.set(space_name, {
20 | background = { color = colors.cyan },
21 | icon = { color = colors.black }
22 | })
23 | end
24 |
25 | if "space."..env.PREV_WORKSPACE == space_name then
26 | sbar.set(space_name, {
27 | background = { color = colors.black },
28 | icon = { color = colors.white }
29 | })
30 | end
31 | end
32 |
33 | -- Add each workspace as a simple item (not a space)
34 | for _, workspace_id in ipairs(workspace_list) do
35 | local space = sbar.add("item", "space." .. workspace_id, {
36 | icon = {
37 | string = workspace_id,
38 | padding_left = 5,
39 | padding_right = 0,
40 | color = colors.white,
41 | },
42 | padding_left = 0,
43 | padding_right = 0,
44 | background = {
45 | color = colors.bg1,
46 | corner_radius = 0,
47 | },
48 | })
49 |
50 | table.insert(spaces, space.name)
51 | space:subscribe("aerospace_workspace_change", handle_space_change)
52 | end
53 |
54 | -- Only add a bracket if we have spaces
55 | if #spaces > 0 then
56 | sbar.add("bracket", spaces, {
57 | background = { color = colors.bg1, border_color = colors.bg2, corner_radius = 0 }
58 | })
59 | end
--------------------------------------------------------------------------------
/configs/sketchybar/items/time.lua:
--------------------------------------------------------------------------------
1 | local colors = require("colors")
2 | local utils = require("utils")
3 |
4 | local time = sbar.add("item", {
5 | position = "right",
6 | icon = {
7 | string = " ",
8 | },
9 | label = {
10 | string = utils.format_time(),
11 | },
12 | update_freq = 1,
13 | })
14 |
15 | local function time_update()
16 | time:set({
17 | label = { string = utils.format_time() }
18 | })
19 | end
20 |
21 | time:subscribe({"routine"}, time_update)
22 |
23 | sbar.add("bracket", {time.name}, {
24 | background = {
25 | color = colors.bg1,
26 | border_color = colors.bg2,
27 | corner_radius = 0
28 | }
29 | })
--------------------------------------------------------------------------------
/configs/sketchybar/items/volume.lua:
--------------------------------------------------------------------------------
1 | local colors = require("colors")
2 | local icons = require("icons")
3 |
4 | local volume_item = sbar.add("item", {
5 | position = "right",
6 | icon = {
7 | string = icons.volume._100,
8 | },
9 | label = {
10 | string = "100%",
11 | },
12 | })
13 |
14 | volume_item:subscribe("volume_change", function(env)
15 | local volume = tonumber(env.INFO)
16 | local icon = icons.volume._0
17 | if volume > 0 then
18 | icon = icons.volume._100
19 | end
20 |
21 | volume_item:set({
22 | icon = { string = icon },
23 | label = { string = volume .. "%" }
24 | })
25 | end)
26 |
27 | -- Add volume item to bracket
28 | sbar.add("bracket", {volume_item.name}, {
29 | background = {
30 | color = colors.bg1,
31 | border_color = colors.bg2,
32 | corner_radius = 0
33 | }
34 | })
--------------------------------------------------------------------------------
/configs/sketchybar/items/window_count.lua:
--------------------------------------------------------------------------------
1 | local colors = require("colors")
2 |
3 | local window_count = sbar.add("item", 'window_count', {
4 | icon = {
5 | string = " ",
6 | color = colors.bar.bg,
7 | padding_left = 5,
8 | },
9 | label = {
10 | string = "0",
11 | color = colors.bar.bg,
12 | padding_right = 5,
13 | font = {
14 | size = 15,
15 | }
16 | },
17 | background = {
18 | color = colors.green,
19 | corner_radius = 0
20 | },
21 | })
22 |
23 | function update_window_count(env)
24 | sbar.set(env.NAME, { label = { string = env.OPEN_WINDOWS } })
25 | end
26 |
27 | window_count:subscribe("aerospace_focus_change", update_window_count)
--------------------------------------------------------------------------------
/configs/sketchybar/settings.lua:
--------------------------------------------------------------------------------
1 | return {
2 | font = "JetBrainsMono Nerd Font",
3 | paddings = 3,
4 | }
5 |
--------------------------------------------------------------------------------
/configs/sketchybar/sketchybarrc:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env lua
2 |
3 | --
4 | -- -- This is only needed once to install the sketchybar module
5 | -- -- (or for an update of the module)
6 | -- os.execute("[ ! -d $HOME/.local/share/sketchybar_lua/ ] && (git clone https://github.com/FelixKratz/SbarLua.git /tmp/SbarLua && cd /tmp/SbarLua/ && make install && rm -rf /tmp/SbarLua/)")
7 | --
8 | -- -- Add the sketchybar module to the package cpath (the module could be
9 | -- -- installed into the default search path then this would not be needed)
10 | -- package.cpath = package.cpath .. ";/Users/" .. os.getenv("USER") .. "/.local/share/sketchybar_lua/?.so"
11 | --
12 | -- -- Require the sketchybar module
13 | -- sbar = require("sketchybar")
14 | --
15 | -- -- Bundle the entire initial configuration into a single message to sketchybar
16 | -- -- This improves startup times drastically, try removing both the begin and end
17 | -- -- config calls to see the difference -- yeah..
18 | -- sbar.begin_config()
19 | -- require("init")
20 | -- sbar.hotload(true)
21 | -- sbar.end_config()
22 | --
23 | -- -- Run the event loop of the sketchybar module (without this there will be no
24 | -- -- callback functions executed in the lua module)
25 | -- sbar.event_loop()
26 |
--------------------------------------------------------------------------------
/configs/sketchybar/utils.lua:
--------------------------------------------------------------------------------
1 | local M = {}
2 |
3 | function M.format_time()
4 | local hour = os.date("%H")
5 | local min = os.date("%M")
6 | return string.format("%02d:%02d", hour, min)
7 | end
8 |
9 | function M.format_date()
10 | local day = os.date("%a") -- Abbreviated day name (Mon)
11 | local month = os.date("%b") -- Abbreviated month name (Oct)
12 | local date = os.date("%d") -- Day of month (7)
13 | return string.format("%s, %s %s", day, month, date)
14 | end
15 |
16 | function M.padding()
17 | return {
18 | position = "right",
19 | width = 7,
20 | }
21 | end
22 |
23 |
24 | return M
--------------------------------------------------------------------------------
/configs/starship.toml:
--------------------------------------------------------------------------------
1 | #--------------BASICS--------------#
2 |
3 | # Don't print a new line at the start of the prompt
4 | format = '''
5 | [━━━━━━━━━━━━━━━━━━━━━━━━━━](black)
6 | $all
7 | '''
8 | add_newline = false
9 | palette = "nord"
10 |
11 | # --PALETTE
12 | [palettes.nord]
13 | frost_green = '#8fbcbb'
14 | frost_cyan = '#88c0d0'
15 | aurora_orange = '#d08770'
16 |
17 | # Make prompt a single line instead of two lines
18 | [line_break]
19 | disabled = false
20 |
21 | #--CHARACTER MODULE
22 | [character]
23 | success_symbol = "[INS](bold green)"
24 | error_symbol = "[INS](bold red)"
25 | vicmd_symbol = "[NOR](bold blue)"
26 | vimcmd_replace_one_symbol = "[REP](bold red)"
27 | vimcmd_replace_symbol = "[REP](bold red)"
28 | vimcmd_visual_symbol = "[VIS](bold yellow)"
29 |
30 | #--CMD DURATION
31 | [cmd_duration]
32 | show_notifications=true
33 | style = "bold red"
34 | format = " [$duration]($style) "
35 |
36 |
37 | # --Package Versioning
38 | [package]
39 | format='[ ](dimmed black) [$symbol$version]($style) '
40 | symbol=" "
41 |
42 | #--------------LANGUAGES--------------#
43 |
44 | [python]
45 | format = '[(\($virtualenv\) )]($style)'
46 |
47 | [conda]
48 | symbol = ' '
49 |
50 | [rust]
51 | symbol = ""
52 | style = ""
53 |
54 | [nix_shell]
55 | symbol = " "
56 | format = '[\[$symbol$state( $name )\]]($style) '
57 | impure_msg = ""
58 |
59 | #--------------GIT STUFF--------------#
60 | [git_branch]
61 | symbol = " "
62 |
63 | [git_status]
64 | format = '([\[ $all_status$ahead_behind\]]($style) )'
65 | style="bold black"
66 | conflicted = " (red) "
67 | ahead = "[ ${count}](bold green) "
68 | behind = "[ ${count}](bold red) "
69 | untracked = "[ ${count}](yellow) "
70 | stashed = "[ ](purple) "
71 | modified = "[ ${count}](blue) "
72 | staged = "[ ${count}](frost_green) "
73 | renamed = "[ ${count}](bold red) "
74 | deleted = "[ ${count}](red) "
75 |
76 | [aws]
77 | disabled = true
78 |
79 | [bun]
80 | disabled = true
81 |
82 | [nodejs]
83 | disabled = true
84 |
85 |
86 | #--------------RANDOM--------------#
87 |
88 | [custom.vid]
89 | description = "to show vlc icon to folders containing vid files"
90 | shell = ['bash']
91 | command = "echo "
92 | style = "#D08770"
93 | extensions = ["mp4","mkv","webm"]
94 | format = "[$output]($style)"
95 |
--------------------------------------------------------------------------------
/configs/textual-web/auth.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kraanzu/.dotfiles/da007ef7322e8303f2d27bb26a47852e498de172/configs/textual-web/auth.json
--------------------------------------------------------------------------------
/configs/textual-web/ganglion.toml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kraanzu/.dotfiles/da007ef7322e8303f2d27bb26a47852e498de172/configs/textual-web/ganglion.toml
--------------------------------------------------------------------------------
/configs/tmux/tmux.conf:
--------------------------------------------------------------------------------
1 | set-option -g prefix C-a
2 | #
3 | # address vim mode switching delay (http://superuser.com/a/252717/65504)
4 | set -sg escape-time 0
5 | set -g history-limit 50000
6 | set -g display-time 4000
7 | set -g status-interval 5
8 | set -g status-keys emacs
9 | set -g focus-events on
10 | setw -g aggressive-resize on
11 |
12 | # play nice with vim termguicolors
13 | # set -g default-terminal screen-256color
14 | set -ag terminal-overrides ",xterm-256color:Tc"
15 |
16 |
17 | # KEYBINDINGS
18 | # tmux windows
19 | bind -n C-Left previous-window
20 | bind -n C-Right next-window
21 | # tmux panes
22 | bind -n M-Left select-pane -L
23 | bind -n M-Right select-pane -R
24 | bind -n M-Up select-pane -U
25 | bind -n M-Down select-pane -D
26 |
27 | setw -g mouse on
28 | set -g base-index 1
29 | setw -g pane-base-index 1
30 |
31 |
32 | # List of plugins.
33 | set -g @plugin 'tmux-plugins/tpm'
34 | set -g @plugin 'kraanzu/nord-tmux'
35 |
36 | # Initialize TPM (keep this line at the very bottom of your tmux.conf).
37 | # two checks for AUR
38 | run '/usr/share/tmux-plugin-manager-git/tpm'
39 | run '/usr/share/tmux-plugin-manager/tpm'
40 |
--------------------------------------------------------------------------------
/configs/vsnip/cpp.json:
--------------------------------------------------------------------------------
1 | {
2 | "bas": {
3 | "prefix": "tpl",
4 | "body": [
5 | "#include ",
6 | "using namespace std;",
7 | "",
8 | "#define ll long long",
9 | "ll inf = 1e16 + 1;",
10 | "",
11 | "#define pprint(arr) \\",
12 | " cout << \"\\n[\"; \\",
13 | " for (auto el : arr) \\",
14 | " cout << el << \",\"; \\",
15 | " cout << \"]\\n\"",
16 | "",
17 | "#define all(vec) vec.begin(), vec.end()",
18 | "#define sum(vec) accumulate(all(vec), 0)",
19 | "",
20 | "#define fi(a, b) for (int i = a; i < b; i++)",
21 | "#define fj(a, b) for (int j = a; j < b; j++)",
22 | "",
23 | "#define v vector",
24 | "#define pii pair",
25 | "",
26 | "#define MOD 1000000007",
27 | "",
28 | "//-------------------------------------------------",
29 | "void solve() {",
30 | " ",
31 | "}",
32 | "",
33 | "int main() {",
34 | " ios_base::sync_with_stdio(false);",
35 | " cin.tie(NULL);",
36 | " cout.tie(NULL);",
37 | " int testCase;",
38 | " testCase = 1;",
39 | " // cin>>testCase;",
40 | " while (testCase--) {",
41 | " solve();",
42 | " cout << endl;",
43 | " }",
44 | "}"
45 | ],
46 | "description": "bas"
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/configs/vsnip/python.json:
--------------------------------------------------------------------------------
1 | {
2 | "base": {
3 | "prefix": "tpl",
4 | "body": [
5 | "import os, sys",
6 | "from io import BytesIO, IOBase",
7 | "from types import GeneratorType",
8 | "from bisect import *",
9 | "from collections import defaultdict, deque, Counter",
10 | "import math, string",
11 | "from heapq import *",
12 | "from operator import add",
13 | "from itertools import accumulate",
14 | "",
15 | "BUFSIZE = 8192",
16 | "sys.setrecursionlimit(10 ** 5)",
17 | "",
18 | "",
19 | "class FastIO(IOBase):",
20 | " newlines = 0",
21 | "",
22 | " def __init__(self, file):",
23 | " import os",
24 | "",
25 | " self.os = os",
26 | " self._fd = file.fileno()",
27 | " self.buffer = BytesIO()",
28 | " self.writable = \"x\" in file.mode or \"r\" not in file.mode",
29 | " self.write = self.buffer.write if self.writable else None",
30 | "",
31 | " def read(self):",
32 | " while True:",
33 | " b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))",
34 | " if not b:",
35 | " break",
36 | " ptr = self.buffer.tell()",
37 | " self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)",
38 | " self.newlines = 0",
39 | " return self.buffer.read()",
40 | "",
41 | " def readline(self):",
42 | " while self.newlines == 0:",
43 | " b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))",
44 | " self.newlines = b.count(b\"\\n\") + (not b)",
45 | " ptr = self.buffer.tell()",
46 | " self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)",
47 | " self.newlines -= 1",
48 | " return self.buffer.readline()",
49 | "",
50 | " def flush(self):",
51 | " if self.writable:",
52 | " self.os.write(self._fd, self.buffer.getvalue())",
53 | " self.buffer.truncate(0), self.buffer.seek(0)",
54 | "",
55 | "",
56 | "class IOWrapper(IOBase):",
57 | " def __init__(self, file):",
58 | " self.buffer = FastIO(file)",
59 | " self.flush = self.buffer.flush",
60 | " self.writable = self.buffer.writable",
61 | " self.write = lambda s: self.buffer.write(s.encode(\"ascii\"))",
62 | " self.read = lambda: self.buffer.read().decode(\"ascii\")",
63 | " self.readline = lambda: self.buffer.readline().decode(\"ascii\")",
64 | "",
65 | "",
66 | "sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)",
67 | "input = lambda: sys.stdin.readline().rstrip(\"\\r\\n\")",
68 | "",
69 | "",
70 | "inf = float(\"inf\")",
71 | "en = lambda x: list(enumerate(x))",
72 | "ceil_ = lambda a, b: (a + b - 1) // b",
73 | "",
74 | "",
75 | "ii = lambda: int(input())",
76 | "r = lambda: map(int, input().split())",
77 | "rr = lambda: list(r())",
78 | "",
79 | "",
80 | "# --------------------------",
81 | "",
82 | "",
83 | "",
84 | ""
85 | ],
86 | "description": "base"
87 | },
88 | "test": {
89 | "prefix": "test",
90 | "body": [
91 | "def solve():",
92 | " ",
93 | "",
94 | "",
95 | "for _ in \" \" * ii():",
96 | " solve()"
97 | ],
98 | "description": "test"
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/configs/wezterm/keys.lua:
--------------------------------------------------------------------------------
1 | local wezterm = require("wezterm")
2 | local act = wezterm.action
3 |
4 | local M = {}
5 |
6 | function M.setup(config)
7 | config.keys = {
8 | -- handle vim's TComment
9 | { key = "/", mods = "CTRL", action = wezterm.action({ SendString = "\x1f" }) },
10 | { key = "RightArrow", mods = "CTRL", action = act.SwitchWorkspaceRelative(1) },
11 | { key = "LeftArrow", mods = "CTRL", action = act.SwitchWorkspaceRelative(-1) },
12 | { key = "x", mods = "CTRL", action = act.CloseCurrentTab({ confirm = false }) },
13 | }
14 | end
15 |
16 | return M
17 |
--------------------------------------------------------------------------------
/configs/wezterm/mux.lua:
--------------------------------------------------------------------------------
1 | local M = {}
2 |
3 | function M.setup(config)
4 | config.unix_domains = {
5 | {
6 | name = "unix",
7 | },
8 | }
9 | -- config.default_gui_startup_args = { "connect", "unix" }
10 | end
11 |
12 | return M
13 |
--------------------------------------------------------------------------------
/configs/wezterm/startup.lua:
--------------------------------------------------------------------------------
1 | local wezterm = require("wezterm")
2 | local mux = wezterm.mux
3 |
4 | wezterm.on("mux-startup", function()
5 | local _ = mux.spawn_window({
6 | workspace = "main",
7 | })
8 | local _ = mux.spawn_window({
9 | workspace = "extra",
10 | })
11 | mux.set_active_workspace("main")
12 | end)
13 |
--------------------------------------------------------------------------------
/configs/wezterm/tab_bar_left.lua:
--------------------------------------------------------------------------------
1 | local wezterm = require("wezterm")
2 | local utils = require("utils")
3 |
4 | M = {}
5 |
6 | local icons = {
7 | vim = "",
8 | nvim = "",
9 | }
10 |
11 | function M.get_icon(cmd, cwd)
12 | if cmd:sub(1, 1) == "~" then
13 | if utils.is_in(cwd, "config") then
14 | return ""
15 | elseif utils.is_in(cwd, "Documents") then
16 | return ""
17 | else
18 | return ""
19 | end
20 | elseif cmd:sub(1, 1) == "/" then
21 | return ""
22 | end
23 |
24 | return icons[cmd] or ""
25 | end
26 |
27 | function M.get_name(title, cmd)
28 | if cmd:sub(1, 1) == "~" then
29 | return title:match("[^/]+$")
30 | end
31 |
32 | return cmd
33 | end
34 |
35 | function M.tab_title(tab_info)
36 | local title = tab_info.active_pane.title
37 | local cmd = title:match("%S+")
38 | local icon = M.get_icon(cmd, title)
39 | local name = M.get_name(title, cmd)
40 | return icon .. " " .. name
41 | end
42 |
43 | wezterm.on("format-tab-title", function(tab)
44 | local title = M.tab_title(tab)
45 | if not tab.is_active then
46 | Res = {
47 | { Background = { Color = "#4c566a" } },
48 | { Foreground = { Color = "#2e3440" } },
49 | { Text = " " .. title .. " " },
50 | }
51 | else
52 | Res = {
53 | { Background = { Color = "#4c566a" } },
54 | { Foreground = { Color = "#eceff4" } },
55 | { Text = " " .. title .. " " },
56 | }
57 | end
58 |
59 | utils.appendTables(Res, utils.tab_separator)
60 | return Res
61 | end)
62 |
63 | -- =======================================
64 |
65 | function M.setup(config)
66 | config.colors = {
67 | tab_bar = {
68 | background = "#2e3440",
69 | },
70 | }
71 | end
72 |
73 | return M
74 |
--------------------------------------------------------------------------------
/configs/wezterm/tab_extras.lua:
--------------------------------------------------------------------------------
1 | local wezterm = require("wezterm")
2 | local utils = require("utils")
3 | local mux = wezterm.mux
4 |
5 | wezterm.on("update-status", function(window)
6 | local workspace = mux.get_active_workspace()
7 |
8 | local color
9 | if workspace == "main" then
10 | color = "#81a1c1"
11 | else
12 | color = "#ebcb8b"
13 | end
14 |
15 | local left = {
16 | { Background = { Color = color } },
17 | { Foreground = { Color = "#2e3440" } },
18 | { Text = " " .. workspace .. " " },
19 | }
20 |
21 | utils.appendTables(left, utils.tab_separator)
22 | window:set_left_status(wezterm.format(left))
23 | end)
24 |
25 | return {}
26 |
--------------------------------------------------------------------------------
/configs/wezterm/utils.lua:
--------------------------------------------------------------------------------
1 | local M = {}
2 |
3 | function M.appendTables(dest, source)
4 | for _, value in ipairs(source) do
5 | table.insert(dest, value)
6 | end
7 | end
8 |
9 | function M.prependTable(dest, source)
10 | for i = #source, 1, -1 do
11 | table.insert(dest, 1, source[i])
12 | end
13 | end
14 |
15 | function M.is_in(phrase, substring)
16 | local ok, _ = phrase:find(substring)
17 | return ok
18 | end
19 |
20 | M.tab_separator = {
21 | { Background = { Color = "#2e3440" } },
22 | { Foreground = { Color = "#2e3440" } },
23 | { Text = " " },
24 | }
25 |
26 | return M
27 |
--------------------------------------------------------------------------------
/configs/wezterm/wezterm.lua:
--------------------------------------------------------------------------------
1 | local wezterm = require("wezterm")
2 | local tab_bar_left = require("tab_bar_left")
3 | local mux = require("mux")
4 | local keys = require("keys")
5 | require("utils")
6 | require("tab_extras")
7 | require("startup")
8 |
9 | local config = {}
10 |
11 | config.enable_wayland = true
12 | config.front_end = "WebGpu"
13 | config.color_scheme = "nord"
14 | config.use_fancy_tab_bar = false
15 | config.font_size = 13
16 | config.font = wezterm.font("JetBrainsMono Nerd Font", { weight = "DemiBold" })
17 | config.default_workspace = "scratch"
18 | config.window_background_opacity = 1
19 | -- config.hide_tab_bar_if_only_one_tab = true
20 | config.max_fps = 120
21 |
22 | tab_bar_left.setup(config)
23 | mux.setup(config)
24 | keys.setup(config)
25 |
26 | return config
27 |
--------------------------------------------------------------------------------
/configs/zathura/zathurarc:
--------------------------------------------------------------------------------
1 | set adjust-open "best-fit"
2 | set pages-per-row 1
3 | set scroll-page-aware "true"
4 | set smooth-scroll "true"
5 | set scroll-full-overlap 0.01
6 | set scroll-step 100
7 | set selection-clipboard clipboard
8 |
9 | set zoom-min 10
10 | set guioptions ""
11 |
12 | # Nord theme colors
13 | set font "JetBrainsMono NF 15"
14 | set default-bg "#242933" # darker than nord0
15 | set default-fg "#D8DEE9" # nord4
16 |
17 | set statusbar-fg "#D8DEE9" # nord4
18 | set statusbar-bg "#3B4252" # nord1
19 |
20 | set inputbar-bg "#2E3440" # nord0 - matches the darker theme
21 | set inputbar-fg "#E5E9F0" # nord5
22 |
23 | set notification-error-bg "#BF616A" # nord11
24 | set notification-error-fg "#2E3440" # nord0
25 |
26 | set notification-warning-bg "#EBCB8B" # nord13
27 | set notification-warning-fg "#2E3440" # nord0
28 |
29 | set highlight-color "#EBCB8B" # nord13
30 | set highlight-active-color "#81A1C1" # nord9
31 |
32 | set completion-highlight-fg "#2E3440" # nord0
33 | set completion-highlight-bg "#88C0D0" # nord8
34 |
35 | set completion-bg "#3B4252" # nord1
36 | set completion-fg "#D8DEE9" # nord4
37 |
38 | set notification-bg "#A3BE8C" # nord14
39 | set notification-fg "#2E3440" # nord0
40 |
41 | # Additional UI elements
42 | set index-bg "#2E3440" # nord0
43 | set index-fg "#D8DEE9" # nord4
44 | set index-active-bg "#3B4252" # nord1
45 | set index-active-fg "#88C0D0" # nord8
46 |
47 | set recolor "true"
48 | set recolor-lightcolor "#242933" # darker than nord0
49 | set recolor-darkcolor "#ECEFF4" # nord6
50 | set recolor-reverse-video "true"
51 | set recolor-keephue "true"
52 |
53 | set render-loading "false"
54 | set scroll-step 50
55 |
56 | unmap f
57 | map f toggle_fullscreen
58 | map [fullscreen] f toggle_fullscreen
59 |
--------------------------------------------------------------------------------
/configs/zed/keymap.json:
--------------------------------------------------------------------------------
1 | // Zed keymap
2 | // For information on binding keys, see the Zed
3 | // documentation: https://zed.dev/docs/key-bindings
4 | //
5 | // To see the default key bindings run `zed: open default keymap`
6 | // from the command palette.
7 | [
8 | {
9 | "bindings": {
10 | "super-i": "workspace::ToggleRightDock",
11 | "super-b": "workspace::ToggleLeftDock",
12 | "super-m": "workspace::ToggleBottomDock",
13 | "super-e": "project_panel::ToggleFocus",
14 | "super-p": [
15 | "task::Spawn",
16 | { "task_name": "Neogit", "reveal_target": "center" }
17 | ],
18 | "super-g": ["agent::NewExternalAgentThread", { "agent": "gemini" }]
19 | }
20 | },
21 | {
22 | "context": "GitPanel && ChangesList",
23 | "use_key_equivalents": true,
24 | "bindings": {
25 | "s": "git::ToggleStaged"
26 | }
27 | }
28 | ]
29 |
--------------------------------------------------------------------------------
/configs/zed/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | // Essentials
3 | "vim_mode": true,
4 | "vim": {
5 | "highlight_on_yank_duration": 500,
6 | "use_smartcase_find": true
7 | },
8 |
9 | // Minimal Bar
10 | "collaboration_panel": {
11 | "button": false
12 | },
13 | "outline_panel": {
14 | "button": false
15 | },
16 | "git_panel": {
17 | "button": false
18 | },
19 | "notification_panel": {
20 | "button": false
21 | },
22 | "project_panel": {
23 | "button": false
24 | },
25 | "terminal": {
26 | "button": false
27 | },
28 | "search": {
29 | "button": false
30 | },
31 |
32 | // Eye candy
33 | "icon_theme": "Material Icon Theme",
34 | "theme": {
35 | "mode": "dark",
36 | "light": "Nord",
37 | "dark": "Nord"
38 | },
39 | "toolbar": {
40 | "breadcrumbs": true,
41 | "quick_actions": false
42 | },
43 | "tabs": {
44 | "file_icons": true
45 | },
46 | "tab_bar": {
47 | "show": true,
48 | "show_nav_history_buttons": false,
49 | "show_tab_bar_buttons": false
50 | },
51 |
52 | // UI & Buffer Fonts
53 | "ui_font_size": 14,
54 | "ui_font_weight": 500,
55 | "ui_font_family": "JetBrainsMono Nerd Font",
56 | "buffer_font_family": "JetBrainsMono Nerd Font",
57 | "buffer_font_weight": 500,
58 | "buffer_font_size": 16,
59 | "buffer_line_height": {
60 | "custom": 1.5
61 | },
62 |
63 | // Diagnostics
64 | "diagnostics": {
65 | "inline": {
66 | "enabled": true
67 | }
68 | },
69 |
70 | "languages": {
71 | "Python": {
72 | "tab_size": 4,
73 | "formatter": [
74 | {
75 | "language_server": {
76 | "name": "ruff"
77 | }
78 | }
79 | ]
80 | }
81 | },
82 |
83 | // LSP Settings
84 | "show_completions_on_input": true,
85 |
86 | "inlay_hints": {
87 | "enabled": true,
88 | "show_type_hints": true,
89 | "show_parameter_hints": true,
90 | "show_other_hints": true
91 | },
92 |
93 | // Copilot settings
94 | "agent": {
95 | "inline_assistant_model": {
96 | "provider": "copilot_chat",
97 | "model": "claude-3.7-sonnet"
98 | },
99 | "button": false,
100 | "default_profile": "ask",
101 | "model_parameters": [],
102 | "default_model": {
103 | "provider": "copilot_chat",
104 | "model": "gpt-4o"
105 | }
106 | },
107 | "agent_servers": {
108 | "gemini": {
109 | "ignore_system_version": false
110 | }
111 | },
112 | "features": {
113 | "edit_prediction_provider": "copilot"
114 | },
115 |
116 | // Extensions
117 | "auto_install_extensions": {
118 | "git-firefly": true,
119 | "material-icon-theme": true,
120 | "golangci-lint": true,
121 | "rainbow-csv": true,
122 |
123 | // languages
124 | "html": true,
125 | "markdown": true,
126 | "fish": true,
127 | "lua": true,
128 | "nix": true,
129 | "scheme": true,
130 | "dockerfile": true,
131 |
132 | "toml": true,
133 | "ruff": true
134 | }
135 | }
136 |
--------------------------------------------------------------------------------
/configs/zed/tasks.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "label": "Neogit",
4 | "command": "nvim +Neogit",
5 | "use_new_terminal": true,
6 | "allow_concurrent_runs": false,
7 | "reveal": "always",
8 | "reveal_target": "dock",
9 | "hide": "on_success",
10 | "tags": ["git"]
11 | }
12 | ]
13 |
--------------------------------------------------------------------------------
/configs/zed/themes/Nord.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://zed.dev/schema/themes/v0.2.0.json",
3 | "name": "Nord",
4 | "author": "Arctic Ice Studio",
5 | "themes": [
6 | {
7 | "name": "Nord",
8 | "appearance": "dark",
9 | "style": {
10 | "border": "#4c566a",
11 | "border.variant": "#434c5e",
12 | "border.focused": "#81a1c1",
13 | "border.selected": "#5e81ac",
14 | "border.transparent": "#00000000",
15 | "border.disabled": "#434c5e",
16 | "elevated_surface.background": "#3b4252",
17 | "surface.background": "#3b4252",
18 | "background": "#2c323d",
19 | "element.background": "#3b4252",
20 | "element.hover": "#434c5e",
21 | "element.active": "#4c566a",
22 | "element.selected": "#4c566a",
23 | "element.disabled": "#3b4252",
24 | "drop_target.background": "#81a1c180",
25 | "ghost_element.background": "#00000000",
26 | "ghost_element.hover": "#434c5e",
27 | "ghost_element.active": "#4c566a",
28 | "ghost_element.selected": "#4c566a",
29 | "ghost_element.disabled": "#3b4252",
30 | "text": "#d8dee9",
31 | "text.muted": "#e5e9f0",
32 | "text.placeholder": "#616e88",
33 | "text.disabled": "#616e88",
34 | "text.accent": "#81a1c1",
35 | "icon": "#d8dee9",
36 | "icon.muted": "#e5e9f0",
37 | "icon.disabled": "#616e88",
38 | "icon.placeholder": "#e5e9f0",
39 | "icon.accent": "#81a1c1",
40 | "status_bar.background": "#2c323d",
41 | "title_bar.background": "#2c323d",
42 | "title_bar.inactive_background": "#3b4252",
43 | "toolbar.background": "#2c323d",
44 | "tab_bar.background": "#3b4252",
45 | "tab.inactive_background": "#3b4252",
46 | "tab.active_background": "#2c323d",
47 | "search.match_background": "#81a1c166",
48 | "panel.background": "#3b4252",
49 | "panel.focused_border": null,
50 | "pane.focused_border": null,
51 | "scrollbar.thumb.background": "#4c566a4c",
52 | "scrollbar.thumb.hover_background": "#434c5e",
53 | "scrollbar.thumb.border": "#434c5e",
54 | "scrollbar.track.background": "#00000000",
55 | "scrollbar.track.border": "#3b4252",
56 | "editor.foreground": "#d8dee9",
57 | "editor.background": "#2c323d",
58 | "editor.gutter.background": "#2c323d",
59 | "editor.subheader.background": "#3b4252",
60 | "editor.active_line.background": "#434c5ebf",
61 | "editor.highlighted_line.background": "#434c5e",
62 | "editor.line_number": "#616e88",
63 | "editor.active_line_number": "#eceff4",
64 | "editor.hover_line_number": "#d8dee9",
65 | "editor.invisible": "#616e88",
66 | "editor.wrap_guide": "#4c566a0d",
67 | "editor.active_wrap_guide": "#4c566a1a",
68 | "editor.document_highlight.read_background": "#81a1c11a",
69 | "editor.document_highlight.write_background": "#bf616a66",
70 | "terminal.background": "#2c323d",
71 | "terminal.foreground": "#d8dee9",
72 | "terminal.bright_foreground": "#eceff4",
73 | "terminal.dim_foreground": "#4c566a",
74 | "terminal.ansi.black": "#3b4252",
75 | "terminal.ansi.bright_black": "#4c566a",
76 | "terminal.ansi.dim_black": "#434c5e",
77 | "terminal.ansi.red": "#bf616a",
78 | "terminal.ansi.bright_red": "#bf616a",
79 | "terminal.ansi.dim_red": "#bf616a99",
80 | "terminal.ansi.green": "#a3be8c",
81 | "terminal.ansi.bright_green": "#a3be8c",
82 | "terminal.ansi.dim_green": "#a3be8c99",
83 | "terminal.ansi.yellow": "#ebcb8b",
84 | "terminal.ansi.bright_yellow": "#ebcb8b",
85 | "terminal.ansi.dim_yellow": "#ebcb8b99",
86 | "terminal.ansi.blue": "#81a1c1",
87 | "terminal.ansi.bright_blue": "#81a1c1",
88 | "terminal.ansi.dim_blue": "#81a1c199",
89 | "terminal.ansi.magenta": "#b48ead",
90 | "terminal.ansi.bright_magenta": "#b48ead",
91 | "terminal.ansi.dim_magenta": "#b48ead99",
92 | "terminal.ansi.cyan": "#88c0d0",
93 | "terminal.ansi.bright_cyan": "#8fbcbb",
94 | "terminal.ansi.dim_cyan": "#88c0d099",
95 | "terminal.ansi.white": "#e5e9f0",
96 | "terminal.ansi.bright_white": "#eceff4",
97 | "terminal.ansi.dim_white": "#d8dee9",
98 | "link_text.hover": "#81a1c1",
99 | "version_control.added": "#a3be8c",
100 | "version_control.modified": "#ebcb8b",
101 | "version_control.deleted": "#bf616a",
102 | "conflict": "#ebcb8b",
103 | "conflict.background": "#ebcb8b1a",
104 | "conflict.border": "#d08770",
105 | "created": "#a3be8c",
106 | "created.background": "#a3be8c1a",
107 | "created.border": "#8fbcbb",
108 | "deleted": "#bf616a",
109 | "deleted.background": "#bf616a1a",
110 | "deleted.border": "#434c5e",
111 | "error": "#bf616a",
112 | "error.background": "#bf616a1a",
113 | "error.border": "#434c5e",
114 | "hidden": "#616e88",
115 | "hidden.background": "#4c566a1a",
116 | "hidden.border": "#434c5e",
117 | "hint": "#616e88",
118 | "hint.background": "#b48ead1a",
119 | "hint.border": "#5e81ac",
120 | "ignored": "#616e88",
121 | "ignored.background": "#4c566a1a",
122 | "ignored.border": "#4c566a",
123 | "info": "#81a1c1",
124 | "info.background": "#81a1c11a",
125 | "info.border": "#5e81ac",
126 | "modified": "#ebcb8b",
127 | "modified.background": "#ebcb8b1a",
128 | "modified.border": "#d08770",
129 | "predictive": "#8fbcbb",
130 | "predictive.background": "#8fbcbb1a",
131 | "predictive.border": "#5e81ac",
132 | "renamed": "#81a1c1",
133 | "renamed.background": "#81a1c11a",
134 | "renamed.border": "#5e81ac",
135 | "success": "#a3be8c",
136 | "success.background": "#a3be8c1a",
137 | "success.border": "#8fbcbb",
138 | "unreachable": "#616e88",
139 | "unreachable.background": "#4c566a1a",
140 | "unreachable.border": "#4c566a",
141 | "warning": "#ebcb8b",
142 | "warning.background": "#ebcb8b1a",
143 | "warning.border": "#d08770",
144 | "players": [
145 | {
146 | "cursor": "#81a1c1",
147 | "background": "#81a1c1",
148 | "selection": "#81a1c13d"
149 | },
150 | {
151 | "cursor": "#bf616a",
152 | "background": "#bf616a",
153 | "selection": "#bf616a3d"
154 | },
155 | {
156 | "cursor": "#ebcb8b",
157 | "background": "#ebcb8b",
158 | "selection": "#ebcb8b3d"
159 | },
160 | {
161 | "cursor": "#b48ead",
162 | "background": "#b48ead",
163 | "selection": "#b48ead3d"
164 | },
165 | {
166 | "cursor": "#8fbcbb",
167 | "background": "#8fbcbb",
168 | "selection": "#8fbcbb3d"
169 | },
170 | {
171 | "cursor": "#a3be8c",
172 | "background": "#a3be8c",
173 | "selection": "#a3be8c3d"
174 | },
175 | {
176 | "cursor": "#d08770",
177 | "background": "#d08770",
178 | "selection": "#d087703d"
179 | }
180 | ],
181 | "syntax": {
182 | "attribute": {
183 | "color": "#8fbcbb",
184 | "font_style": null,
185 | "font_weight": null
186 | },
187 | "boolean": {
188 | "color": "#81a1c1",
189 | "font_style": null,
190 | "font_weight": null
191 | },
192 | "comment": {
193 | "color": "#616e88",
194 | "font_style": "italic",
195 | "font_weight": null
196 | },
197 | "comment.doc": {
198 | "color": "#a3be8c",
199 | "font_style": "italic",
200 | "font_weight": null
201 | },
202 | "constant": {
203 | "color": "#81a1c1",
204 | "font_style": null,
205 | "font_weight": null
206 | },
207 | "constructor": {
208 | "color": "#88c0d0",
209 | "font_style": null,
210 | "font_weight": null
211 | },
212 | "embedded": {
213 | "color": "#eceff4",
214 | "font_style": null,
215 | "font_weight": null
216 | },
217 | "emphasis": {
218 | "color": "#d8dee9",
219 | "font_style": "italic",
220 | "font_weight": null
221 | },
222 | "emphasis.strong": {
223 | "color": "#d8dee9",
224 | "font_style": null,
225 | "font_weight": 700
226 | },
227 | "enum": {
228 | "color": "#b48ead",
229 | "font_style": null,
230 | "font_weight": null
231 | },
232 | "function": {
233 | "color": "#88c0d0",
234 | "font_style": null,
235 | "font_weight": null
236 | },
237 | "hint": {
238 | "color": "#4c566a",
239 | "font_style": null,
240 | "font_weight": 700
241 | },
242 | "keyword": {
243 | "color": "#81a1c1",
244 | "font_style": null,
245 | "font_weight": null
246 | },
247 | "label": {
248 | "color": "#81a1c1",
249 | "font_style": null,
250 | "font_weight": null
251 | },
252 | "link_text": {
253 | "color": "#88c0d0",
254 | "font_style": "normal",
255 | "font_weight": null
256 | },
257 | "link_uri": {
258 | "color": "#8fbcbb",
259 | "font_style": null,
260 | "font_weight": null
261 | },
262 | "namespace": {
263 | "color": "#eceff4",
264 | "font_style": null,
265 | "font_weight": null
266 | },
267 | "number": {
268 | "color": "#b48ead",
269 | "font_style": null,
270 | "font_weight": null
271 | },
272 | "operator": {
273 | "color": "#81a1c1",
274 | "font_style": null,
275 | "font_weight": null
276 | },
277 | "predictive": {
278 | "color": "#4c566a",
279 | "font_style": "italic",
280 | "font_weight": null
281 | },
282 | "preproc": {
283 | "color": "#5e81ac",
284 | "font_style": null,
285 | "font_weight": null
286 | },
287 | "primary": {
288 | "color": "#d8dee9",
289 | "font_style": null,
290 | "font_weight": null
291 | },
292 | "property": {
293 | "color": "#d8dee9",
294 | "font_style": null,
295 | "font_weight": null
296 | },
297 | "punctuation": {
298 | "color": "#eceff4",
299 | "font_style": null,
300 | "font_weight": null
301 | },
302 | "punctuation.bracket": {
303 | "color": "#eceff4",
304 | "font_style": null,
305 | "font_weight": null
306 | },
307 | "punctuation.delimiter": {
308 | "color": "#eceff4",
309 | "font_style": null,
310 | "font_weight": null
311 | },
312 | "punctuation.list_marker": {
313 | "color": "#81a1c1",
314 | "font_style": null,
315 | "font_weight": null
316 | },
317 | "punctuation.special": {
318 | "color": "#d08770",
319 | "font_style": null,
320 | "font_weight": null
321 | },
322 | "selector": {
323 | "color": "#a3be8c",
324 | "font_style": null,
325 | "font_weight": null
326 | },
327 | "selector.pseudo": {
328 | "color": "#5e81ac",
329 | "font_style": null,
330 | "font_weight": null
331 | },
332 | "string": {
333 | "color": "#a3be8c",
334 | "font_style": null,
335 | "font_weight": null
336 | },
337 | "string.escape": {
338 | "color": "#ebcb8b",
339 | "font_style": null,
340 | "font_weight": null
341 | },
342 | "string.regex": {
343 | "color": "#ebcb8b",
344 | "font_style": null,
345 | "font_weight": null
346 | },
347 | "string.special": {
348 | "color": "#ebcb8b",
349 | "font_style": null,
350 | "font_weight": null
351 | },
352 | "string.special.symbol": {
353 | "color": "#d8dee9",
354 | "font_style": null,
355 | "font_weight": null
356 | },
357 | "tag": {
358 | "color": "#81a1c1",
359 | "font_style": null,
360 | "font_weight": null
361 | },
362 | "text.literal": {
363 | "color": "#a3be8c",
364 | "font_style": null,
365 | "font_weight": null
366 | },
367 | "title": {
368 | "color": "#5e81ac",
369 | "font_style": null,
370 | "font_weight": 600
371 | },
372 | "type": {
373 | "color": "#8fbcbb",
374 | "font_style": null,
375 | "font_weight": null
376 | },
377 | "variable": {
378 | "color": "#d8dee9",
379 | "font_style": null,
380 | "font_weight": null
381 | },
382 | "variable.special": {
383 | "color": "#d8dee9",
384 | "font_style": null,
385 | "font_weight": null
386 | },
387 | "variant": {
388 | "color": "#88c0d0",
389 | "font_style": null,
390 | "font_weight": null
391 | }
392 | }
393 | }
394 | }
395 | ]
396 | }
397 |
--------------------------------------------------------------------------------
/flake.lock:
--------------------------------------------------------------------------------
1 | {
2 | "nodes": {
3 | "darwin": {
4 | "inputs": {
5 | "nixpkgs": [
6 | "nixpkgs"
7 | ]
8 | },
9 | "locked": {
10 | "lastModified": 1758805352,
11 | "narHash": "sha256-BHdc43Lkayd+72W/NXRKHzX5AZ+28F3xaUs3a88/Uew=",
12 | "owner": "LnL7",
13 | "repo": "nix-darwin",
14 | "rev": "c48e963a5558eb1c3827d59d21c5193622a1477c",
15 | "type": "github"
16 | },
17 | "original": {
18 | "owner": "LnL7",
19 | "ref": "master",
20 | "repo": "nix-darwin",
21 | "type": "github"
22 | }
23 | },
24 | "dooit": {
25 | "inputs": {
26 | "nixpkgs": "nixpkgs"
27 | },
28 | "locked": {
29 | "lastModified": 1755589570,
30 | "narHash": "sha256-aVZVUFAScabB5nHC4c3BvNIrQ2Nmd0btlq3ePia/+jI=",
31 | "owner": "dooit-org",
32 | "repo": "dooit",
33 | "rev": "d12987ee1f93362042fd481c0ead17b25d7a014e",
34 | "type": "github"
35 | },
36 | "original": {
37 | "owner": "dooit-org",
38 | "repo": "dooit",
39 | "type": "github"
40 | }
41 | },
42 | "dooit-extras": {
43 | "inputs": {
44 | "dooit": "dooit_2",
45 | "nixpkgs": "nixpkgs_3"
46 | },
47 | "locked": {
48 | "lastModified": 1758024842,
49 | "narHash": "sha256-ZTZut4TN1le6rokxLOR3nuEzK+IjKh6Gy+xoUgcUXtI=",
50 | "owner": "dooit-org",
51 | "repo": "dooit-extras",
52 | "rev": "311bbcd9a11a3ab4520fe4bf9b84f6a5e06f6c18",
53 | "type": "github"
54 | },
55 | "original": {
56 | "owner": "dooit-org",
57 | "repo": "dooit-extras",
58 | "type": "github"
59 | }
60 | },
61 | "dooit_2": {
62 | "inputs": {
63 | "nixpkgs": "nixpkgs_2"
64 | },
65 | "locked": {
66 | "lastModified": 1748666860,
67 | "narHash": "sha256-Ux7cqxFcYEpPOfzVTem5IkuDGflh7UmIcdIW6ZPtovM=",
68 | "owner": "dooit-org",
69 | "repo": "dooit",
70 | "rev": "d6e3ac12508b8bb1ec99847f3a2670b709ca54c2",
71 | "type": "github"
72 | },
73 | "original": {
74 | "owner": "dooit-org",
75 | "repo": "dooit",
76 | "type": "github"
77 | }
78 | },
79 | "flake-compat": {
80 | "flake": false,
81 | "locked": {
82 | "lastModified": 1650374568,
83 | "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
84 | "owner": "edolstra",
85 | "repo": "flake-compat",
86 | "rev": "b4a34015c698c7793d592d66adbab377907a2be8",
87 | "type": "github"
88 | },
89 | "original": {
90 | "owner": "edolstra",
91 | "repo": "flake-compat",
92 | "type": "github"
93 | }
94 | },
95 | "flake-utils": {
96 | "inputs": {
97 | "systems": "systems"
98 | },
99 | "locked": {
100 | "lastModified": 1694529238,
101 | "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
102 | "owner": "numtide",
103 | "repo": "flake-utils",
104 | "rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
105 | "type": "github"
106 | },
107 | "original": {
108 | "owner": "numtide",
109 | "repo": "flake-utils",
110 | "type": "github"
111 | }
112 | },
113 | "flake-utils-plus": {
114 | "inputs": {
115 | "flake-utils": "flake-utils"
116 | },
117 | "locked": {
118 | "lastModified": 1715533576,
119 | "narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=",
120 | "owner": "gytis-ivaskevicius",
121 | "repo": "flake-utils-plus",
122 | "rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
123 | "type": "github"
124 | },
125 | "original": {
126 | "owner": "gytis-ivaskevicius",
127 | "repo": "flake-utils-plus",
128 | "rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
129 | "type": "github"
130 | }
131 | },
132 | "grub2-themes": {
133 | "inputs": {
134 | "nixpkgs": [
135 | "nixpkgs"
136 | ]
137 | },
138 | "locked": {
139 | "lastModified": 1724048800,
140 | "narHash": "sha256-+Gwv1Bpy7TomxrfUpQFGp3ngSA61PmMSFVW6V1ZYQyU=",
141 | "owner": "vinceliuice",
142 | "repo": "grub2-themes",
143 | "rev": "775e4f7487fb4e56da215f6bcd9dcc7585db0352",
144 | "type": "github"
145 | },
146 | "original": {
147 | "owner": "vinceliuice",
148 | "ref": "2024-08-19",
149 | "repo": "grub2-themes",
150 | "type": "github"
151 | }
152 | },
153 | "home-manager": {
154 | "inputs": {
155 | "nixpkgs": [
156 | "nixpkgs"
157 | ]
158 | },
159 | "locked": {
160 | "lastModified": 1759106866,
161 | "narHash": "sha256-GjLvAl7qxGxKtop6ghasxjQ1biTT7pA+WU45byzMl/4=",
162 | "owner": "nix-community",
163 | "repo": "home-manager",
164 | "rev": "619ae569293b6427d23cce4854eb4f3c33af3eec",
165 | "type": "github"
166 | },
167 | "original": {
168 | "owner": "nix-community",
169 | "repo": "home-manager",
170 | "type": "github"
171 | }
172 | },
173 | "mywalls": {
174 | "flake": false,
175 | "locked": {
176 | "lastModified": 1732537159,
177 | "narHash": "sha256-sWNt8KYBLyTTrDoRi2PbfM/+DgE2T+LwFe1J91YdJEk=",
178 | "owner": "kraanzu",
179 | "repo": "nord_walls",
180 | "rev": "33436ca29fd622ba0a324e349c24a3d833ee240c",
181 | "type": "github"
182 | },
183 | "original": {
184 | "owner": "kraanzu",
185 | "repo": "nord_walls",
186 | "type": "github"
187 | }
188 | },
189 | "nix-index-database": {
190 | "inputs": {
191 | "nixpkgs": [
192 | "nixpkgs"
193 | ]
194 | },
195 | "locked": {
196 | "lastModified": 1759032422,
197 | "narHash": "sha256-WZf+FhebP2/1pK2np5xj/NuDjD6fXK2BHnq/tPUN18o=",
198 | "owner": "nix-community",
199 | "repo": "nix-index-database",
200 | "rev": "ec7a78cb0e098832d8acac091a4df393259c4839",
201 | "type": "github"
202 | },
203 | "original": {
204 | "owner": "nix-community",
205 | "repo": "nix-index-database",
206 | "type": "github"
207 | }
208 | },
209 | "nixpkgs": {
210 | "locked": {
211 | "lastModified": 1755186698,
212 | "narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=",
213 | "owner": "nixos",
214 | "repo": "nixpkgs",
215 | "rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c",
216 | "type": "github"
217 | },
218 | "original": {
219 | "owner": "nixos",
220 | "ref": "nixos-unstable",
221 | "repo": "nixpkgs",
222 | "type": "github"
223 | }
224 | },
225 | "nixpkgs_2": {
226 | "locked": {
227 | "lastModified": 1746904237,
228 | "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=",
229 | "owner": "nixos",
230 | "repo": "nixpkgs",
231 | "rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956",
232 | "type": "github"
233 | },
234 | "original": {
235 | "owner": "nixos",
236 | "ref": "nixos-unstable",
237 | "repo": "nixpkgs",
238 | "type": "github"
239 | }
240 | },
241 | "nixpkgs_3": {
242 | "locked": {
243 | "lastModified": 1748460289,
244 | "narHash": "sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg=",
245 | "owner": "nixos",
246 | "repo": "nixpkgs",
247 | "rev": "96ec055edbe5ee227f28cdbc3f1ddf1df5965102",
248 | "type": "github"
249 | },
250 | "original": {
251 | "owner": "nixos",
252 | "ref": "nixos-unstable",
253 | "repo": "nixpkgs",
254 | "type": "github"
255 | }
256 | },
257 | "nixpkgs_4": {
258 | "locked": {
259 | "lastModified": 1759036355,
260 | "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=",
261 | "owner": "nixos",
262 | "repo": "nixpkgs",
263 | "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127",
264 | "type": "github"
265 | },
266 | "original": {
267 | "owner": "nixos",
268 | "ref": "nixos-unstable",
269 | "repo": "nixpkgs",
270 | "type": "github"
271 | }
272 | },
273 | "qtile-flake": {
274 | "inputs": {
275 | "nixpkgs": [
276 | "nixpkgs"
277 | ]
278 | },
279 | "locked": {
280 | "lastModified": 1749516886,
281 | "narHash": "sha256-UF4gRmcevtH9WNA7g/pwcciJcDariXcMNpqya68mQ38=",
282 | "owner": "qtile",
283 | "repo": "qtile",
284 | "rev": "db58974991621f8606a580cecb6ed2d84cba6dc4",
285 | "type": "github"
286 | },
287 | "original": {
288 | "owner": "qtile",
289 | "ref": "v0.32.0",
290 | "repo": "qtile",
291 | "type": "github"
292 | }
293 | },
294 | "root": {
295 | "inputs": {
296 | "darwin": "darwin",
297 | "dooit": "dooit",
298 | "dooit-extras": "dooit-extras",
299 | "grub2-themes": "grub2-themes",
300 | "home-manager": "home-manager",
301 | "mywalls": "mywalls",
302 | "nix-index-database": "nix-index-database",
303 | "nixpkgs": "nixpkgs_4",
304 | "qtile-flake": "qtile-flake",
305 | "snowfall-lib": "snowfall-lib"
306 | }
307 | },
308 | "snowfall-lib": {
309 | "inputs": {
310 | "flake-compat": "flake-compat",
311 | "flake-utils-plus": "flake-utils-plus",
312 | "nixpkgs": [
313 | "nixpkgs"
314 | ]
315 | },
316 | "locked": {
317 | "lastModified": 1736130495,
318 | "narHash": "sha256-4i9nAJEZFv7vZMmrE0YG55I3Ggrtfo5/T07JEpEZ/RM=",
319 | "owner": "snowfallorg",
320 | "repo": "lib",
321 | "rev": "02d941739f98a09e81f3d2d9b3ab08918958beac",
322 | "type": "github"
323 | },
324 | "original": {
325 | "owner": "snowfallorg",
326 | "repo": "lib",
327 | "type": "github"
328 | }
329 | },
330 | "systems": {
331 | "locked": {
332 | "lastModified": 1681028828,
333 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
334 | "owner": "nix-systems",
335 | "repo": "default",
336 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
337 | "type": "github"
338 | },
339 | "original": {
340 | "owner": "nix-systems",
341 | "repo": "default",
342 | "type": "github"
343 | }
344 | }
345 | },
346 | "root": "root",
347 | "version": 7
348 | }
349 |
--------------------------------------------------------------------------------
/flake.nix:
--------------------------------------------------------------------------------
1 | {
2 | description = "Kraanzu's NixOS config";
3 |
4 | inputs = {
5 | nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
6 | darwin.url = "github:LnL7/nix-darwin/master";
7 | darwin.inputs.nixpkgs.follows = "nixpkgs";
8 |
9 | snowfall-lib = {
10 | url = "github:snowfallorg/lib";
11 | inputs.nixpkgs.follows = "nixpkgs";
12 | };
13 |
14 | nix-index-database.url = "github:nix-community/nix-index-database";
15 | nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
16 |
17 | home-manager.url = "github:nix-community/home-manager";
18 | home-manager.inputs.nixpkgs.follows = "nixpkgs";
19 |
20 | grub2-themes.url = "github:vinceliuice/grub2-themes/2024-08-19";
21 | grub2-themes.inputs.nixpkgs.follows = "nixpkgs";
22 |
23 | qtile-flake = {
24 | url = "github:qtile/qtile/v0.32.0";
25 | inputs.nixpkgs.follows = "nixpkgs";
26 | };
27 |
28 | dooit.url = "github:dooit-org/dooit";
29 | dooit-extras.url = "github:dooit-org/dooit-extras";
30 |
31 | mywalls = {
32 | url = "github:kraanzu/nord_walls";
33 | flake = false;
34 | };
35 | };
36 |
37 | outputs =
38 | inputs:
39 | let
40 | lib = inputs.snowfall-lib.mkLib {
41 | inherit inputs;
42 | src = ./.;
43 | snowfall = {
44 | namespace = "mynix";
45 | meta = {
46 | name = "mynix";
47 | title = "Kraanzu's NixOS config";
48 | };
49 | };
50 | };
51 | in
52 | lib.mkFlake {
53 | channels-config = {
54 | allowUnfree = true;
55 | };
56 |
57 | systems.modules.nixos = with inputs; [
58 | nix-index-database.nixosModules.nix-index
59 | grub2-themes.nixosModules.default
60 | home-manager.nixosModules.home-manager
61 | ];
62 |
63 | homes.users."kraanzu@nzxt".specialArgs = {
64 | mywalls = inputs.mywalls;
65 | };
66 |
67 | homes.modules = with inputs; [
68 | dooit.homeManagerModules.default
69 | ];
70 | };
71 | }
72 |
--------------------------------------------------------------------------------
/homes/aarch64-darwin/kraanzu@macos/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 |
4 | ...
5 | }:
6 | with lib.mynix;
7 | let
8 | user_name = "kraanzu";
9 | user_email = "kraanzu@gmail.com";
10 | in
11 | {
12 | programs.git = {
13 | enable = true;
14 | userEmail = "${user_email}";
15 | userName = "${user_name}";
16 | };
17 |
18 | programs.home-manager.enable = true;
19 | home.stateVersion = "24.11";
20 | }
21 |
--------------------------------------------------------------------------------
/homes/x86_64-linux/kraanzu@nzxt/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | config,
4 | ...
5 | }:
6 | with lib.mynix;
7 | {
8 | mynix = {
9 | desktop = {
10 | rofi = enabled;
11 | dunst = enabled;
12 | picom = enabled;
13 | wallpapers = enabled;
14 | nord_theme = enabled;
15 | };
16 | browsers = {
17 | firefox = enabled;
18 | brave = enabled;
19 | edge = enabled;
20 | };
21 | media.all = enabled;
22 |
23 | dev.apps.all = enabled;
24 | dev.lang = {
25 | cpp = enabled;
26 | go = enabled;
27 | python = enabled;
28 | lua = enabled;
29 | markdown = enabled;
30 | nix = enabled;
31 | rust = enabled;
32 | };
33 |
34 | sec = enabled;
35 | };
36 |
37 | xdg = {
38 | mimeApps = enabled;
39 | userDirs = {
40 | enable = true;
41 | createDirectories = false;
42 | videos = "${config.home.homeDirectory}/HDD/Videos";
43 | };
44 | };
45 |
46 | systemd.user.startServices = "sd-switch";
47 | programs.home-manager.enable = true;
48 | home.stateVersion = "24.11";
49 | }
50 |
--------------------------------------------------------------------------------
/lib/module/default.nix:
--------------------------------------------------------------------------------
1 | { lib, ... }:
2 | with lib;
3 | rec {
4 | ## Create a NixOS module option.
5 | ##
6 | ## ```nix
7 | ## lib.mkOpt nixpkgs.lib.types.str "My default" "Description of my option."
8 | ## ```
9 | ##
10 | #@ Type -> Any -> String
11 | mkOpt =
12 | type: default: description:
13 | mkOption { inherit type default description; };
14 |
15 | ## Create a NixOS module option without a description.
16 | ##
17 | ## ```nix
18 | ## lib.mkOpt' nixpkgs.lib.types.str "My default"
19 | ## ```
20 | ##
21 | #@ Type -> Any -> String
22 | mkOpt' = type: default: mkOpt type default null;
23 |
24 | # ---
25 |
26 | mkBoolOpt = mkOpt types.bool;
27 | mkBoolOpt' = mkOpt' types.bool;
28 |
29 | enabled = {
30 | enable = true;
31 | };
32 |
33 | disabled = {
34 | enable = false;
35 | };
36 | }
37 |
--------------------------------------------------------------------------------
/modules/home/browsers/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | ...
6 | }:
7 |
8 | with lib;
9 | with lib.mynix;
10 |
11 | let
12 | cfg = config.mynix.browsers;
13 |
14 | browserDesktopNames = {
15 | firefox = "firefox.desktop";
16 | brave = "brave-browser.desktop";
17 | chrome = "google-chrome.desktop";
18 | };
19 |
20 | defaultDesktop = browserDesktopNames.${cfg.defaultBrowser};
21 | in
22 | {
23 | options.mynix.browsers = {
24 | all.enable = mkBoolOpt false "Enable all browsers";
25 | firefox.enable = mkBoolOpt false "Enable Firefox browser";
26 | brave.enable = mkBoolOpt false "Enable Brave browser";
27 | chrome.enable = mkBoolOpt false "Enable Chrome browser";
28 | edge.enable = mkBoolOpt false "Enable MS Edge browser";
29 |
30 | defaultBrowser = mkOption {
31 | type = types.enum [
32 | "firefox"
33 | "brave"
34 | "chrome"
35 | ];
36 | default = "brave";
37 | description = "Default browser for xdg-open";
38 | };
39 | };
40 |
41 | config = {
42 | home.packages = with pkgs; [
43 | (mkIf (cfg.brave.enable || cfg.all.enable) brave)
44 | (mkIf (cfg.chrome.enable || cfg.all.enable) google-chrome)
45 | (mkIf (cfg.edge.enable || cfg.all.enable) microsoft-edge)
46 | ];
47 |
48 | programs.firefox = mkIf (cfg.firefox.enable || cfg.all.enable) {
49 | enable = true;
50 | profiles.kraanzu = {
51 | settings = {
52 | "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
53 | };
54 | userChrome = ''
55 | tab.identity-color-yellow {
56 | color: white !important;
57 | }
58 | tab.identity-color-yellow .tab-background .tab-context-line {
59 | background-color: #EBCB8B !important;
60 | height: 6px !important;
61 | position: absolute !important;
62 | bottom: 0 !important;
63 | left: 0 !important;
64 | right: 0 !important;
65 | }
66 | '';
67 | };
68 | };
69 |
70 | xdg.mimeApps.defaultApplications = {
71 | "text/html" = [ defaultDesktop ];
72 | "x-scheme-handler/http" = [ defaultDesktop ];
73 | "x-scheme-handler/https" = [ defaultDesktop ];
74 | "x-scheme-handler/chrome" = [ defaultDesktop ];
75 | "application/x-extension-htm" = [ defaultDesktop ];
76 | "application/x-extension-html" = [ defaultDesktop ];
77 | "application/x-extension-shtml" = [ defaultDesktop ];
78 | "application/xhtml+xml" = [ defaultDesktop ];
79 | "application/x-extension-xhtml" = [ defaultDesktop ];
80 | "application/x-extension-xht" = [ defaultDesktop ];
81 | };
82 |
83 | home.sessionVariables.BROWSER = defaultDesktop;
84 | };
85 | }
86 |
--------------------------------------------------------------------------------
/modules/home/desktop/dunst/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | pkgs,
4 | config,
5 |
6 | ...
7 | }:
8 | let
9 | cfg = config.mynix.desktop.dunst;
10 | in
11 | {
12 | options.mynix.desktop.dunst.enable = lib.mkOption {
13 | type = lib.types.bool;
14 | default = false;
15 | description = "Enable dunst";
16 | };
17 |
18 | config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
19 | home.packages = with pkgs; [
20 | dunst
21 | libnotify
22 | ];
23 | };
24 | }
25 |
--------------------------------------------------------------------------------
/modules/home/desktop/nord_theme/default.nix:
--------------------------------------------------------------------------------
1 | {
2 |
3 | config,
4 | lib,
5 | pkgs,
6 | ...
7 | }:
8 | let
9 | cfg = config.mynix.desktop.nord_theme;
10 | in
11 | {
12 | options.mynix.desktop.nord_theme.enable = lib.mkOption {
13 | type = lib.types.bool;
14 | default = false;
15 | description = "Enable nord gtk theme";
16 | };
17 |
18 | config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
19 | gtk.enable = true;
20 | qt.enable = true;
21 |
22 | home.pointerCursor.gtk.enable = true;
23 | home.pointerCursor.name = "Nordic-cursors";
24 | home.pointerCursor.package = pkgs.nordic;
25 | home.pointerCursor.size = 20;
26 |
27 | gtk.theme.name = "Nordic-bluish-accent";
28 | gtk.theme.package = pkgs.nordic;
29 |
30 | gtk.iconTheme.name = "Papirus";
31 | gtk.iconTheme.package = pkgs.papirus-nord.override { accent = "polarnight2"; };
32 |
33 | gtk.cursorTheme.name = "Nordic-cursors";
34 | gtk.cursorTheme.package = pkgs.nordic;
35 | };
36 | }
37 |
--------------------------------------------------------------------------------
/modules/home/desktop/picom/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | config,
4 |
5 | pkgs,
6 | ...
7 | }:
8 | let
9 | cfg = config.mynix.desktop.picom;
10 | shadow_offset_x = -7;
11 | shadow_offset_y = -7;
12 | in
13 | {
14 | options.mynix.desktop.picom.enable = lib.mkOption {
15 | type = lib.types.bool;
16 | default = false;
17 | description = "Enable picom";
18 | };
19 |
20 | config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
21 | services.picom = {
22 | enable = true;
23 | settings = {
24 | shadow = false;
25 | shadowRadius = 7;
26 | shadowOffsets = [
27 | shadow_offset_x
28 | shadow_offset_y
29 | ];
30 | shadowColor = "#2e3440";
31 |
32 | fading = false;
33 | fadeDelta = 2;
34 | noFadingOpenClose = true;
35 |
36 | frameOpacity = 0.7;
37 | inactiveDimFixed = true;
38 |
39 | cornerRadius = 0;
40 |
41 | # blur = {
42 | # method = "gaussian";
43 | # size = 20;
44 | # deviation = 5.0;
45 | # };
46 | # blurBackground = true;
47 | # blurKern = "3x3box";
48 |
49 | backend = "glx";
50 | ditheredPresent = false;
51 | vsync = true;
52 | detectRoundedCorners = true;
53 | detectClientOpacity = true;
54 | detectTransient = true;
55 | useDamage = true;
56 |
57 | shadow-exclude = [
58 | "QTILE_INTERNAL:32c = 1"
59 | ];
60 |
61 | wintypes = {
62 | tooltip = {
63 | fade = false;
64 | shadow = true;
65 | opacity = 0.75;
66 | "full-shadow" = false;
67 | };
68 | dock = {
69 | "blur-background" = false;
70 | "corner-radius" = 0;
71 | shadow = false;
72 | };
73 | desktop = {
74 | "blur-background" = false;
75 | "corner-radius" = 0;
76 | shadow = false;
77 | };
78 | notification = {
79 | shadow = false;
80 | };
81 | dropdown_menu = {
82 | opacity = 1;
83 | "blur-background" = false;
84 | shadow = false;
85 | };
86 | popup_menu = {
87 | opacity = 1;
88 | "blur-background" = false;
89 | shadow = false;
90 | };
91 | unknown = {
92 | opacity = 1;
93 | "blur-background" = false;
94 | shadow = false;
95 | };
96 | };
97 | };
98 | };
99 | };
100 | }
101 |
--------------------------------------------------------------------------------
/modules/home/desktop/rofi/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | lib,
4 | config,
5 |
6 | ...
7 | }:
8 | let
9 | rofi_modes = [
10 | # default modes
11 | "window"
12 | "drun"
13 | "run"
14 | "ssh"
15 | "combi"
16 |
17 | # simple plugins
18 | "emoji"
19 |
20 | # extra config
21 | "power-menu:${pkgs.rofi-power-menu}/bin/rofi-power-menu"
22 | ];
23 | cfg = config.mynix.desktop.rofi;
24 | in
25 | {
26 | options.mynix.desktop.rofi.enable = lib.mkOption {
27 | type = lib.types.bool;
28 | default = false;
29 | description = "Enable rofi";
30 | };
31 |
32 | config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
33 | home.packages = with pkgs; [
34 | rofi-bluetooth
35 | mynix.rofi-audio-switcher
36 | ];
37 | programs.rofi = {
38 | enable = true;
39 | plugins = with pkgs; [
40 | rofi-power-menu
41 | rofi-emoji
42 | ];
43 | extraConfig = {
44 | modes = lib.concatStringsSep "," rofi_modes;
45 | };
46 |
47 | theme = import ./rofi-theme.nix {
48 | mkLiteral = config.lib.formats.rasi.mkLiteral;
49 | };
50 | };
51 | };
52 | }
53 |
--------------------------------------------------------------------------------
/modules/home/desktop/rofi/rofi-theme.nix:
--------------------------------------------------------------------------------
1 | { mkLiteral }:
2 | {
3 | "*" = {
4 | "al" = mkLiteral "#00000000";
5 | "bg" = mkLiteral "#252a34ff";
6 | "se" = mkLiteral "#8fbcbbff";
7 | "fg" = mkLiteral "#d8dee9cc";
8 | "ac" = mkLiteral "#8fbcbbff";
9 | "red" = mkLiteral "#bf616aff";
10 | "green" = mkLiteral "#a3be8cff";
11 | "yellow" = mkLiteral "#ebcb8bff";
12 | "blue" = mkLiteral "#88c0d0ff";
13 | "purple" = mkLiteral "#b48eadff";
14 | "cyan" = mkLiteral "#4DD0E1ff";
15 | };
16 |
17 | "*" = {
18 | "background-color" = mkLiteral "@bg";
19 | };
20 |
21 | "window" = {
22 | "border" = mkLiteral "0px";
23 | "border-color" = mkLiteral "@ac";
24 | "border-radius" = mkLiteral "6px";
25 | "padding" = mkLiteral "15";
26 | "width" = mkLiteral "350";
27 | };
28 |
29 | "prompt" = {
30 | "spacing" = mkLiteral "0";
31 | "border" = mkLiteral "0";
32 | "text-color" = mkLiteral "@fg";
33 | };
34 |
35 | "textbox-prompt-colon" = {
36 | "expand" = mkLiteral "false";
37 | "str" = mkLiteral "\" \"";
38 | "margin" = mkLiteral "0px 4px 0px 0px";
39 | "text-color" = mkLiteral "inherit";
40 | };
41 |
42 | "entry" = {
43 | "spacing" = mkLiteral "0";
44 | "text-color" = mkLiteral "@fg";
45 | };
46 |
47 | "case-indicator" = {
48 | "spacing" = mkLiteral "0";
49 | "text-color" = mkLiteral "@fg";
50 | };
51 |
52 | "inputbar" = {
53 | "spacing" = mkLiteral "0px";
54 | "text-color" = mkLiteral "@fg";
55 | "padding" = mkLiteral "1px";
56 | "children" = map mkLiteral [
57 | "prompt"
58 | "textbox-prompt-colon"
59 | "entry"
60 | "case-indicator"
61 | ];
62 | };
63 |
64 | "mainbox" = {
65 | "border" = mkLiteral "0px";
66 | "border-color" = mkLiteral "@ac";
67 | "padding" = mkLiteral "6";
68 | };
69 |
70 | "listview" = {
71 | "lines" = mkLiteral "6";
72 | "columns" = mkLiteral "1";
73 | "fixed-height" = mkLiteral "0";
74 | "border" = mkLiteral "0px";
75 | "border-color" = mkLiteral "@ac";
76 | "spacing" = mkLiteral "4px";
77 | "scrollbar" = mkLiteral "false";
78 | "padding" = mkLiteral "5px 5px 0px 5px";
79 | };
80 |
81 | "element-text" = {
82 | "background-color" = mkLiteral "#00000000";
83 | "text-color" = mkLiteral "inherit";
84 | };
85 |
86 | "element-icon" = {
87 | "background-color" = mkLiteral "#00000000";
88 | "text-color" = mkLiteral "inherit";
89 | };
90 |
91 | "element" = {
92 | "border" = mkLiteral "0px";
93 | "border-radius" = mkLiteral "4px";
94 | "padding" = mkLiteral "5px";
95 | };
96 |
97 | "element normal.normal" = {
98 | "background-color" = mkLiteral "@bg";
99 | "text-color" = mkLiteral "@fg";
100 | };
101 |
102 | "element normal.urgent" = {
103 | "background-color" = mkLiteral "@bg";
104 | "text-color" = mkLiteral "@red";
105 | };
106 |
107 | "element normal.active" = {
108 | "background-color" = mkLiteral "@green";
109 | "text-color" = mkLiteral "@bg";
110 | };
111 |
112 | "element selected.normal" = {
113 | "background-color" = mkLiteral "@fg";
114 | "text-color" = mkLiteral "@bg";
115 | };
116 |
117 | "element selected.urgent" = {
118 | "background-color" = mkLiteral "@bg";
119 | "text-color" = mkLiteral "@red";
120 | };
121 |
122 | "element selected.active" = {
123 | "background-color" = mkLiteral "@fg";
124 | "text-color" = mkLiteral "@bg";
125 | };
126 |
127 | "element alternate.normal" = {
128 | "background-color" = mkLiteral "@bg";
129 | "text-color" = mkLiteral "@fg";
130 | };
131 |
132 | "element alternate.urgent" = {
133 | "background-color" = mkLiteral "@bg";
134 | "text-color" = mkLiteral "@fg";
135 | };
136 |
137 | "element alternate.active" = {
138 | "background-color" = mkLiteral "@bg";
139 | "text-color" = mkLiteral "@fg";
140 | };
141 |
142 | "sidebar" = {
143 | "border" = mkLiteral "0px";
144 | "border-color" = mkLiteral "@ac";
145 | "border-radius" = mkLiteral "0px";
146 | };
147 |
148 | "button" = {
149 | "horizontal-align" = mkLiteral "0.5";
150 | "vertical-align" = mkLiteral "0.5";
151 | "background-color" = mkLiteral "@fg";
152 | "margin" = mkLiteral "5px";
153 | "padding" = mkLiteral "5px";
154 | "text-color" = mkLiteral "@bg";
155 | "border" = mkLiteral "0px";
156 | "border-radius" = mkLiteral "4px";
157 | "border-color" = mkLiteral "@fg";
158 | };
159 |
160 | "button selected" = {
161 | "background-color" = mkLiteral "@ac";
162 | "text-color" = mkLiteral "@fg";
163 | "border" = mkLiteral "0px";
164 | "border-radius" = mkLiteral "4px";
165 | "border-color" = mkLiteral "@fg";
166 | };
167 |
168 | "scrollbar" = {
169 | "width" = mkLiteral "4px";
170 | "border" = mkLiteral "0px";
171 | "handle-color" = mkLiteral "@fg";
172 | "handle-width" = mkLiteral "8px";
173 | "padding" = mkLiteral "0";
174 | };
175 |
176 | "message" = {
177 | "border" = mkLiteral "0px";
178 | "border-color" = mkLiteral "@ac";
179 | "padding" = mkLiteral "1px";
180 | };
181 |
182 | "textbox" = {
183 | "text-color" = mkLiteral "@fg";
184 | };
185 | }
186 |
--------------------------------------------------------------------------------
/modules/home/desktop/wallpapers/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | inputs,
3 |
4 | config,
5 | lib,
6 | ...
7 | }:
8 | let
9 | wallpath = builtins.toString inputs.mywalls;
10 | cfg = config.mynix.desktop.wallpapers;
11 | in
12 | {
13 | options.mynix.desktop.wallpapers.enable = lib.mkOption {
14 | type = lib.types.bool;
15 | default = false;
16 | description = "Enable desktop wallpapers";
17 | };
18 |
19 | config = lib.mkIf cfg.enable {
20 | home.file = {
21 | "wallpapers" = {
22 | source = "${wallpath}";
23 | target = ".wallpapers";
24 | };
25 | };
26 | };
27 | }
28 |
--------------------------------------------------------------------------------
/modules/home/dev/apps/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | ...
6 | }:
7 |
8 | with lib;
9 | with lib.mynix;
10 |
11 | let
12 | cfg = config.mynix.dev.apps;
13 | in
14 | {
15 | options.mynix.dev.apps = {
16 | all.enable = mkBoolOpt false "Enable all editors";
17 |
18 | alacritty.enable = mkBoolOpt false "Enable Alacritty";
19 | wezterm.enable = mkBoolOpt false "Enable WezTerm";
20 |
21 | neovim.enable = mkBoolOpt false "Enable Neovim";
22 | postman.enable = mkBoolOpt false "Enable Postman";
23 |
24 | vscode.enable = mkBoolOpt false "Enable VSCode";
25 | zed.enable = mkBoolOpt false "Enable Zed";
26 | };
27 |
28 | config = {
29 | home.packages = with pkgs; [
30 | (mkIf (cfg.alacritty.enable || cfg.all.enable) alacritty)
31 | (mkIf (cfg.postman.enable || cfg.all.enable) postman)
32 | (mkIf (cfg.vscode.enable || cfg.all.enable) vscode)
33 | (mkIf (cfg.wezterm.enable || cfg.all.enable) wezterm)
34 | (mkIf (cfg.zed.enable || cfg.all.enable) zed-editor)
35 | ];
36 |
37 | programs.neovim = mkIf (cfg.neovim.enable || cfg.all.enable) {
38 | enable = true;
39 | defaultEditor = true;
40 | extraPackages = with pkgs; [
41 | python3Packages.debugpy
42 | nodejs_22 # copilot
43 | ctags # toggle bar
44 | gcc # Treesiter
45 | ];
46 | };
47 | };
48 | }
49 |
--------------------------------------------------------------------------------
/modules/home/dev/lang/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | ...
6 | }:
7 | with lib;
8 | with lib.mynix;
9 |
10 | let
11 | cfg = config.mynix.dev.lang;
12 | languagePackages = {
13 |
14 | cpp = with pkgs; [
15 | gcc
16 | clang-tools
17 | ];
18 |
19 | go = with pkgs; [
20 | go
21 | gopls
22 | delve
23 | gdlv
24 | ];
25 |
26 | python = with pkgs; [
27 | python3
28 | basedpyright
29 | ruff
30 | conda
31 | poetry
32 | uv
33 | python312Packages.ipython
34 | binutils
35 | ];
36 |
37 | lua = with pkgs; [
38 | lua
39 | luajitPackages.lua-lsp
40 | ];
41 |
42 | markdown = with pkgs; [
43 | marksman
44 | ];
45 |
46 | nix = with pkgs; [
47 | nil
48 | nixd
49 | nixfmt-rfc-style
50 | ];
51 |
52 | rust = with pkgs; [
53 | rustup
54 | ];
55 |
56 | ts = with pkgs; [
57 | nodejs_22
58 | typescript
59 | ];
60 |
61 | zig = with pkgs; [
62 | zig
63 | zls
64 | ];
65 |
66 | };
67 |
68 | enabledLanguages = filterAttrs (name: _: cfg.${name}.enable) languagePackages;
69 | allEnabledPackages = concatLists (attrValues enabledLanguages);
70 | in
71 | {
72 | options.mynix.dev.lang = {
73 | cpp.enable = mkBoolOpt false "Enable C++";
74 | go.enable = mkBoolOpt false "Enable Go";
75 | python.enable = mkBoolOpt false "Enable Python";
76 | lua.enable = mkBoolOpt false "Enable Lua";
77 | markdown.enable = mkBoolOpt false "Enable Markdown";
78 | nix.enable = mkBoolOpt false "Enable Nix";
79 | rust.enable = mkBoolOpt false "Enable Rust";
80 | ts.enable = mkBoolOpt false "Enable TypeScript";
81 | zig.enable = mkBoolOpt false "Enable Zig";
82 | };
83 |
84 | config = {
85 | home.packages = with pkgs; allEnabledPackages ++ [ entr ];
86 | };
87 | }
88 |
--------------------------------------------------------------------------------
/modules/home/media/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | ...
6 | }:
7 |
8 | with lib;
9 | with lib.mynix;
10 |
11 | let
12 | cfg = config.mynix.media;
13 | in
14 | {
15 | options.mynix.media = {
16 | all.enable = mkBoolOpt false "Enable all apps";
17 | anydesk.enable = mkBoolOpt false "Enable Anydesk";
18 | qbittorrent.enable = mkBoolOpt false "Enable qBittorrent";
19 | simplescreenrecorder.enable = mkBoolOpt false "Enable SimpleScreenRecorder";
20 | telegram.enable = mkBoolOpt false "Enable Telegram";
21 | vlc.enable = mkBoolOpt false "Enable VLC";
22 | discord.enable = mkBoolOpt false "Enable Discord";
23 | };
24 |
25 | config = {
26 | home.packages = with pkgs; [
27 | (mkIf (cfg.anydesk.enable || cfg.all.enable) anydesk)
28 | (mkIf (cfg.qbittorrent.enable || cfg.all.enable) qbittorrent)
29 | (mkIf (cfg.simplescreenrecorder.enable || cfg.all.enable) simplescreenrecorder)
30 | (mkIf (cfg.telegram.enable || cfg.all.enable) telegram-desktop)
31 | (mkIf (cfg.vlc.enable || cfg.all.enable) vlc)
32 | (mkIf (cfg.discord.enable || cfg.all.enable) discord)
33 | ];
34 |
35 | xdg.mimeApps.defaultApplications = mkIf (cfg.telegram.enable || cfg.all.enable) {
36 | "x-scheme-handler/tg" = [ "org.telegram.desktop.desktop" ];
37 | };
38 | };
39 | }
40 |
--------------------------------------------------------------------------------
/modules/home/privacy/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | ...
6 | }:
7 |
8 | with lib;
9 | with lib.mynix;
10 |
11 | let
12 | cfg = config.mynix.secrets;
13 | in
14 | {
15 | options.mynix.secrets = {
16 | all.enable = mkBoolOpt true "Enable all privacy apps";
17 |
18 | bitwarden.enable = mkBoolOpt false "Enable bitwarden";
19 | gitcrypt.enable = mkBoolOpt false "Enable git-crypt";
20 | protonvpn.enable = mkBoolOpt false "Enable ProtonVPN";
21 | };
22 |
23 | config = {
24 | home.packages = with pkgs; [
25 | (mkIf (cfg.bitwarden.enable || cfg.all.enable) bitwarden-desktop)
26 | (mkIf (cfg.gitcrypt.enable || cfg.all.enable) git-crypt)
27 | (mkIf (cfg.protonvpn.enable || cfg.all.enable) protonvpn-cli_2)
28 | ];
29 | };
30 | }
31 |
--------------------------------------------------------------------------------
/modules/home/projects/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | ...
6 | }:
7 |
8 | with lib;
9 | with lib.mynix;
10 |
11 | let
12 | cfg = config.mynix.projects;
13 | in
14 | {
15 | options.mynix.projects = {
16 | all.enable = mkBoolOpt false "Enable all apps";
17 |
18 | dooit.enable = mkBoolOpt false "Enable dooit";
19 | };
20 |
21 | config = mkIf (cfg.dooit.enable || cfg.all.enable) {
22 | nixpkgs.overlays = [ inputs.dooit-extras.overlay ];
23 |
24 | programs.dooit = {
25 | enable = true;
26 | extraPackages = [ inputs.dooit-extras.packages.${pkgs.system}.default ];
27 | };
28 | };
29 | }
30 |
--------------------------------------------------------------------------------
/modules/home/sec/apps/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | ...
6 | }:
7 |
8 | with lib;
9 | with lib.mynix;
10 |
11 | let
12 | cfg = config.mynix.sec;
13 | in
14 | {
15 | config = mkIf cfg.enable {
16 | home.packages = with pkgs; [
17 | burpsuite
18 | ];
19 | };
20 | }
21 |
--------------------------------------------------------------------------------
/modules/home/sec/bforce/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | ...
6 | }:
7 |
8 | with lib;
9 | with lib.mynix;
10 |
11 | let
12 | cfg = config.mynix.sec;
13 | wordlists = pkgs.wordlists;
14 | dirbuster = pkgs.dirbuster;
15 | in
16 | {
17 | config = mkIf cfg.enable {
18 | home.packages = with pkgs; [
19 | thc-hydra
20 | fcrackzip
21 | hashcat
22 | ];
23 |
24 | home.file.".wordlists/seclists".source = "${wordlists}/share/wordlists";
25 | home.file.".wordlists/dirbuster".source = "${dirbuster}/share/dirbuster";
26 | };
27 | }
28 |
--------------------------------------------------------------------------------
/modules/home/sec/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | ...
4 | }:
5 |
6 | with lib;
7 | with lib.mynix;
8 | {
9 | options.mynix.sec = {
10 | enable = mkBoolOpt true "Enable all security tools";
11 | };
12 | }
13 |
--------------------------------------------------------------------------------
/modules/home/sec/networking/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | ...
6 | }:
7 |
8 | with lib;
9 | with lib.mynix;
10 |
11 | let
12 | cfg = config.mynix.sec;
13 | in
14 | {
15 | config = mkIf cfg.enable {
16 | home.packages = with pkgs; [
17 | inetutils
18 | nmap
19 | samba
20 | dig
21 | ];
22 | };
23 | }
24 |
--------------------------------------------------------------------------------
/modules/home/sec/recon/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | ...
6 | }:
7 |
8 | with lib;
9 | with lib.mynix;
10 |
11 | let
12 | cfg = config.mynix.sec;
13 | in
14 | {
15 | config = mkIf cfg.enable {
16 | home.packages = with pkgs; [
17 | subfinder
18 | amass
19 | gobuster
20 | httprobe
21 | whatweb
22 | hash-identifier
23 | feroxbuster
24 | ffuf
25 | exploitdb
26 | ];
27 | };
28 | }
29 |
--------------------------------------------------------------------------------
/modules/home/sec/redkit/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | ...
6 | }:
7 |
8 | with lib;
9 | with lib.mynix;
10 |
11 | let
12 | cfg = config.mynix.sec;
13 | in
14 | {
15 | config = mkIf cfg.enable {
16 | home.packages = with pkgs; [
17 | metasploit
18 | ];
19 | };
20 | }
21 |
--------------------------------------------------------------------------------
/modules/home/utils/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | ...
6 | }:
7 |
8 | with lib;
9 | with lib.mynix;
10 |
11 | let
12 | cfg = config.mynix.utils;
13 | in
14 | {
15 | options.mynix.utils = {
16 | enable = mkBoolOpt true "Enable all utility applications";
17 | };
18 |
19 | config = {
20 | home.packages =
21 | with pkgs;
22 | mkIf cfg.enable [
23 | libreoffice
24 | gdrive3
25 | syncthing
26 | obsidian
27 | yt-dlp
28 |
29 | # Disk utilities
30 | gparted
31 | ntfs3g
32 | gnome-disk-utility
33 |
34 | # coding stuff
35 | gemini-cli
36 | claude-code
37 | direnv
38 | gh
39 |
40 | # must-have
41 | killall
42 | wget
43 | git
44 | htop
45 | os-prober
46 | geoclue2
47 | unzip
48 | zip
49 | xclip
50 | ripgrep
51 | bluez
52 | tree
53 | tokei
54 | bat
55 | delta
56 | zoxide
57 | imagemagick
58 | popsicle
59 | wmctrl
60 | xdotool
61 | poppler-utils
62 | img2pdf
63 | stow
64 | sct
65 | ];
66 | };
67 | }
68 |
--------------------------------------------------------------------------------
/modules/nixos/apps/droidcam/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 |
5 | ...
6 | }:
7 | with lib;
8 | let
9 | cfg = config.mynix.apps.droidcam;
10 | in
11 | {
12 | options.mynix.apps.droidcam = {
13 | enable = mkOption {
14 | type = types.bool;
15 | default = false;
16 | description = "Enable droidcam";
17 | };
18 | };
19 |
20 | config = mkIf cfg.enable {
21 | programs.droidcam.enable = true;
22 | };
23 | }
24 |
--------------------------------------------------------------------------------
/modules/nixos/apps/openrgb/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 |
6 | ...
7 | }:
8 | with lib;
9 | let
10 | cfg = config.mynix.apps.openrgb;
11 | in
12 | {
13 | options.mynix.apps.openrgb = {
14 | enable = mkOption {
15 | type = types.bool;
16 | default = false;
17 | description = "Enable OpenRGB with systemd service";
18 | };
19 |
20 | profile = mkOption {
21 | type = types.path;
22 | default = ./profile.orp; # Convert relative path to absolute
23 | description = "Profile to load on OpenRGB start";
24 | };
25 | };
26 |
27 | config = mkIf cfg.enable {
28 | environment.systemPackages = [ pkgs.openrgb ];
29 | services.udev.packages = [ pkgs.openrgb ];
30 |
31 | systemd.user.services.openrgb = {
32 | description = "OpenRGB Server";
33 | serviceConfig = {
34 | ExecStart = "${pkgs.openrgb}/bin/openrgb --server --server-port 6742 --profile ${cfg.profile}";
35 | Restart = "on-failure";
36 | PartOf = [ "graphical-session.target" ];
37 | };
38 | wantedBy = [ "graphical-session.target" ];
39 | };
40 | };
41 | }
42 |
--------------------------------------------------------------------------------
/modules/nixos/apps/openrgb/profile.orp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kraanzu/.dotfiles/da007ef7322e8303f2d27bb26a47852e498de172/modules/nixos/apps/openrgb/profile.orp
--------------------------------------------------------------------------------
/modules/nixos/cli/docker/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | ...
5 | }:
6 | let
7 | cfg = config.mynix.cli.docker;
8 | in
9 | {
10 | options = {
11 | mynix.cli.docker.enable = lib.mkOption {
12 | type = lib.types.bool;
13 | default = true;
14 | description = "Enable Docker";
15 | };
16 | };
17 |
18 | config = lib.mkIf cfg.enable {
19 | virtualisation.docker = {
20 | enable = true;
21 | liveRestore = false;
22 | rootless = {
23 | enable = true;
24 | setSocketVariable = true;
25 | };
26 | };
27 | };
28 | }
29 |
--------------------------------------------------------------------------------
/modules/nixos/cli/openvpn/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | ...
6 | }:
7 | let
8 | cfg = config.mynix.cli.openvpn;
9 | in
10 | {
11 | options = {
12 | mynix.cli.openvpn.enable = lib.mkOption {
13 | type = lib.types.bool;
14 | default = true;
15 | description = "Enable OpenVPN";
16 | };
17 | };
18 |
19 | config = lib.mkIf cfg.enable {
20 | boot.kernelModules = [ "tun" ];
21 |
22 | services.openvpn.servers = {
23 | sp_htb = {
24 | config = builtins.readFile ./sp_htb.ovpn;
25 | autoStart = false;
26 | };
27 | lab_htb = {
28 | config = builtins.readFile ./lab_htb.ovpn;
29 | autoStart = false;
30 | };
31 | };
32 |
33 | environment.systemPackages = [ pkgs.openvpn ];
34 |
35 | };
36 | }
37 |
--------------------------------------------------------------------------------
/modules/nixos/cli/openvpn/lab_htb.ovpn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kraanzu/.dotfiles/da007ef7322e8303f2d27bb26a47852e498de172/modules/nixos/cli/openvpn/lab_htb.ovpn
--------------------------------------------------------------------------------
/modules/nixos/cli/openvpn/sp_htb.ovpn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kraanzu/.dotfiles/da007ef7322e8303f2d27bb26a47852e498de172/modules/nixos/cli/openvpn/sp_htb.ovpn
--------------------------------------------------------------------------------
/modules/nixos/desktop/addons/utilities/default.nix:
--------------------------------------------------------------------------------
1 | # SDDM CHILI THEME
2 | {
3 | config,
4 | lib,
5 | pkgs,
6 |
7 | ...
8 | }:
9 | with lib;
10 | let
11 | cfg = config.mynix.desktop.utilities;
12 | in
13 | {
14 | options = {
15 | mynix.desktop.utilities.enable = lib.mkOption {
16 | type = lib.types.bool;
17 | default = false;
18 | description = "Enable desktop utilities such as network manager, clipboard manager, etc.";
19 | };
20 | };
21 |
22 | config = mkIf cfg.enable {
23 | environment.systemPackages = with pkgs; [
24 | zathura
25 | blueberry
26 | networkmanagerapplet
27 | xfce.xfce4-clipman-plugin
28 | caffeine-ng
29 | lxsession
30 | nautilus
31 | ];
32 | };
33 | }
34 |
--------------------------------------------------------------------------------
/modules/nixos/desktop/login/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | ...
5 | }:
6 | with lib;
7 | let
8 | cfg = config.mynix.desktop.login;
9 | in
10 | {
11 | options = {
12 | mynix.desktop.login.enable = lib.mkOption {
13 | type = lib.types.bool;
14 | default = false;
15 | description = "Enable the SDDM login";
16 | };
17 | };
18 |
19 | config = mkIf cfg.enable {
20 | services.xserver.enable = true;
21 | services.displayManager.sddm = {
22 | enable = true;
23 | };
24 | services.getty.autologinUser = "kraanzu";
25 | services.displayManager.autoLogin = {
26 | enable = true;
27 | user = "kraanzu";
28 | };
29 | };
30 | }
31 |
--------------------------------------------------------------------------------
/modules/nixos/desktop/qtile/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | config,
4 | lib,
5 | inputs,
6 | ...
7 | }:
8 | let
9 | cfg = config.mynix.desktop.qtile;
10 | in
11 | {
12 | options = {
13 | mynix.desktop.qtile.enable = lib.mkOption {
14 | type = lib.types.bool;
15 | default = false;
16 | description = "Enable Qtile WM";
17 | };
18 | };
19 |
20 | config = lib.mkIf cfg.enable {
21 | programs.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
22 | environment.systemPackages = with pkgs; [
23 | flameshot
24 | pulseaudio
25 | playerctl
26 | ];
27 |
28 | services.xserver.windowManager.qtile = {
29 | enable = true;
30 | extraPackages =
31 | p: with p; [
32 | qtile-extras
33 | dbus-next
34 | pulsectl-asyncio
35 | requests
36 | ];
37 | };
38 | };
39 | }
40 |
--------------------------------------------------------------------------------
/modules/nixos/hardware/amdgpu/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 |
5 | ...
6 | }:
7 | with lib;
8 | let
9 | cfg = config.mynix.hardware.amdgpu;
10 | in
11 | {
12 | options = {
13 | mynix.hardware.amdgpu.enable = lib.mkOption {
14 | type = lib.types.bool;
15 | default = false;
16 | description = "Enable AMD GPU";
17 | };
18 | };
19 |
20 | config = mkIf cfg.enable {
21 | boot.initrd.kernelModules = [ "amdgpu" ];
22 | services.xserver.videoDrivers = [ "amdgpu" ];
23 | };
24 | }
25 |
--------------------------------------------------------------------------------
/modules/nixos/home/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | options,
5 |
6 | ...
7 | }:
8 | let
9 | inherit (lib.mynix) mkOpt;
10 | in
11 | {
12 | options.mynix.home = with lib.types; {
13 | file = mkOpt attrs { } "A set of files to be managed by home-manager's .";
14 | configFile =
15 | mkOpt attrs { }
16 | "A set of files to be managed by home-manager's .";
17 | extraOptions = mkOpt attrs { } "Options to pass directly to home-manager.";
18 | homeConfig = mkOpt attrs { } "Final config for home-manager.";
19 | };
20 |
21 | config = {
22 | mynix.home.extraOptions = {
23 | home.file = lib.mkAliasDefinitions options.mynix.home.file;
24 | xdg.enable = true;
25 | xdg.configFile = lib.mkAliasDefinitions options.mynix.home.configFile;
26 | };
27 |
28 | snowfallorg.users.${config.mynix.user.name}.home.config =
29 | lib.mkAliasDefinitions options.mynix.home.extraOptions;
30 |
31 | home-manager = {
32 | # enables backing up existing files instead of erroring if conflicts exist
33 | backupFileExtension = "hm.old";
34 |
35 | useUserPackages = true;
36 | useGlobalPkgs = true;
37 |
38 | verbose = true;
39 | };
40 | };
41 | }
42 |
--------------------------------------------------------------------------------
/modules/nixos/system/boot/default.nix:
--------------------------------------------------------------------------------
1 | {
2 |
3 | lib,
4 | config,
5 | ...
6 | }:
7 | let
8 | cfg = config.mynix.system.boot;
9 | in
10 | {
11 | options.mynix.system.boot.enable = lib.mkOption {
12 | type = lib.types.bool;
13 | default = true;
14 | description = "Enable boot configuration.";
15 | };
16 |
17 | config = lib.mkIf cfg.enable {
18 | boot.loader.systemd-boot.enable = false;
19 | boot.loader = {
20 | efi = {
21 | canTouchEfiVariables = true;
22 | };
23 | grub2-theme = {
24 | enable = true;
25 | theme = "vimix";
26 | footer = true;
27 | };
28 |
29 | grub = {
30 | useOSProber = true;
31 | efiSupport = true;
32 | device = "nodev";
33 | # efiInstallAsRemovable = true; # in case canTouchEfiVariables doesn't work for your system
34 | };
35 | };
36 | systemd.user.extraConfig = ''
37 | DefaultTimeoutStopSec=5s
38 | '';
39 | };
40 | }
41 |
--------------------------------------------------------------------------------
/modules/nixos/system/fonts/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 |
4 | lib,
5 | config,
6 | ...
7 | }:
8 | let
9 | cfg = config.mynix.system.fonts;
10 | in
11 | {
12 | options.mynix.system.fonts.enable = lib.mkOption {
13 | type = lib.types.bool;
14 | default = true;
15 | description = "Setup fonts";
16 | };
17 |
18 | config = lib.mkIf cfg.enable {
19 | fonts.packages = with pkgs; [
20 | nerd-fonts.sauce-code-pro
21 | nerd-fonts.jetbrains-mono
22 | ];
23 | };
24 | }
25 |
--------------------------------------------------------------------------------
/modules/nixos/system/locale/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | config,
4 | ...
5 | }:
6 | let
7 | cfg = config.mynix.system.locale;
8 | in
9 | {
10 | options.mynix.system.locale.enable = lib.mkOption {
11 | type = lib.types.bool;
12 | default = true;
13 | description = "Setup locale";
14 | };
15 |
16 | config = lib.mkIf cfg.enable {
17 | time.timeZone = "Asia/Kolkata";
18 | i18n.defaultLocale = "en_IN";
19 |
20 | i18n.extraLocaleSettings = {
21 | LC_ADDRESS = "en_IN";
22 | LC_IDENTIFICATION = "en_IN";
23 | LC_MEASUREMENT = "en_IN";
24 | LC_MONETARY = "en_IN";
25 | LC_NAME = "en_IN";
26 | LC_NUMERIC = "en_IN";
27 | LC_PAPER = "en_IN";
28 | LC_TELEPHONE = "en_IN";
29 | LC_TIME = "en_IN";
30 | };
31 |
32 | location.latitude = 22.5744;
33 | location.longitude = 88.3629;
34 | };
35 | }
36 |
--------------------------------------------------------------------------------
/modules/nixos/system/misc/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | config,
4 | pkgs,
5 | ...
6 | }:
7 | let
8 | cfg = config.mynix.system.misc;
9 | in
10 | {
11 | options.mynix.system.misc.enable = lib.mkOption {
12 | type = lib.types.bool;
13 | default = true;
14 | description = "Setup misc items";
15 | };
16 |
17 | config = lib.mkIf cfg.enable {
18 | services.printing.enable = false;
19 | security.polkit.enable = true;
20 | networking.networkmanager.enable = true;
21 |
22 | programs.dconf.enable = true;
23 | programs.nix-index-database.comma.enable = true;
24 | programs.nix-ld.enable = true;
25 | programs.adb.enable = true;
26 |
27 | xdg.portal = {
28 | enable = true;
29 | extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
30 | config = {
31 | common.default = "*";
32 | };
33 | };
34 |
35 | services.dnsmasq.enable = true;
36 | services.dnsmasq.settings = {
37 | no-resolv = true;
38 | bogus-priv = true;
39 | strict-order = true;
40 | server = [
41 | "94.140.14.49"
42 | "94.140.15.15"
43 | ];
44 | };
45 |
46 | services.dbus.enable = true;
47 | programs.seahorse.enable = true;
48 | services.gnome.gnome-keyring.enable = true;
49 | security.pam.services.sddm.enableGnomeKeyring = true;
50 | security.pam.services.login.enableGnomeKeyring = true;
51 |
52 | # Faster Load/Shutdown
53 | # systemd.services."NetworkManager-wait-online".enable = false;
54 | systemd.settings.Manager.DefaultTimeoutStopSec = "5s";
55 |
56 | nix.settings.experimental-features = [
57 | "nix-command"
58 | "flakes"
59 | ];
60 | };
61 | }
62 |
--------------------------------------------------------------------------------
/modules/nixos/system/shell/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 |
4 | lib,
5 | config,
6 | ...
7 | }:
8 | let
9 | cfg = config.mynix.system.shell;
10 | garbageCollectCmd = "nix-collect-garbage --delete-older-than 3d";
11 | in
12 | {
13 | options.mynix.system.shell.enable = lib.mkOption {
14 | type = lib.types.bool;
15 | default = true;
16 | description = "Setup shell";
17 | };
18 |
19 | config = lib.mkIf cfg.enable {
20 | programs.fish.enable = true;
21 |
22 | programs.fish = {
23 | shellAliases = {
24 | nix-shell = "nix-shell --run fish";
25 | cleanup = "${garbageCollectCmd}";
26 | scleanup = "sudo ${garbageCollectCmd}";
27 | };
28 | shellInit = ''
29 | if test -e ${pkgs.conda}/bin/conda
30 | eval ${pkgs.conda}/bin/conda "shell.fish" "hook" $argv | source
31 | end
32 | '';
33 | interactiveShellInit = ''
34 | function runshell
35 | if test (count $argv) -eq 1
36 | nix develop ~/.dotfiles/#$argv[1]
37 | else
38 | echo "Usage: runshell "
39 | end
40 | end
41 | '';
42 | };
43 |
44 | environment.systemPackages = with pkgs; [
45 | fish
46 | starship
47 | eza
48 | ];
49 | };
50 | }
51 |
--------------------------------------------------------------------------------
/modules/nixos/system/sound/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | config,
4 | ...
5 | }:
6 | let
7 | cfg = config.mynix.system.sound;
8 | in
9 | {
10 | options.mynix.system.sound.enable = lib.mkOption {
11 | type = lib.types.bool;
12 | default = true;
13 | description = "Setup sound";
14 | };
15 |
16 | config = lib.mkIf cfg.enable {
17 | services.pulseaudio.enable = false;
18 |
19 | hardware.bluetooth = {
20 | enable = true;
21 | powerOnBoot = true;
22 | settings = {
23 | General = {
24 | AutoEnable = true;
25 | RememberDevice = true;
26 | };
27 | };
28 | };
29 |
30 | security.rtkit.enable = true;
31 | services.pipewire = {
32 | enable = true;
33 | audio.enable = true;
34 | pulse.enable = true;
35 | alsa.enable = true;
36 |
37 | wireplumber.enable = true;
38 | wireplumber.extraConfig = {
39 | "rename-sinks" = {
40 | "monitor.alsa.rules" = [
41 | {
42 | matches = [
43 | { "node.name" = "alsa_output.pci-0000_0a_00.1.hdmi-stereo-extra1"; }
44 | ];
45 | actions.update-props = {
46 | "node.description" = "Monitor HDMI";
47 | "device.form-factor" = "hdmi";
48 | };
49 | }
50 |
51 | {
52 | matches = [
53 | { "node.name" = "alsa_output.usb-ACTIONS_Pebble_V3-00.analog-stereo"; }
54 | ];
55 | actions.update-props = {
56 | "node.description" = "Pebble V3";
57 | "device.form-factor" = "speakers";
58 | };
59 | }
60 |
61 | {
62 | matches = [
63 | { "node.name" = "alsa_output.pci-0000_0c_00.4.iec958-stereo"; }
64 | ];
65 | actions.update-props = {
66 | "node.description" = "Internal HDMI";
67 | "device.form-factor" = "internal";
68 | };
69 | }
70 | ];
71 | };
72 | };
73 | };
74 | };
75 | }
76 |
--------------------------------------------------------------------------------
/modules/nixos/system/usb/default.nix:
--------------------------------------------------------------------------------
1 | {
2 |
3 | lib,
4 | config,
5 | ...
6 | }:
7 | let
8 | cfg = config.mynix.system.usb;
9 | in
10 | {
11 | options.mynix.system.usb.enable = lib.mkOption {
12 | type = lib.types.bool;
13 | default = true;
14 | description = "Setup usb stuff";
15 | };
16 |
17 | config = lib.mkIf cfg.enable {
18 | services.gvfs.enable = true;
19 | services.udisks2.enable = true;
20 | };
21 | }
22 |
--------------------------------------------------------------------------------
/modules/nixos/system/xkb/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 |
5 | ...
6 | }:
7 | with lib;
8 | let
9 | cfg = config.mynix.system.xkb;
10 | in
11 | {
12 | options.mynix.system.xkb.enable = lib.mkOption {
13 | type = lib.types.bool;
14 | default = true;
15 | description = "Setup xkb";
16 | };
17 |
18 | config = mkIf cfg.enable {
19 | services.xserver = {
20 | xkb = {
21 | layout = "us";
22 | };
23 | };
24 | };
25 | }
26 |
--------------------------------------------------------------------------------
/modules/nixos/user/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 |
6 | ...
7 | }:
8 | let
9 | inherit (lib) types mkIf;
10 | inherit (lib.mynix) mkOpt;
11 |
12 | cfg = config.mynix.user;
13 | in
14 | {
15 | options.mynix.user = {
16 | name = mkOpt types.str "kraanzu" "The user account.";
17 | email = mkOpt types.str "kraanzu@gmail.com" "The email of the user.";
18 | fullName = mkOpt types.str "Murli Tawari" "The full name of the user.";
19 | uid = mkOpt (types.nullOr types.int) 1000 "The uid for the user account.";
20 | };
21 |
22 | config = {
23 | users.users.${cfg.name} = {
24 | uid = mkIf (cfg.uid != null) cfg.uid;
25 | shell = pkgs.fish;
26 | };
27 | };
28 | }
29 |
--------------------------------------------------------------------------------
/packages/dooit/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | fetchFromGitHub,
4 | dooit,
5 | python311,
6 | testers,
7 | nix-update-script,
8 | extraPackages ? [ ],
9 | }:
10 | let
11 | python3 = python311;
12 | in
13 | python3.pkgs.buildPythonApplication rec {
14 | pname = "dooit";
15 | version = "3.0.2";
16 | pyproject = true;
17 |
18 | src = fetchFromGitHub {
19 | owner = "dooit-org";
20 | repo = "dooit";
21 | rev = "refs/tags/v${version}";
22 | hash = "sha256-DPmCADFduGc5n+6q9zl0f4x9C6RmzLvBeYh2j0ZSpH0=";
23 | };
24 |
25 | build-system = with python3.pkgs; [ poetry-core ];
26 |
27 | pythonRelaxDeps = [
28 | "tzlocal"
29 | "textual"
30 | "sqlalchemy"
31 | ];
32 |
33 | propagatedBuildInputs =
34 | with python3.pkgs;
35 | [
36 | pyperclip
37 | textual
38 | pyyaml
39 | python-dateutil
40 | sqlalchemy
41 | platformdirs
42 | tzlocal
43 | click
44 | ]
45 | ++ extraPackages;
46 |
47 | # /homeless-shelter
48 | preBuild = ''
49 | export HOME=$(mktemp -d)
50 | '';
51 |
52 | checkInputs = with python3.pkgs; [
53 | pytestCheckHook
54 | faker
55 | ];
56 |
57 | passthru = {
58 | tests.version = testers.testVersion {
59 | package = dooit;
60 | command = "HOME=$(mktemp -d) dooit --version";
61 | };
62 |
63 | updateScript = nix-update-script { };
64 | };
65 |
66 | meta = with lib; {
67 | description = "TUI todo manager";
68 | homepage = "https://github.com/dooit-org/dooit";
69 | changelog = "https://github.com/dooit-org/dooit/blob/v${version}/CHANGELOG.md";
70 | license = licenses.mit;
71 | maintainers = with maintainers; [
72 | khaneliman
73 | wesleyjrz
74 | kraanzu
75 | ];
76 | mainProgram = "dooit";
77 | };
78 | }
79 |
--------------------------------------------------------------------------------
/packages/firefox-nordic-theme/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | pkgs.fetchFromGitHub {
3 | owner = "EliverLara";
4 | repo = "firefox-nordic-theme";
5 | rev = "287c6b4a94361a038d63f2fa7b62f9adfc08fe02";
6 | sha256 = "1bh7jslgscfn84bblsjixrywvpb6bdmdqk5y8aaisvbclmj33iz9";
7 | name = "firefox-nordic-theme";
8 | }
9 |
--------------------------------------------------------------------------------
/packages/rofi-audio-switcher/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | glib,
4 | stdenv,
5 | makeWrapper,
6 | rofi,
7 | pulseaudio,
8 | gawk,
9 | gnugrep,
10 | bash,
11 | }:
12 |
13 | stdenv.mkDerivation {
14 | pname = "rofi-audio-switcher";
15 | version = "1.0";
16 |
17 | src = ./.;
18 |
19 | nativeBuildInputs = [ makeWrapper ];
20 |
21 | installPhase = ''
22 | runHook preInstall
23 |
24 | install -D --target-directory=$out/bin ./rofi-audio-switcher
25 |
26 | wrapProgram $out/bin/rofi-audio-switcher \
27 | --prefix PATH ":" ${
28 | lib.makeBinPath [
29 | rofi
30 | pulseaudio
31 | gawk
32 | gnugrep
33 | bash
34 | ]
35 | }
36 |
37 | runHook postInstall
38 | '';
39 |
40 | meta = with lib; {
41 | description = "Rofi-based audio input/output switcher using pactl";
42 | homepage = null;
43 | license = licenses.mit;
44 | maintainers = with maintainers; [ kraanzu ];
45 | mainProgram = "rofi-audio-switcher";
46 | platforms = platforms.linux;
47 | };
48 | }
49 |
--------------------------------------------------------------------------------
/packages/rofi-audio-switcher/rofi-audio-switcher:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Define choices
4 | OUTPUT_CHOICE="🔊 Output"
5 | INPUT_CHOICE="🎤 Input"
6 |
7 | # Show menu
8 | choice=$(echo -e "$OUTPUT_CHOICE\n$INPUT_CHOICE" | rofi -dmenu -p "Type:")
9 | [ -z "$choice" ] && exit 1
10 |
11 | declare -A devices_map
12 |
13 | get_icon() {
14 | case "$1" in
15 | headphones|headset) echo "🎧" ;;
16 | speakers|desktop-speakers) echo "🔊" ;;
17 | hdmi) echo "🎬" ;;
18 | internal|built-in) echo "💻" ;;
19 | usb) echo "🔌" ;;
20 | spdif) echo "📡" ;;
21 | *) echo "🔈" ;;
22 | esac
23 | }
24 | if [[ "$choice" == "$OUTPUT_CHOICE" ]]; then
25 | # Get current default sink
26 | current_sink=$(pactl get-default-sink)
27 |
28 | while IFS= read -r line; do
29 | name=$(echo "$line" | awk '{print $2}')
30 | description=$(pactl list sinks | awk -v dev="$name" '
31 | $0 ~ "Name: "dev { in_dev = 1 }
32 | in_dev && /Description:/ { gsub(/^[[:space:]]*Description: /, ""); print; found=1 }
33 | found { exit }
34 | ')
35 | form_factor=$(pactl list sinks | awk -v dev="$name" '
36 | $0 ~ "Name: "dev { in_dev = 1 }
37 | in_dev && /device.form_factor/ { gsub(/.*= "/, ""); gsub(/"$/, ""); print; exit }
38 | ')
39 | icon=$(get_icon "$form_factor")
40 | label="$icon $description"
41 |
42 | # Add "(current)" indicator if this is the default sink
43 | if [[ "$name" == "$current_sink" ]]; then
44 | label="$label (current)"
45 | fi
46 |
47 | devices_map["$label"]="$name"
48 | echo "$label"
49 | done < <(pactl list short sinks)
50 | selected_desc=$(printf "%s\n" "${!devices_map[@]}" | rofi -dmenu -p "Select:" -markup-rows)
51 | [ -n "$selected_desc" ] && pactl set-default-sink "${devices_map[$selected_desc]}"
52 | elif [[ "$choice" == "$INPUT_CHOICE" ]]; then
53 | # Get current default source
54 | current_source=$(pactl get-default-source)
55 |
56 | while IFS= read -r line; do
57 | name=$(echo "$line" | awk '{print $2}')
58 | description=$(pactl list sources | awk -v dev="$name" '
59 | $0 ~ "Name: "dev { in_dev = 1 }
60 | in_dev && /Description:/ { gsub(/^[[:space:]]*Description: /, ""); print; found=1 }
61 | found { exit }
62 | ')
63 | form_factor=$(pactl list sources | awk -v dev="$name" '
64 | $0 ~ "Name: "dev { in_dev = 1 }
65 | in_dev && /device.form-factor/ { gsub(/.*= "/, ""); gsub(/"$/, ""); print; exit }
66 | ')
67 | icon=$(get_icon "$form_factor")
68 | label="$icon $description"
69 |
70 | # Add "(current)" indicator if this is the default source
71 | if [[ "$name" == "$current_source" ]]; then
72 | label="$label (current)"
73 | fi
74 |
75 | devices_map["$label"]="$name"
76 | echo "$label"
77 | done < <(pactl list short sources)
78 | selected_desc=$(printf "%s\n" "${!devices_map[@]}" | rofi -dmenu -p "Select:" -markup-rows)
79 | [ -n "$selected_desc" ] && pactl set-default-source "${devices_map[$selected_desc]}"
80 | fi
81 |
--------------------------------------------------------------------------------
/packages/smassh/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | fetchFromGitHub,
4 | smassh,
5 | python311,
6 | testers,
7 | }:
8 |
9 | let
10 | python3 = python311;
11 | in
12 | python3.pkgs.buildPythonApplication rec {
13 | pname = "smassh";
14 | version = "3.1.7";
15 | pyproject = true;
16 |
17 | src = fetchFromGitHub {
18 | owner = "kraanzu";
19 | repo = "smassh";
20 | rev = "v${version}";
21 | hash = "sha256-NqeOeyzVn+hBPX+76A0hMBezPQqDNFZsHBSaRtsrfrA=";
22 | };
23 |
24 | nativeBuildInputs = with python3.pkgs; [ poetry-core ];
25 |
26 | pythonRelaxDeps = [
27 | "platformdirs"
28 | "textual"
29 | ];
30 |
31 | propagatedBuildInputs = with python3.pkgs; [
32 | click
33 | platformdirs
34 | requests
35 | textual
36 | ];
37 |
38 | # No tests available
39 | doCheck = false;
40 |
41 | passthru.tests.version = testers.testVersion {
42 | package = smassh;
43 | command = "HOME=$(mktemp -d) smassh --version";
44 | version = "smassh - v${version}";
45 | };
46 |
47 | meta = with lib; {
48 | description = "TUI based typing test application inspired by MonkeyType";
49 | homepage = "https://github.com/kraanzu/smassh";
50 | changelog = "https://github.com/kraanzu/smassh/blob/main/CHANGELOG.md";
51 | license = licenses.gpl3Plus;
52 | maintainers = with maintainers; [
53 | aimpizza
54 | kraanzu
55 | ];
56 | mainProgram = "smassh";
57 | };
58 | }
59 |
--------------------------------------------------------------------------------
/shells/archlinux/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | mkShell,
3 | pkgs,
4 | ...
5 | }:
6 | mkShell {
7 | packages = with pkgs; [
8 | docker
9 | ];
10 |
11 | shellHook = ''
12 | # Get the current working directory
13 | CURRENT_DIR=$(pwd)
14 |
15 | if git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
16 | # Set the current directory as a safe directory for Git
17 | git config --global --add safe.directory "$PWD"
18 |
19 | # Turn off git tracking of file permissions
20 | git config core.fileMode false
21 | fi
22 |
23 | # Run the docker container with the current directory mounted to /shared
24 | docker run -it --rm -v "$CURRENT_DIR:/shared" archlinux bash -c "
25 | # Sync the latest mirrors
26 | pacman -Sy --noconfirm archlinux-keyring
27 | pacman -Sy --noconfirm
28 |
29 | # Install required packages
30 | pacman -S --noconfirm base-devel neovim git fish tmux sudo python3
31 |
32 | # Create user and add sudo permissions
33 | useradd -m -G wheel -s /usr/bin/fish test
34 | echo 'test ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/test
35 |
36 | # Set the permissions on /shared to allow read and write for all users
37 | chmod -R 777 /shared
38 |
39 | # Create a symlink from /home/test/shared to /shared
40 | ln -s /shared /home/test/shared
41 |
42 | # Run additional commands as 'test' user
43 | sudo -u test bash -c '
44 | cd ~
45 | sudo pacman -S --needed --noconfirm git base-devel
46 | git clone https://aur.archlinux.org/yay-bin.git
47 | cd yay-bin
48 | makepkg -si --noconfirm
49 | cd ..
50 | rm -rf yay-bin
51 | '
52 |
53 | # Switch to 'test' user and start 'fish' shell
54 | sudo -u test -i fish
55 | "
56 |
57 | # Exit the nix shell after exiting the docker container
58 | exit
59 | '';
60 | }
61 |
--------------------------------------------------------------------------------
/shells/qtile/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | mkShell,
4 | ...
5 | }:
6 | mkShell {
7 | packages = with pkgs; [
8 | fish
9 | python3Packages.qtile
10 | python3Packages.qtile-extras
11 | python3Packages.requests
12 | ];
13 |
14 | shellHook = ''
15 | echo "DevShell for Qtile and Qtile_extras!"
16 | exec fish
17 | exit
18 | '';
19 | }
20 |
--------------------------------------------------------------------------------
/systems/aarch64-darwin/macos/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | pkgs,
4 | config,
5 | ...
6 | }:
7 | with lib.mynix;
8 | {
9 | environment.systemPath = [ "/opt/homebrew/bin" ];
10 | ids.gids.nixbld = 350;
11 | system.stateVersion = 4;
12 | homebrew = {
13 | enable = true;
14 | onActivation.cleanup = "zap";
15 | };
16 |
17 | system.activationScripts.applications.text =
18 | let
19 | env = pkgs.buildEnv {
20 | name = "system-applications";
21 | paths = config.environment.systemPackages;
22 | pathsToLink = "/Applications";
23 | };
24 | in
25 | pkgs.lib.mkForce ''
26 | # Set up applications.
27 | echo "setting up /Applications..." >&2
28 | rm -rf /Applications/Nix\ Apps
29 | mkdir -p /Applications/Nix\ Apps
30 | find ${env}/Applications -maxdepth 1 -type l -exec readlink '{}' + |
31 | while read -r src; do
32 | app_name=$(basename "$src")
33 | echo "copying $src" >&2
34 | ${pkgs.mkalias}/bin/mkalias "$src" "/Applications/Nix Apps/$app_name"
35 | done
36 | '';
37 |
38 | mynix = {
39 | };
40 | }
41 |
--------------------------------------------------------------------------------
/systems/x86_64-linux/nzxt/default.nix:
--------------------------------------------------------------------------------
1 | { lib, ... }:
2 | with lib;
3 | with lib.mynix;
4 | {
5 | imports = [
6 | ./hardware-configuration.nix
7 | ./htb.nix
8 | ./monitors.nix
9 | ./drives.nix
10 | ];
11 |
12 | hardware.openrazer = {
13 | enable = true;
14 | batteryNotifier = {
15 | percentage = 5;
16 | frequency = 6 * 3600;
17 | };
18 | };
19 |
20 | networking.hostName = "nzxt";
21 | mynix = {
22 | apps = {
23 | openrgb = enabled;
24 | };
25 | desktop = {
26 | qtile = enabled;
27 | login = enabled;
28 | utilities = enabled;
29 | };
30 | hardware = {
31 | amdgpu = enabled;
32 | };
33 | };
34 |
35 | programs.coolercontrol.enable = true;
36 | programs.gnupg.agent = {
37 | enable = true;
38 | enableSSHSupport = true;
39 | };
40 |
41 | users.users.kraanzu = {
42 | isNormalUser = true;
43 | extraGroups = [
44 | "networkmanager"
45 | "wheel"
46 | "adbusers"
47 | "openrazer"
48 | ];
49 | };
50 |
51 | system.stateVersion = "24.11";
52 | }
53 |
--------------------------------------------------------------------------------
/systems/x86_64-linux/nzxt/drives.nix:
--------------------------------------------------------------------------------
1 | {
2 |
3 | fileSystems."/drives/WIN" = {
4 | device = "/dev/disk/by-uuid/7476F42376F3E430";
5 | fsType = "ntfs";
6 | options = [
7 | "defaults"
8 | "nofail"
9 | ];
10 | };
11 |
12 | fileSystems."/drives/HDD" = {
13 | device = "/dev/disk/by-uuid/f7ff91fe-2871-4f4f-9297-0d6df5235f85";
14 | fsType = "ext4";
15 | options = [
16 | "defaults"
17 | "nofail"
18 | ];
19 | };
20 | }
21 |
--------------------------------------------------------------------------------
/systems/x86_64-linux/nzxt/hardware-configuration.nix:
--------------------------------------------------------------------------------
1 | # Do not modify this file! It was generated by ‘nixos-generate-config’
2 | # and may be overwritten by future invocations. Please make changes
3 | # to /etc/nixos/configuration.nix instead.
4 | { config, lib, pkgs, modulesPath, ... }:
5 |
6 | {
7 | imports =
8 | [ (modulesPath + "/installer/scan/not-detected.nix")
9 | ];
10 |
11 | boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
12 | boot.initrd.kernelModules = [ ];
13 | boot.kernelModules = [ ];
14 | boot.extraModulePackages = [ ];
15 |
16 | fileSystems."/" =
17 | { device = "/dev/disk/by-uuid/0f71ef56-4e53-4a0d-aa31-d46b26e823dd";
18 | fsType = "ext4";
19 | };
20 |
21 | fileSystems."/boot" =
22 | { device = "/dev/disk/by-uuid/CDFE-1EE9";
23 | fsType = "vfat";
24 | options = [ "fmask=0077" "dmask=0077" ];
25 | };
26 |
27 | fileSystems."/home" =
28 | { device = "/dev/disk/by-uuid/e4af8cb6-79de-4705-9f88-54b704bff842";
29 | fsType = "ext4";
30 | };
31 |
32 | swapDevices = [ ];
33 |
34 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
35 | # (the default) this is the recommended approach. When using systemd-networkd it's
36 | # still possible to use this option, but it's recommended to use it in conjunction
37 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`.
38 | networking.useDHCP = lib.mkDefault true;
39 | # networking.interfaces.enp7s0.useDHCP = lib.mkDefault true;
40 |
41 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
42 | hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
43 | }
44 |
--------------------------------------------------------------------------------
/systems/x86_64-linux/nzxt/htb.nix:
--------------------------------------------------------------------------------
1 | # Temp file for htb boxes
2 |
3 | {
4 | networking.hosts = {
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/systems/x86_64-linux/nzxt/monitors.nix:
--------------------------------------------------------------------------------
1 | let
2 | dp_edid = "00ffffffffffff001e6d715b01010101011a0104b5351e789f0331a6574ea2260d5054a54b80317c4568457c617c8168818081bc953cdf8880a070385a403020350055502100001e023a801871382d40582c4500132a2100001e000000fd003090a0a03c010a202020202020000000fc003237474c363530460a20202020014b020320f1230907074b010203041112131f903f0083010000e305c000e30605018048801871382d40582c4500132a2100001e866f80a07038404030203500132a2100001efe5b80a07038354030203500132a21000018011d007251d01e206e285500132a2100001e00000000000000000000000000000000000000000000003c";
3 |
4 | hdmi_edid = "00ffffffffffff0009d1e778010101012a20010380351e782e05f5a557529c270b5054a56b80d1c0b300a9c08180810081c001010101023a801871382d40582c45000f282100001e000000ff00455437414e3031353439534c30000000fd00324c1e5311000a202020202020000000fc0042656e51204757323438300a20010b020322f14f901f04130312021101140607151605230907078301000065030c001000023a801871382d40582c45000f282100001f011d8018711c1620582c25000f282100009f011d007251d01e206e2855000f282100001e8c0ad08a20e02d10103e96000f282100001800000000000000000000000000000000000000000003";
5 |
6 | fingerprints = {
7 | DisplayPort-1 = dp_edid;
8 | HDMI-A-0 = hdmi_edid;
9 | };
10 | in
11 | {
12 | services.autorandr = {
13 | enable = true;
14 | defaultTarget = "single-monitor";
15 |
16 | profiles = {
17 | "dual-monitor" = {
18 | fingerprint = fingerprints;
19 | config = {
20 | DisplayPort-1 = {
21 | enable = true;
22 | primary = true;
23 | position = "1080x420";
24 | mode = "1920x1080";
25 | rotate = "normal";
26 | };
27 | HDMI-A-0 = {
28 | enable = true;
29 | position = "0x0";
30 | mode = "1920x1080";
31 | rotate = "left";
32 | };
33 | };
34 | };
35 |
36 | "single-monitor" = {
37 | fingerprint = fingerprints;
38 | config = {
39 | DisplayPort-1 = {
40 | enable = true;
41 | primary = true;
42 | position = "1080x420";
43 | mode = "1920x1080";
44 | rotate = "normal";
45 | };
46 | HDMI-A-0 = {
47 | enable = false;
48 | };
49 | };
50 | };
51 | };
52 | };
53 | }
54 |
--------------------------------------------------------------------------------