├── .gitignore
├── INDEX.md
├── README.md
├── assets
├── images
│ ├── nixos-icon-generic.png
│ └── nixos-logo.png
├── screens
│ ├── blank-desktop.png
│ ├── desktop-busy.png
│ ├── desktop-neofetch.png
│ ├── toolbelt.gif
│ └── toolbelt_hq.gif
├── sound
│ ├── backspace.wav
│ ├── bell.wav
│ ├── cd.wav
│ ├── collectgarbage.wav
│ ├── enter.wav
│ ├── error.wav
│ ├── gitadd.wav
│ ├── gitcheckout.wav
│ ├── gitcommit.wav
│ ├── gitpull.wav
│ ├── gitpush.wav
│ ├── gitrebase.wav
│ ├── invoke.wav
│ ├── login.wav
│ ├── ls.wav
│ ├── move_h.wav
│ ├── move_v.wav
│ ├── nixswitch-start.wav
│ ├── nvim.wav
│ ├── rm.wav
│ ├── screenshot.wav
│ ├── sh-source.wav
│ ├── ssh.wav
│ ├── update.wav
│ ├── update_alt.wav
│ └── warning.wav
└── wallpapers
│ ├── cabin-2.jpg
│ ├── cat-leaves.png
│ ├── cloud.png
│ ├── dark-waves.jpg
│ ├── evening-sky.png
│ ├── nixos-catppuccin.png
│ ├── nixos_blue.png
│ ├── nord-balloons.png
│ ├── purpled-night.jpg
│ ├── sine.png
│ ├── sleeping-blackmetal.png
│ ├── sleeping.png
│ └── train.jpg
├── docs
├── options
│ ├── home_options.md
│ └── system_options.md
├── scripts.md
└── sounds.md
├── flake.lock
├── flake.nix
├── hosts
├── desktop
│ ├── config.nix
│ ├── hardware.nix
│ └── home.nix
├── laptop
│ ├── config.nix
│ ├── hardware.nix
│ └── home.nix
├── live-env
│ ├── config.nix
│ ├── disko.nix
│ └── home.nix
└── server
│ ├── config.nix
│ ├── hardware.nix
│ └── home.nix
├── modules
├── home
│ ├── default.nix
│ ├── environment
│ │ ├── default.nix
│ │ ├── gtk.nix
│ │ ├── hyprland.nix
│ │ ├── spicetify.nix
│ │ ├── starship.nix
│ │ ├── stylixhome.nix
│ │ ├── swaync.nix
│ │ ├── userpkgs.nix
│ │ ├── userservices.nix
│ │ ├── waybar.nix
│ │ └── zsh
│ │ │ ├── aliases.nix
│ │ │ ├── default.nix
│ │ │ ├── env.nix
│ │ │ ├── extraconfig.nix
│ │ │ └── options.nix
│ ├── files.nix
│ ├── programs
│ │ ├── autojump.nix
│ │ ├── bat.nix
│ │ ├── btop.nix
│ │ ├── cava.nix
│ │ ├── default.nix
│ │ ├── eza.nix
│ │ ├── fuzzel.nix
│ │ ├── fzf.nix
│ │ ├── git.nix
│ │ ├── kitty.nix
│ │ ├── nixvim
│ │ │ ├── autocmd.nix
│ │ │ ├── default.nix
│ │ │ ├── keymaps.nix
│ │ │ ├── options.nix
│ │ │ └── plugins
│ │ │ │ ├── airline.nix
│ │ │ │ ├── alpha.nix
│ │ │ │ ├── barbar.nix
│ │ │ │ ├── cmp.nix
│ │ │ │ ├── coq.nix
│ │ │ │ ├── default.nix
│ │ │ │ ├── extra_plugins.nix
│ │ │ │ ├── fidget.nix
│ │ │ │ ├── gitsigns.nix
│ │ │ │ ├── haskell.nix
│ │ │ │ ├── indent-blankline.nix
│ │ │ │ ├── lsp.nix
│ │ │ │ ├── lualine.nix
│ │ │ │ ├── neocord.nix
│ │ │ │ ├── nvim-lightbulb.nix
│ │ │ │ ├── nvim-tree.nix
│ │ │ │ ├── plugins.nix
│ │ │ │ ├── rustaceanvim.nix
│ │ │ │ ├── scratch.nix
│ │ │ │ ├── scrollview.nix
│ │ │ │ ├── telescope.nix
│ │ │ │ └── vim-matchup.nix
│ │ ├── password-store.nix
│ │ └── yazi.nix
│ └── servermodule.nix
├── server
│ ├── cdn
│ │ ├── default.nix
│ │ └── jellyfin.nix
│ ├── default.nix
│ └── glasshaus
│ │ ├── caddy.nix
│ │ └── default.nix
└── sys
│ ├── default.nix
│ ├── hardware
│ ├── bootloader.nix
│ ├── default.nix
│ ├── network.nix
│ └── powerprofiles.nix
│ ├── software
│ ├── default.nix
│ ├── gaming
│ │ ├── default.nix
│ │ ├── gaming_pkgs.nix
│ │ └── steam.nix
│ ├── packages.nix
│ ├── programs.nix
│ ├── services.nix
│ └── virtualization.nix
│ └── sysenv
│ ├── console.nix
│ ├── default.nix
│ ├── issue.nix
│ ├── nix.nix
│ ├── sddm.nix
│ └── stylix.nix
└── overlay
├── overlay.nix
├── pkgs
├── breezex-cursor
│ └── package.nix
├── slash
│ ├── Cargo.lock
│ ├── package.nix
│ └── update_slash.sh
└── zsh-fzf-tab
│ └── package.nix
└── scripts
├── commands
├── git-compose.nix
├── icanhazip.nix
├── invoke.nix
├── runbg.nix
├── splash.nix
├── toolbelt.nix
├── viconf.nix
└── vipkg.nix
├── misc
├── color-commit.nix
└── mntstack.nix
├── nix
├── check_updates.nix
├── fetchfromgh.nix
├── garbage-collect.nix
└── rebuild.nix
└── wm-controls
├── chpaper.nix
├── chscheme.nix
├── keyring.nix
├── mkscreenshots.nix
├── moveonscreen.nix
├── playshellsound.nix
├── s_check.nix
└── switchmon.nix
/.gitignore:
--------------------------------------------------------------------------------
1 | result
2 | target
3 | hardware.nix
4 |
--------------------------------------------------------------------------------
/INDEX.md:
--------------------------------------------------------------------------------
1 | # Index of Configuration Files
2 |
3 | This document provides an overview of the directories and Nix files in my configuration, along with a brief description of their purpose.
4 |
5 | ---
6 |
7 | ## Assets
8 | - Contains resources used by the configuration, such as images, sound effects, and wallpapers.
9 |
10 | ### Subdirectories:
11 | - **images/**
12 | - General images like icons and logos.
13 | - **screens/**
14 | - Screenshots of the desktop environment and toolbelt demos.
15 | - **sound/**
16 | - Sound effects for terminal interactions and system events.
17 | - **wallpapers/**
18 | - Wallpapers used for the desktop environment.
19 |
20 | ---
21 |
22 | ## Hosts
23 | - Machine-specific configurations.
24 |
25 | ### Subdirectories:
26 | - **desktop/**:
27 | - Configuration for the desktop machine.
28 | - Files: `config.nix`, `hardware.nix`, `home.nix`
29 | - **laptop/**:
30 | - Configuration for the laptop.
31 | - Files: `config.nix`, `hardware.nix`, `home.nix`
32 | - **server/**:
33 | - Configuration for the server.
34 | - Files: `config.nix`, `hardware.nix`, `home.nix`
35 | - **installer/**:
36 | - NixOS installer configuration.
37 | - Files: `default.nix`, `disko-ext4-singledisk.nix`
38 |
39 | ---
40 |
41 | ## Modules
42 | - Main modules for defining home and system-level configurations.
43 |
44 | ### Subdirectories:
45 | - **home/**:
46 | - Modules for user environments, programs, and custom scripts.
47 | - **Subdirectories**:
48 | - **environment/**: Configures desktop environment components like Hyprland, Waybar, and GTK.
49 | - Files: `hyprland.nix`, `waybar.nix`, `gtk.nix`
50 | - **programs/**: Configures user programs like Firefox, Kitty, and autojump.
51 | - Files: `firefox.nix`, `kitty.nix`, `autojump.nix`
52 | - **scripts/**: Defines custom commands, Nix aliases, and window manager controls.
53 | - **Subdirectories**:
54 | - **commands/**: My CLI scripts.
55 | - **nix/**: Nix-specific utilities.
56 | - **wm-controls/**: Custom controls for Hyprland.
57 |
58 | - **server/**:
59 | - Server-specific modules, including Jellyfin and CDN configurations. Still under construction.
60 | - Files: `jellyfin.nix`, `cdn/default.nix`
61 |
62 | - **sys/**:
63 | - Modules for system-level configurations, including hardware, software, and environment settings.
64 | - **Subdirectories**:
65 | - **hardware/**: Configures hardware components like the bootloader and network.
66 | - Files: `bootloader.nix`, `network.nix`
67 | - **software/**: Manages installed packages, programs, and services.
68 | - Files: `packages.nix`, `services.nix`
69 | - **sysenv/**: Configures system environment settings.
70 | - Files: `issue.nix`, `sddm.nix`
71 |
72 | ---
73 |
74 | ## Overlay
75 | - Custom Nix overlays for my derivations and utilities.
76 |
77 | ### Subdirectories:
78 | - **breezex-cursor/**: Package for custom cursor themes.
79 | - Files: `package.nix`
80 | - **check_updates/**: Script for checking package updates.
81 | - Files: `package.nix`
82 | - Root file: `overlay.nix`
83 |
84 | ---
85 |
86 | ## Additional Notes
87 | - **Assets** contains resources like images and sounds used in the configuration.
88 | - **Modules** contain the logic and settings for both user-level and system-level configurations.
89 | - **Hosts** provide machine-specific overrides for desktop, laptop, and server setups.
90 | - **Overlay** adds customizations to the Nix package set.
91 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ❄️ pagedMov's NixOS config ❄️
2 |
3 | Special thanks to Frost-Phoenix, this config started out as a fork of his dots. [Check out his
4 | config here](https://github.com/Frost-Phoenix/nixos-config/tree/catppuccin)
5 |
6 |
7 |
8 | ## Gallery
9 |
10 | 
11 | 
12 | Screenshots up to date as of [this commit](https://github.com/pagedMov/nixos-config/commit/501aedc11976afe8c5386364c7a6e4b5b73af044)
13 |
14 | ## Programs
15 |
16 | | Component | Program |
17 | |----------------|---------------------------------------------------|
18 | | Window manager | [Hyprland](https://github.com/hyprwm/Hyprland) |
19 | | Status Bar | [Waybar](https://github.com/Alexays/Waybar) |
20 | | Launcher | [Fuzzel](https://codeberg.org/dnkl/fuzzel) |
21 | | Terminal | [Kitty](https://github.com/kovidgoyal/kitty) |
22 | | Shell | [zsh](https://zsh.sourceforge.io/) |
23 | | Text Editor | [Nixvim](https://github.com/nix-community/nixvim) |
24 | | Image Viewer | [feh](https://github.com/derf/feh) |
25 |
26 | ## Installation
27 |
28 | If you are on NixOS and have flakes enabled, you can just follow these steps:
29 |
30 | 1. Clone the repo to a directory
31 |
32 | 2. Run nixos-generate-config --show-hardware-config > hardware.nix to get a hardware config
33 |
34 | 3. Move the hardware config to the folder of the host you want to use
35 |
36 | 4. Run sudo nixos-rebuild switch --flake /path/to/flake#host where "host" is the name of the config you want to use
37 |
38 | ## Configs
39 |
40 | Currently there are two complete system configurations available. These are:
41 |
42 | * **Oganesson** - My desktop configuration. Generalist workflow which includes virtualization and gaming features.
43 | * **Mercury** - My laptop configuration. My laptop is a pretty weak machine so this configuration is stripped down a bit.
44 |
45 | The 'Xenon' config is my server configuration and is highly unlikely to be of use to anyone but me, as the setup has some very specific use-cases.
46 |
47 | ## Modules
48 |
49 | This config uses custom modules for the home-manager and system configurations. Basically every part of the configuration can be toggled using an option, and some configs have extra options as well.
50 | All of the options declared in these modules can be found in the documentation under docs/options
51 |
52 | ## Scripts
53 |
54 | ```chpaper``` - opens a fzf window with filenames and previews of images in $FLAKEPATH/assets/wallpapers. Picking one replaces the existing wallpaper path in $FLAKEPATH/flake.nix with the one you chose.
55 |
56 | ```chscheme``` - opens the full list of base16 color schemes in a fzf window, with a preview to see how the colors look in your terminal. When selected, replaces the chosen colorscheme in $FLAKEPATH/flake.nix with the one you chose.
57 |
58 | ```keyring``` - opens a fzf window containing all of the paths in ~/.password-store. Selecting one will use pass to copy the corresponding password to your clipboard for up to 45 seconds.
59 |
60 | ```toolbelt``` - opens a fzf menu containing some utilities that are nice to have in arm's reach; btop, alsamixer, the chpaper and chscheme scripts, among others. Bound to Super + P in the hyprland config by default.
61 |
62 | ```viconf``` - takes a partial path or filename as an argument. Attempts to find a corresponding .nix file or directory in $FLAKEPATH. If multiple matches are found, then it opens a fzf instance that allows you to choose one. Opens the file in neovim.
63 |
64 | ## Aliases
65 |
66 | ```rebuild``` == ```nh os switch```
67 |
68 | ```ga``` == ```git add```
69 |
70 | ```gcomm``` == ```git commit```
71 |
72 | ```gpull``` == ```git pull```
73 |
74 | ```gpush``` == ```git push```
75 |
76 | ```gt``` == ```gtrash```
77 |
78 | ```gtp``` == ```gtrash put```
79 |
80 | ```svc``` == ```sudo systemctl```
81 |
82 | ```svcu``` == ```systemctl --user```
83 |
84 | ```viflake``` == ```nvim flake.nix```
85 |
86 | ```pk``` == ```pkill -9 -f```
87 |
88 | ```psg``` == ```ps aux | grep -v grep | grep -i -e VSZ -e```
89 |
90 | ```sr``` == ```source ~/.zshrc```
91 |
92 | ## Bindings
93 |
94 | 'mod' is Super by default.
95 |
96 | Utility
97 |
98 | ```mod + printscreen``` = grimblast copy area
99 |
100 | ```mod + t``` = open swaync-client
101 |
102 | ```mod + a``` = open firefox
103 |
104 | ```mod + q``` = open kitty
105 |
106 | ```mod + c``` = kill active window
107 |
108 | ```mod + e``` = open nemo (file browser)
109 |
110 | ```mod + p``` = open toolbelt script window
111 |
112 | ```mod + m``` = open fuzzel (application launcher)
113 |
114 | ```mod + r``` = open neovide (neovim GUI)
115 |
116 |
117 |
118 | Navigation
119 |
120 | ```super + b``` = change split direction
121 |
122 | ```super + f``` = float/unfloat window
123 |
124 | ```super + g``` = fullscreen
125 |
126 | ```super + h``` = move focus left
127 |
128 | ```super + l``` = move focus right
129 |
130 | ```super + k``` = move focus up
131 |
132 | ```super + j``` = move focus down
133 |
134 | ```super + d``` = switch focus to other monitor
135 |
136 | ```super + 1``` = go to workspace 1
137 |
138 | ```super + 2``` = go to workspace 2
139 |
140 | ```super + 3``` = go to workspace 3
141 |
142 | ```super + 4``` = go to workspace 4
143 |
144 | ```super + 5``` = go to workspace 5
145 |
146 | ```super + 6``` = go to workspace 6
147 |
148 | ```super + shift + 1``` = move active window to workspace 1
149 |
150 | ```super + shift + 2``` = move active window to workspace 2
151 |
152 | ```super + shift + 3``` = move active window to workspace 3
153 |
154 | ```super + shift + 4``` = move active window to workspace 4
155 |
156 | ```super + shift + 5``` = move active window to workspace 5
157 |
158 | ```super + shift + 6``` = move active window to workspace 6
159 |
160 | ```super + s``` = toggle scrachpad
161 |
162 | ```super + shift + s``` = move active window to scratchpad
163 |
164 |
165 |
166 | ---
167 |
168 | Important note: Some aspects of the configuration are hard coded. these include
169 | * Hyprland config: hardcoded display outputs
170 | * Waybar config: hardcoded display outputs
171 | * Git config: set up like userEmail = ${username}@gmail.com, userName = ${username}, so these will be substituted with whatever you put as the username in the flake.nix file.
172 |
173 | Many of the scripts use the $FLAKEPATH environment variable, which is set to $HOME/.sysflake by default. This variable should contain the path to this flake.
174 |
--------------------------------------------------------------------------------
/assets/images/nixos-icon-generic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/images/nixos-icon-generic.png
--------------------------------------------------------------------------------
/assets/images/nixos-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/images/nixos-logo.png
--------------------------------------------------------------------------------
/assets/screens/blank-desktop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/screens/blank-desktop.png
--------------------------------------------------------------------------------
/assets/screens/desktop-busy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/screens/desktop-busy.png
--------------------------------------------------------------------------------
/assets/screens/desktop-neofetch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/screens/desktop-neofetch.png
--------------------------------------------------------------------------------
/assets/screens/toolbelt.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/screens/toolbelt.gif
--------------------------------------------------------------------------------
/assets/screens/toolbelt_hq.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/screens/toolbelt_hq.gif
--------------------------------------------------------------------------------
/assets/sound/backspace.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/backspace.wav
--------------------------------------------------------------------------------
/assets/sound/bell.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/bell.wav
--------------------------------------------------------------------------------
/assets/sound/cd.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/cd.wav
--------------------------------------------------------------------------------
/assets/sound/collectgarbage.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/collectgarbage.wav
--------------------------------------------------------------------------------
/assets/sound/enter.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/enter.wav
--------------------------------------------------------------------------------
/assets/sound/error.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/error.wav
--------------------------------------------------------------------------------
/assets/sound/gitadd.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/gitadd.wav
--------------------------------------------------------------------------------
/assets/sound/gitcheckout.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/gitcheckout.wav
--------------------------------------------------------------------------------
/assets/sound/gitcommit.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/gitcommit.wav
--------------------------------------------------------------------------------
/assets/sound/gitpull.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/gitpull.wav
--------------------------------------------------------------------------------
/assets/sound/gitpush.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/gitpush.wav
--------------------------------------------------------------------------------
/assets/sound/gitrebase.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/gitrebase.wav
--------------------------------------------------------------------------------
/assets/sound/invoke.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/invoke.wav
--------------------------------------------------------------------------------
/assets/sound/login.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/login.wav
--------------------------------------------------------------------------------
/assets/sound/ls.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/ls.wav
--------------------------------------------------------------------------------
/assets/sound/move_h.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/move_h.wav
--------------------------------------------------------------------------------
/assets/sound/move_v.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/move_v.wav
--------------------------------------------------------------------------------
/assets/sound/nixswitch-start.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/nixswitch-start.wav
--------------------------------------------------------------------------------
/assets/sound/nvim.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/nvim.wav
--------------------------------------------------------------------------------
/assets/sound/rm.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/rm.wav
--------------------------------------------------------------------------------
/assets/sound/screenshot.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/screenshot.wav
--------------------------------------------------------------------------------
/assets/sound/sh-source.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/sh-source.wav
--------------------------------------------------------------------------------
/assets/sound/ssh.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/ssh.wav
--------------------------------------------------------------------------------
/assets/sound/update.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/update.wav
--------------------------------------------------------------------------------
/assets/sound/update_alt.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/update_alt.wav
--------------------------------------------------------------------------------
/assets/sound/warning.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/sound/warning.wav
--------------------------------------------------------------------------------
/assets/wallpapers/cabin-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/wallpapers/cabin-2.jpg
--------------------------------------------------------------------------------
/assets/wallpapers/cat-leaves.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/wallpapers/cat-leaves.png
--------------------------------------------------------------------------------
/assets/wallpapers/cloud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/wallpapers/cloud.png
--------------------------------------------------------------------------------
/assets/wallpapers/dark-waves.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/wallpapers/dark-waves.jpg
--------------------------------------------------------------------------------
/assets/wallpapers/evening-sky.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/wallpapers/evening-sky.png
--------------------------------------------------------------------------------
/assets/wallpapers/nixos-catppuccin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/wallpapers/nixos-catppuccin.png
--------------------------------------------------------------------------------
/assets/wallpapers/nixos_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/wallpapers/nixos_blue.png
--------------------------------------------------------------------------------
/assets/wallpapers/nord-balloons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/wallpapers/nord-balloons.png
--------------------------------------------------------------------------------
/assets/wallpapers/purpled-night.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/wallpapers/purpled-night.jpg
--------------------------------------------------------------------------------
/assets/wallpapers/sine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/wallpapers/sine.png
--------------------------------------------------------------------------------
/assets/wallpapers/sleeping-blackmetal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/wallpapers/sleeping-blackmetal.png
--------------------------------------------------------------------------------
/assets/wallpapers/sleeping.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/wallpapers/sleeping.png
--------------------------------------------------------------------------------
/assets/wallpapers/train.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/km-clay/nixos-config/c12ae3a9e96846731766aa5522ac39417c9d101b/assets/wallpapers/train.jpg
--------------------------------------------------------------------------------
/docs/options/home_options.md:
--------------------------------------------------------------------------------
1 | # Home-Manager Options
2 |
3 | - **movOpts**
4 |
5 | - **homeFiles**
6 | - **enable**
7 | - Enables my declared files.
8 | - *Type*: Boolean
9 | - *Default*: `true`
10 | - *Defined in*: `modules/home/files.nix`
11 |
12 | ---
13 |
14 | - **envConfig**
15 |
16 | - **hyprlandConfig**
17 | - **enable**
18 | - Enables my custom Hyprland configuration.
19 | - *Type*: Boolean
20 | - *Default*: `true`
21 | - *Defined in*: `modules/home/environment/hyprland.nix`
22 | - **monitorNames**
23 | - List of monitor names for my Hyprland configuration.
24 | - *Type*: List of Strings
25 | - *Default*: `[]`
26 | - *Defined in*: `modules/home/environment/hyprland.nix`
27 | - **workspaceLayout**
28 | - Workspace layout for Hyprland (e.g., dual monitor setups).
29 | - *Type*: String
30 | - *Default*: `"dualmonitor"`
31 | - *Defined in*: `modules/home/environment/hyprland.nix`
32 |
33 | - **userPkgs**
34 | - **enable**
35 | - Enables my default user packages.
36 | - *Type*: Boolean
37 | - *Default*: `true`
38 | - *Defined in*: `modules/home/environment/userpkgs.nix`
39 |
40 | - **stylixHomeConfig**
41 | - **enable**
42 | - Enables my Stylix Home-Manager options.
43 | - *Type*: Boolean
44 | - *Default*: `true`
45 | - *Defined in*: `modules/home/environment/stylix.nix`
46 |
47 | - **waybarConfig**
48 | - **enable**
49 | - Enables my custom Waybar configuration.
50 | - *Type*: Boolean
51 | - *Default*: `true`
52 | - *Defined in*: `modules/home/environment/waybar.nix`
53 |
54 | - **gtkConfig**
55 | - **enable**
56 | - Enables my GTK configuration.
57 | - *Type*: Boolean
58 | - *Default*: `true`
59 | - *Defined in*: `modules/home/environment/gtk.nix`
60 |
61 | - **spicetifyConfig**
62 | - **enable**
63 | - Enables my Spicetify configuration.
64 | - *Type*: Boolean
65 | - *Default*: `true`
66 | - *Defined in*: `modules/home/environment/spicetify.nix`
67 |
68 | - **starshipConfig**
69 | - **enable**
70 | - Enables my Starship prompt configuration.
71 | - *Type*: Boolean
72 | - *Default*: `true`
73 | - *Defined in*: `modules/home/environment/starship.nix`
74 |
75 | - **swayncConfig**
76 | - **enable**
77 | - Enables my SwayNC configuration.
78 | - *Type*: Boolean
79 | - *Default*: `true`
80 | - *Defined in*: `modules/home/environment/swaync.nix`
81 |
82 | - **zshConfig**
83 | - **shellAliases**
84 | - **enable**
85 | - Enables custom shell aliases.
86 | - *Type*: Boolean
87 | - *Default*: `true`
88 | - *Defined in*: `modules/home/environment/zsh/aliases.nix`
89 | - **envVariables**
90 | - **enable**
91 | - Enables custom environment variables for Zsh.
92 | - *Type*: Boolean
93 | - *Default*: `true`
94 | - *Defined in*: `modules/home/environment/zsh/env.nix`
95 | - **shellOptions**
96 | - **enable**
97 | - Enables custom shell options for Zsh.
98 | - *Type*: Boolean
99 | - *Default*: `true`
100 | - *Defined in*: `modules/home/environment/zsh/options.nix`
101 | - **extraConfig**
102 | - **enable**
103 | - Enables extra custom configuration for Zsh.
104 | - *Type*: Boolean
105 | - *Default*: `true`
106 | - *Defined in*: `modules/home/environment/zsh/extraconfig.nix`
107 |
108 | ---
109 |
110 | - **programConfigs**
111 |
112 | - **autojumpConfig**
113 | - **enable**
114 | - Enables my Autojump options.
115 | - *Type*: Boolean
116 | - *Default*: `true`
117 | - *Defined in*: `modules/home/programs/autojump.nix`
118 |
119 | - **btopConfig**
120 | - **enable**
121 | - Enables my Btop configuration.
122 | - *Type*: Boolean
123 | - *Default*: `true`
124 | - *Defined in*: `modules/home/programs/btop.nix`
125 |
126 | - **cavaConfig**
127 | - **enable**
128 | - Enables my Cava configuration.
129 | - *Type*: Boolean
130 | - *Default*: `true`
131 | - *Defined in*: `modules/home/programs/cava.nix`
132 |
133 | - **ezaConfig**
134 | - **enable**
135 | - Enables my Eza configuration.
136 | - *Type*: Boolean
137 | - *Default*: `true`
138 | - *Defined in*: `modules/home/programs/eza.nix`
139 |
140 | - **firefoxConfig**
141 | - **enable**
142 | - Enables my Firefox configuration.
143 | - *Type*: Boolean
144 | - *Default*: `true`
145 | - *Defined in*: `modules/home/programs/firefox.nix`
146 |
147 | - **fuzzelConfig**
148 | - **enable**
149 | - Enables my Fuzzel configuration.
150 | - *Type*: Boolean
151 | - *Default*: `true`
152 | - *Defined in*: `modules/home/programs/fuzzel.nix`
153 |
154 | - **fzfConfig**
155 | - **enable**
156 | - Enables my FZF configuration.
157 | - *Type*: Boolean
158 | - *Default*: `true`
159 | - *Defined in*: `modules/home/programs/fzf.nix`
160 |
161 | - **gitConfig**
162 | - **enable**
163 | - Enables my Git configuration.
164 | - *Type*: Boolean
165 | - *Default*: `true`
166 | - *Defined in*: `modules/home/programs/git.nix`
167 |
168 | - **kittyConfig**
169 | - **enable**
170 | - Enables my Kitty configuration.
171 | - *Type*: Boolean
172 | - *Default*: `true`
173 | - *Defined in*: `modules/home/programs/kitty.nix`
174 |
175 | - **yaziConfig**
176 | - **enable**
177 | - Enables my Yazi configuration.
178 | - *Type*: Boolean
179 | - *Default*: `true`
180 | - *Defined in*: `modules/home/programs/yazi.nix`
181 |
182 | - **passConfig**
183 | - **enable**
184 | - Enables my Password-Store configuration.
185 | - *Type*: Boolean
186 | - *Default*: `true`
187 | - *Defined in*: `modules/home/programs/password-store.nix`
188 |
189 | - **batConfig**
190 | - **enable**
191 | - Enables my Bat configuration.
192 | - *Type*: Boolean
193 | - *Default*: `true`
194 | - *Defined in*: `modules/home/programs/bat.nix`
195 |
--------------------------------------------------------------------------------
/docs/options/system_options.md:
--------------------------------------------------------------------------------
1 | # System Options
2 |
3 | - **sysEnv**
4 | - **issue**
5 | - **enable**
6 | - Enables my custom `/etc/issue` TTY splash screen.
7 | - *Type*: Boolean
8 | - *Default*: `false`
9 | - *Defined in*: `modules/sys/environment/issue.nix`
10 |
11 | - **sddmConfig**
12 | - **enable**
13 | - Enables my Catppuccin-SDDM configuration.
14 | - *Type*: Boolean
15 | - *Default*: `false`
16 | - *Defined in*: `modules/sys/environment/sddm.nix`
17 |
18 | - **stylixConfig**
19 | - **enable**
20 | - Enables Stylix for system theming.
21 | - *Type*: Boolean
22 | - *Default*: `false`
23 | - *Defined in*: `modules/sys/environment/stylix.nix`
24 |
25 | - **nixSettings**
26 | - **enable**
27 | - Enables my NixOS settings.
28 | - *Type*: Boolean
29 | - *Default*: `false`
30 | - *Defined in*: `modules/sys/environment/nix.nix`
31 |
32 | ---
33 |
34 | - **hardwareCfg**
35 | - **networkModule**
36 | - **enable**
37 | - Enables my network configuration.
38 | - *Type*: Boolean
39 | - *Default*: `false`
40 | - *Defined in*: `modules/sys/hardware/network.nix`
41 |
42 | - **bootLoader**
43 | - **enable**
44 | - Enables my bootloader settings.
45 | - *Type*: Boolean
46 | - *Default*: `false`
47 | - *Defined in*: `modules/sys/hardware/bootloader.nix`
48 |
49 | ---
50 |
51 | - **softwareCfg**
52 | - **gamingPkgs**
53 | - **enable**
54 | - Enables gaming-related packages.
55 | - *Type*: Boolean
56 | - *Default*: `false`
57 | - *Defined in*: `modules/sys/software/gaming/gaming_pkgs.nix`
58 |
59 | - **steamConfig**
60 | - **enable**
61 | - Enables my Steam configuration.
62 | - *Type*: Boolean
63 | - *Default*: `false`
64 | - *Defined in*: `modules/sys/software/gaming/steam.nix`
65 |
66 | - **sysPkgs**
67 | - **enable**
68 | - Installs my default system packages.
69 | - *Type*: Boolean
70 | - *Default*: `false`
71 | - *Defined in*: `modules/sys/software/packages.nix`
72 |
73 | - **sysProgs**
74 | - **enable**
75 | - Enables my system programs.
76 | - *Type*: Boolean
77 | - *Default*: `false`
78 | - *Defined in*: `modules/sys/software/programs.nix`
79 |
80 | - **sysServices**
81 | - **enable**
82 | - Enables system services.
83 | - *Type*: Boolean
84 | - *Default*: `false`
85 | - *Defined in*: `modules/sys/software/services.nix`
86 |
87 | - **virtConfig**
88 | - **enable**
89 | - Enables virtualization-related configuration.
90 | - *Type*: Boolean
91 | - *Default*: `false`
92 | - *Defined in*: `modules/sys/software/virtualization.nix`
93 |
--------------------------------------------------------------------------------
/docs/scripts.md:
--------------------------------------------------------------------------------
1 | # pagedMov's scripts
2 |
3 | ---
4 |
5 | This document contains information about the scripts I've written for this configuration. All of the scripts listed here are
6 | included in my nixpkgs overlay as custom packages, and these packages are declared in the configuration in the file
7 | `overlay/env/userpkgs.nix`
8 |
9 | - **icanhazip**
10 | - *Description*:
11 | - Leverages `ip` and `icanhazip.com` to return relevant IP information for the current machine.
12 | - *Usage*:
13 | - `icanhazip` - Returns public IP, local IP, and default gateway.
14 | - `icanhazip -p` - Returns only public IP.
15 | - `icanhazip -l` - Returns only local IP.
16 | - `icanhazip -d` - Returns only default gateway.
17 | - *Defined in*: `overlay/scripts/commands/icanhazip.nix`
18 |
19 | ---
20 |
21 | - **invoke**
22 | - *Description*:
23 | - Leverages `nix run` to run any command once. Works with arguments.
24 | - *Usage*:
25 | - `invoke `
26 | - **Example**:
27 | - `invoke hello`
28 | - *Defined in*: `overlay/scripts/commands/invoke.nix`
29 |
30 | ---
31 |
32 | - **runbg**
33 | - *Description*:
34 | - Runs a command and detaches the process from the shell silently. Works with arguments.
35 | - Credit to [Frost-Phoenix](https://github.com/Frost-Phoenix) for writing this script.
36 | - *Usage*:
37 | - `runbg `
38 | - **Example**:
39 | - `runbg waybar`
40 | - *Defined in*: `overlay/scripts/commands/runbg.nix`
41 |
42 | ---
43 |
44 | - **git-compose**
45 | - *Description*:
46 | - To be used in a git repository. Opens an interactive neovim session containing all currently uncommitted changes. Allows you to group files together and give individual commit messages to each group of files. Automatically creates commits for the file groups with the given commit messages.
47 | - *Usage*:
48 | - `git-compose (inside of a git repository)`
49 | - *Defined in*: `overlay/scripts/commands/git-compose.nix`
50 |
51 | ---
52 |
53 | - **toolbelt**
54 | - *Description*:
55 | - Opens a fuzzyfinder window with some useful utilities.
56 | - Meant to be used with the `Super + P` bind defined in `hyprland.nix`, and not invoked directly from the shell.
57 | - *Defined in*: `overlay/scripts/commands/toolbelt.nix`
58 |
59 | ---
60 |
61 | - **viconf**
62 | - *Description*:
63 | - Searches the directory held in the `$FLAKEPATH` environment variable for a given Nix file or directory name.
64 | - Opens the file in Neovim, or if there are multiple matches, opens a fuzzyfinder window to allow you to choose one.
65 | - *Usage*:
66 | - `viconf `
67 | - **Examples**:
68 | - `viconf hyprland` - Opens `$FLAKEPATH/overlay/environment/hyprland.nix`.
69 | - `viconf sys` - Opens a fuzzyfinder window containing all Nix files in `modules/sys` and its subdirectories.
70 | - `viconf config` - Opens a fuzzyfinder window containing all Nix files called `config.nix`.
71 | - `viconf scripts/def` - Opens `$FLAKEPATH/overlay/scripts/default.nix`.
72 | - *Defined in*: `overlay/scripts/commands/viconf.nix`
73 |
74 | ---
75 |
76 | - **vipkg**
77 | - *Description*:
78 | - Searches the `pkgs` directory from the Nixpkgs GitHub repository.
79 | - Works almost identically to `viconf` with a few tweaks to accommodate the different directory structure.
80 | - Useful for overriding a package's build attributes or searching for a package name.
81 | - *Usage*:
82 | - `vipkg `
83 | - **Example**:
84 | - `vipkg neofetch` - Opens `nixpkgs/pkgs/tools/misc/neofetch/default.nix`.
85 | - *Defined in*: `overlay/scripts/commands/vipkg.nix`
86 |
87 | ---
88 |
89 | - **fetchfromgh**
90 | - *Description*:
91 | - Given a username and repo name like `someuser/somerepo`, generates a full `pkgs.fetchFromGitHub` call. Uses the most recent commit.
92 | - *Usage*:
93 | - `fetchfromgh someuser/somerepo`
94 | - **Example**:
95 | - `fetchfromgh pagedMov/nixos-config`
96 | - Returns:
97 | ```
98 | src = pkgs.fetchFromGitHub {
99 | owner = "pagedMov";
100 | repo = "nixos-config";
101 | rev = "fcf19c65971c667f67abf57bcaf88be410fb0759";
102 | hash = "sha256-z+3E+ueSd2QNqtrbBKt8bwIfboPCXSUrGn690Hc/kl0=";
103 | };
104 | ```
105 | - *Defined in*: `overlay/scripts/nix/fetchfromgh.nix`
106 |
107 | ---
108 |
109 | - **garbage-collect**
110 | - *Description*:
111 | - Runs the Nix garbage collector and also deletes all files in `.local/share/Trash`.
112 | - *Usage*:
113 | - `garbage-collect` - Does not take any arguments.
114 | - *Defined in*: `overlay/scripts/nix/garbage-collect.nix`
115 |
116 | ---
117 |
118 | - **nsp**
119 | - *Description*:
120 | - Simple alias for `nix-shell -p`.
121 | - *Usage*:
122 | - `nsp `
123 | - **Example**:
124 | - `nsp hello`
125 | - *Defined in*: `overlay/scripts/nix/nsp.nix`
126 |
127 | ---
128 |
129 | - **rebuild**
130 | - *Description*:
131 | - Combines `nh os switch` and `nh home switch` into a single command.
132 | - *Usage*:
133 | - `rebuild -h` - Runs `nh home switch -c $FLAKEPATH`
134 | - `rebuild -s` - Runs `nh os switch -H $FLAKEPATH`
135 | - `rebuild -a` - Runs both of the above commands.
136 | - Adding `n` before any flag (e.g., `rebuild -na`) performs a dry run.
137 | - *Defined in*: `overlay/scripts/nix/rebuild.nix`
138 |
139 | ---
140 |
141 | *Note*: None of the following scripts are meant to be invoked directly in the terminal and are primarily used as helpers for other scripts. However, they are documented here in case you wish to use them in your own scripts.
142 |
143 | ---
144 |
145 | - **chscheme**
146 | - *Description*:
147 | - Opens an `fzf` menu containing all of the color schemes available in the `base16schemes` package from Nixpkgs.
148 | - The `fzf` preview shows the colors so you can see them in your terminal before choosing one.
149 | - *Usage*:
150 | - `chscheme` - Does not take arguments.
151 | - *Defined in*: `overlay/scripts/wm-controls/chscheme.nix`
152 |
153 | ---
154 |
155 | - **chpaper**
156 | - *Description*:
157 | - Opens an `fzf` menu containing all wallpapers in `$FLAKEPATH/assets/wallpapers`.
158 | - The `fzf` preview shows the image file the user is hovering over.
159 | - *Usage*:
160 | - `chpaper` - Does not take arguments.
161 | - *Defined in*: `overlay/scripts/wm-controls/chpaper.nix`
162 |
163 | ---
164 |
165 | - **keyring**
166 | - *Description*:
167 | - Opens an `fzf` menu containing all directories/files in `~/.password-store`.
168 | - Selecting an entry uses `pass -c` to copy it to the clipboard.
169 | - Temporarily pauses the clipboard history daemon to ensure the password is not added to clipboard history.
170 | - Automatically clears the password from the clipboard after 10 seconds unless overwritten.
171 | - *Usage*:
172 | - `keyring` - Does not take arguments.
173 | - *Defined in*: `overlay/scripts/wm-controls/keyring.nix`
174 |
175 | ---
176 |
177 | - **mkscreenshots**
178 | - *Description*:
179 | - Switches to workspace 4 (if empty) and takes screenshots showcasing the desktop environment.
180 | - Saves the screenshots to `$FLAKEPATH/assets/screens`, overwriting the old ones.
181 | - Updates `README.md` to include the commit hash of the current screenshots.
182 | - *Usage*:
183 | - `mkscreenshots` - Does not take arguments. Only runs if workspace 4 has no windows.
184 | - *Defined in*: `overlay/scripts/wm-controls/mkscreenshots.nix`
185 |
186 | ---
187 |
188 | - **moveonscreen**
189 | - *Description*:
190 | - Uses `hyprctl` to move the currently active floating window relative to the cursor.
191 | - Prevents the window from moving outside the screen bounds.
192 | - Often used with `toolbelt` for smooth window movements.
193 | - *Usage*:
194 | - `moveonscreen` - Moves the window to the cursor's position, anchored at the top-left corner.
195 | - `moveonscreen --center` - Moves the window to the cursor's position, anchored at the center of the window.
196 | - *Defined in*: `overlay/scripts/wm-controls/moveonscreen.nix`
197 |
198 | ---
199 |
200 | - **s_check**
201 | - *Description*:
202 | - Tests whether `$SOUNDS_ENABLED` is set to `0` or `1`.
203 | - Does not return anything except the status code from the test.
204 | - *Note*: This does not work as a Zsh alias for unknown reasons.
205 | - *Usage*:
206 | - `s_check` - Does not take arguments.
207 | - *Defined in*: `overlay/scripts/wm-controls/switchmon.nix`
208 |
209 | ---
210 |
211 | - **switchmon**
212 | - *Description*:
213 | - Uses `hyprctl` to switch focus between two monitors.
214 | - Only supports setups with two monitors.
215 | - *Usage*:
216 | - `switchmon` - Does not take arguments.
217 | - *Defined in*: `overlay/scripts/wm-controls/switchmon.nix`
218 |
219 | ---
220 |
221 | - **color-commit**
222 | - *Description*:
223 | - Colorizes the output of `git commit` if piped into it via stdin
224 | - *Usage*:
225 | - `git commit -m "message" | color-commit`
226 | - *Defined in*: `overlay/scripts/misc/color-commit.nix`
227 |
228 | ---
229 |
230 | - **mntstack**
231 | - *Description*:
232 | - Keeps mounts in a stack and allows you to easily mount and then unmount volumes in the same order that they were mounted. Useful for quickly setting up and tearing down chroot environments.
233 | - *Usage*:
234 | - `mntstack push ` -Push an entry into the stack
235 | - `mntstack push --bind ` -Use bind to mount directories
236 | - `mntstack pop` -Unmounts and removes the most recently mounted volume
237 | - `mntstack pop -c #` -Pops a given number of mounts
238 | - `mntstack pop -a` -Pops the entire stack
239 | - `mntstack list` -Shows the current stack, and the order which they will be popped in
240 | - *Defined in*: `overlay/scripts/misc/mntstack.nix`
241 |
--------------------------------------------------------------------------------
/docs/sounds.md:
--------------------------------------------------------------------------------
1 | # Terminal Sound Effects
2 |
3 | ---
4 |
5 | My zsh configuration has several aliases and wrapper functions that essentially wrap commands such that they play a sound effect when
6 | invoked. The sound effects are from Earthbound, and are stored in `assets/sound`. Notable examples include `ls` and `cd` which
7 | both play a sound when invoked, among some of the other common utilities, for both GNU and NixOS. If you wish to disable these sound
8 | effects, you can do so by changing the `SOUNDS_ENABLED` environment variable defined in `modules/home/environment/zsh/env.nix` from `true` to `false`.
9 |
10 | ---
11 |
12 | The aliases and commands which use sound effects are:
13 |
14 | - `grimblast`
15 | - Uses: `assets/sound/screenshot.wav`
16 |
17 | - `ls`
18 | - Uses: `assets/sound/ls.wav`
19 |
20 | - `cd`
21 | - Uses: `assets/sound/cd.wav`
22 |
23 | - `gcomm (alias for 'git commit')`
24 | - Uses: `assets/sound/gitcommit.wav`
25 |
26 | - `gpush (alias for 'git push')`
27 | - Uses: `assets/sound/`
28 |
29 | - `gpull (alias for 'git pull')`
30 | - Uses: `assets/sound/gitpull.wav`
31 |
32 | - `greb (alias for 'git rebase')`
33 | - Uses: `assets/sound/gitrebase.wav`
34 |
35 | - `ga (alias for 'git add')`
36 | - Uses: `assets/sound/gitadd.wav`
37 |
38 | - `gtp (alias for 'gtrash put')`
39 | - Uses: `assets/sound/rm.wav`
40 |
41 | - `rebuild`
42 | - Uses: `assets/sound/update.wav` or `assets/sound/error.wav`
43 |
--------------------------------------------------------------------------------
/flake.nix:
--------------------------------------------------------------------------------
1 | {
2 | description = "pagedMov's NixOS and Home Manager configuration";
3 |
4 | inputs = {
5 | nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
6 | hypr-contrib.url = "github:hyprwm/contrib";
7 | hyprpicker.url = "github:hyprwm/hyprpicker";
8 | stylix.url = "github:danth/stylix";
9 | disko.url = "github:nix-community/disko";
10 | impermanence.url = "github:nix-community/impermanence";
11 | ghostty.url = "github:ghostty-org/ghostty";
12 |
13 | nixvim = {
14 | url = "github:nix-community/nixvim";
15 | inputs.nixpkgs.follows = "nixpkgs";
16 | };
17 |
18 | home-manager = {
19 | url = "github:nix-community/home-manager";
20 | inputs.nixpkgs.follows = "nixpkgs";
21 | };
22 |
23 | hyprland = {
24 | type = "git";
25 | url = "https://github.com/hyprwm/Hyprland";
26 | submodules = true;
27 | };
28 |
29 | spicetify-nix = {
30 | url = "github:gerg-l/spicetify-nix";
31 | inputs.nixpkgs.follows = "nixpkgs";
32 | };
33 | lash_flake.url = "github:pagedMov/slash";
34 | };
35 |
36 | outputs = { self, home-manager, disko, lash_flake, nixpkgs, impermanence, nixvim, stylix, ... }@inputs:
37 | let
38 | system = "x86_64-linux";
39 | username = "pagedmov";
40 | slash = lash_flake.packages.${system}.default;
41 | nixpkgsConfig = {
42 | allowUnfree = true;
43 | };
44 | in {
45 | homeConfigurations = {
46 | oganessonHome = let host = "oganesson"; in home-manager.lib.homeManagerConfiguration {
47 | pkgs = import nixpkgs {
48 | inherit system;
49 | config = nixpkgsConfig;
50 | overlays = [
51 | (import ./overlay/overlay.nix { inherit host; root = self; })
52 | ];
53 | };
54 | extraSpecialArgs = {
55 | inherit host self username inputs;
56 | };
57 |
58 | modules = [
59 | ./hosts/desktop/home.nix
60 | ./modules/home
61 | stylix.homeManagerModules.stylix
62 | nixvim.homeManagerModules.nixvim
63 | ];
64 | };
65 |
66 | mercuryHome = let host = "mercury"; in home-manager.lib.homeManagerConfiguration {
67 | pkgs = import nixpkgs {
68 | inherit system;
69 | config = nixpkgsConfig;
70 | overlays = [
71 | (import ./overlay/overlay.nix { inherit host; root = self; })
72 | ];
73 | };
74 | extraSpecialArgs = {
75 | inherit host self username inputs;
76 | };
77 |
78 | modules = [
79 | ./hosts/laptop/home.nix
80 | ./modules/home
81 | stylix.homeManagerModules.stylix
82 | nixvim.homeManagerModules.nixvim
83 | ];
84 | };
85 |
86 | xenonHome = let host = "xenon"; in home-manager.lib.homeManagerConfiguration {
87 | pkgs = import nixpkgs {
88 | inherit system;
89 | config = nixpkgsConfig;
90 | overlays = [
91 | (import ./overlay/overlay.nix { inherit host; root = self; })
92 | ];
93 | };
94 | extraSpecialArgs = {
95 | inherit host self username inputs;
96 | };
97 |
98 | modules = [
99 | ./hosts/server/home.nix
100 | ./modules/home
101 | stylix.homeManagerModules.stylix
102 | nixvim.homeManagerModules.nixvim
103 | ];
104 | };
105 | neonImpermanenceHome = let host = "neonImpermanence"; in home-manager.lib.homeManagerConfiguration { # Live Environment
106 | pkgs = import nixpkgs {
107 | inherit system;
108 | config = nixpkgsConfig;
109 | overlays = [
110 | (import ./overlay/overlay.nix { inherit host; root = self; })
111 | ];
112 | };
113 | extraSpecialArgs = {
114 | inherit host self username inputs;
115 | };
116 | modules = [
117 | ./modules/home
118 | (import ./hosts/live-env/home.nix { username = "impermanence"; })
119 | nixvim.homeManagerModules.nixvim
120 | stylix.homeManagerModules.stylix
121 | ];
122 | };
123 | neonPersistenceHome = let host = "neonPersistence"; in home-manager.lib.homeManagerConfiguration { # Live Environment
124 | pkgs = import nixpkgs {
125 | inherit system;
126 | config = nixpkgsConfig;
127 | overlays = [
128 | (import ./overlay/overlay.nix { inherit host; root = self; })
129 | ];
130 | };
131 | extraSpecialArgs = {
132 | inherit host self username inputs;
133 | };
134 | modules = [
135 | ./modules/home
136 | (import ./hosts/live-env/home.nix { username = "persistence"; })
137 | nixvim.homeManagerModules.nixvim
138 | stylix.homeManagerModules.stylix
139 | ];
140 | };
141 | };
142 |
143 | nixosConfigurations = {
144 | oganesson = nixpkgs.lib.nixosSystem { # Desktop
145 | specialArgs = {
146 | inherit self inputs username slash;
147 | host = "oganesson";
148 | overlays = [
149 | (import ./overlay/overlay.nix { root = self; })
150 | ];
151 | };
152 | inherit system;
153 | pkgs = import nixpkgs {
154 | inherit system;
155 | config = nixpkgsConfig;
156 | overlays = [
157 | (import ./overlay/overlay.nix { root = self; })
158 | ];
159 | };
160 | modules = [
161 | ./hosts/desktop/config.nix
162 | ./modules/sys
163 | stylix.nixosModules.stylix
164 | ];
165 | };
166 |
167 | mercury = nixpkgs.lib.nixosSystem { # Laptop
168 | specialArgs = {
169 | inherit self inputs username;
170 | host = "mercury";
171 | };
172 | inherit system;
173 | pkgs = import nixpkgs {
174 | inherit system;
175 | config = nixpkgsConfig;
176 | };
177 | modules = [
178 | ./hosts/laptop/config.nix
179 | ./modules/sys
180 | stylix.nixosModules.stylix
181 | ];
182 | };
183 |
184 | xenon = nixpkgs.lib.nixosSystem { # Server
185 | specialArgs = {
186 | inherit self inputs username;
187 | host = "xenon";
188 | };
189 | inherit system;
190 | pkgs = import nixpkgs {
191 | inherit system;
192 | config = nixpkgsConfig;
193 | };
194 | modules = [
195 | ./hosts/server/config.nix
196 | ./modules/sys
197 | ./modules/server
198 | stylix.nixosModules.stylix
199 | ];
200 | };
201 | neon = nixpkgs.lib.nixosSystem { # Live environment
202 | specialArgs = {
203 | host = "neon";
204 | inherit self inputs;
205 | };
206 | inherit system;
207 | pkgs = import nixpkgs {
208 | inherit system;
209 | config = nixpkgsConfig;
210 | overlays = [];
211 | };
212 | modules = [
213 | ./hosts/live-env/config.nix
214 | (import ./hosts/live-env/disko.nix { device = "/dev/sdd"; })
215 | ./modules/sys
216 | disko.nixosModules.default
217 | nixvim.nixosModules.nixvim
218 | impermanence.nixosModules.impermanence
219 | stylix.nixosModules.stylix
220 | ];
221 | };
222 | };
223 | };
224 | }
225 |
--------------------------------------------------------------------------------
/hosts/desktop/config.nix:
--------------------------------------------------------------------------------
1 | { slash, pkgs, username, ... }:
2 |
3 | {
4 | imports = [ ./hardware.nix ];
5 |
6 | # My module options
7 | movOpts = {
8 | sysEnv = {
9 | issue.enable = true;
10 | sddmConfig.enable = false;
11 | stylixConfig.enable = true;
12 | nixSettings.enable = true;
13 | #consoleSettings.enable = true;
14 | };
15 | hardwareCfg = {
16 | networkModule.enable = true;
17 | bootLoader.enable = true;
18 | };
19 | softwareCfg = {
20 | gamingPkgs.enable = true;
21 | steamConfig.enable = true;
22 | sysPkgs.enable = true;
23 | sysProgs.enable = true;
24 | sysServices.enable = true;
25 | virtConfig.enable = true;
26 | };
27 | };
28 |
29 | environment = {
30 | variables = { PATH = "${pkgs.clang-tools}/bin:$PATH"; };
31 | shells = [ pkgs.myPkgs.slash pkgs.zsh pkgs.bash ];
32 | };
33 |
34 | users = {
35 | groups.persist = { };
36 | users = {
37 | root.initialPassword = "1234";
38 | ${username} = {
39 | isNormalUser = true;
40 | initialPassword = "1234";
41 | shell = pkgs.zsh;
42 | extraGroups = [ "input" "wheel" "persist" "libvirtd" ];
43 | };
44 | };
45 | };
46 | security.sudo.extraConfig = ''
47 | ${username} ALL=(ALL) NOPASSWD: /etc/profiles/per-user/${username}/bin/rebuild
48 | '';
49 | nix.settings.allowed-users = [ "${username}" ];
50 |
51 | time.timeZone = "America/New_York";
52 | }
53 |
--------------------------------------------------------------------------------
/hosts/desktop/hardware.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 | imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
6 |
7 | boot.initrd.availableKernelModules =
8 | [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
9 | boot.initrd.kernelModules = [ ];
10 | boot.kernelModules = [ "kvm-amd" ];
11 | boot.extraModulePackages = [ ];
12 |
13 | fileSystems."/" = {
14 | device = "/dev/disk/by-partlabel/disk-main-root";
15 | fsType = "ext4";
16 | };
17 |
18 | fileSystems."/nix" = {
19 | device = "/dev/disk/by-partlabel/disk-main-nix";
20 | fsType = "ext4";
21 | };
22 |
23 | fileSystems."/boot" = {
24 | device = "/dev/disk/by-partlabel/disk-main-ESP";
25 | fsType = "vfat";
26 | options = [ "fmask=0077" "dmask=0077" ];
27 | };
28 |
29 | fileSystems."/home" = {
30 | device = "/dev/disk/by-partlabel/disk-main-home";
31 | fsType = "ext4";
32 | };
33 |
34 | swapDevices = [ ];
35 |
36 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
37 | # (the default) this is the recommended approach. When using systemd-networkd it's
38 | # still possible to use this option, but it's recommended to use it in conjunction
39 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`.
40 | networking.useDHCP = lib.mkDefault true;
41 | # networking.interfaces.enp14s0.useDHCP = lib.mkDefault true;
42 | # networking.interfaces.wlp15s0.useDHCP = lib.mkDefault true;
43 |
44 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
45 | hardware = {
46 | keyboard.uhk.enable = true;
47 | cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
48 | };
49 | }
50 |
--------------------------------------------------------------------------------
/hosts/desktop/home.nix:
--------------------------------------------------------------------------------
1 | { username, ... }: {
2 | home.username = "${username}";
3 | home.homeDirectory =
4 | "/home/${username}";
5 | home.stateVersion = "25.05";
6 |
7 | programs.home-manager.enable = true;
8 |
9 | movOpts = {
10 | # modules/home/files
11 | homeFiles.enable = true;
12 |
13 | # modules/home/environment
14 | envConfig = {
15 | hyprlandConfig = {
16 | enable = true;
17 | monitorNames = [ "HDMI-A-1" "DP-1" ];
18 | workspaceLayout = "dualmonitor";
19 | };
20 | userPkgs.enable = true;
21 | stylixHomeConfig.enable = true;
22 | waybarConfig.enable = true;
23 | gtkConfig.enable = true;
24 | spicetifyConfig.enable = false;
25 | starshipConfig.enable = true;
26 | swayncConfig.enable = true;
27 | zshConfig = {
28 | shellAliases.enable = true;
29 | envVariables.enable = true;
30 | shellOptions.enable = true;
31 | extraConfig.enable = true;
32 | };
33 | };
34 |
35 | # modules/home/programs
36 | programConfigs = {
37 | autojumpConfig.enable = true;
38 | btopConfig.enable = true;
39 | cavaConfig.enable = false;
40 | ezaConfig.enable = true;
41 | fuzzelConfig.enable = true;
42 | fzfConfig.enable = true;
43 | gitConfig.enable = true;
44 | kittyConfig.enable = true;
45 | yaziConfig.enable = true;
46 | passConfig.enable = true;
47 | batConfig.enable = true;
48 | };
49 | };
50 |
51 | dconf.settings = {
52 | "org/virt-manager/virt-manager/connections" = {
53 | autoconnect = [ "qemu:///system" ];
54 | uris = [ "qemu:///system" ];
55 | };
56 | };
57 | }
58 |
--------------------------------------------------------------------------------
/hosts/laptop/config.nix:
--------------------------------------------------------------------------------
1 | { username, pkgs, config, ... }: {
2 | imports = [ ./hardware.nix ];
3 |
4 | boot = {
5 | kernelModules = [ "acpi_call" ];
6 | extraModulePackages = with config.boot.kernelPackages;
7 | [ acpi_call cpupower ] ++ [ pkgs.cpupower-gui ];
8 | };
9 |
10 | movOpts = {
11 | sysEnv = {
12 | issue.enable = true;
13 | sddmConfig.enable = true;
14 | stylixConfig.enable = true;
15 | nixSettings.enable = true;
16 | };
17 | hardwareCfg = {
18 | networkModule.enable = true;
19 | bootLoader.enable = true;
20 | powerProfiles.enable = true;
21 | };
22 | softwareCfg = {
23 | sysPkgs.enable = true;
24 | sysProgs.enable = true;
25 | sysServices.enable = true;
26 | };
27 | };
28 |
29 | environment = {
30 | variables = { PATH = "${pkgs.clang-tools}/bin:$PATH"; };
31 | shells = with pkgs; [ zsh bash ];
32 | systemPackages = with pkgs; [ acpi brightnessctl cpupower-gui powertop ];
33 | };
34 |
35 | users = {
36 | groups.persist = { };
37 | users = {
38 | root.initialPassword = "1234";
39 | ${username} = {
40 | isNormalUser = true;
41 | initialPassword = "1234";
42 | shell = pkgs.zsh;
43 | extraGroups = [ "wheel" "persist" "libvirtd" ];
44 | };
45 | };
46 | };
47 | security.sudo.extraConfig = ''
48 | ${username} ALL=(ALL) NOPASSWD: /etc/profiles/per-user/${username}/bin/rebuild
49 | '';
50 | nix.settings.allowed-users = [ "${username}" ];
51 |
52 | time.timeZone = "America/New_York";
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/hosts/laptop/hardware.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 | imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
6 |
7 | boot.initrd.availableKernelModules =
8 | [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
9 | boot.initrd.kernelModules = [ ];
10 | boot.kernelModules = [ "kvm-amd" ];
11 | boot.extraModulePackages = [ ];
12 |
13 | fileSystems."/" = {
14 | device = "/dev/sda4";
15 | fsType = "ext4";
16 | };
17 |
18 | fileSystems."/nix" = {
19 | device = "/dev/sda3";
20 | fsType = "ext4";
21 | };
22 |
23 | fileSystems."/boot" = {
24 | device = "/dev/sda2";
25 | fsType = "vfat";
26 | options = [ "fmask=0077" "dmask=0077" ];
27 | };
28 |
29 | fileSystems."/home" = {
30 | device = "/dev/sda5";
31 | fsType = "ext4";
32 | };
33 |
34 | swapDevices = [ ];
35 |
36 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
37 | # (the default) this is the recommended approach. When using systemd-networkd it's
38 | # still possible to use this option, but it's recommended to use it in conjunction
39 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`.
40 | networking.useDHCP = lib.mkDefault true;
41 | # networking.interfaces.enp14s0.useDHCP = lib.mkDefault true;
42 | # networking.interfaces.wlp15s0.useDHCP = lib.mkDefault true;
43 |
44 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
45 | hardware.cpu.amd.updateMicrocode =
46 | lib.mkDefault config.hardware.enableRedistributableFirmware;
47 | }
48 |
--------------------------------------------------------------------------------
/hosts/laptop/home.nix:
--------------------------------------------------------------------------------
1 | { host, pkgs, self, inputs, username, lib, config, ... }: {
2 | home.username = "${username}"; # Replace with your actual username
3 | home.homeDirectory =
4 | "/home/${username}"; # Replace with your actual home directory
5 | home.stateVersion =
6 | "24.05"; # Adjust this based on your system's NixOS version
7 |
8 | programs.home-manager.enable = true;
9 |
10 | movOpts = {
11 | # modules/home/files
12 | homeFiles.enable = true;
13 |
14 | # modules/home/environment
15 | envConfig = {
16 | hyprlandConfig = {
17 | enable = true;
18 | workspaceLayout = "singlemonitor";
19 | monitorNames = [ "eDP-1" ];
20 | };
21 | userPkgs.enable = true;
22 | stylixHomeConfig.enable = true;
23 | waybarConfig.enable = true;
24 | gtkConfig.enable = true;
25 | spicetifyConfig.enable = true;
26 | starshipConfig.enable = true;
27 | swayncConfig.enable = true;
28 | zshConfig = {
29 | shellAliases.enable = true;
30 | envVariables.enable = true;
31 | shellOptions.enable = true;
32 | extraConfig.enable = true;
33 | };
34 | };
35 |
36 | # modules/home/programs
37 | programConfigs = {
38 | autojumpConfig.enable = true;
39 | btopConfig.enable = true;
40 | ezaConfig.enable = true;
41 | firefoxConfig.enable = true;
42 | fuzzelConfig.enable = true;
43 | fzfConfig.enable = true;
44 | gitConfig.enable = true;
45 | kittyConfig.enable = true;
46 | yaziConfig.enable = true;
47 | passConfig.enable = true;
48 | batConfig.enable = true;
49 | };
50 | };
51 | }
52 |
--------------------------------------------------------------------------------
/hosts/live-env/config.nix:
--------------------------------------------------------------------------------
1 | { lib, pkgs, modulesPath, inputs, ... }:
2 |
3 | let
4 | userConfig = {
5 | isNormalUser = true;
6 | hashedPassword = "$y$j9T$OobgblSbriz8BMgqKXk8Q/$FlTKe918WI3e5m3sj0dDGO.R/rmJOqcscVZMtN5a/DD";
7 | shell = pkgs.zsh;
8 | extraGroups = [ "wheel" ];
9 | };
10 | in
11 | {
12 | imports = [ ./hardware.nix ];
13 | boot.initrd.postDeviceCommands = lib.mkAfter ''
14 | mkdir /btrfs_tmp
15 | mount /dev/root_vg/root /btrfs_tmp
16 | if [[ -e /btrfs_tmp/root ]]; then
17 | mkdir -p /btrfs_tmp/old_roots
18 | timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
19 | mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
20 | fi
21 |
22 | delete_subvolume_recursively() {
23 | IFS=$'\n'
24 | for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
25 | delete_subvolume_recursively "/btrfs_tmp/$i"
26 | done
27 | btrfs subvolume delete "$1"
28 | }
29 |
30 | for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do
31 | delete_subvolume_recursively "$i"
32 | done
33 |
34 | btrfs subvolume create /btrfs_tmp/root
35 | umount /btrfs_tmp
36 | '';
37 |
38 | environment.persistence."/home" = {
39 | enable = true;
40 | hideMounts = true;
41 | directories = [
42 | "persistence"
43 | ];
44 | };
45 |
46 | movOpts = {
47 | sysEnv = {
48 | issue.enable = true;
49 | stylixConfig.enable = true;
50 | nixSettings.enable = true;
51 | };
52 | hardwareCfg = {
53 | networkModule.enable = true;
54 | bootLoader.enable = true;
55 | };
56 | softwareCfg = {
57 | sysProgs.enable = true;
58 | sysServices.enable = true;
59 | };
60 | };
61 |
62 | environment.systemPackages = with pkgs;[
63 | alsa-lib
64 | xwayland
65 | wayland
66 | alsa-utils
67 | bc
68 | cliphist
69 | git
70 | hyprpaper
71 | hyprpicker
72 | inetutils
73 | kitty
74 | lsof
75 | neofetch
76 | nh
77 | nix-output-monitor
78 | nix-prefetch-scripts
79 | nixos-option
80 | nix-search-cli
81 | nix-template
82 | nixfmt
83 | nvd
84 | pamixer
85 | pavucontrol
86 | playerctl
87 | usbutils
88 | vim
89 | jq
90 | wl-clipboard
91 | libnotify
92 | file
93 | ];
94 |
95 | users = {
96 | groups.persist = { };
97 | users = {
98 | impermanence = userConfig;
99 | persistence = userConfig // {
100 | extraGroups = userConfig.extraGroups ++ [ "persist" ];
101 | };
102 | root.hashedPassword = "$y$j9T$tjpyEif7XNctN0twWipqc/$hfVGMaVYVP7.gjqG.2eV34j2AoWp2AFBxox7B5QyQy3";
103 | };
104 | };
105 | }
106 |
--------------------------------------------------------------------------------
/hosts/live-env/disko.nix:
--------------------------------------------------------------------------------
1 | {
2 | device ? throw "Set this to your disk device, e.g. /dev/sda",
3 | ...
4 | }: {
5 | disko.devices = {
6 | disk.main = {
7 | inherit device;
8 | type = "disk";
9 | content = {
10 | type = "gpt";
11 | partitions = {
12 | boot = {
13 | name = "boot";
14 | size = "1M";
15 | type = "EF02";
16 | };
17 | esp = {
18 | name = "ESP";
19 | size = "750M";
20 | type = "EF00";
21 | content = {
22 | type = "filesystem";
23 | format = "vfat";
24 | mountpoint = "/boot";
25 | };
26 | };
27 | swap = {
28 | size = "4G";
29 | content = {
30 | type = "swap";
31 | resumeDevice = true;
32 | };
33 | };
34 | root = {
35 | name = "root";
36 | size = "100%";
37 | content = {
38 | type = "lvm_pv";
39 | vg = "root_vg";
40 | };
41 | };
42 | };
43 | };
44 | };
45 | lvm_vg = {
46 | root_vg = {
47 | type = "lvm_vg";
48 | lvs = {
49 | root = {
50 | size = "100%FREE";
51 | content = {
52 | type = "btrfs";
53 | extraArgs = ["-f"];
54 |
55 | subvolumes = {
56 | "/root" = {
57 | mountpoint = "/";
58 | };
59 |
60 | "/home/persistence" = {
61 | mountOptions = ["subvol=persist" "noatime"];
62 | mountpoint = "/home/persistence";
63 | };
64 |
65 | "/nix" = {
66 | mountOptions = ["subvol=nix" "noatime"];
67 | mountpoint = "/nix";
68 | };
69 | };
70 | };
71 | };
72 | };
73 | };
74 | };
75 | };
76 | }
77 |
--------------------------------------------------------------------------------
/hosts/live-env/home.nix:
--------------------------------------------------------------------------------
1 | { pkgs, username, ... }:
2 |
3 | let
4 | scripts = with pkgs; [
5 | myScripts.icanhazip
6 | myScripts.invoke
7 | myScripts.runbg
8 | myScripts.splash
9 | myScripts.toolbelt
10 | myScripts.viconf
11 | myScripts.vipkg
12 | myScripts.fetchfromgh
13 | myScripts.garbage-collect
14 | myScripts.nsp
15 | myScripts.rebuild
16 | myScripts.chpaper
17 | myScripts.chscheme
18 | myScripts.keyring
19 | myScripts.mkscreenshots
20 | myScripts.moveonscreen
21 | myScripts.s_check
22 | myScripts.switchmon
23 | myScripts.git-compose
24 | myScripts.playshellsound
25 | myScripts.color-commit
26 | ];
27 | in
28 | {
29 | home.username = "${username}";
30 | home.homeDirectory = "/home/${username}";
31 | home.stateVersion = "25.05";
32 |
33 | programs.home-manager.enable = true;
34 |
35 | home.packages = with pkgs; [
36 | nemo
37 | feh
38 | gtk3
39 | sqlite
40 | gimp
41 | imagemagick
42 | lolcat
43 | vesktop
44 | zsh
45 | zsh-syntax-highlighting
46 | zsh-history-substring-search
47 | zsh-autosuggestions
48 | libreoffice
49 | gtrash
50 | ripgrep
51 | toilet-extrafonts
52 | chafa
53 | ] ++ scripts;
54 |
55 | movOpts = {
56 | homeFiles.enable = true;
57 | envConfig = {
58 | hyprlandConfig = {
59 | enable = true;
60 | monitorNames = [ "eDP-1" ];
61 | workspaceLayout = "singlemonitor";
62 | };
63 | userPkgs.enable = false;
64 | stylixHomeConfig.enable = true;
65 | gtkConfig.enable = true;
66 | starshipConfig.enable = true;
67 | swayncConfig.enable = true;
68 | zshConfig = {
69 | shellAliases.enable = true;
70 | envVariables.enable = true;
71 | shellOptions.enable = true;
72 | extraConfig.enable = true;
73 | };
74 | };
75 | programConfigs = {
76 | autojumpConfig.enable = true;
77 | btopConfig.enable = true;
78 | ezaConfig.enable = true;
79 | firefoxConfig.enable = true;
80 | fuzzelConfig.enable = true;
81 | fzfConfig.enable = true;
82 | gitConfig.enable = true;
83 | kittyConfig.enable = true;
84 | yaziConfig.enable = true;
85 | passConfig.enable = true;
86 | batConfig.enable = true;
87 | };
88 | };
89 | }
90 |
--------------------------------------------------------------------------------
/hosts/server/config.nix:
--------------------------------------------------------------------------------
1 | { pkgs, username, ... }: {
2 | imports = [ ./hardware.nix ];
3 | movOpts = {
4 | sysEnv = {
5 | issue.enable = true;
6 | sddmConfig.enable = true;
7 | stylixConfig.enable = true;
8 | nixSettings.enable = true;
9 | };
10 | hardwareCfg = {
11 | networkModule.enable = true;
12 | bootLoader.enable = true;
13 | powerProfiles.enable = true;
14 | };
15 | softwareCfg = {
16 | sysPkgs.enable = true;
17 | sysProgs.enable = true;
18 | sysServices.enable = true;
19 | };
20 | serverCfg = {
21 | jellyfinConfig.enable = true;
22 | caddyConfig.enable = true;
23 | };
24 | };
25 | networking.firewall = { allowedTCPPorts = [ 443 8920 ]; };
26 | environment = {
27 | etc."tmpfiles.d/home-permissions.conf".text = ''
28 | d /home/pagedmov 0750 pagedmov users -
29 | '';
30 | variables = {
31 | PATH = "${pkgs.clang-tools}/bin:$PATH";
32 | TERM = "kitty";
33 | };
34 | shells = with pkgs; [ zsh bash ];
35 | };
36 |
37 | users = {
38 | groups.persist = { };
39 | users = {
40 | root.initialPassword = "1234";
41 | ${username} = {
42 | isNormalUser = true;
43 | initialPassword = "1234";
44 | shell = pkgs.zsh;
45 | extraGroups = [ "wheel" "persist" "libvirtd" ];
46 | };
47 | };
48 | };
49 | security.sudo.extraConfig = ''
50 | ${username} ALL=(ALL) NOPASSWD: /etc/profiles/per-user/${username}/bin/rebuild
51 | '';
52 | nix.settings.allowed-users = [ "${username}" ];
53 |
54 | time.timeZone = "America/New_York";
55 | }
56 |
--------------------------------------------------------------------------------
/hosts/server/hardware.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 = [ (modulesPath + "/installer/scan/not-detected.nix") ];
8 |
9 | boot.initrd.availableKernelModules =
10 | [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
11 | boot.initrd.kernelModules = [ ];
12 | boot.kernelModules = [ "kvm-amd" ];
13 | boot.extraModulePackages = [ ];
14 |
15 | fileSystems."/" = {
16 | device = "/dev/disk/by-uuid/c40b3b09-688d-4fe3-96f9-8e3d75b0a7b7";
17 | fsType = "ext4";
18 | };
19 |
20 | fileSystems."/nix" = {
21 | device = "/dev/disk/by-uuid/1048d206-0a27-4e4e-b9a4-4f068bab5439";
22 | fsType = "ext4";
23 | };
24 |
25 | fileSystems."/boot" = {
26 | device = "/dev/disk/by-uuid/357E-BCCD";
27 | fsType = "vfat";
28 | options = [ "fmask=0077" "dmask=0077" ];
29 | };
30 |
31 | fileSystems."/home" = {
32 | device = "/dev/disk/by-uuid/b53ab583-f32e-4144-a2ee-f341e54f8233";
33 | fsType = "ext4";
34 | };
35 |
36 | swapDevices = [ ];
37 |
38 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
39 | # (the default) this is the recommended approach. When using systemd-networkd it's
40 | # still possible to use this option, but it's recommended to use it in conjunction
41 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`.
42 | networking.useDHCP = lib.mkDefault true;
43 | # networking.interfaces.enp10s0.useDHCP = lib.mkDefault true;
44 | # networking.interfaces.wlp11s0.useDHCP = lib.mkDefault true;
45 |
46 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
47 | hardware.cpu.amd.updateMicrocode =
48 | lib.mkDefault config.hardware.enableRedistributableFirmware;
49 | }
50 |
--------------------------------------------------------------------------------
/hosts/server/home.nix:
--------------------------------------------------------------------------------
1 | { host, pkgs, self, inputs, lib, username, config, ... }: {
2 |
3 | home.username = "${username}";
4 | home.homeDirectory =
5 | "/home/${username}";
6 | home.stateVersion =
7 | "24.05";
8 |
9 | programs.home-manager.enable = true;
10 |
11 | movOpts = {
12 | homeFiles.enable = true;
13 |
14 | # modules/home/environment
15 | envConfig = {
16 | starshipConfig.enable = true;
17 | stylixHomeConfig.enable = true;
18 | userPkgs.enable = true;
19 | zshConfig = {
20 | shellAliases.enable = true;
21 | envVariables.enable = true;
22 | shellOptions.enable = true;
23 | extraConfig.enable = true;
24 | };
25 | };
26 |
27 | # modules/home/programs
28 | programConfigs = {
29 | autojumpConfig.enable = true;
30 | kittyConfig.enable = true;
31 | btopConfig.enable = true;
32 | ezaConfig.enable = true;
33 | fzfConfig.enable = true;
34 | gitConfig.enable = true;
35 | yaziConfig.enable = true;
36 | batConfig.enable = true;
37 | };
38 | };
39 | }
40 |
--------------------------------------------------------------------------------
/modules/home/default.nix:
--------------------------------------------------------------------------------
1 | { env, inputs, nixpkgs, config, self, username, host, lib, ... }: {
2 | imports = [ ./programs ./environment ./files.nix ];
3 | }
4 |
--------------------------------------------------------------------------------
/modules/home/environment/default.nix:
--------------------------------------------------------------------------------
1 | { host, nixvim, self, inputs, username, config, home-manager, ... }: {
2 | imports = [
3 | ./gtk.nix
4 | ./spicetify.nix
5 | ./stylixhome.nix
6 | ./userservices.nix
7 | ./starship.nix
8 | ./userpkgs.nix
9 | ./zsh
10 | ./swaync.nix
11 | ./hyprland.nix
12 | ./waybar.nix
13 | ];
14 | }
15 |
--------------------------------------------------------------------------------
/modules/home/environment/gtk.nix:
--------------------------------------------------------------------------------
1 | { lib, config, pkgs, ... }: {
2 | options = {
3 | movOpts.envConfig.gtkConfig.enable =
4 | lib.mkEnableOption "enable my gtk options";
5 | };
6 | config = lib.mkIf config.movOpts.envConfig.gtkConfig.enable {
7 | fonts.fontconfig.enable = true;
8 | home.packages = with pkgs;
9 | [
10 | nerd-fonts.jetbrains-mono
11 | nerd-fonts.symbols-only
12 | cascadia-code
13 | ];
14 |
15 | gtk = {
16 | enable = true;
17 | iconTheme = {
18 | name = "Papirus-Dark";
19 | package = pkgs.papirus-nord.override { accent = "frostblue4"; };
20 | };
21 | #cursorTheme = {
22 | # name = "Bibata-Modern-Ice";
23 | # package = pkgs.bibata-cursors;
24 | # size = 16;
25 | #};
26 | #font = {
27 | # name = "Iosevka Nerd Font";
28 | # package = pkgs.nerdfonts.override {fonts = ["Iosevka"];};
29 | #};
30 | };
31 | };
32 | }
33 |
--------------------------------------------------------------------------------
/modules/home/environment/hyprland.nix:
--------------------------------------------------------------------------------
1 | { inputs, pkgs, lib, config, self, host, ... }:
2 | let
3 | desktop = host == "oganesson";
4 | screenshot_bind = if desktop then
5 | [ "super, print, exec, grimblast copy area"
6 | "super shift, print, exec, grimblast --freeze copy area"
7 | ]
8 | else
9 | [
10 | # My laptop does not have a printscreen button
11 | "super, insert, exec, grimblast copy area"
12 | ];
13 | scheme = config.lib.stylix.colors;
14 | mons = config.movOpts.envConfig.hyprlandConfig.monitorNames;
15 |
16 | in {
17 |
18 | options = {
19 | movOpts.envConfig.hyprlandConfig = {
20 | enable = lib.mkEnableOption "enables my hyprland config";
21 | workspaceLayout = lib.mkOption {
22 | type = lib.types.str;
23 | default = "dualmonitor";
24 | };
25 | monitorNames = lib.mkOption {
26 | type = lib.types.listOf lib.types.str;
27 | # The order of the monitor names matters for the purpose of workspace assignment
28 | # For instance, in a dual monitor setup, index 0 gets 4,5 and 6, while index 1 gets 1,2 and 3
29 | default = [ "DP-1" "HDMI-A-1" ];
30 | };
31 | };
32 | };
33 | config = lib.mkIf config.movOpts.envConfig.hyprlandConfig.enable {
34 | home.packages = with pkgs; [
35 | swaybg
36 | inputs.hypr-contrib.packages.${pkgs.system}.grimblast
37 | hyprpicker
38 | grim
39 | slurp
40 | wl-clip-persist
41 | wf-recorder
42 | glib
43 | wayland
44 | direnv
45 | ];
46 | systemd.user.targets.hyprland-session.Unit.Wants =
47 | [ "xdg-desktop-autostart.target" ];
48 | wayland.windowManager.hyprland = {
49 | enable = true;
50 | xwayland = { enable = true; };
51 | systemd.enable = true;
52 | };
53 | wayland.windowManager.hyprland = {
54 | settings = {
55 | monitor = if (host == "oganesson") then [
56 | "DP-1, 1920x1080@144, 1920x0, 1"
57 | "HDMI-A-1, 1920x1080, 0x0, 1"
58 | ] else
59 | [ "eDP-1, 1600x900, 0x0, 1" ];
60 |
61 | exec-once = [
62 | "waybar &"
63 | "swaync &"
64 | "wl-paste --type text --watch cliphist store &"
65 | "wl-paste --type image --watch cliphist store &"
66 | "wl-clip-persist --clipboard both"
67 | "systemctl --user import-environment &"
68 | "hash dbus-update-activation-environment 2>/dev/null &"
69 | "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &"
70 | ];
71 |
72 | workspace = if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "dualmonitor") then [
73 | "1,persistent=true,monitor:${builtins.elemAt mons 0}"
74 | "2,persistent=true,monitor:${builtins.elemAt mons 0}"
75 | "3,persistent=true,monitor:${builtins.elemAt mons 0}"
76 | "4,persistent=true,monitor:${builtins.elemAt mons 1}"
77 | "5,persistent=true,monitor:${builtins.elemAt mons 1}"
78 | "6,persistent=true,monitor:${builtins.elemAt mons 1}"
79 | ] else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "singlemonitor") then [
80 | "1,persistent=true,monitor:${builtins.elemAt mons 0} "
81 | "2,persistent=true,monitor:${builtins.elemAt mons 0}"
82 | "3,persistent=true,monitor:${builtins.elemAt mons 0}"
83 | "4,persistent=true,monitor:${builtins.elemAt mons 0}"
84 | ] else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "trimonitor") then [
85 | "1,persistent=true,monitor:${builtins.elemAt mons 2}"
86 | "2,persistent=true,monitor:${builtins.elemAt mons 2}"
87 | "3,persistent=true,monitor:${builtins.elemAt mons 1}"
88 | "4,persistent=true,monitor:${builtins.elemAt mons 1}"
89 | "5,persistent=true,monitor:${builtins.elemAt mons 0}"
90 | "6,persistent=true,monitor:${builtins.elemAt mons 0}"
91 | ] else [ ];
92 |
93 | env = [
94 | "XDG_CONFIG_HOME,$HOME/.config"
95 | "XDG_DATA_HOME,$HOME/.local/share"
96 | "XDG_CACHE_HOME,$HOME/.cache"
97 | ];
98 | layerrule = [ "blur,waybar" "ignorezero,waybar" "blur,launcher" ];
99 | windowrule = [ "opacity 0.8,nemo" ];
100 |
101 | input = {
102 | kb_layout = "us";
103 | follow_mouse = 1;
104 | accel_profile = "flat";
105 | force_no_accel = 1;
106 | sensitivity = 0;
107 | };
108 | general = {
109 | "$mainMod" = "super";
110 | layout = "dwindle";
111 | gaps_in = 4;
112 | gaps_out = 8;
113 | border_size = 3;
114 | #"col.inactive_border" = "0xff${scheme.base01}";
115 | "col.active_border" = lib.mkForce "0xff${scheme.base04}";
116 | border_part_of_window = false;
117 | no_border_on_floating = false;
118 | };
119 | misc = {
120 | disable_autoreload = true;
121 | disable_hyprland_logo = true;
122 | always_follow_on_dnd = true;
123 | layers_hog_keyboard_focus = true;
124 | animate_manual_resizes = false;
125 | enable_swallow = true;
126 | focus_on_activate = true;
127 | };
128 |
129 | dwindle = {
130 | force_split = 0;
131 | special_scale_factor = 1.0;
132 | split_width_multiplier = 1.0;
133 | use_active_for_splits = true;
134 | pseudotile = "yes";
135 | preserve_split = "yes";
136 | };
137 |
138 | master = {
139 | new_status = "master";
140 | special_scale_factor = 1;
141 | };
142 |
143 | decoration = {
144 | rounding = 10;
145 |
146 | blur = {
147 | enabled = true;
148 | # size = 1;
149 | # passes = 1;
150 | size = 2;
151 | passes = 1;
152 | brightness = 1;
153 | contrast = 1.4;
154 | ignore_opacity = true;
155 | popups = true;
156 | noise = 0;
157 | new_optimizations = true;
158 | xray = true;
159 | };
160 |
161 | };
162 |
163 | animations = {
164 | enabled = true;
165 |
166 | bezier = [
167 | "fluent_decel, 0, 0.2, 0.4, 1"
168 | "easeOutCirc, 0, 0.55, 0.45, 1"
169 | "easeOutCubic, 0.33, 1, 0.68, 1"
170 | "easeinoutsine, 0.37, 0, 0.63, 1"
171 | ];
172 |
173 | animation = [
174 | # Windows
175 | "windowsIn, 1, 3, easeOutCubic, popin 30%" # window open
176 | "windowsOut, 1, 3, fluent_decel, popin 70%" # window close.
177 | "windowsMove, 1, 2, easeinoutsine, slide" # everything in between, moving, dragging, resizing.
178 |
179 | # Fade
180 | "fadeIn, 1, 3, easeOutCubic" # fade in (open) -> layers and windows
181 | "fadeOut, 1, 2, easeOutCubic" # fade out (close) -> layers and windows
182 | "fadeSwitch, 0, 1, easeOutCirc" # fade on changing activewindow and its opacity
183 | "fadeShadow, 1, 10, easeOutCirc" # fade on changing activewindow for shadows
184 | "fadeDim, 1, 4, fluent_decel" # the easing of the dimming of inactive windows
185 | "border, 1, 2.7, easeOutCirc" # for animating the border's color switch speed
186 | "borderangle, 1, 30, fluent_decel, once" # for animating the border's gradient angle - styles: once (default), loop
187 | "workspaces, 1, 4, easeOutCubic, fade" # styles: slide, slidevert, fade, slidefade, slidefadevert
188 | ];
189 |
190 | bind = [
191 | "super, up, exec, pactl set-sink-volume @default_sink@ +10%"
192 | "super, down, exec, pactl set-sink-volume @default_sink@ -10%"
193 | "super, t, exec, swaync-client -t -sw"
194 | "super, a, exec, librewolf"
195 | "super, q, exec, kitty"
196 | "super shift, q, exec, [float;size 40% 30%;move onscreen cursor -50% -50%] kitty"
197 | "super, c, killactive,"
198 | "super shift, c,exec, hyprctl kill"
199 | "super, e, exec, [float;size 40% 50%;move onscreen cursor -50% -50%] nemo"
200 | "super, p, exec, [float;size 40% 25%;move onscreen cursor] [ ! -f /tmp/keyringfile ] && kitty toolbelt"
201 | "super shift, m, exit,"
202 | "super, m, exec, fuzzel"
203 | "super, r, exec, neovide"
204 | "super, b, togglesplit, # dwindle"
205 | "super, f, togglefloating"
206 | "super, g, fullscreen"
207 | "super, h, movefocus, l"
208 | "super, l, movefocus, r"
209 | "super, k, movefocus, u"
210 | "super, j, movefocus, d"
211 | "super shift, h, movewindow, l"
212 | "super shift, l, movewindow, r"
213 | "super shift, k, movewindow, u"
214 | "super shift, j, movewindow, d"
215 | "super, d, exec, switchmon"
216 | "super, 1, exec, hyprctl 'dispatch workspace 1'"
217 | "super, 2, exec, hyprctl 'dispatch workspace 2'"
218 | "super, 3, exec, hyprctl 'dispatch workspace 3'"
219 | "super, 4, exec, hyprctl 'dispatch workspace 4'"
220 | "super, 5, exec, hyprctl 'dispatch workspace 5'"
221 | "super, 6, exec, hyprctl 'dispatch workspace 6'"
222 | "super shift, 1, movetoworkspace, 1"
223 | "super shift, 2, movetoworkspace, 2"
224 | "super shift, 3, movetoworkspace, 3"
225 | "super shift, 4, movetoworkspace, 4"
226 | "super shift, 5, movetoworkspace, 5"
227 | "super shift, 6, movetoworkspace, 6"
228 | "super, s, togglespecialworkspace, magic"
229 | "super shift, s, movetoworkspace, special:magic"
230 | ] ++ screenshot_bind;
231 | bindm =
232 | [ "super, mouse:272, movewindow" "super, mouse:273, resizewindow" ];
233 | };
234 | };
235 | };
236 | };
237 | }
238 |
--------------------------------------------------------------------------------
/modules/home/environment/spicetify.nix:
--------------------------------------------------------------------------------
1 | { lib, config, pkgs, inputs, ... }:
2 | let
3 | spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
4 | scheme = config.lib.stylix.colors;
5 | in {
6 | imports = [ inputs.spicetify-nix.homeManagerModules.default ];
7 | options = {
8 | movOpts.envConfig.spicetifyConfig.enable =
9 | lib.mkEnableOption "enable my spicetify options";
10 | };
11 | config = lib.mkIf config.movOpts.envConfig.spicetifyConfig.enable {
12 | nixpkgs.config.allowUnfreePredicate = pkg:
13 | builtins.elem (lib.getName pkg) [ "spotify" ];
14 |
15 | programs.spicetify = {
16 | enable = true;
17 | enabledExtensions = with spicePkgs.extensions; [
18 | adblock
19 | hidePodcasts
20 | shuffle # shuffle+ (special characters are sanitized out of extension names)
21 | ];
22 | #colorScheme = "custom";
23 |
24 | #customColorScheme = {
25 | # text = scheme.base06;
26 | # subtext = scheme.base04;
27 | # sidebar-text = scheme.base04;
28 | # main = scheme.base00;
29 | # sidebar = scheme.base01;
30 | # shadow = scheme.base01;
31 | # selected-row = scheme.base08;
32 | # button = scheme.base0D;
33 | # button-active = scheme.base0C;
34 | # button-disabled = scheme.base02;
35 | # tab-active = scheme.base0E;
36 | # notification = scheme.base0A;
37 | # notification-error = scheme.base09;
38 | # misc = scheme.base0F;
39 | #};
40 | };
41 | };
42 | }
43 |
--------------------------------------------------------------------------------
/modules/home/environment/starship.nix:
--------------------------------------------------------------------------------
1 | { config, lib, inputs, ... }: {
2 | options = {
3 | movOpts.envConfig.starshipConfig.enable =
4 | lib.mkEnableOption "enables my starship configuration";
5 | };
6 | config = lib.mkIf config.movOpts.envConfig.starshipConfig.enable {
7 | programs.starship = {
8 | enable = true;
9 | enableZshIntegration = false;
10 | settings = {
11 | add_newline = true;
12 | right_format = "($custom)";
13 |
14 | format = lib.concatStrings [
15 | "($ssh_symbol)($username)($hostname)($nix_shell)(bold white)($cmd_duration)($character)"
16 | "($git_branch)($git_status)($rust)"
17 | "($directory)"
18 | "$line_break[ ](bold #89b4fa)"
19 | ];
20 |
21 | username = {
22 | show_always = true;
23 | style_user = "bold white";
24 | format = "[$user]($style)";
25 | };
26 |
27 | rust = {
28 | format = " via [$symbol($version)]($style)";
29 | };
30 |
31 | directory = {
32 | format = ''
33 |
34 | [$path](bold cyan)[/](bold green) '';
35 | style = "bold #b4befe";
36 | };
37 |
38 | character = {
39 | success_symbol = "[ -> ](bold green)";
40 | error_symbol = "[ -> ✗](bold red)";
41 | # error_symbol = "[ ](bold #89dceb)[ ✗](bold red)";
42 | };
43 |
44 | cmd_duration = {
45 | format = "[ $duration]($style)";
46 | disabled = false;
47 | style = "bg:none fg:#f9e2af";
48 | show_notifications = false;
49 | min_time_to_notify = 60000;
50 | };
51 |
52 | git_branch = {
53 | format = ''
54 |
55 | on [$symbol$branch](bold purple)'';
56 | symbol = " ";
57 | truncation_length = 15;
58 | style = "bold purple";
59 | };
60 |
61 | hostname = {
62 | ssh_symbol = "🌐";
63 | ssh_only = false;
64 | format = "[@](bold blue)[$hostname $ssh_symbol](bold red)";
65 | };
66 |
67 | nix_shell = {
68 | format = " via [$symbol]($style)";
69 | symbol = " ";
70 | };
71 |
72 | custom.shellver = {
73 | command = "zsh --version";
74 | when = ''test $SHELL = "/run/current-system/sw/bin/zsh"'';
75 | symbol = "";
76 | style = "bold magenta";
77 | };
78 | };
79 | };
80 | };
81 | }
82 |
--------------------------------------------------------------------------------
/modules/home/environment/stylixhome.nix:
--------------------------------------------------------------------------------
1 | { lib, self, config, host, pkgs, ... }:
2 |
3 | let
4 | scheme = "chalk";
5 | wallpaper = "${self}/assets/wallpapers/dark-waves.jpg";
6 | server = (host == "xenon");
7 | in {
8 | options = {
9 | movOpts.envConfig.stylixHomeConfig.enable =
10 | lib.mkEnableOption "enables my stylix Home-Manager options";
11 | };
12 | config = lib.mkIf config.movOpts.envConfig.stylixHomeConfig.enable {
13 | stylix = {
14 | enable = true;
15 | base16Scheme = "${pkgs.base16-schemes}/share/themes/${scheme}.yaml";
16 | image = wallpaper;
17 | polarity = "dark";
18 | autoEnable = true;
19 | opacity.terminal = 1.0;
20 | targets = {
21 | waybar.enable = false;
22 | spicetify.enable = false;
23 | btop.enable = false;
24 | nixvim.enable = false;
25 | nixvim.transparentBackground = {
26 | main = false;
27 | signColumn = false;
28 | };
29 | };
30 | cursor = {
31 | package = pkgs.bibata-cursors;
32 | name = "Bibata-Modern-Ice";
33 | };
34 | fonts = {
35 | monospace = {
36 | package = pkgs.nerd-fonts.jetbrains-mono;
37 | name = "JetBrains Mono Nerd Font";
38 | };
39 | sansSerif = {
40 | package = pkgs.nerd-fonts.jetbrains-mono;
41 | name = "JetBrains Mono Nerd Font";
42 | };
43 | serif = {
44 | package = pkgs.nerd-fonts.jetbrains-mono;
45 | name = "JetBrains Mono Nerd Font";
46 | };
47 | sizes = {
48 | desktop = 10;
49 | applications = 14;
50 | terminal = 14;
51 | popups = 16;
52 | };
53 | };
54 | };
55 | };
56 | }
57 |
--------------------------------------------------------------------------------
/modules/home/environment/userpkgs.nix:
--------------------------------------------------------------------------------
1 | { lib, config, pkgs, self, ... }:
2 |
3 | let
4 | scripts = with pkgs; [
5 | myScripts.icanhazip
6 | myScripts.invoke
7 | myScripts.runbg
8 | myScripts.splash
9 | myScripts.toolbelt
10 | myScripts.viconf
11 | myScripts.vipkg
12 | myScripts.fetchfromgh
13 | myScripts.garbage-collect
14 | myScripts.rebuild
15 | myScripts.chpaper
16 | myScripts.chscheme
17 | myScripts.keyring
18 | myScripts.mkscreenshots
19 | myScripts.moveonscreen
20 | myScripts.s_check
21 | myScripts.switchmon
22 | myScripts.git-compose
23 | myScripts.playshellsound
24 | myScripts.color-commit
25 | myScripts.mntstack
26 | ];
27 | in {
28 | options = {
29 | movOpts.envConfig.userPkgs.enable =
30 | lib.mkEnableOption "enables my default user packages";
31 | };
32 | config = lib.mkIf config.movOpts.envConfig.userPkgs.enable {
33 | home.packages = with pkgs; [
34 | nemo
35 | feh
36 | gtk3
37 | gimp
38 | imagemagick
39 | vlc
40 | lolcat
41 | vesktop
42 | zsh
43 | zsh-syntax-highlighting
44 | zsh-history-substring-search
45 | zsh-autosuggestions
46 | libreoffice
47 | gtrash
48 | ripgrep
49 | wf-recorder
50 | toilet
51 | vkbasalt
52 | librewolf
53 | spotify
54 | zathura
55 | chromium
56 | obs-studio
57 | gparted
58 | dust
59 | porsmo
60 | rustup
61 | w3m
62 | neovide
63 | python3
64 | ghostty
65 | fd
66 | delta
67 | glfw
68 | glxinfo
69 | xwayland
70 | discord
71 | cloc
72 | wine
73 | nodejs_latest
74 | ] ++ scripts;
75 | };
76 | }
77 |
--------------------------------------------------------------------------------
/modules/home/environment/userservices.nix:
--------------------------------------------------------------------------------
1 | { pkgs, self, ... }:
2 |
3 | {
4 | systemd.user = {
5 | timers = {
6 | maintenanceCheck = {
7 | Unit = { Description = "Timer for package maintenance check"; };
8 | Timer = {
9 | OnCalendar = "hourly";
10 | Persistent = true;
11 | };
12 | Install = { WantedBy = [ "timers.target" ]; };
13 | };
14 | };
15 | services = {
16 | loginSound = {
17 | Unit= {
18 | Description = "Plays a sound on login";
19 | After = [ "graphical-session.target" ];
20 | WantedBy = [ "graphical-session.target" ];
21 | };
22 |
23 | Service = {
24 | ExecStart = "${pkgs.alsa-utils}/bin/aplay -qN ${self}/assets/sound/login.wav";
25 | Type = "simple";
26 | };
27 | };
28 | maintenanceCheck = {
29 | Unit = {
30 | Description = "Check for updates in my maintained packages";
31 | };
32 |
33 | Service = {
34 | ExecStart = "${pkgs.nix}/bin/nix-shell -p python3Packages.requests --run '${pkgs.python311}/bin/python ${pkgs.myScripts.check_updates}/bin/checkupdates.py'";
35 | Type = "simple";
36 | };
37 | };
38 | };
39 | };
40 | }
41 |
--------------------------------------------------------------------------------
/modules/home/environment/zsh/aliases.nix:
--------------------------------------------------------------------------------
1 | { lib, config, self, ... }:
2 | {
3 | options.movOpts.envConfig.zshConfig.shellAliases.enable = lib.mkEnableOption "enables my zsh aliases";
4 | config = lib.mkIf config.movOpts.envConfig.zshConfig.shellAliases.enable {
5 | programs.zsh = {
6 | shellAliases = {
7 | grep = "rg";
8 | find = "fd";
9 | cat = "bat";
10 | yazi = "y";
11 | mv = "mv -v";
12 | cp = "cp -vr";
13 | gt = "gtrash";
14 | gtp = "playshellsound ${self}/assets/sound/rm.wav; gtrash put";
15 | sr = "source ~/.zshrc && source ~/.zshenv";
16 | ".." = "cd ..";
17 | rm = "echo 'use \"gtp\" instead'";
18 | psg = "ps aux | grep -v grep | grep -i -e VSZ -e";
19 | mkdir = "mkdir -p";
20 | pk = "pkill -9 -f";
21 | svcu = "systemctl --user";
22 | svc = "sudo systemctl";
23 | viflake = "nvim flake.nix";
24 | iv = "invoke";
25 | cfgfilecount = ''find ".\.nix" $FLAKEPATH | wc -l | toilet -f 3d | lolcat'';
26 | record = "wf-recorder";
27 | #git
28 | ga = "playshellsound ${self}/assets/sound/gitadd.wav; git add";
29 | gcomm = "gitcommit_sfx";
30 | gpush = "gitpush_sfx";
31 | gpull = "gitpull_sfx";
32 | greb = "gitrebase_sfx";
33 | rsh = "$HOME/Coding/projects/rust/rsh/target/debug/rsh";
34 | vide = "neovide";
35 | pk9 = "pkill -9";
36 | };
37 | };
38 | };
39 | }
40 |
--------------------------------------------------------------------------------
/modules/home/environment/zsh/default.nix:
--------------------------------------------------------------------------------
1 | { lib, config, self, ... }:
2 |
3 | {
4 | imports = [
5 | ./env.nix
6 | ./aliases.nix
7 | ./options.nix
8 | ./extraconfig.nix
9 | ];
10 | }
11 |
--------------------------------------------------------------------------------
/modules/home/environment/zsh/env.nix:
--------------------------------------------------------------------------------
1 | { lib, config, ... }:
2 |
3 | {
4 | options = {
5 | movOpts.envConfig.zshConfig.envVariables.enable = lib.mkEnableOption "enables my default session variables";
6 | };
7 | config = lib.mkIf config.movOpts.envConfig.zshConfig.envVariables.enable {
8 | programs.zsh = {
9 | sessionVariables = {
10 | SOUNDS_ENABLED = "true";
11 | EDITOR = "nvim";
12 | SUDO_EDITOR = "nvim";
13 | VISUAL = "nvim";
14 | LANG = "en_US.UTF-8";
15 | BROWSER = "firefox";
16 | FLAKEPATH = "$HOME/.sysflake";
17 | STEAMPATH = "$HOME/.local/share/Steam";
18 | PATH = "$PATH:$HOME/.userpath/";
19 | FZF_DEFAULT_COMMAND = "fd";
20 | FZF_DEFAULT_OPTS = "--height 40% --layout=reverse --border";
21 | };
22 | };
23 | };
24 | }
25 |
--------------------------------------------------------------------------------
/modules/home/environment/zsh/extraconfig.nix:
--------------------------------------------------------------------------------
1 | { lib, config, self, pkgs, ... }:
2 |
3 | let
4 | shellsound = "${pkgs.myScripts.playshellsound}/bin/playshellsound";
5 | color-commit = "${pkgs.myScripts.color-commit}/bin/color-commit";
6 | fzf-tab = "${pkgs.myPkgs.fzf-tab}";
7 | sndpath = "${self}/assets/sound";
8 | in
9 | {
10 | options = {
11 | movOpts.envConfig.zshConfig.extraConfig.enable = lib.mkEnableOption "enables my extra shell configurations";
12 | };
13 | config = lib.mkIf config.movOpts.envConfig.zshConfig.extraConfig.enable {
14 | programs.zsh = {
15 | initExtra = ''
16 | build-drv() { # Put the derivation path in $RESULT instead of making a 'result' symlink
17 | RESULT=$(nix-build "$@" --no-link)
18 | if [ -z "$RESULT" ]; then
19 | return 1
20 | fi
21 | export RESULT
22 | echo "\$RESULT = $RESULT"
23 | }
24 | precmd() { # Reset kitty color scheme
25 | if [ "$NIX_SHELL" = "false" ]; then # don't run this in a nix-shell
26 | trap 'NIX_SHELL=false kitty_theme' EXIT SIGINT SIGTERM SIGHUP
27 | else # but still apply ssh theme logic in nix-shell
28 | trap 'kitty_theme' EXIT SIGINT SIGTERM SIGHUP
29 | fi
30 | }
31 | nix-shell() {
32 | NIX_SHELL=true command nix-shell "$@" --run zsh
33 | }
34 | nsp() {
35 | NIX_SHELL=true command nix-shell -p "$@" --run zsh
36 | }
37 | nvim() {
38 | ${shellsound} ${sndpath}/nvim.wav
39 | command nvim "$@"
40 | }
41 | neovide() {
42 | ${shellsound} ${sndpath}/nvim.wav
43 | command neovide "$@"
44 | }
45 | alias vi="nvim"
46 | kitty_theme() {
47 | if [ $TERM = "xterm-kitty" ]; then
48 | if [ -n "$SSH_CONNECTION" ]; then
49 | kitty @ set-colors -a ~/.config/kitty/ssh-theme.conf
50 | elif [ "$name" = "nix-shell-env" ] || [ "$NIX_SHELL" = "true" ]; then
51 | kitty @ set-colors -a ~/.config/kitty/nix-shell-theme.conf
52 | else
53 | kitty @ set-colors -a ~/.config/kitty/default-theme.conf
54 | fi
55 | fi
56 | }
57 | grimblast() {
58 | if command grimblast "$@"; then
59 | ${shellsound} ${sndpath}/screenshot.wav
60 | fi
61 | }
62 | gitcheckout_sfx() {
63 | if git checkout "$@"; then
64 | ${shellsound} ${sndpath}/gitcheckout.wav
65 | return 0
66 | else
67 | ${shellsound} ${sndpath}/error.wav
68 | return 1
69 | fi
70 | }
71 | gitrebase_sfx() {
72 | if git rebase "$@"; then
73 | ${shellsound} ${sndpath}/gitrebase.wav
74 | return 0
75 | else
76 | ${shellsound} ${sndpath}/error.wav
77 | return 1
78 | fi
79 | }
80 | gitcommit_sfx() {
81 | output=$(git commit "$@")
82 | if [ -n "$output" ]; then
83 | ${shellsound} ${sndpath}/gitcommit.wav
84 | echo "$output" | ${color-commit}
85 | return 0
86 | else
87 | ${shellsound} ${sndpath}/error.wav
88 | echo "$output"
89 | return 1
90 | fi
91 | }
92 | gitpush_sfx() {
93 | if git push "$@"; then
94 | ${shellsound} ${sndpath}/gitpush.wav
95 | return 0
96 | else
97 | ${shellsound} ${sndpath}/error.wav
98 | return 1
99 | fi
100 | }
101 | gitpull_sfx() {
102 | if git pull "$@"; then
103 | ${shellsound} ${sndpath}/gitpull.wav
104 | return 0
105 | else
106 | ${shellsound} ${sndpath}/error.wav
107 | return 1
108 | fi
109 | }
110 | unalias ls
111 | ls() {
112 | eza -1 --group-directories-first --icons "$@"
113 | ${shellsound} ${sndpath}/ls.wav
114 | return 0
115 | }
116 |
117 | mkcd() {
118 | mkdir -p "$1" && cd "$1"
119 | }
120 |
121 | y() {
122 | local tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
123 | yazi "$@" --cwd-file="$tmp"
124 | if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
125 | builtin cd -- "$cwd"
126 | fi
127 | rm -f -- "$tmp"
128 | }
129 |
130 | cd() {
131 | local prev_sounds_enabled="$SOUNDS_ENABLED"
132 | SOUNDS_ENABLED=0
133 | eza -1 --group-directories-first --icons "$@"
134 | SOUNDS_ENABLED=$prev_sounds_enabled
135 | builtin cd "$@"
136 | ${shellsound} /nix/store/7a9w7np3qrvmzxjbs7xj05qq2yccgfsj-source/assets/sound/cd.wav
137 | return 0
138 | }
139 | if [ ! -e $HOME/.zsh_history ]; then
140 | touch $HOME/.zsh_history
141 | chmod 600 $HOME/.zsh_history
142 | fi
143 | if [ "$TERM" = "linux" ]; then
144 | echo -en "\e]P0101010"
145 | setfont ter-v32b
146 | fi
147 | setopt APPEND_HISTORY # Append history to the history file (don't overwrite)
148 | setopt INC_APPEND_HISTORY # Append to the history file incrementally
149 | setopt SHARE_HISTORY # Share history between all zsh sessions
150 |
151 | setopt CORRECT
152 | setopt NO_NOMATCH
153 | setopt LIST_PACKED
154 | setopt ALWAYS_TO_END
155 | setopt GLOB_COMPLETE
156 | setopt COMPLETE_ALIASES
157 | setopt COMPLETE_IN_WORD
158 | setopt AUTO_CD
159 | setopt AUTO_CONTINUE
160 | setopt LONG_LIST_JOBS
161 | setopt HIST_VERIFY
162 | setopt SHARE_HISTORY
163 | setopt HIST_IGNORE_SPACE
164 | setopt HIST_SAVE_NO_DUPS
165 | setopt HIST_IGNORE_ALL_DUPS
166 | setopt EXTENDED_GLOB
167 | setopt TRANSIENT_RPROMPT
168 | setopt INTERACTIVE_COMMENTS
169 |
170 | autoload -U compinit # completion
171 | autoload -U terminfo # terminfo keys
172 | zmodload -i zsh/complist # menu completion
173 | autoload -U promptinit # prompt
174 |
175 | autoload -U up-line-or-beginning-search; zle -N up-line-or-beginning-search
176 | autoload -U down-line-or-beginning-search; zle -N down-line-or-beginning-search
177 |
178 | compinit
179 | source ${fzf-tab}/fzf-tab.plugin.zsh
180 |
181 | bindkey -v
182 | kitty_theme
183 | type starship_zle-keymap-select >/dev/null || \
184 | {
185 | eval "$(starship init zsh)"
186 | }
187 | ${shellsound} ${sndpath}/sh-source.wav
188 | [ ! -f $FLAKEPATH/flake.nix ] && echo "WARNING: flake.nix not found at \$FLAKEPATH. Shell aliases for editing config files won't work correctly!" && echo "Edit the FLAKEPATH session variable in zshell.nix to point to the path where you saved the system configuration flake."
189 | '';
190 | };
191 | };
192 | }
193 |
--------------------------------------------------------------------------------
/modules/home/environment/zsh/options.nix:
--------------------------------------------------------------------------------
1 | { lib, config, ... }:
2 |
3 | {
4 | options = {
5 | movOpts.envConfig.zshConfig.shellOptions.enable = lib.mkEnableOption "enables my default shell settings";
6 | };
7 | config = lib.mkIf config.movOpts.envConfig.zshConfig.shellOptions.enable {
8 | programs.zoxide = {
9 | enable = true;
10 | enableZshIntegration = true;
11 | };
12 | programs.zsh = {
13 | enable = true;
14 |
15 | syntaxHighlighting = {
16 | enable = true;
17 | };
18 |
19 | oh-my-zsh = {
20 | enable = true;
21 | plugins = [
22 | "git"
23 | "fzf"
24 | "aliases"
25 | "eza"
26 | ];
27 | };
28 |
29 | enableCompletion = true;
30 |
31 | history = {
32 | path = "$HOME/.zsh_history";
33 | save = 10000;
34 | size = 10000;
35 | share = true;
36 | };
37 |
38 | autosuggestion = {
39 | enable = true;
40 | highlight = "fg=#4C566A,underline";
41 | };
42 | };
43 | };
44 | }
45 |
--------------------------------------------------------------------------------
/modules/home/files.nix:
--------------------------------------------------------------------------------
1 | { pkgs, lib, self, config, ... }:
2 |
3 | # This folder is for programs that do not have existing configuration modules in NixOS.
4 | # Basically a to-do list for stuff I need to write my own modules for.
5 | let
6 | # Extract color scheme from base_16 yaml file
7 | extractSchemeFromYaml = base16_scheme: let
8 | scheme_path = "${pkgs.base16-schemes}/share/themes/${base16_scheme}.yaml";
9 | scheme_string = builtins.readFile scheme_path;
10 | scheme_list = lib.splitString "\n" scheme_string; # Split into a list
11 | colors =
12 | lib.filter (line: builtins.match "^ *base[0-9A-F]{2}: .*" line != null) # Get raw hex values from scheme list
13 | scheme_list;
14 | parsed_scheme = lib.lists.foldl' (acc: line: # Initialize attribute set and begin folding values into it
15 | let
16 | splitLine = lib.splitString ": " line; # Split into keys (base00, base01, etc.) and values
17 | key = builtins.elemAt splitLine 0;
18 | value = builtins.elemAt splitLine 1;
19 | trimmedKey = lib.trim key; # Start cleaning values
20 | cleanValue_step1 = lib.splitString " " value;
21 | cleanValue_step2 = builtins.elemAt cleanValue_step1 0; # Get just the hex value, ignore comments etc.
22 | cleanValue_final =
23 | builtins.substring 1 (builtins.stringLength cleanValue_step2 - 2)
24 | cleanValue_step2;
25 | in acc // { "${trimmedKey}" = cleanValue_final; }) { } colors; # Accumulate keys/values into attribute set
26 | in parsed_scheme; # Return parsed color scheme
27 |
28 | ssh_scheme = extractSchemeFromYaml "atelier-cave" ;
29 | nix-shell_scheme = extractSchemeFromYaml "blueish";
30 | def_scheme = config.lib.stylix.colors;
31 |
32 |
33 | # Custom theme for nix-shell
34 | in {
35 | options = {
36 | movOpts.homeFiles.enable =
37 | lib.mkEnableOption "enables declared custom files";
38 | };
39 | config = {
40 | home.file = {
41 | ".config/neofetch/config.conf".text = ''
42 | username=$(whoami)
43 | name_length=''${#username}
44 | total_width=40
45 | side_length=$(( (total_width - name_length - 2) / 2 ))
46 |
47 | top_line=$(printf "─%.0s" $(seq 1 $side_length))
48 | top_line="$top_line $username "
49 | top_line+=$(printf "─%.0s" $(seq 1 $side_length))
50 |
51 | if (( (total_width - name_length) % 2 != 0 )); then
52 | top_line+="─"
53 | fi
54 |
55 | print_info() {
56 | prin "┌$top_line┐"
57 | info " " distro
58 | info " " kernel
59 | info " " wm
60 | info " " shell
61 | info " " term
62 | info " " term_font
63 | info " " packages
64 | prin "└────────────────────────────────────────┘"
65 | info cols
66 | prin "\n \n \n \n \n ''${cl3} \n \n ''${cl5} \n \n ''${cl2} \n \n ''${cl6} \n \n ''${cl4} \n \n ''${cl1} \n \n ''${cl7} \n \n ''${cl0}"
67 | }
68 |
69 | kernel_shorthand="on"
70 | distro_shorthand="on"
71 | os_arch="off"
72 | uptime_shorthand="on"
73 | memory_percent="on"
74 | package_managers="off"
75 | shell_path="off"
76 | shell_version="on"
77 | speed_type="bios_limit"
78 | speed_shorthand="on"
79 | gtk_shorthand="on"
80 | gtk2="on"
81 | gtk3="on"
82 | colors=(distro)
83 | bold="on"
84 | underline_enabled="on"
85 | underline_char="-"
86 | separator=" "
87 | color_blocks="off"
88 | block_range=(0 15) # Colorblocks
89 |
90 | # Colors for custom colorblocks
91 | magenta="\033[1;35m"
92 | green="\033[1;32m"
93 | white="\033[1;37m"
94 | blue="\033[1;34m"
95 | red="\033[1;31m"
96 | black="\033[1;40;30m"
97 | yellow="\033[1;33m"
98 | cyan="\033[1;36m"
99 | reset="\033[0m"
100 | bgyellow="\033[1;43;33m"
101 | bgwhite="\033[1;47;37m"
102 | cl0="''${reset}"
103 | cl1="''${magenta}"
104 | cl2="''${green}"
105 | cl3="''${white}"
106 | cl4="''${blue}"
107 | cl5="''${red}"
108 | cl6="''${yellow}"
109 | cl7="''${cyan}"
110 | cl8="''${black}"
111 | cl9="''${bgyellow}"
112 | cl10="''${bgwhite}"
113 |
114 | block_width=4
115 | block_height=1
116 |
117 | bar_char_elapsed="-"
118 | bar_char_total="="
119 | bar_border="on"
120 | bar_length=15
121 | bar_color_elapsed="distro"
122 | bar_color_total="distro"
123 |
124 | cpu_display="on"
125 | memory_display="on"
126 | battery_display="on"
127 | disk_display="on"
128 |
129 | image_backend="kitty"
130 | image_source="${self}/assets/images/nixos-logo.png"
131 | image_size="250px"
132 | image_loop="off"
133 |
134 | aascii_distro="auto"
135 | ascii_colors=(distro)
136 | ascii_bold="on"
137 |
138 | crop_mode="normal"
139 | crop_offset="center"
140 |
141 | gap=2
142 |
143 | yoffset=0
144 | xoffset=0
145 |
146 | stdout="off"
147 | '';
148 |
149 | ".config/kitty/default-theme.conf".text = ''
150 | background #${def_scheme.base00}
151 | foreground #${def_scheme.base05}
152 | selection_background #${def_scheme.base05}
153 | selection_foreground #${def_scheme.base00}
154 | url_color #${def_scheme.base04}
155 | cursor #${def_scheme.base05}
156 | active_border_color #${def_scheme.base03}
157 | inactive_border_color #${def_scheme.base01}
158 | active_tab_background #${def_scheme.base00}
159 | active_tab_foreground #${def_scheme.base05}
160 | inactive_tab_background #${def_scheme.base01}
161 | inactive_tab_foreground #${def_scheme.base04}
162 | tab_bar_background #${def_scheme.base01}
163 |
164 | # normal
165 | color0 #${def_scheme.base01}
166 | color1 #${def_scheme.base08}
167 | color2 #${def_scheme.base0B}
168 | color3 #${def_scheme.base0A}
169 | color4 #${def_scheme.base0D}
170 | color5 #${def_scheme.base0E}
171 | color6 #${def_scheme.base0C}
172 | color7 #${def_scheme.base05}
173 |
174 | # bright
175 | color8 #${def_scheme.base03}
176 | color9 #${def_scheme.base09}
177 | color10 #${def_scheme.base01}
178 | color11 #${def_scheme.base02}
179 | color12 #${def_scheme.base04}
180 | color13 #${def_scheme.base06}
181 | color14 #${def_scheme.base0F}
182 | color15 #${def_scheme.base07}
183 | '';
184 | ".config/kitty/ssh-theme.conf".text = ''
185 | background ${ssh_scheme.base00}
186 | foreground ${ssh_scheme.base05}
187 | selection_background ${ssh_scheme.base05}
188 | selection_foreground ${ssh_scheme.base00}
189 | url_color ${ssh_scheme.base04}
190 | cursor ${ssh_scheme.base05}
191 | active_border_color ${ssh_scheme.base03}
192 | inactive_border_color ${ssh_scheme.base01}
193 | active_tab_background ${ssh_scheme.base00}
194 | active_tab_foreground ${ssh_scheme.base05}
195 | inactive_tab_background ${ssh_scheme.base01}
196 | inactive_tab_foreground ${ssh_scheme.base04}
197 | tab_bar_background ${ssh_scheme.base01}
198 |
199 | # normal
200 | color0 ${ssh_scheme.base01}
201 | color1 ${ssh_scheme.base08}
202 | color2 ${ssh_scheme.base0B}
203 | color3 ${ssh_scheme.base0A}
204 | color4 ${ssh_scheme.base0D}
205 | color5 ${ssh_scheme.base0E}
206 | color6 ${ssh_scheme.base0C}
207 | color7 ${ssh_scheme.base05}
208 |
209 | # bright
210 | color8 ${ssh_scheme.base03}
211 | color9 ${ssh_scheme.base09}
212 | color10 ${ssh_scheme.base01}
213 | color11 ${ssh_scheme.base02}
214 | color12 ${ssh_scheme.base04}
215 | color13 ${ssh_scheme.base06}
216 | color14 ${ssh_scheme.base0F}
217 | color15 ${ssh_scheme.base07}
218 | '';
219 | ".config/kitty/nix-shell-theme.conf".text = ''
220 | background ${nix-shell_scheme.base00}
221 | foreground ${nix-shell_scheme.base05}
222 | selection_background ${nix-shell_scheme.base05}
223 | selection_foreground ${nix-shell_scheme.base00}
224 | url_color ${nix-shell_scheme.base04}
225 | cursor ${nix-shell_scheme.base05}
226 | active_border_color ${nix-shell_scheme.base03}
227 | inactive_border_color ${nix-shell_scheme.base01}
228 | active_tab_background ${nix-shell_scheme.base00}
229 | active_tab_foreground ${nix-shell_scheme.base05}
230 | inactive_tab_background ${nix-shell_scheme.base01}
231 | inactive_tab_foreground ${nix-shell_scheme.base04}
232 | tab_bar_background ${nix-shell_scheme.base01}
233 |
234 | # normal
235 | color0 ${nix-shell_scheme.base01}
236 | color1 ${nix-shell_scheme.base08}
237 | color2 ${nix-shell_scheme.base0B}
238 | color3 ${nix-shell_scheme.base0A}
239 | color4 ${nix-shell_scheme.base0D}
240 | color5 ${nix-shell_scheme.base0E}
241 | color6 ${nix-shell_scheme.base0C}
242 | color7 ${nix-shell_scheme.base05}
243 |
244 | # bright
245 | color8 ${nix-shell_scheme.base03}
246 | color9 ${nix-shell_scheme.base09}
247 | color10 ${nix-shell_scheme.base01}
248 | color11 ${nix-shell_scheme.base02}
249 | color12 ${nix-shell_scheme.base04}
250 | color13 ${nix-shell_scheme.base06}
251 | color14 ${nix-shell_scheme.base0F}
252 | color15 ${nix-shell_scheme.base07}
253 | '';
254 | };
255 | };
256 | }
257 |
--------------------------------------------------------------------------------
/modules/home/programs/autojump.nix:
--------------------------------------------------------------------------------
1 | { lib, config, ... }: {
2 | options = {
3 | movOpts.programConfigs.autojumpConfig.enable =
4 | lib.mkEnableOption "enables my autojump options";
5 | };
6 | config = lib.mkIf config.movOpts.programConfigs.autojumpConfig.enable {
7 | programs.autojump = {
8 | enable = true;
9 | enableZshIntegration = true;
10 | };
11 | };
12 | }
13 |
--------------------------------------------------------------------------------
/modules/home/programs/bat.nix:
--------------------------------------------------------------------------------
1 | { lib, config, inputs, ... }: {
2 | options = {
3 | movOpts.programConfigs.batConfig.enable =
4 | lib.mkEnableOption "enables my bat options";
5 | };
6 | config = lib.mkIf config.movOpts.programConfigs.batConfig.enable {
7 | programs.bat = {
8 | enable = true;
9 | config = { pager = "less -FR"; };
10 | };
11 | };
12 | }
13 |
--------------------------------------------------------------------------------
/modules/home/programs/btop.nix:
--------------------------------------------------------------------------------
1 | { lib, config, pkgs, ... }: {
2 | options = {
3 | movOpts.programConfigs.btopConfig.enable =
4 | lib.mkEnableOption "enables my btop config";
5 | };
6 | config = lib.mkIf config.movOpts.programConfigs.btopConfig.enable {
7 | programs.btop = {
8 | enable = true;
9 |
10 | settings = {
11 | update_ms = 500;
12 | vim_keys = true;
13 | color_theme = "nord";
14 | theme_background = true;
15 | temp_scale = "fahrenheit";
16 | graph_symbol = "block";
17 | disks_filter = "exclude=/boot /";
18 | show_swap = false;
19 | swap_disk = false;
20 | };
21 | };
22 |
23 | home.packages = with pkgs; [ nvtopPackages.intel ];
24 | };
25 | }
26 |
--------------------------------------------------------------------------------
/modules/home/programs/cava.nix:
--------------------------------------------------------------------------------
1 | { lib, config, inputs, pkgs, ... }: {
2 | options = {
3 | movOpts.programConfigs.cavaConfig.enable =
4 | lib.mkEnableOption "enables my cava settings";
5 | };
6 | config = lib.mkIf config.movOpts.programConfigs.cavaConfig.enable {
7 | programs.cava = { enable = true; };
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/modules/home/programs/default.nix:
--------------------------------------------------------------------------------
1 | { env, host, nixvim, self, inputs, username, config, home-manager, ... }: {
2 | imports = [ (import ./btop.nix) ] ++ [ (import ./yazi.nix) ]
3 | ++ [ (import ./kitty.nix) ] ++ [ (import ./fuzzel.nix) ]
4 | ++ [ (import ./eza.nix) ] ++ [ (import ./cava.nix) ]
5 | ++ [ (import ./bat.nix) ] ++ [ (import ./fzf.nix) ]
6 | ++ [ (import ./git.nix) ] ++ [ (import ./password-store.nix) ]
7 | ++ [ (import ./autojump.nix) ] ++ [ (import ./nixvim) ];
8 | }
9 |
--------------------------------------------------------------------------------
/modules/home/programs/eza.nix:
--------------------------------------------------------------------------------
1 | { lib, config, ... }: {
2 | options = {
3 | movOpts.programConfigs.ezaConfig.enable =
4 | lib.mkEnableOption "enables my eza options";
5 | };
6 | config = lib.mkIf config.movOpts.programConfigs.ezaConfig.enable {
7 | programs.eza = {
8 | enable = true;
9 | enableZshIntegration = false;
10 | extraOptions = [ "-1" "-h" "--group-directories-first" ];
11 | icons = "auto";
12 | git = true;
13 | };
14 | };
15 | }
16 |
--------------------------------------------------------------------------------
/modules/home/programs/fuzzel.nix:
--------------------------------------------------------------------------------
1 | { config, lib, ... }: {
2 | options = {
3 | movOpts.programConfigs.fuzzelConfig.enable =
4 | lib.mkEnableOption "enables my fuzzel configuration";
5 | };
6 | config = lib.mkIf config.movOpts.programConfigs.fuzzelConfig.enable {
7 | programs.fuzzel = {
8 | enable = true;
9 | settings = {
10 | main = {
11 | line-height = 25;
12 | fields = "name,generic,comment,categories,filename,keywords";
13 | terminal = "kitty";
14 | prompt = "' ➜ '";
15 | layer = "top";
16 | lines = 10;
17 | width = 35;
18 | horizontal-pad = 25;
19 | inner-pad = 5;
20 | };
21 | border = {
22 | radius = 15;
23 | width = 3;
24 | };
25 | colors.background = lib.mkForce "2e344080";
26 | };
27 | };
28 | };
29 | }
30 |
--------------------------------------------------------------------------------
/modules/home/programs/fzf.nix:
--------------------------------------------------------------------------------
1 | { lib, config, ... }: {
2 | options = {
3 | movOpts.programConfigs.fzfConfig.enable =
4 | lib.mkEnableOption "enables my fzf options";
5 | };
6 | config = lib.mkIf config.movOpts.programConfigs.fzfConfig.enable {
7 | programs.fzf = {
8 | enable = true;
9 | enableZshIntegration = true;
10 | };
11 | };
12 | }
13 |
--------------------------------------------------------------------------------
/modules/home/programs/git.nix:
--------------------------------------------------------------------------------
1 | { lib, config, username, pkgs, ... }: {
2 | options = {
3 | movOpts.programConfigs.gitConfig.enable =
4 | lib.mkEnableOption "enables my git configuration";
5 | };
6 | config = lib.mkIf config.movOpts.programConfigs.gitConfig.enable {
7 | programs.git = {
8 | enable = true;
9 | signing = {
10 | gpgPath = "${pkgs.gnupg}/bin/gpg";
11 | key = "0DA69D51BA4B2D2B58FC9CB574ED6528A37CA99A";
12 | signByDefault = true;
13 | };
14 | userEmail = "kylerclay@proton.me";
15 | userName = "${username}";
16 | extraConfig = {
17 | core.pager = "delta";
18 | interactive.diffFilter = "delta --color-only";
19 | delta.navigate = "true";
20 | delta.dark = "true";
21 | merge.conflictstyle = "zdiff3";
22 | };
23 | };
24 | };
25 | }
26 |
--------------------------------------------------------------------------------
/modules/home/programs/kitty.nix:
--------------------------------------------------------------------------------
1 | { lib, config, pkgs, ... }: {
2 | options = {
3 | movOpts.programConfigs.kittyConfig.enable =
4 | lib.mkEnableOption "enables my kitty configuration";
5 | };
6 | config = lib.mkIf config.movOpts.programConfigs.kittyConfig.enable {
7 | programs.kitty = {
8 | enable = true;
9 | font = {
10 | package = lib.mkForce pkgs.fira-code;
11 | name = lib.mkForce "Fira Code";
12 | size = lib.mkForce 20;
13 | };
14 |
15 | settings = {
16 | confirm_os_window_close = 0;
17 | window_padding_width = 4;
18 | scrollback_lines = 10000;
19 | enable_audio_bell = false;
20 | allow_remote_control = true;
21 | mouse_hide_wait = 60;
22 |
23 | ## Tabs
24 | tab_title_template = "{index}";
25 | active_tab_font_style = "normal";
26 | inactive_tab_font_style = "normal";
27 | tab_bar_style = "powerline";
28 | tab_bar_edge = "top";
29 | tab_powerline_style = "round";
30 | };
31 |
32 | keybindings = {
33 | "ctrl+shift+l" = "next_tab";
34 | "ctrl+shift+h" = "previous_tab";
35 | "ctrl+shift+j" = "scroll_end";
36 | "ctrl+shift+k" = "scroll_home";
37 | "ctrl+shift+equal" = "change_font_size all +2.0";
38 | "ctrl+shift+minus" = "change_font_size all -2.0";
39 | "ctrl+shift+backspace" = "change_font_size all 0";
40 | };
41 | };
42 | };
43 | }
44 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/autocmd.nix:
--------------------------------------------------------------------------------
1 | { pkgs, self, ... }: {
2 | programs.nixvim = {
3 | autoCmd = [
4 | {
5 | command = "silent! mkview";
6 | event = [ "BufWinLeave" ];
7 | pattern = [ "*" ];
8 | desc =
9 | "Save session window settings to be loaded next time the file is opened";
10 | }
11 | {
12 | command = "silent! loadview";
13 | event = [ "BufWinEnter" ];
14 | pattern = [ "*" ];
15 | desc =
16 | "Load previous session window settings for the opened file (folds, cursor pos, etc)";
17 | }
18 | {
19 | command = "silent! FloatermNew --name=def_term --width=0.8 --height=0.8 --wintype=topright --silent";
20 | event = [ "VimEnter" ];
21 | pattern = [ "*" ];
22 | desc = "Start the floaterm window";
23 | }
24 | ];
25 | };
26 | }
27 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/default.nix:
--------------------------------------------------------------------------------
1 | { env, config, pkgs, host, self, ... }: {
2 | imports = [ ./plugins ./options.nix ./keymaps.nix ./autocmd.nix ];
3 | }
4 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/keymaps.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nixvim = {
3 | keymaps = [
4 | {
5 | action = "Telescope find_files"; # select entire document
6 | key = "!fs";
7 | mode = "n";
8 | }
9 | {
10 | action = "UndotreeToggle"; # select entire document
11 | key = "!t";
12 | mode = "n";
13 | }
14 | {
15 | action = "ggG"; # select entire document
16 | key = "!a";
17 | mode = "n";
18 | }
19 | {
20 | action = "lua vim.lsp.buf.code_action()";
21 | key = "!ca";
22 | mode = "n";
23 | }
24 | {
25 | action = "lua vim.lsp.buf.format()";
26 | key = "!fmt";
27 | mode = "n";
28 | }
29 | {
30 | action = "lua vim.diagnostic.open_float()";
31 | key = "!df";
32 | mode = "n";
33 | }
34 | {
35 | action = "W";
36 | key = "";
37 | mode = "n";
38 | }
39 | {
40 | action = "w";
41 | key = "";
42 | mode = "n";
43 | }
44 | {
45 | action = "FloatermToggle def_term";
46 | key = "";
47 | mode = [ "n" "t" ];
48 | }
49 | {
50 | action = "NvimTreeToggle";
51 | key = "";
52 | mode = "n";
53 | }
54 | {
55 | action = "COQnow";
56 | key = "!cq";
57 | mode = "n";
58 | }
59 | ];
60 | };
61 | }
62 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/options.nix:
--------------------------------------------------------------------------------
1 | { config, ... }:
2 |
3 | let scheme = config.lib.stylix.colors;
4 | in {
5 | programs.nixvim = {
6 | colorschemes.base16 = {
7 | enable = true;
8 | colorscheme = "chalk";
9 | #colorscheme = {
10 | # base00 = "#${scheme.base00}";
11 | # base01 = "#${scheme.base01}";
12 | # base02 = "#${scheme.base02}";
13 | # base03 = "#${scheme.base03}";
14 | # base04 = "#${scheme.base04}";
15 | # base05 = "#${scheme.base05}";
16 | # base06 = "#${scheme.base06}";
17 | # base07 = "#${scheme.base07}";
18 | # base08 = "#${scheme.base08}";
19 | # base09 = "#${scheme.base09}";
20 | # base0A = "#${scheme.base0A}";
21 | # base0B = "#${scheme.base0B}";
22 | # base0C = "#${scheme.base0C}";
23 | # base0D = "#${scheme.base0D}";
24 | # base0E = "#${scheme.base0E}";
25 | # base0F = "#${scheme.base0F}";
26 | #};
27 | };
28 | enable = true;
29 | diagnostics.signs = false;
30 | extraConfigLua = ''
31 | if vim.g.started_by_firenvim == true then
32 | vim.o.laststatus = 0
33 | end
34 | if vim.g.neovide then
35 | vim.g.neovide_refresh_rate = 144
36 | vim.g.neovide_cursor_vfx_mode = "sonicboom"
37 | vim.g.neovide_cursor_animate_in_insert_mode = false
38 | end
39 |
40 | vim.g.vimwiki_list = {{path = '~/vimwiki/', syntax = 'markdown', ext = '.md'}}
41 |
42 | vim.opt.number = true
43 | vim.opt.relativenumber = true
44 | vim.opt.hlsearch = true
45 | vim.opt.incsearch = true
46 | vim.opt.shiftwidth = 2
47 | vim.opt.tabstop = 2
48 | vim.opt.termguicolors = true
49 | vim.opt.ruler = true
50 | vim.opt.scrolloff = 6
51 | vim.opt.undofile = true
52 | vim.opt.foldmethod = "manual"
53 | vim.opt.wrap = true
54 | vim.opt.linebreak = true
55 | vim.opt.textwidth = 0
56 | vim.opt.breakat = " \t!@*-+;:,./?"
57 | vim.opt.guifont = "Fira Code:h18"
58 |
59 | vim.g.mapleader = "!"
60 | vim.g.rust_recommended_style = 0
61 | '';
62 | };
63 | }
64 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/airline.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nixvim = {
3 | plugins.airline = {
4 | enable = true;
5 | settings = {
6 | left_sep = "";
7 | right_sep = "";
8 | powerline_fonts = 1;
9 | theme = "dark";
10 | section_x = "";
11 | section_y = "";
12 | skip_empty_sections = 1;
13 | };
14 | };
15 | };
16 | }
17 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/alpha.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nixvim = {
3 | plugins.alpha = {
4 | enable = true;
5 | theme = "dashboard";
6 | };
7 | };
8 | }
9 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/barbar.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nixvim = {
3 | plugins.barbar = {
4 | enable = false;
5 | settings = { auto_hide = 1; };
6 | };
7 | };
8 | }
9 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/cmp.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nixvim = {
3 | plugins.cmp = {
4 | autoEnableSources = true;
5 | settings.sources =
6 | [ { name = "nvim_lsp"; } { name = "path"; } { name = "buffer"; } ];
7 | };
8 | plugins.cmp-nvim-lsp.enable = true;
9 | plugins.cmp-nvim-lsp-document-symbol.enable = true;
10 | plugins.cmp-nvim-lsp-signature-help.enable = true;
11 | };
12 | }
13 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/coq.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nixvim = {
3 | plugins.coq-nvim = {
4 | enable = true;
5 | settings = { auto_start = false; };
6 | };
7 | };
8 | }
9 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/default.nix:
--------------------------------------------------------------------------------
1 | { host, self, pkgs, env, ... }:
2 |
3 | {
4 | imports = [
5 | ./alpha.nix
6 | ./haskell.nix
7 | ./vim-matchup.nix
8 | # ./coq.nix
9 | ./barbar.nix
10 | ./scrollview.nix
11 | ./cmp.nix
12 | ./lsp.nix
13 | ./rustaceanvim.nix
14 | ./fidget.nix
15 | # ./lualine.nix
16 | ./airline.nix
17 | ./nvim-lightbulb.nix
18 | ./neocord.nix
19 | ./plugins.nix
20 | ./nvim-tree.nix
21 | ./telescope.nix
22 | ./indent-blankline.nix
23 | ./gitsigns.nix
24 | ./extra_plugins.nix
25 | ];
26 | }
27 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/extra_plugins.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }: {
2 | programs.nixvim = {
3 | extraPlugins = [
4 | (pkgs.vimUtils.buildVimPlugin {
5 | # vimwiki
6 | name = "vimwiki";
7 | src = pkgs.fetchFromGitHub {
8 | owner = "vimwiki";
9 | repo = "vimwiki";
10 | rev = "705ad1e0dded0e3b7ff5fac78547ab67c9d39bdf";
11 | hash = "sha256-Upx29rIPwW/e7Lkmf0PNOpIACnAXIzlkfa6V1p2nYHM=";
12 | };
13 | })
14 | (pkgs.vimUtils.buildVimPlugin {
15 | name = "vim-sneak";
16 | src = pkgs.fetchFromGitHub {
17 | owner = "justinmk";
18 | repo = "vim-sneak";
19 | rev = "c13d0497139b8796ff9c44ddb9bc0dc9770ad2dd";
20 | hash = "sha256-ndWhnV0fgCcqCGwVyM07GfmUB3CitBZbOWvZtsB1tBk=";
21 | };
22 | })
23 | (pkgs.vimUtils.buildVimPlugin {
24 | name = "vim-slash";
25 | src = pkgs.fetchFromGitHub {
26 | owner = "junegunn";
27 | repo = "vim-slash";
28 | rev = "31aee09b7ea8893a18fa34f65e63e364fc998444";
29 | hash = "sha256-hC590lmKBssLCSKPF9O2cnt6TCJkklzbbhDNhf1ozUU=";
30 | };
31 | })
32 | (pkgs.vimUtils.buildVimPlugin {
33 | name = "automkdir.nvim";
34 | src = pkgs.fetchFromGitHub {
35 | owner = "mateuszwieloch";
36 | repo = "automkdir.nvim";
37 | rev = "beeb2dd76f1c3ac776d901c43217a774f1f045de";
38 | hash = "sha256-lKSCZ80b/+OV56858FDK7x/zhcuU/AWuCDe+8NdhziU=";
39 | };
40 | })
41 | #(pkgs.vimUtils.buildVimPlugin {
42 | #name = "nvim-ghost.nvim";
43 | #src = pkgs.fetchFromGitHub {
44 | #owner = "subnut";
45 | #repo = "nvim-ghost.nvim";
46 | #rev = "67cc8f38c69d271af1c2430ff5099766f3550eb8";
47 | #hash = "sha256-XldDgPqVeIfUjaRLVUMp88eHBHLzoVgOmT3gupPs+ao=";
48 | #};
49 | #})
50 | ];
51 | };
52 | }
53 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/fidget.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nixvim.plugins.fidget = {
3 | enable = true;
4 | notification = {
5 | overrideVimNotify = true;
6 | window = { border = "rounded"; };
7 | };
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/gitsigns.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nixvim = {
3 | plugins.gitsigns = {
4 | enable = true;
5 | settings.signs = {
6 | add.text = "│";
7 | change.text = "/";
8 | delete.text = "-";
9 | topdelete.text = "-";
10 | changedelete.text = "\\";
11 | };
12 | };
13 | };
14 | }
15 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/haskell.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }: {
2 | programs.nixvim = {
3 | #extraPlugins = [
4 | #(pkgs.vimUtils.buildVimPlugin {
5 | #name = "haskell-tools.nvim";
6 | #src = pkgs.fetchFromGitHub {
7 | #owner = "mrcjkb";
8 | #repo = "haskell-tools.nvim";
9 | #rev = "39c4ced6f1bff1abc8d4df5027efd11ac38c6e6c";
10 | #hash = "sha256-f+M35EwAlHwjJ2Xs2u9FLnyH0FJT22D0LLShDXCbEEs=";
11 | #};
12 | #})
13 | #];
14 | #plugins = { haskell-scope-highlighting.enable = true; };
15 | };
16 | }
17 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/indent-blankline.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nixvim = {
3 | plugins.indent-blankline = {
4 | enable = true;
5 | #settings = {
6 | #indent.char = "│";
7 | #};
8 | };
9 | };
10 | }
11 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/lsp.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nixvim = {
3 | plugins = {
4 | cmp-snippy.enable = true;
5 | cmp = {
6 | enable = true;
7 | settings = {
8 | mapping = {
9 | __raw = ''
10 | cmp.mapping.preset.insert({
11 | [''] = cmp.mapping.close_docs(),
12 | [''] = cmp.mapping.open_docs(),
13 | [''] = cmp.mapping.scroll_docs(-4),
14 | [''] = cmp.mapping.scroll_docs(4),
15 | [''] = cmp.mapping.complete(),
16 | [''] = cmp.mapping.abort(),
17 | [''] = function(fallback)
18 | if cmp.visible() then
19 | cmp.confirm()
20 | else
21 | fallback()
22 | end
23 | end, -- Added a comma here
24 | [''] = function(fallback)
25 | if cmp.visible() then
26 | cmp.select_next_item()
27 | else
28 | fallback()
29 | end
30 | end, -- Added a comma here
31 | [''] = function(fallback)
32 | if cmp.visible() then
33 | cmp.select_prev_item()
34 | else
35 | fallback()
36 | end
37 | end -- No comma needed for the last item
38 | })
39 | '';
40 | };
41 | window = { completion.border = "rounded"; };
42 | };
43 | };
44 | lsp = {
45 | enable = true;
46 | servers = {
47 | bashls.enable = true;
48 | ccls.enable = true;
49 | clangd.enable = true;
50 | cmake.enable = true;
51 | ts_ls.enable = true;
52 | eslint.enable = true;
53 | html.enable = true;
54 | jsonls.enable = true;
55 | lua_ls.enable = true;
56 | marksman.enable = true;
57 | rust_analyzer = {
58 | enable = true;
59 | installCargo = false;
60 | installRustc = false;
61 | settings = {
62 | check.allTargets = false;
63 | };
64 | };
65 | nixd = {
66 | enable = true;
67 | settings = {
68 | nixd = {
69 | nixpkgs.expr = "import { }";
70 | formatting.command = "nixfmt";
71 | };
72 | options = {
73 | # uses Xenon config because it has every option exposed to it
74 | nixos.expr = ''
75 | (builtins.getFlake "github:pagedMov/nixos-config").nixosConfigurations.xenon.options'';
76 | home.expr = ''
77 | (builtins.getFlake "github:pagedMov/nixos-config").homeConfigurations.xenonHome.options'';
78 | };
79 | };
80 | };
81 | jdtls.enable = true;
82 | pyright.enable = true;
83 | sqls.enable = true;
84 | hls = {
85 | enable = true;
86 | installGhc = true;
87 | };
88 | };
89 | };
90 | };
91 | };
92 | }
93 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/lualine.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nixvim = {
3 | plugins.lualine = {
4 | enable = false;
5 | settings = {
6 | options = {
7 | icons_enabled = true;
8 | theme = "auto";
9 | component_separators = {
10 | left = "";
11 | right = "";
12 | };
13 | section_separators = {
14 | left = "";
15 | right = "";
16 | };
17 | always_divide_middle = true;
18 | globalstatus = false;
19 | refresh = {
20 | statusline = 1000;
21 | tabline = 1000;
22 | winbar = 1000;
23 | };
24 | };
25 | sections = {
26 | lualine_a = [ "mode" ];
27 | lualine_b = [ "buffers" ];
28 | lualine_c = [ ];
29 | lualine_x = [ "searchcount" "fileformat" "filetype" ];
30 | lualine_y = [ "branch" "diff" "diagnostics" ];
31 | lualine_z = [ "location" ];
32 | };
33 | inactive_sections = {
34 | lualine_a = [ ];
35 | lualine_b = [ ];
36 | lualine_c = [ "filename" ];
37 | lualine_x = [ "location" ];
38 | lualine_y = [ ];
39 | lualine_z = [ ];
40 | };
41 | };
42 | };
43 | };
44 | }
45 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/neocord.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nixvim.plugins.neocord = {
3 | enable = true;
4 | settings = {
5 | logo =
6 | "https://styles.redditmedia.com/t5_30kix/styles/communityIcon_n2hvyn96zwk81.png";
7 | logo_tooltip = "Neovim";
8 | buttons = [
9 | {
10 | label = " My GitHub";
11 | url = "https://github.com/pagedMov";
12 | }
13 | {
14 | label = " Nixvim";
15 | url = "https://github.com/nix-community/nixvim";
16 | }
17 | ];
18 | };
19 | };
20 | }
21 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/nvim-lightbulb.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nixvim.plugins.nvim-lightbulb = {
3 | enable = true;
4 | settings = {
5 | virtual_text = { enable = true; };
6 | autocmd.enabled = true;
7 | sign.enabled = false;
8 | };
9 | };
10 | }
11 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/nvim-tree.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nixvim = {
3 | plugins.nvim-tree = {
4 | enable = true;
5 | hijackUnnamedBufferWhenOpening = false;
6 | openOnSetup = false;
7 | onAttach = {
8 | __raw = ''
9 | function(bufnr)
10 | local api = require('nvim-tree.api')
11 |
12 | local function opts(desc)
13 | return { desc = 'nvim-tree: ' .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
14 | end
15 |
16 | -- BEGIN_DEFAULT_ON_ATTACH
17 | vim.keymap.set('n', '', api.tree.change_root_to_node, opts('CD'))
18 | vim.keymap.set('n', '', api.node.open.replace_tree_buffer, opts('Open: In Place'))
19 | vim.keymap.set('n', '', api.node.show_info_popup, opts('Info'))
20 | vim.keymap.set('n', '', api.fs.rename_sub, opts('Rename: Omit Filename'))
21 | vim.keymap.set('n', '', api.node.open.tab, opts('Open: New Tab'))
22 | vim.keymap.set('n', '', api.node.open.vertical, opts('Open: Vertical Split'))
23 | vim.keymap.set('n', '', api.node.open.horizontal, opts('Open: Horizontal Split'))
24 | vim.keymap.set('n', '', api.node.navigate.parent_close, opts('Close Directory'))
25 | vim.keymap.set('n', '', api.node.open.edit, opts('Open'))
26 | vim.keymap.set('n', 'b', api.node.open.preview, opts('Open Preview'))
27 | vim.keymap.set('n', '>', api.node.navigate.sibling.next, opts('Next Sibling'))
28 | vim.keymap.set('n', '<', api.node.navigate.sibling.prev, opts('Previous Sibling'))
29 | vim.keymap.set('n', '.', api.node.run.cmd, opts('Run Command'))
30 | vim.keymap.set('n', '-', api.tree.change_root_to_parent, opts('Up'))
31 | vim.keymap.set('n', 'a', api.fs.create, opts('Create File Or Directory'))
32 | vim.keymap.set('n', 'bd', api.marks.bulk.delete, opts('Delete Bookmarked'))
33 | vim.keymap.set('n', 'bt', api.marks.bulk.trash, opts('Trash Bookmarked'))
34 | vim.keymap.set('n', 'bmv', api.marks.bulk.move, opts('Move Bookmarked'))
35 | vim.keymap.set('n', 'B', api.tree.toggle_no_buffer_filter, opts('Toggle Filter: No Buffer'))
36 | vim.keymap.set('n', 'c', api.fs.copy.node, opts('Copy'))
37 | vim.keymap.set('n', 'C', api.tree.toggle_git_clean_filter, opts('Toggle Filter: Git Clean'))
38 | vim.keymap.set('n', '[c', api.node.navigate.git.prev, opts('Prev Git'))
39 | vim.keymap.set('n', ']c', api.node.navigate.git.next, opts('Next Git'))
40 | vim.keymap.set('n', 'd', api.fs.remove, opts('Delete'))
41 | vim.keymap.set('n', 'D', api.fs.trash, opts('Trash'))
42 | vim.keymap.set('n', 'E', api.tree.expand_all, opts('Expand All'))
43 | vim.keymap.set('n', 'e', api.fs.rename_basename, opts('Rename: Basename'))
44 | vim.keymap.set('n', ']e', api.node.navigate.diagnostics.next, opts('Next Diagnostic'))
45 | vim.keymap.set('n', '[e', api.node.navigate.diagnostics.prev, opts('Prev Diagnostic'))
46 | vim.keymap.set('n', 'F', api.live_filter.clear, opts('Live Filter: Clear'))
47 | vim.keymap.set('n', 'f', api.live_filter.start, opts('Live Filter: Start'))
48 | vim.keymap.set('n', 'g?', api.tree.toggle_help, opts('Help'))
49 | vim.keymap.set('n', 'gy', api.fs.copy.absolute_path, opts('Copy Absolute Path'))
50 | vim.keymap.set('n', 'ge', api.fs.copy.basename, opts('Copy Basename'))
51 | vim.keymap.set('n', 'H', api.tree.toggle_hidden_filter, opts('Toggle Filter: Dotfiles'))
52 | vim.keymap.set('n', 'I', api.tree.toggle_gitignore_filter, opts('Toggle Filter: Git Ignore'))
53 | vim.keymap.set('n', 'J', api.node.navigate.sibling.last, opts('Last Sibling'))
54 | vim.keymap.set('n', 'K', api.node.navigate.sibling.first, opts('First Sibling'))
55 | vim.keymap.set('n', 'L', api.node.open.toggle_group_empty, opts('Toggle Group Empty'))
56 | vim.keymap.set('n', 'M', api.tree.toggle_no_bookmark_filter, opts('Toggle Filter: No Bookmark'))
57 | vim.keymap.set('n', 'm', api.marks.toggle, opts('Toggle Bookmark'))
58 | vim.keymap.set('n', 'o', api.node.open.edit, opts('Open'))
59 | vim.keymap.set('n', 'O', api.node.open.no_window_picker, opts('Open: No Window Picker'))
60 | vim.keymap.set('n', 'p', api.fs.paste, opts('Paste'))
61 | vim.keymap.set('n', 'P', api.node.navigate.parent, opts('Parent Directory'))
62 | vim.keymap.set('n', 'q', api.tree.close, opts('Close'))
63 | vim.keymap.set('n', 'r', api.fs.rename, opts('Rename'))
64 | vim.keymap.set('n', 'R', api.tree.reload, opts('Refresh'))
65 | vim.keymap.set('n', 's', api.node.run.system, opts('Run System'))
66 | vim.keymap.set('n', 'S', api.tree.search_node, opts('Search'))
67 | vim.keymap.set('n', 'u', api.fs.rename_full, opts('Rename: Full Path'))
68 | vim.keymap.set('n', 'U', api.tree.toggle_custom_filter, opts('Toggle Filter: Hidden'))
69 | vim.keymap.set('n', 'W', api.tree.collapse_all, opts('Collapse'))
70 | vim.keymap.set('n', 'x', api.fs.cut, opts('Cut'))
71 | vim.keymap.set('n', 'y', api.fs.copy.filename, opts('Copy Name'))
72 | vim.keymap.set('n', 'Y', api.fs.copy.relative_path, opts('Copy Relative Path'))
73 | vim.keymap.set('n', '<2-LeftMouse>', api.node.open.edit, opts('Open'))
74 | vim.keymap.set('n', '<2-RightMouse>', api.tree.change_root_to_node, opts('CD'))
75 | -- END_DEFAULT_ON_ATTACH
76 | end
77 | '';
78 | };
79 | view = {
80 | side = "right";
81 | centralizeSelection = true;
82 | number = true;
83 | relativenumber = true;
84 | width = 40;
85 | };
86 | };
87 | };
88 | }
89 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/plugins.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nixvim = {
3 | plugins = {
4 | nix.enable = true;
5 | endwise.enable = true;
6 | undotree.enable = true;
7 | firenvim.enable = true;
8 | helpview.enable = true;
9 | floaterm.enable = true;
10 | fugitive.enable = true;
11 | indent-blankline.enable = true;
12 | lastplace.enable = true;
13 | markdown-preview.enable = true;
14 | marks.enable = true;
15 | nvim-surround.enable = true;
16 | rainbow-delimiters.enable = true;
17 | render-markdown.enable = true;
18 | treesitter.enable = true;
19 | trim.enable = true;
20 | trouble.enable = true;
21 | web-devicons.enable = true;
22 | };
23 | };
24 | }
25 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/rustaceanvim.nix:
--------------------------------------------------------------------------------
1 | { ... }:
2 |
3 | {
4 | programs.nixvim.plugins.rustaceanvim = {
5 | enable = false;
6 | settings = {
7 | server.auto_attach = true;
8 | dap.adapter = false;
9 | };
10 | };
11 | }
12 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/scratch.nix:
--------------------------------------------------------------------------------
1 | { programs.nixvim.plugins.chatgpt = { enable = true; }; }
2 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/scrollview.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nixvim = {
3 | plugins.scrollview = {
4 | enable = true;
5 | settings.diagnostics_error_symbol = "■";
6 | settings.diagnostics_warn_symbol = "■";
7 | settings.diagnostics_hint_symbol = "■";
8 | settings.diagnostics_info_symbol = "■";
9 | settings.character = "│";
10 | };
11 | };
12 | }
13 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/telescope.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nixvim = {
3 | plugins.telescope = {
4 | enable = true;
5 | settings = {
6 | defaults = {
7 | file_ignore_patterns = [
8 | "%.snap"
9 | ];
10 | };
11 | pickers = {
12 | find_files = {
13 | hidden = true;
14 | };
15 | };
16 | };
17 | };
18 | };
19 | }
20 |
--------------------------------------------------------------------------------
/modules/home/programs/nixvim/plugins/vim-matchup.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nixvim = {
3 | plugins.vim-matchup = {
4 | enable = true;
5 | settings = {
6 | surround_enabled = 1;
7 | text_obj_enabled = 1;
8 | motion_enabled = 1;
9 | motion_cursor_end = 1;
10 | matchparen_deferred_hi_surround_always = true;
11 | matchparen_offscreen = { method = "popup"; };
12 | treesitter = {
13 | enable = true;
14 | include_match_words = true;
15 | };
16 | };
17 | };
18 | };
19 | }
20 |
--------------------------------------------------------------------------------
/modules/home/programs/password-store.nix:
--------------------------------------------------------------------------------
1 | { lib, config, username, ... }:
2 | let home = "/home/${username}";
3 | in {
4 | options = {
5 | movOpts.programConfigs.passConfig.enable =
6 | lib.mkEnableOption "enables my pass config";
7 | };
8 | config = lib.mkIf config.movOpts.programConfigs.passConfig.enable {
9 | programs.password-store = {
10 | enable = true;
11 | settings = { PASSWORD_STORE_DIR = "${home}/.password-store"; };
12 | };
13 | };
14 | }
15 |
--------------------------------------------------------------------------------
/modules/home/programs/yazi.nix:
--------------------------------------------------------------------------------
1 | { lib, config, ... }: {
2 | options = {
3 | movOpts.programConfigs.yaziConfig.enable =
4 | lib.mkEnableOption "enables my yazi config";
5 | };
6 | config = lib.mkIf config.movOpts.programConfigs.yaziConfig.enable {
7 | programs.yazi = {
8 | enable = true;
9 | enableZshIntegration = true;
10 | };
11 | };
12 | }
13 |
--------------------------------------------------------------------------------
/modules/home/servermodule.nix:
--------------------------------------------------------------------------------
1 | { inputs, nixpkgs, config, self, username, host, lib, ... }: {
2 | imports = [
3 | ./environment/starship.nix
4 | ./environment/userpkgs.nix
5 | ./environment/stylixhome.nix
6 | ./environment/zsh
7 | ./programs/nixvim
8 | ./programs/autojump.nix
9 | ./programs/bat.nix
10 | ./programs/kitty.nix
11 | ./programs/btop.nix
12 | ./programs/eza.nix
13 | ./programs/fzf.nix
14 | ./programs/git.nix
15 | ./programs/yazi.nix
16 | ./files.nix
17 | ];
18 | }
19 |
--------------------------------------------------------------------------------
/modules/server/cdn/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, lib, config, ... }:
2 |
3 | {
4 | imports = [ ./jellyfin.nix ];
5 | }
6 |
--------------------------------------------------------------------------------
/modules/server/cdn/jellyfin.nix:
--------------------------------------------------------------------------------
1 | { pkgs, lib, config, ... }:
2 |
3 | {
4 | options = {
5 | movOpts.serverCfg.jellyfinConfig.enable =
6 | lib.mkEnableOption "Enables the server's jellyfin config";
7 | };
8 | config = lib.mkIf config.movOpts.serverCfg.jellyfinConfig.enable {
9 | services.jellyfin = {
10 | enable = true;
11 | openFirewall = true;
12 | };
13 | };
14 | }
15 |
--------------------------------------------------------------------------------
/modules/server/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, lib, ... }:
2 |
3 | {
4 | imports = [ ./cdn ./glasshaus ];
5 | }
6 |
--------------------------------------------------------------------------------
/modules/server/glasshaus/caddy.nix:
--------------------------------------------------------------------------------
1 | { lib, config, pkgs, ... }:
2 |
3 | {
4 | options = {
5 | movOpts.serverCfg.caddyConfig.enable = lib.mkEnableOption
6 | "Enable my caddy config for the glasshaus.info domain name";
7 | };
8 | config = lib.mkIf config.movOpts.serverCfg.caddyConfig.enable {
9 | services.caddy = {
10 | enable = true;
11 | configFile = pkgs.writeText "Caddyfile" ''
12 | glasshaus.info {
13 | reverse_proxy localhost:8096
14 | }
15 | '';
16 | };
17 | };
18 | }
19 |
--------------------------------------------------------------------------------
/modules/server/glasshaus/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, lib, config, ... }:
2 |
3 | {
4 | imports = [ ./caddy.nix ];
5 | }
6 |
--------------------------------------------------------------------------------
/modules/sys/default.nix:
--------------------------------------------------------------------------------
1 | { inputs, nixpkgs, config, self, username, host, lib, ... }: {
2 | imports = [ ./hardware ./software ./sysenv ];
3 | }
4 |
--------------------------------------------------------------------------------
/modules/sys/hardware/bootloader.nix:
--------------------------------------------------------------------------------
1 | { pkgs, lib, config, ... }: {
2 | options = {
3 | movOpts.hardwareCfg.bootLoader.enable =
4 | lib.mkEnableOption "enables bootloader config";
5 | };
6 | config = lib.mkIf config.movOpts.hardwareCfg.bootLoader.enable {
7 | boot = {
8 | loader.systemd-boot.enable = true;
9 | loader.efi.canTouchEfiVariables = true;
10 | loader.systemd-boot.configurationLimit = 10;
11 | loader.grub.gfxmodeEfi = "1024x768";
12 | loader.grub.extraConfig = ''
13 | GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"
14 | GRUB_GFXPAYLOAD_LINUX=1024x768
15 | '';
16 | kernelPackages = pkgs.linuxPackages_latest;
17 | };
18 | };
19 | }
20 |
--------------------------------------------------------------------------------
/modules/sys/hardware/default.nix:
--------------------------------------------------------------------------------
1 | { inputs, nixpkgs, nixvim, config, self, username, host, ... }: {
2 | imports = [ (import ./bootloader.nix) ] ++ [ (import ./network.nix) ]
3 | ++ [ (import ./powerprofiles.nix) ];
4 | }
5 |
--------------------------------------------------------------------------------
/modules/sys/hardware/network.nix:
--------------------------------------------------------------------------------
1 | { host, lib, config, ... }: {
2 | options = {
3 | movOpts.hardwareCfg.networkModule.enable =
4 | lib.mkEnableOption "enables network configuration";
5 | };
6 | config = lib.mkIf config.movOpts.hardwareCfg.networkModule.enable {
7 | networking = {
8 | networkmanager.enable = true;
9 | hostName = "${host}";
10 | hosts = {
11 | "192.168.1.200" = [ "xenon" ];
12 | "192.168.1.201" = [ "oganesson" ];
13 | "192.168.1.202" = [ "mercury" ];
14 | };
15 | firewall = {
16 | enable = true;
17 | allowedTCPPorts = [ 443 8080 ];
18 | };
19 | };
20 | };
21 | }
22 |
--------------------------------------------------------------------------------
/modules/sys/hardware/powerprofiles.nix:
--------------------------------------------------------------------------------
1 | { lib, config, ... }: {
2 | options = {
3 | movOpts.hardwareCfg.powerProfiles.enable =
4 | lib.mkEnableOption "enables power profiles";
5 | };
6 | config = lib.mkIf config.movOpts.hardwareCfg.powerProfiles.enable {
7 | services = {
8 |
9 | power-profiles-daemon.enable = true;
10 |
11 | upower = {
12 | enable = true;
13 | percentageLow = 20;
14 | percentageCritical = 5;
15 | percentageAction = 3;
16 | criticalPowerAction = "PowerOff";
17 | };
18 |
19 | tlp.settings = {
20 | CPU_ENERGY_PERF_POLICY_ON_AC = "power";
21 | CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
22 |
23 | CPU_BOOST_ON_AC = 1;
24 | CPU_BOOST_ON_BAT = 1;
25 |
26 | CPU_HWP_DYN_BOOST_ON_AC = 1;
27 | CPU_HWP_DYN_BOOST_ON_BAT = 1;
28 |
29 | PLATFORM_PROFILE_ON_AC = "performance";
30 | PLATFORM_PROFILE_ON_BAT = "performance";
31 |
32 | INTEL_GPU_MIN_FREQ_ON_AC = 500;
33 | INTEL_GPU_MIN_FREQ_ON_BAT = 500;
34 | # INTEL_GPU_MAX_FREQ_ON_AC=0;
35 | # INTEL_GPU_MAX_FREQ_ON_BAT=0;
36 | # INTEL_GPU_BOOST_FREQ_ON_AC=0;
37 | # INTEL_GPU_BOOST_FREQ_ON_BAT=0;
38 |
39 | PCIE_ASPM_ON_AC = "default";
40 | PCIE_ASPM_ON_BAT = "powersupersave";
41 | };
42 | };
43 | };
44 | }
45 |
--------------------------------------------------------------------------------
/modules/sys/software/default.nix:
--------------------------------------------------------------------------------
1 | { inputs, nixpkgs, config, self, username, host, ... }: {
2 | imports = [ (import ./packages.nix) ] ++ [ (import ./programs.nix) ]
3 | ++ [ (import ./services.nix) ] ++ [ (import ./virtualization.nix) ]
4 | ++ [ (import ./gaming) ];
5 | }
6 |
--------------------------------------------------------------------------------
/modules/sys/software/gaming/default.nix:
--------------------------------------------------------------------------------
1 | { ... }: {
2 | imports = [ (import ./steam.nix) ] ++ [ (import ./gaming_pkgs.nix) ];
3 | }
4 |
--------------------------------------------------------------------------------
/modules/sys/software/gaming/gaming_pkgs.nix:
--------------------------------------------------------------------------------
1 | { lib, config, pkgs, ... }:
2 |
3 | let
4 | cust-openrct2 = pkgs.openrct2.overrideAttrs (oldAttrs: {
5 | cmakeFlags = [
6 | "-DDOWNLOAD_OBJECTS=ON"
7 | "-DDOWNLOAD_OPENMSX=ON"
8 | "-DDOWNLOAD_OPENSFX=ON"
9 | "-DDOWNLOAD_TITLE_SEQUENCES=ON"
10 | ];
11 | });
12 | in {
13 | options = {
14 | movOpts.softwareCfg.gamingPkgs.enable =
15 | lib.mkEnableOption "enables gaming packages";
16 | };
17 | config = lib.mkIf config.movOpts.softwareCfg.gamingPkgs.enable {
18 | environment.systemPackages = with pkgs; [
19 | #snes9x-gtk
20 | #cust-openrct2
21 | mgba
22 | dwarf-fortress-packages.dwarf-fortress-full
23 | prismlauncher
24 | ];
25 | };
26 | }
27 |
--------------------------------------------------------------------------------
/modules/sys/software/gaming/steam.nix:
--------------------------------------------------------------------------------
1 | { lib, config, ... }: {
2 | options = {
3 | movOpts.softwareCfg.steamConfig.enable =
4 | lib.mkEnableOption "enables steam configuration";
5 | };
6 | config = lib.mkIf config.movOpts.softwareCfg.steamConfig.enable {
7 | programs.steam = {
8 | enable = true;
9 | remotePlay.openFirewall = true;
10 | };
11 | };
12 | }
13 |
--------------------------------------------------------------------------------
/modules/sys/software/packages.nix:
--------------------------------------------------------------------------------
1 | { lib, config, pkgs, inputs, ... }: {
2 | options = {
3 | movOpts.softwareCfg.sysPkgs.enable =
4 | lib.mkEnableOption "enables default system packages";
5 | };
6 | config = lib.mkIf config.movOpts.softwareCfg.sysPkgs.enable {
7 | environment.systemPackages = with pkgs; [
8 | alsa-lib
9 | xwayland
10 | wayland
11 | alsa-utils
12 | bc
13 | cliphist
14 | fail2ban
15 | git
16 | gcc
17 | zip
18 | unzip
19 | hyprland-workspaces
20 | hyprpaper
21 | hyprpicker
22 | inetutils
23 | kitty
24 | lolcat
25 | lsof
26 | neofetch
27 | nh
28 | nix-index
29 | nix-output-monitor
30 | nix-prefetch-scripts
31 | nixos-option
32 | nix-search-cli
33 | nix-template
34 | nixfmt
35 | sshfs
36 | nvd
37 | pamixer
38 | pavucontrol
39 | playerctl
40 | usbutils
41 | vim
42 | uhk-agent
43 | jq
44 | wl-clipboard
45 | cmake
46 | libnotify
47 | gnumake
48 | file
49 | pkg-config
50 | openssl
51 | openssl_3
52 | openssl_3_0
53 | openssl_3_3
54 | libvirt-glib
55 | man-pages
56 | man-pages-posix
57 | most
58 | ];
59 | };
60 | }
61 |
--------------------------------------------------------------------------------
/modules/sys/software/programs.nix:
--------------------------------------------------------------------------------
1 | { lib, config, pkgs, ... }: {
2 | options = {
3 | movOpts.softwareCfg.sysProgs.enable =
4 | lib.mkEnableOption "enables default system programs";
5 | };
6 | config = lib.mkIf config.movOpts.softwareCfg.sysProgs.enable {
7 | environment.etc."shells" = {
8 | enable = true;
9 | text = ''
10 | /run/current-system/sw/bin/zsh
11 | /run/current-system/sw/bin/bash
12 | /run/current-system/sw/bin/zsh
13 | /nix/store/m7l6yzmflrf9hjs8707lk9nkhi6f73n1-zsh-5.9/bin/zsh
14 | /run/current-system/sw/bin/bash
15 | /run/current-system/sw/bin/sh
16 | /nix/store/f33kh08pa7pmy4kvsmsibda46sh46s66-bash-interactive-5.2p37/bin/bash
17 | /nix/store/f33kh08pa7pmy4kvsmsibda46sh46s66-bash-interactive-5.2p37/bin/sh
18 | /bin/sh
19 | /home/pagedmov/Coding/projects/rust/rsh/target/debug/rsh
20 | '';
21 | };
22 | programs = {
23 | hyprland.enable = lib.mkDefault true;
24 | zsh.enable = lib.mkDefault true;
25 | nix-ld = {
26 | enable = lib.mkDefault true;
27 | libraries = with pkgs; [ stdenv.cc.cc ffmpeg-full ];
28 | };
29 | gnupg.agent = {
30 | enable = lib.mkDefault true;
31 | enableSSHSupport = lib.mkDefault true;
32 | };
33 | };
34 | };
35 | }
36 |
--------------------------------------------------------------------------------
/modules/sys/software/services.nix:
--------------------------------------------------------------------------------
1 | { lib, config, ... }: {
2 | options = {
3 | movOpts.softwareCfg.sysServices.enable =
4 | lib.mkEnableOption "enables default system services";
5 | };
6 | config = lib.mkIf config.movOpts.softwareCfg.sysServices.enable {
7 | services = {
8 | keyd = {
9 | enable = true;
10 | keyboards.default = {
11 | ids = [ "*" ];
12 | settings.main = { capslock = "esc"; };
13 | };
14 | };
15 | pipewire = {
16 | enable = true;
17 | pulse.enable = true;
18 | wireplumber.enable = true;
19 | alsa.enable = true;
20 | alsa.support32Bit = true;
21 | };
22 | openssh = {
23 | enable = true;
24 | allowSFTP = true;
25 | };
26 | ratbagd.enable = true;
27 | pcscd.enable = true;
28 | udev.enable = true;
29 | dbus.enable = true;
30 | mullvad-vpn.enable = true;
31 | blueman.enable = true;
32 | };
33 | };
34 | }
35 |
--------------------------------------------------------------------------------
/modules/sys/software/virtualization.nix:
--------------------------------------------------------------------------------
1 | { lib, config, username, ... }: {
2 | options = {
3 | movOpts.softwareCfg.virtConfig.enable =
4 | lib.mkEnableOption "enables virtualization";
5 | };
6 | config = lib.mkIf config.movOpts.softwareCfg.virtConfig.enable {
7 | virtualisation.libvirtd.enable = true;
8 | programs.virt-manager.enable = true;
9 | };
10 | }
11 |
--------------------------------------------------------------------------------
/modules/sys/sysenv/console.nix:
--------------------------------------------------------------------------------
1 | { lib, config, pkgs, ... }: {
2 | options = {
3 | movOpts.sysEnv.consoleSettings.enable =
4 | lib.mkEnableOption "enables my console settings";
5 | };
6 | config = lib.mkIf config.movOpts.sysEnv.consoleSettings.enable {
7 | i18n.defaultLocale = "en_US.UTF-8";
8 | console = {
9 | earlySetup = true;
10 | font = "Lat2-Terminus32";
11 | packages = with pkgs; [ terminus_font ];
12 | };
13 | };
14 | }
15 |
--------------------------------------------------------------------------------
/modules/sys/sysenv/default.nix:
--------------------------------------------------------------------------------
1 | { inputs, nixpkgs, nixvim, config, self, username, host, ... }: {
2 | imports = [ (import ./sddm.nix) ] ++ [ (import ./issue.nix) ]
3 | ++ [ (import ./nix.nix) ] ++ [ (import ./stylix.nix) ];
4 | #++ [ (import ./console.nix) ];
5 | }
6 |
--------------------------------------------------------------------------------
/modules/sys/sysenv/issue.nix:
--------------------------------------------------------------------------------
1 | { lib, config, ... }: {
2 | options = {
3 | movOpts.sysEnv.issue.enable =
4 | lib.mkEnableOption "enables custom /etc/issue splash screen for the tty";
5 | };
6 | config = lib.mkIf config.movOpts.sysEnv.issue.enable {
7 | environment.etc."issue".text = ''
8 |
9 | \e[38;5;27m▓▓▓▓ \e[38;5;81m▒▒▒▒ ▒▒▒▒
10 | \e[38;5;27m▓▓▓▓ \e[38;5;81m▒▒▒▒ ▒▒▒▒ \e[38;5;27m ▓▓▓
11 | \e[38;5;27m▓▓▓▓ \e[38;5;81m▒▒▒▒▒▒▒▒ \e[38;5;27m ▓▓▓ ▓▓ ▓▓▓▓▓ \e[38;5;81m ▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒
12 | \e[38;5;27m▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓\e[38;5;81m▒▒▒▒▒▒ \e[38;5;27m▓▓ \e[38;5;27m ▓▓▓▓▓ ▓▓▓▓ ▓▓▓ \e[38;5;81m ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒
13 | \e[38;5;27m▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓\e[38;5;81m▒▒▒▒ \e[38;5;27m▓▓▓ \e[38;5;27m ▓▓▓▓▓▓ ▓▓▓▓ \e[38;5;81m ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒ ▒▒▒▒▒
14 | \e[38;5;81m▒▒▒▒ \e[38;5;81m▒▒▒▒ \e[38;5;27m▓▓▓▓ \e[38;5;27m ▓▓▓▓▓▓▓ ▓▓▓▓ \e[38;5;81m ▒▒▒▒ ▒▒▒▒ ▒▒▒▒
15 | \e[38;5;81m▒▒▒▒ \e[38;5;81m▒▒▒▒\e[38;5;27m▓▓▓▓ \e[38;5;27m ▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ \e[38;5;81m ▒▒▒ ▒▒▒ ▒▒▒▒
16 | \e[38;5;81m▒▒▒▒▒▒▒▒▒▒▒ \e[38;5;81m▒▒\e[38;5;27m▓▓▓▓ \e[38;5;27m ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ \e[38;5;81m ▒▒▒ ▒▒▒ ▒▒▒▒▒
17 | \e[38;5;81m ▒▒▒▒▒▒▒▒▒\e[38;5;27m \e[38;5;27m▓▓▓▓▓▓▓▓▓ \e[38;5;27m ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓▓ ▓▓▓▓ \e[38;5;81m ▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒
18 | \e[38;5;81m▒▒▒▒\e[38;5;27m▓▓ \e[38;5;27m▓▓▓▓▓▓▓▓▓▓▓ \e[38;5;27m ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓ \e[38;5;81m ▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒
19 | \e[38;5;81m▒▒▒▒\e[38;5;27m▓▓▓▓ \e[38;5;27m▓▓▓▓ \e[38;5;27m ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓ \e[38;5;81m ▒▒▒ ▒▒▒ ▒▒▒▒▒
20 | \e[38;5;81m▒▒▒▒ \e[38;5;27m▓▓▓▓ \e[38;5;27m▓▓▓▓ \e[38;5;27m ▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓ \e[38;5;81m ▒▒▒ ▒▒▒ ▒▒▒▒
21 | \e[38;5;81m▒▒▒ \e[38;5;27m▓▓▓▓\e[38;5;81m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[38;5;27m ▓▓▓▓ ▓▓▓▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓ \e[38;5;81m ▒▒▒▒ ▒▒▒▒ ▒▒▒▒
22 | \e[38;5;81m▒▒ \e[38;5;27m▓▓▓▓▓▓\e[38;5;81m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[38;5;27m ▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓ ▓▓▓▓ \e[38;5;81m ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒
23 | \e[38;5;27m▓▓▓▓▓▓▓▓ \e[38;5;81m▒▒▒▒ \e[38;5;27m ▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓ ▓▓▓▓ \e[38;5;81m ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒
24 | \e[38;5;27m▓▓▓▓ ▓▓▓▓ \e[38;5;81m▒▒▒▒ \e[38;5;27m ▓▓ ▓▓▓ ▓▓▓ ▓▓▓ ▓▓▓ \e[38;5;81m ▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒
25 | \e[38;5;27m▓▓▓▓ ▓▓▓▓ \e[38;5;81m▒▒▒▒
26 |
27 | \e[1;32mSystem Maintainer\e[0m: Kyler Clay
28 | \e[1;32mContact\e[0m: kylerclay@proton.me
29 | 470-403-8522
30 |
31 | Run '\e[1;35mnixos-help\e[0m' for the NixOS manual.
32 | Run '\e[1;35mHyprland\e[0m' to enter the desktop environment.
33 | '';
34 | };
35 | }
36 |
--------------------------------------------------------------------------------
/modules/sys/sysenv/nix.nix:
--------------------------------------------------------------------------------
1 | { lib, config, ... }: {
2 | options = {
3 | movOpts.sysEnv.nixSettings.enable =
4 | lib.mkEnableOption "enables my nixos settings";
5 | };
6 | config = lib.mkIf config.movOpts.sysEnv.nixSettings.enable {
7 | system.stateVersion = "24.05";
8 | nix = {
9 | settings = {
10 | auto-optimise-store = true;
11 | experimental-features = [ "nix-command" "flakes" ];
12 | substituters = [ "https://nix-gaming.cachix.org" ];
13 | };
14 | gc = {
15 | automatic = true;
16 | dates = "weekly";
17 | options = "--delete-older-than 7d";
18 | };
19 | };
20 | time.timeZone = "America/New_York";
21 | i18n.defaultLocale = "en_US.UTF-8";
22 | };
23 | }
24 |
--------------------------------------------------------------------------------
/modules/sys/sysenv/sddm.nix:
--------------------------------------------------------------------------------
1 | { pkgs, self, lib, config, ... }: {
2 | options = {
3 | movOpts.sysEnv.sddmConfig.enable =
4 | lib.mkEnableOption "enables custom sddm configuration";
5 | };
6 | config = lib.mkIf config.movOpts.sysEnv.sddmConfig.enable {
7 | environment.systemPackages = [
8 | (pkgs.catppuccin-sddm.override {
9 | flavor = "mocha";
10 | font = "JetBrains Mono Nerd Font";
11 | fontSize = "14";
12 | loginBackground = true;
13 | background = "${self}/assets/wallpapers/dark-waves.jpg";
14 | })
15 | ];
16 | services.displayManager.sddm = {
17 | enable = true;
18 | wayland.enable = true;
19 | theme = "catppuccin-mocha";
20 | package = pkgs.kdePackages.sddm;
21 | };
22 | };
23 | }
24 |
--------------------------------------------------------------------------------
/modules/sys/sysenv/stylix.nix:
--------------------------------------------------------------------------------
1 | { pkgs, self, lib, config, ... }:
2 |
3 | let
4 | scheme = "chalk";
5 | wallpaper = "${self}/assets/wallpapers/dark-waves.jpg";
6 | in {
7 | options = {
8 | movOpts.sysEnv.stylixConfig.enable =
9 | lib.mkEnableOption "enables custom stylix options";
10 | };
11 | config = lib.mkIf config.movOpts.sysEnv.stylixConfig.enable {
12 | stylix = {
13 | enable = true;
14 | base16Scheme = "${pkgs.base16-schemes}/share/themes/${scheme}.yaml";
15 | image = wallpaper;
16 | homeManagerIntegration = {
17 | autoImport = true;
18 | followSystem = true;
19 | };
20 | polarity = "dark";
21 | autoEnable = true;
22 | opacity.terminal = 0.8;
23 | targets = {
24 | console.enable = false;
25 | feh.enable = true;
26 | grub.enable = true;
27 | gtk.enable = true;
28 | nixos-icons.enable = true;
29 | };
30 | cursor = {
31 | package = pkgs.bibata-cursors;
32 | name = "Bibata-Modern-Ice";
33 | };
34 | fonts = {
35 | monospace = {
36 | package = pkgs.nerd-fonts.jetbrains-mono;
37 | name = "JetBrains Mono Nerd Font";
38 | };
39 | sansSerif = {
40 | package = pkgs.nerd-fonts.jetbrains-mono;
41 | name = "JetBrains Mono Nerd Font";
42 | };
43 | serif = {
44 | package = pkgs.nerd-fonts.jetbrains-mono;
45 | name = "JetBrains Mono Nerd Font";
46 | };
47 | sizes = {
48 | desktop = 10;
49 | applications = 14;
50 | terminal = 14;
51 | popups = 16;
52 | };
53 | };
54 | };
55 | };
56 | }
57 |
--------------------------------------------------------------------------------
/overlay/overlay.nix:
--------------------------------------------------------------------------------
1 | { host ? "oganesson", root, ... }: self: super:
2 |
3 | let
4 | extraFigletFonts = super.fetchFromGitHub {
5 | owner = "xero";
6 | repo = "figlet-fonts";
7 | rev = "master";
8 | sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY=";
9 | };
10 | in
11 | {
12 | toilet = super.toilet.overrideAttrs (old: {
13 | buildInputs = old.buildInputs or [ ] ++ [ extraFigletFonts ];
14 |
15 | installPhase = ''
16 | make install PREFIX=$out
17 | mkdir -p $out/share/figlet
18 | cp -r ${extraFigletFonts}/* $out/share/figlet
19 | '';
20 | });
21 | myPkgs = {
22 | # Packages that I've made
23 | slash = super.callPackage ./pkgs/slash/package.nix {};
24 | fzf-tab = super.callPackage ./pkgs/zsh-fzf-tab/package.nix {};
25 | };
26 | myScripts = {
27 | # Scripts written using pkgs.writeShellApplication
28 | icanhazip = super.callPackage ./scripts/commands/icanhazip.nix {};
29 | invoke = super.callPackage ./scripts/commands/invoke.nix { self = root; };
30 | git-compose = super.callPackage ./scripts/commands/git-compose.nix { self = root; };
31 | runbg = super.callPackage ./scripts/commands/runbg.nix {};
32 | splash = super.callPackage ./scripts/commands/splash.nix {};
33 | toolbelt = super.callPackage ./scripts/commands/toolbelt.nix {};
34 | viconf = super.callPackage ./scripts/commands/viconf.nix {};
35 | vipkg = super.callPackage ./scripts/commands/vipkg.nix {};
36 | fetchfromgh = super.callPackage ./scripts/nix/fetchfromgh.nix {};
37 | garbage-collect = super.callPackage ./scripts/nix/garbage-collect.nix {};
38 | check_updates = super.callPackage ./scripts/nix/check_updates.nix {};
39 | rebuild = super.callPackage ./scripts/nix/rebuild.nix { inherit host; self = root; };
40 | chpaper = super.callPackage ./scripts/wm-controls/chpaper.nix {};
41 | chscheme = super.callPackage ./scripts/wm-controls/chscheme.nix {};
42 | keyring = super.callPackage ./scripts/wm-controls/keyring.nix {};
43 | playshellsound = super.callPackage ./scripts/wm-controls/playshellsound.nix {};
44 | mkscreenshots = super.callPackage ./scripts/wm-controls/mkscreenshots.nix {};
45 | moveonscreen = super.callPackage ./scripts/wm-controls/moveonscreen.nix {};
46 | s_check = super.callPackage ./scripts/wm-controls/s_check.nix {};
47 | switchmon = super.callPackage ./scripts/wm-controls/switchmon.nix {};
48 | color-commit = super.callPackage ./scripts/misc/color-commit.nix {};
49 | mntstack = super.callPackage ./scripts/misc/mntstack.nix {};
50 | };
51 | }
52 |
--------------------------------------------------------------------------------
/overlay/pkgs/breezex-cursor/package.nix:
--------------------------------------------------------------------------------
1 | {
2 | stdenvNoCC,
3 | fetchFromGitHub,
4 | fetchzip,
5 | clickgen,
6 | lib
7 | }:
8 |
9 | stdenvNoCC.mkDerivation rec {
10 | pname = "breezex-cursor";
11 | version = "2.0.1";
12 |
13 | src = fetchFromGitHub {
14 | owner = "ful1e5";
15 | repo = "BreezeX_Cursor";
16 | rev = "refs/tags/v${version}";
17 | hash = "sha256-P9LgQb3msq6YydK5RIk5yykUd9SL2GQbC4aH4F8LUF0=";
18 | };
19 |
20 | nativeBuildInputs = [
21 | clickgen
22 | ];
23 |
24 | bitmaps = fetchzip {
25 | url = "https://github.com/ful1e5/BreezeX_Cursor/releases/download/v2.0.1/bitmaps.zip";
26 | hash = "sha256-JncEE+G4tPgcLgabe/dD7DOVMLOWCI7e+3VdmXuZSo8=";
27 | };
28 |
29 | buildPhase = ''
30 | runHook preBuild
31 | ctgen configs/x.build.toml -p x11 -d "$bitmaps/BreezeX-Dark" -n "BreezeX-Dark" -c "Extended KDE Dark (v2.0.1)"
32 | ctgen configs/x.build.toml -p x11 -d "$bitmaps/BreezeX-Black" -n "BreezeX-Black" -c "Extended KDE Black (v2.0.1)"
33 | ctgen configs/x.build.toml -p x11 -d "$bitmaps/BreezeX-Light" -n "BreezeX-Light" -c "Extended KDE Light (v2.0.1)"
34 | runHook postBuild
35 | '';
36 |
37 | installPhase = ''
38 | runHook preInstall
39 | install -dm 0755 $out/share/icons
40 | cp -rf themes/* $out/share/icons/
41 | runHook postInstall
42 | '';
43 |
44 | meta = {
45 | description = "Extended KDE cursor theme, inspired by KDE Breeze";
46 | homepage = "https://github.com/ful1e5/BreezeX_Cursor";
47 | license = lib.licenses.gpl3;
48 | maintainers = with lib.maintainers; [ pagedMov ];
49 | };
50 | }
51 |
--------------------------------------------------------------------------------
/overlay/pkgs/slash/package.nix:
--------------------------------------------------------------------------------
1 | { pkgs ? import {} }:
2 |
3 | pkgs.rustPlatform.buildRustPackage rec {
4 | pname = "slash";
5 | version = "v0.5.0_662cb43";
6 |
7 | src = pkgs.fetchFromGitHub {
8 | owner = "pagedMov";
9 | repo = "slash";
10 | rev = "662cb43e499d179579d99bf358073516605230ea";
11 | hash = "sha256-4DKAhRkd1XeDNyYH8yL1TnbTc6hZnp2+UV7UYeDRkpE=";
12 | };
13 |
14 |
15 | doCheck = false; # TODO: Find a way to make tests work
16 |
17 | cargoLock.lockFile = ./Cargo.lock;
18 |
19 | passthru = {
20 | shellPath = "/bin/slash";
21 | };
22 | }
23 |
--------------------------------------------------------------------------------
/overlay/pkgs/slash/update_slash.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | export GIT_SSH_COMMAND="ssh -F /dev/null"
4 |
5 | curl -O https://raw.githubusercontent.com/pagedMov/slash/refs/heads/master/Cargo.lock
6 | NEW_SRC=$(fetchfromgh pagedMov/slash)
7 |
8 | REV_SHORT=$(git ls-remote git@github.com:pagedMov/slash.git HEAD | awk '{print substr($1, 1, 7)}')
9 | CUR_TAG=$(git ls-remote --tags git@github.com:pagedMov/slash.git | tail -n 2 | head -n 1 | cut -f2 | cut -d'/' -f3)
10 | NEW_VER="${CUR_TAG}_$REV_SHORT"
11 |
12 | cat < {} }:
14 |
15 | pkgs.rustPlatform.buildRustPackage rec {
16 | pname = "slash";
17 | version = "$NEW_VER";
18 |
19 | $NEW_SRC
20 |
21 | doCheck = false; # TODO: Find a way to make tests work
22 |
23 | cargoLock.lockFile = ./Cargo.lock;
24 |
25 | passthru = {
26 | shellPath = "/bin/slash";
27 | };
28 | }
29 | EOF
30 |
--------------------------------------------------------------------------------
/overlay/pkgs/zsh-fzf-tab/package.nix:
--------------------------------------------------------------------------------
1 | { pkgs ? import { } }:
2 |
3 | pkgs.stdenv.mkDerivation {
4 | pname = "fzf-tab";
5 | version = "v1.1.2";
6 | src = pkgs.fetchFromGitHub {
7 | owner = "Aloxaf";
8 | repo = "fzf-tab";
9 | rev = "6aced3f35def61c5edf9d790e945e8bb4fe7b305";
10 | hash = "sha256-EWMeslDgs/DWVaDdI9oAS46hfZtp4LHTRY8TclKTNK8=";
11 | };
12 |
13 | installPhase = ''
14 | cp -r $src $out
15 | '';
16 | }
17 |
--------------------------------------------------------------------------------
/overlay/scripts/commands/git-compose.nix:
--------------------------------------------------------------------------------
1 | { pkgs, self }:
2 | pkgs.writeShellApplication {
3 | name = "git-compose";
4 | runtimeInputs = with pkgs; [
5 | git
6 | alsa-utils
7 | gawk
8 | myScripts.color-commit
9 | myScripts.s_check
10 | myScripts.playshellsound
11 | ];
12 | text = ''
13 | set -e
14 |
15 | toplevel=$(git rev-parse --show-toplevel 2>/dev/null)
16 |
17 | if [ -z "$toplevel" ]; then
18 | echo "You aren't in a git repository."
19 | exit 1
20 | fi
21 |
22 | (
23 | cd "$toplevel" || { echo "Failed to change to repo root"; exit 1; }
24 |
25 | unstaged=$(git status --porcelain | awk '{print $2}') || { echo "Failed to get git status"; exit 1; }
26 |
27 | if [ -z "$unstaged" ]; then
28 | echo "No unstaged files found."
29 | exit 0
30 | fi
31 |
32 | git reset > /dev/null 2>&1
33 |
34 | tmpfile=$(mktemp) || { echo "Failed to create a temporary file"; exit 1; }
35 | trap 'rm -f "$tmpfile"' EXIT
36 |
37 | filecontent=$(
38 | echo "# Compose your commits here"
39 | echo "# To cancel this operation, exit without saving (e.g., :q!)"
40 | echo "#"
41 | echo "# Format should be as follows:"
42 | echo "# "
43 | echo "# "
44 | echo "# "
45 | echo "# "
46 | echo "#"
47 | echo "# Groups are separated by empty lines"
48 | echo "# Commits will be created for each group of files"
49 | echo "# using the given commit message at the top of the group"
50 | echo
51 | echo "$unstaged"
52 | )
53 | echo "$filecontent" > "$tmpfile"
54 |
55 | nvim -c 'setfiletype gitcommit' "$tmpfile"
56 |
57 | if [ "$(cat "$tmpfile")" = "$filecontent" ]; then
58 | echo "No changes found; cancelling composition."
59 | exit 1
60 | fi
61 |
62 | collecting=false
63 | msg=""
64 | lines=()
65 |
66 | while IFS= read -r line; do
67 | [[ "$line" =~ ^#[[:space:]]* ]] && continue
68 | if [ -z "$line" ]; then
69 | if [ -n "$msg" ] && [ ''${#lines[@]} -gt 0 ]; then
70 | git add "''${lines[@]}"
71 | git commit -m "$msg" | color-commit
72 | fi
73 | collecting=false
74 | msg=""
75 | lines=()
76 | elif [ "$collecting" = "false" ]; then
77 | collecting=true
78 | msg="$line"
79 | else
80 | lines+=("./$line")
81 | fi
82 | done < "$tmpfile"
83 |
84 | # Final cleanup
85 | if [ -n "$msg" ] && [ ''${#lines[@]} -gt 0 ]; then
86 | git add "''${lines[@]}"
87 | git commit -m "$msg" | color-commit
88 | fi
89 | playshellsound ${self}/assets/sound/gitcommit.wav
90 | )
91 | '';
92 | }
93 |
--------------------------------------------------------------------------------
/overlay/scripts/commands/icanhazip.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 |
3 | pkgs.writeShellApplication {
4 | name = "icanhazip";
5 | runtimeInputs = with pkgs; [ iproute2 curl gawk coreutils ];
6 | text = ''
7 | if [ $# -eq 0 ]; then
8 | echo "Public IP: $(curl -s icanhazip.com -4)"
9 | ip route | awk '/default/ {print "Default Gateway: " $3} /src/ {print "Local IP: " $9}' | head -n 2
10 | else case $1 in
11 | "-p" ) echo "Public IP: $(curl -s icanhazip.com -4)";;
12 | "-d" ) ip route | awk '/default/ {print $3}';;
13 | "-l" ) ip route | awk '/src/ {print $9}';;
14 | * ) echo "Options: -p, -d or -l for public ip, default gateway, and local ip respectively"; echo "i.e. icanhazip -p"
15 | esac
16 | fi
17 | '';
18 | }
19 |
--------------------------------------------------------------------------------
/overlay/scripts/commands/invoke.nix:
--------------------------------------------------------------------------------
1 | { pkgs, self }:
2 | pkgs.writeShellApplication {
3 | name = "invoke";
4 | text = ''
5 | cmd="$1"
6 | shift
7 | playshellsound ${self}/assets/sound/invoke.wav
8 | nix run nixpkgs#"$cmd" -- "$@"
9 | '';
10 | }
11 |
--------------------------------------------------------------------------------
/overlay/scripts/commands/runbg.nix:
--------------------------------------------------------------------------------
1 | { pkgs, }:
2 | pkgs.writeShellApplication {
3 | name = "runbg";
4 | runtimeInputs = with pkgs; [
5 | coreutils # Provides `basename`, `which`, etc.
6 | bash # Provides the Bash shell
7 | util-linux # Provides `tty`
8 | ];
9 | text = ''
10 | #!/usr/bin/env bash
11 |
12 | [ $# -eq 0 ] && { # $# is number of args
13 | echo "$(basename "$0"): missing command" >&2
14 | exit 1
15 | }
16 | prog="$(which "$1")" # see below
17 | [ -z "$prog" ] && {
18 | echo "$(basename "$0"): unknown command: $1" >&2
19 | exit 1
20 | }
21 | shift # remove $1, now $prog, from args
22 | tty -s && exec /dev/null # if stdout is a terminal, redirect to null
24 | tty -s <&2 && exec 2>&1 # stderr to stdout (which might not be null)
25 | "$prog" "$@" & # $@ is all args
26 | '';
27 | }
28 |
--------------------------------------------------------------------------------
/overlay/scripts/commands/splash.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | pkgs.writeShellApplication {
3 | name = "splash";
4 | runtimeInputs = with pkgs; [ lolcat toilet coreutils ];
5 | text = ''
6 | echo "NixOS kernel ver. $(uname -a | awk '{print $3}') x86_64 GNU/Linux"
7 | date +"%A %B %-d %Y"
8 | echo
9 | echo " NixOS" | toilet -f 3d | lolcat -S 25
10 | echo
11 | '';
12 | }
13 |
--------------------------------------------------------------------------------
/overlay/scripts/commands/toolbelt.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | pkgs.writeShellApplication {
3 | name = "toolbelt";
4 | runtimeInputs = with pkgs; [
5 | cliphist
6 | fzf
7 | ripgrep
8 | gawk
9 | wl-clipboard
10 | hyprland
11 | alsa-utils
12 | btop
13 | coreutils
14 | ];
15 | text = ''
16 | cliphistory() {
17 | selection=$(cliphist list | fzf --preview="
18 | index=\$(echo {} | awk '{print \$1}'); \
19 | mime=\$(cliphist decode \$index | file -i -); \
20 | if echo \"\$mime\" | grep -q 'image'; then \
21 | echo \$(cliphist list | rg \"^\$index\" | cut -d ' ' -f 2- | fmt -w 30); \
22 | else \
23 | cliphist decode \"\$index\" | fmt -w 30; \
24 | fi" --prompt="> " | awk '{print $1}')
25 | [ -z "$selection" ] && return 1
26 | cliphist decode "$selection" | wl-copy
27 | }
28 | btop_cmd() {
29 |
30 | if [ "$(cat /etc/hostname)" = "oganesson" ]; then
31 | hyprctl dispatch resizeactive 20% 155% &&
32 | moveonscreen --center &&
33 | btop &&
34 | hyprctl dispatch resizeactive exact 40% 25% &&
35 | moveonscreen
36 | else
37 | hyprctl dispatch resizeactive exact 60% 68% &&
38 | moveonscreen --center &&
39 | btop &&
40 | hyprctl dispatch resizeactive exact 40% 25% &&
41 | moveonscreen
42 | fi
43 | }
44 |
45 | running=true
46 |
47 | declare -A commands=(
48 | ["Change Wallpaper"]="hyprctl dispatch resizeactive 20% 50% && moveonscreen --center && if chpaper; then running=false; else moveonscreen; fi"
49 | ["Change System Color Scheme"]="hyprctl dispatch resizeactive 10% 80% && moveonscreen --center && if chscheme; then running=false; else hyprctl dispatch resizeactive exact 40% 25% && moveonscreen; fi"
50 | ["Open System Monitor"]="btop_cmd"
51 | ["Open Volume Controls"]="hyprctl dispatch resizeactive 10% 80% && moveonscreen --center && alsamixer && hyprctl dispatch resizeactive exact 40% 25% && moveonscreen"
52 | ["Open Keyring"]="hyprctl dispatch resizeactive -300 0 && moveonscreen && if keyring; then running=false; else hyprctl dispatch resizeactive exact 40% 25% && moveonscreen; fi"
53 | ["View Clipboard History"]="hyprctl dispatch resizeactive 45% 120% && moveonscreen --center && if cliphistory;then running=false; else hyprctl dispatch resizeactive exact 40% 25% && moveonscreen; fi"
54 | )
55 |
56 | ordered_commands=(
57 | "Open Keyring"
58 | "Open System Monitor"
59 | "Open Volume Controls"
60 | "Change Wallpaper"
61 | "Change System Color Scheme"
62 | "View Clipboard History"
63 | )
64 |
65 | # Use fzf to select a command with preview
66 | while $running; do
67 | selected_command=$(printf "%s\n" "''${ordered_commands[@]}" | fzf --prompt="> ")
68 |
69 |
70 | #Execute the selected command if selection is not empty
71 | if [[ -n $selected_command ]]; then
72 | eval "''${commands[$selected_command]}"
73 | else
74 | running=false
75 | fi
76 | done
77 | '';
78 | }
79 |
--------------------------------------------------------------------------------
/overlay/scripts/commands/viconf.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | pkgs.writeShellApplication {
3 | name = "viconf";
4 | runtimeInputs = with pkgs; [ coreutils fd ripgrep fzf ];
5 | text = ''
6 | open_file() {
7 | file="$1"
8 | if grep -Pq "[^\x00-\x7F]" "$file"; then
9 | NIXD_FLAGS="--semantic-tokens=false" nvim "$file"
10 | else
11 | nvim "$file"
12 | fi
13 | }
14 |
15 | if [ $# -eq 1 ]; then
16 | results=$(find "$FLAKEPATH" -type f -name '*.nix' -path "*$1*")
17 | else
18 | results=$(find "$FLAKEPATH" -type f -name '*.nix')
19 | fi
20 |
21 | numresults=$(echo "$results" | grep -c '^')
22 |
23 | if [ "$numresults" -eq 0 ]; then
24 | echo "$1 not found in \$FLAKEPATH"
25 | exit 1
26 | elif [ "$numresults" -eq 1 ]; then
27 | file="$results"
28 | open_file "$file"
29 | exit 0
30 | fi
31 |
32 | # Handle multiple results
33 | results_prefix=$(echo "$results" | head -n 1 | cut -d'/' -f-4)
34 | results=$(echo "$results" | cut -d'/' -f5- | grep "$1")
35 | file=$(echo "$results" | fzf)
36 |
37 | if [ -n "$file" ]; then
38 | file="$results_prefix/$file"
39 | open_file "$file"
40 | else
41 | exit 1
42 | fi
43 | '';
44 | }
45 |
--------------------------------------------------------------------------------
/overlay/scripts/commands/vipkg.nix:
--------------------------------------------------------------------------------
1 | { pkgs ? import { } }:
2 | let
3 | nixpkgs_toplevel = pkgs.fetchFromGitHub {
4 | owner = "NixOS";
5 | repo = "nixpkgs";
6 | rev = "63dacb46bf939521bdc93981b4cbb7ecb58427a0";
7 | hash = "sha256-vboIEwIQojofItm2xGCdZCzW96U85l9nDW3ifMuAIdM=";
8 | };
9 | in pkgs.writeShellApplication {
10 | name = "vipkg";
11 | runtimeInputs = with pkgs; [ coreutils fd ripgrep fzf ];
12 | text = ''
13 | [ ! $# -eq 1 ] && echo "Usage: vipkg " && exit 1
14 |
15 | results=$(find "${nixpkgs_toplevel}/pkgs" -wholename "*$1*" -exec find {} \; | sort | uniq | rg '\.nix$')
16 | numresults=$(echo "$results" | wc -l)
17 |
18 | [ "$numresults" -eq 0 ] && echo "$1 not found in ${nixpkgs_toplevel}/pkgs" && exit 1
19 |
20 | if [ "$numresults" -gt 1 ]; then
21 | results=$(echo "$results" | awk -F"${nixpkgs_toplevel}/pkgs/" '{print $2}')
22 |
23 | file=$(echo "$results" | fzf)
24 |
25 | full_path="${nixpkgs_toplevel}/pkgs/$file"
26 |
27 | nvim "$full_path"
28 |
29 | else
30 | result_path=$(echo "$results" | awk -F"${nixpkgs_toplevel}/pkgs/" '{print $2}')
31 | full_path="${nixpkgs_toplevel}/pkgs/$result_path"
32 | nvim "$full_path"
33 | fi
34 | '';
35 | }
36 |
--------------------------------------------------------------------------------
/overlay/scripts/misc/color-commit.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 |
3 | pkgs.writeShellApplication {
4 | name = "color-commit";
5 | text = ''
6 | stdin=$(cat)
7 | [ -z "$stdin" ] && echo "Requires input via stdin" && exit 1
8 |
9 | teal="\\\033[38;2;180;249;248m"
10 | pink="\\\033[38;2;187;154;247m"
11 | reset="\\\033[0m"
12 | green_bg="\\\033[48;2;16;55;39m"
13 | red_bg="\\\033[48;2;62;21;31m"
14 | blue_bg="\\\033[48;2;33;73;129m"
15 |
16 | branch=$(git branch | grep "\*" | cut -d' ' -f2)
17 |
18 | output=$(echo "$stdin" | grep -A 1 -E "\[''${branch} ")
19 | [ -z "$output" ] && echo "This doesn't look like commit output: " && echo "$stdin" && exit 1
20 |
21 | echo "$output" | while IFS= read -r line; do
22 | [ "$line" = "--" ] && continue
23 |
24 | if [[ "$line" =~ ^\[$branch ]]; then
25 | line=$(echo "$line" | sed -E "s/\[([a-zA-Z0-9_-]+) ([a-zA-Z0-9]{7})\] (.*)/$(printf '%s' "$teal")\[\\1 \\2\]$(printf '%s' "$pink") \"\3\"$(printf '%s' "$reset")/")
26 | echo -e "$line"
27 | else
28 | line=$(echo "$line" | sed -E \
29 | -e "s/([0-9]+ file(s)? changed,?)/''${blue_bg}\1''${reset}/g" \
30 | -e "s/([0-9]+ insertion(s)?\(\+\),?)/''${green_bg}\1''${reset}/g" \
31 | -e "s/([0-9]+ deletion(s)?\(-\),?)/''${red_bg}\1''${reset}/g")
32 | echo -e "$line"
33 | echo
34 | fi
35 | done
36 | '';
37 | }
38 |
--------------------------------------------------------------------------------
/overlay/scripts/misc/mntstack.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 |
3 | pkgs.writeShellApplication {
4 | name = "mntstack";
5 | runtimeInputs = [];
6 | text = ''
7 | set -e
8 |
9 | # File to store the stack
10 | STACK_FILE="/tmp/mntstack.txt"
11 |
12 | validate_entry() {
13 | local entry_dev entry_mntpoint
14 | IFS=' ' read -r entry_dev entry_mntpoint <<< "$1"
15 | echo "$entry_dev" > /dev/null # Don't ask
16 | [ -n "$(findmnt -no SOURCE,TARGET "$entry_mntpoint" | cut -d' ' -f1-)" ]
17 | }
18 |
19 | # Function to push a path onto the stack
20 | push_path() {
21 | local device="$1"
22 | local mount_point="$2"
23 | local bind_flag="$3"
24 |
25 | if [ ! -f "$STACK_FILE" ]; then
26 | touch "$STACK_FILE"
27 | fi
28 |
29 | # Validate the paths
30 | if [[ ! -e "$device" || ! -d "$mount_point" ]]; then
31 | echo "Error: Invalid device or mount point."
32 | exit 1
33 | fi
34 |
35 | # Check if the device is a normal directory
36 | if [[ -d "$device" && "$bind_flag" != "--bind" ]]; then
37 | echo "Error: Cannot mount a normal directory without --bind flag."
38 | exit 1
39 | fi
40 |
41 | # Check for duplicate entries
42 | if grep -q "^$device $mount_point\$" "$STACK_FILE"; then
43 | echo "Error: Duplicate entry detected."
44 | exit 1
45 | fi
46 |
47 | # Mount the device to the mount point
48 | if [[ "$bind_flag" == "--bind" ]]; then
49 | sudo mount --bind "$device" "$mount_point"
50 | else
51 | sudo mount "$device" "$mount_point"
52 | fi
53 |
54 | # Append the path to the stack file
55 | echo "$device $mount_point" >> "$STACK_FILE"
56 | echo "Pushed and mounted: $device $mount_point"
57 | }
58 |
59 | # Function to pop a path from the stack
60 | pop_path() {
61 |
62 |
63 | if [[ ! -f "$STACK_FILE" || ''${#stack[@]} -eq 0 ]]; then
64 | echo "Warning: Stack is empty. Nothing to pop."
65 | exit 0
66 | fi
67 |
68 | mapfile -t stack < "$STACK_FILE"
69 |
70 | # Get the last entry
71 | last_path="''${stack[-1]}"
72 | if ! validate_entry "$last_path"; then
73 | echo -e "Warning: Invalid stack entry \"''${stack[-1]}\""
74 | sed -i '$d' "$STACK_FILE"
75 | return 0
76 | fi
77 |
78 | IFS=' ' read -r device mount_point <<< "$last_path"
79 |
80 | # Unmount the device
81 | sudo umount "$mount_point"
82 | sed -i '$d' "$STACK_FILE"
83 |
84 | echo "Popped and unmounted: $device"
85 | }
86 |
87 | # Function to list the current stack
88 | list_stack() {
89 | # Check if the stack file exists
90 | if [[ ! -f "$STACK_FILE" ]]; then
91 | echo "Stack is empty."
92 | exit 0
93 | fi
94 |
95 | # Read the stack file into an array
96 | mapfile -t stack < "$STACK_FILE"
97 |
98 | # Check if the stack is empty
99 | if [[ ''${#stack[@]} -eq 0 ]]; then
100 | echo "Stack is empty."
101 | exit 0
102 | fi
103 |
104 | # Display the stack elements
105 | for ((i=0; i<''${#stack[@]}; i++)); do
106 | IFS=' ' read -r device mount_point <<< "''${stack[i]}"
107 | echo "$((i+1)). $mount_point -> $device"
108 | done
109 | }
110 |
111 | pop_num=1
112 | all=false
113 | bind=false
114 | pos_args=()
115 |
116 | # Early check for help
117 | if [[ "$1" == "help" ]]; then
118 | echo "Usage: $0 {push|pop|list} [--bind] [ ]"
119 | echo "Flags:"
120 | echo "pop -c,--count: specify a number of mounts to pop"
121 | echo "pop -a,--all: pop the entire stack"
122 | echo "push -b,--bind: use --bind when mounting"
123 | exit 0
124 | fi
125 |
126 | # Process flags
127 | while [[ $# -gt 0 ]]; do
128 | case "$1" in
129 | -a|--all)
130 | all=true
131 | shift
132 | ;;
133 | -c|--count)
134 | if [[ "$2" =~ ^-?[0-9]+$ ]]; then
135 | pop_num="$2"
136 | shift 2
137 | else
138 | echo "Invalid count: please give an integer like -c 5"
139 | exit 1
140 | fi
141 | ;;
142 | -b|--bind)
143 | bind=true
144 | shift
145 | ;;
146 | *)
147 | pos_args+=("$1")
148 | shift
149 | ;;
150 | esac
151 | done
152 |
153 | # Main command processing
154 | case "''${pos_args[0]}" in
155 | push)
156 | if [[ ''${#pos_args[@]} -lt 3 || ''${#pos_args[@]} -gt 4 ]]; then
157 | echo "Usage: $0 push [--bind] "
158 | exit 1
159 | fi
160 | push_path "''${pos_args[1]}" "''${pos_args[2]}" "$([[ $bind == true ]] && echo "--bind")"
161 | ;;
162 | pop)
163 | if [[ ''${#pos_args[@]} -ne 1 ]]; then
164 | echo "Usage: $0 pop"
165 | exit 1
166 | fi
167 | if [[ ! -f "$STACK_FILE" ]]; then
168 | echo "Stack file does not exist. Nothing to pop."
169 | fi
170 | if [[ $all == false ]]; then
171 | mapfile -t stack < "$STACK_FILE"
172 | while [[ $pop_num -gt 0 ]]; do
173 | pop_path || break
174 | mapfile -t stack < "$STACK_FILE"
175 | ((pop_num--))
176 | done
177 | else
178 | mapfile -t stack < "$STACK_FILE"
179 | while [[ ''${#stack[@]} -gt 0 ]]; do
180 | if ! pop_path; then
181 | break
182 | fi
183 | mapfile -t stack < "$STACK_FILE"
184 | done
185 | fi
186 | ;;
187 | list)
188 | if [[ ''${#pos_args[@]} -ne 1 ]]; then
189 | echo "Usage: $0 list"
190 | exit 1
191 | fi
192 | list_stack
193 | ;;
194 | *)
195 | echo "Usage: $0 {push|pop|list} [--bind] [ ]"
196 | exit 1
197 | ;;
198 | esac
199 | '';
200 | }
201 |
--------------------------------------------------------------------------------
/overlay/scripts/nix/check_updates.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 |
3 | pkgs.stdenv.mkDerivation {
4 | pname = "pkg_maintenance_check";
5 | version = "1.0";
6 | src = ./.;
7 | buildPhase = ''
8 | mkdir -p $out/bin
9 | cat > $out/bin/checkupdates.py <<- EOF
10 | import json
11 | import subprocess
12 | import requests
13 | def get_packages_by_maintainer(target_maintainer):
14 | try:
15 | nix_env_command = [
16 | "nix-env", "--meta", "--json", "-qaP"
17 | ]
18 | jq_query = (
19 | 'to_entries[] | select(.value.meta.maintainers? // [] | '
20 | f'any(.github == "{target_maintainer}")) | .value'
21 | )
22 | result = subprocess.run(
23 | nix_env_command,
24 | capture_output=True,
25 | text=True,
26 | check=True
27 | )
28 | filtered_packages = subprocess.run(
29 | ["jq", "-r", "-c", jq_query],
30 | input=result.stdout,
31 | capture_output=True,
32 | text=True,
33 | check=True
34 | )
35 | return [json.loads(pkg) for pkg in filtered_packages.stdout.strip().split('\n') if pkg]
36 | except subprocess.CalledProcessError as e:
37 | print(f"Error running nix-env or jq: {e}")
38 | return []
39 |
40 | def check_github_releases(maintained_packages):
41 | github_api_template = "https://api.github.com/repos/{owner}/{repo}/releases/latest"
42 | updates = []
43 |
44 | for package in maintained_packages:
45 | pname = package.get("pname", "unknown")
46 | repo_url = package.get("meta", {}).get("homepage", "")
47 | current_version = package.get("version", "unknown")
48 |
49 | if "github.com" in repo_url:
50 | owner_repo = repo_url.split("github.com/")[1].rstrip('/')
51 | owner, repo = owner_repo.split('/')
52 | api_url = github_api_template.format(owner=owner, repo=repo)
53 |
54 | response = requests.get(api_url)
55 | if response.status_code == 200:
56 | latest_release = response.json()
57 | latest_version = latest_release.get("tag_name", "").lstrip('v')
58 | if latest_version and latest_version != current_version:
59 | updates.append({"pkg": pname, "version": latest_version})
60 | else:
61 | print(f"{pname} is up to date.\n")
62 | else:
63 | print(f"Failed to check version for {pname} (HTTP {response.status_code}).\n")
64 | else:
65 | print(f"Skipping non-GitHub repository for {pname}.\n")
66 | return updates
67 |
68 | def notify_updates(updates):
69 | if updates:
70 | update_string = '\n'.join([f" {update['pkg']} -> {update['version']}" for update in updates])
71 | subprocess.run([
72 | "notify-send",
73 | "--icon=/home/pagedmov/.sysflake/assets/images/nixos-icon-generic.png",
74 | "Maintenance Update",
75 | f"Package updates found:\n{update_string}"
76 | ])
77 | subprocess.run(["aplay", "-q", "-N", "/home/pagedmov/.sysflake/assets/sound/login.wav"])
78 |
79 | target_maintainer = "pagedMov"
80 | maintained_packages = get_packages_by_maintainer(target_maintainer)
81 |
82 | if maintained_packages:
83 | updates = check_github_releases(maintained_packages)
84 | notify_updates(updates)
85 | else:
86 | print(f"No packages maintained by {target_maintainer} were found.")
87 | EOF
88 | '';
89 | buildInputs = with pkgs; [ python3Packages.requests jq ];
90 | installPhase = ":";
91 | }
92 |
--------------------------------------------------------------------------------
/overlay/scripts/nix/fetchfromgh.nix:
--------------------------------------------------------------------------------
1 | { pkgs ? import { } }:
2 |
3 | pkgs.writeShellApplication {
4 | name = "fetchfromgh";
5 | runtimeInputs = [ pkgs.nix-prefetch-scripts ];
6 | text = ''
7 | if [ $# -ne 1 ] || ! echo "$1" | grep -qE "[A-Za-z0-9_-]+/[A-Za-z0-9_-]+"; then
8 | echo "Usage: fetchfromgh someuser/somerepo"
9 | echo " - i.e. fetchfromgh pagedMov/nixos-config"
10 | exit 1
11 | fi
12 |
13 | if ! curl -s -o /dev/null -w "%{http_code}" "https://github.com/$1" | grep -q "200"; then
14 | echo "Couldn't find that repository, curl returned 404."
15 | exit 1
16 | fi
17 |
18 | json=$(nix-prefetch-git --quiet "https://github.com/$1")
19 |
20 | url=$(echo "$json" | jq '.url' | tr -d '"')
21 | owner=$(echo "$url" | awk -F'/' '{print $(NF-1)}')
22 | repo=$(echo "$url" | awk -F'/' '{print $NF}')
23 | rev=$(echo "$json" | jq '.rev' | tr -d '"')
24 | hash=$(echo "$json" | jq '.hash' | tr -d '"')
25 |
26 | output="\
27 | src = pkgs.fetchFromGitHub {
28 | owner = \"$owner\";
29 | repo = \"$repo\";
30 | rev = \"$rev\";
31 | hash = \"$hash\";
32 | };
33 | "
34 | echo "$output"
35 | '';
36 | }
37 |
--------------------------------------------------------------------------------
/overlay/scripts/nix/garbage-collect.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | pkgs.writeShellApplication {
3 | name = "garbage-collect";
4 | runtimeInputs = with pkgs; [
5 | bash
6 | coreutils
7 | gnugrep
8 | bc
9 | alsa-utils
10 | findutils
11 | nix
12 | ];
13 | text = ''
14 | convert_size() {
15 | units=("MB" "GB" "TB" "PB")
16 | size=$1
17 | divisions=0
18 | while [ "$(echo "$size >= 1024.0" | bc -l)" -eq 1 ]; do
19 | size=$(echo "scale=2; $size / 1024" | bc -l)
20 | divisions=$((divisions + 1))
21 | done
22 | echo -e "\033[1;4;38;2;166;227;161m$size ''${units[divisions]}\033[0m"
23 | }
24 |
25 | echo "This will delete all unused paths in the nix store and delete any files in the gtrash folder."
26 | echo -e "\033[1;4;38;2;243;139;168mThis process is irreversible.\033[0m Are you sure?"
27 | select yn in "Yes" "No"; do
28 | case $yn in
29 | Yes ) echo "Sweeping system..."; scheck && runbg aplay "$HOME/assets/sound/sys/collectgarbage.wav"; break;;
30 | No ) echo "Canceling garbage collection."; return;;
31 | esac
32 | done
33 |
34 | output=$(nix-collect-garbage | tee /dev/tty)
35 | nix_freed=$(echo "$output" | grep -oP '\d+(\.\d+)? MiB freed' | cut -d' ' -f1)
36 |
37 | echo "Done, nix-collect-garbage freed up $(convert_size "$nix_freed")"
38 |
39 | # Get the size of the trash folder before deleting
40 | if [ "$(find ~/.local/share/Trash/files/ 2>/dev/null)" ]; then
41 | echo "Deleting trash files..."
42 | echo "Found $(find ~/.local/share/Trash/files/ | wc -l) files in trash can."
43 | rm_freed=$(du -sm ~/.local/share/Trash/files | awk '{print $1}')
44 | sudo /run/current-system/sw/bin/rm -rf ~/.local/share/Trash/files
45 | mkdir -p ~/.local/share/Trash/files
46 | echo "Done, deleting trash freed up $(convert_size "$rm_freed")"
47 | else
48 | rm_freed="0"
49 | fi
50 |
51 | total_freed=$(echo "$nix_freed + $rm_freed" | bc)
52 | total_converted=$(convert_size "$total_freed")
53 |
54 | echo "Optimizing nix store..."
55 | nix store optimise
56 |
57 | echo -e "System cleaning complete, freed \033[1;4;38;2;166;227;161m$total_converted\033[0m in total"
58 |
59 |
60 | scheck && runbg aplay "$HOME/assets/sound/sys/rm.wav"
61 | '';
62 | }
63 |
--------------------------------------------------------------------------------
/overlay/scripts/nix/rebuild.nix:
--------------------------------------------------------------------------------
1 | { host, self, pkgs, }:
2 | pkgs.writeShellApplication {
3 | name = "rebuild";
4 | runtimeInputs = [
5 | pkgs.myScripts.playshellsound
6 | ];
7 | text = ''
8 | checkbools() { [ "$all" = false ] && [ "$system" = false ] && [ "$home" = false ]; }
9 | checkflags() {
10 | str="$1"
11 | [ -z "$str" ] && return
12 | char="''${str: -1}"
13 | str="''${str::-1}"
14 | if [ "$char" = "-" ]; then return 0; fi
15 | case "$char" in
16 | "a") if checkbools; then all=true; else echo -e "$usage" && exit 1; fi ;;
17 | "s") if checkbools; then system=true; else echo -e "$usage" && exit 1; fi ;;
18 | "h") if checkbools; then home=true; else echo -e "$usage" && exit 1; fi ;;
19 | "n") if [ "$dry" = false ]; then dry=true; else echo -e "$usage" && exit 1; fi ;;
20 | *) echo -e "$usage" && exit 1 ;;
21 | esac
22 | checkflags "$str"
23 | }
24 |
25 | system=false
26 | home=false
27 | all=false
28 | dry=false
29 |
30 | hooray() { playshellsound "${self}/assets/sound/update.wav"; }
31 | damn() { playshellsound "${self}/assets/sound/error.wav"; }
32 |
33 | usage="\033[1;4;38;2;243;139;168mUsage\033[0m: rebuild -h for home config, rebuild -s for sys config, rebuild -a for both. Including 'n' with the flag does a dry run, i.e. rebuild -nh"
34 |
35 | { [ $# -eq 0 ] || [ $# -gt 1 ]; } && echo -e "$usage" && damn && exit 1
36 | if [[ "$1" =~ ^-[a-zA-Z]+$ ]]; then
37 | checkflags "$1"
38 | else
39 | echo -e "$usage" && damn && exit 1
40 | fi
41 |
42 | dry_flag=""
43 | [ "$dry" = true ] && dry_flag="-n"
44 |
45 | [ "$all" = true ] && if sudo sleep 0.1 && nh os switch $dry_flag -H "${host}" "$FLAKEPATH" && nh home switch $dry_flag -c "${host}Home" "$FLAKEPATH"; then hooray; else damn; fi
46 | [ "$system" = true ] && if nh os switch $dry_flag -H "${host}" "$FLAKEPATH"; then hooray; else damn; fi
47 | [ "$home" = true ] && if nh home switch $dry_flag -c "${host}Home" "$FLAKEPATH"; then hooray; else damn; fi
48 | '';
49 | }
50 |
--------------------------------------------------------------------------------
/overlay/scripts/wm-controls/chpaper.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | pkgs.writeShellApplication {
3 | name = "chpaper";
4 | runtimeInputs = with pkgs; [ chafa fzf ripgrep findutils coreutils ];
5 | text = ''
6 | paper="$\{self}/assets/wallpapers/$(find "$FLAKEPATH"/assets/wallpapers -exec basename {} \; | rg "\.\w+$" | fzf --preview "chafa -s 30x40 $FLAKEPATH/assets/wallpapers/{}")"
7 | [ "$paper" = "$\{self}/assets/wallpapers/" ] && echo "Cancelling wallpaper change" && exit 1
8 | echo "$paper" | xargs -I {} sed -i '/wallpaper =/s|"[^"]*"|"{}"|' "$FLAKEPATH"/modules/sys/environment/stylix.nix
9 | echo "Successfully changed wallpaper. Rebuild now?" && \
10 | select choice in "Yes" "No"; do
11 | case $choice in
12 | "Yes")
13 | rebuild;systemctl --user restart hyprpaper;exit 0;;
14 | "No")
15 | echo "Exiting...";exit 0;;
16 | esac
17 | done
18 | '';
19 | }
20 |
--------------------------------------------------------------------------------
/overlay/scripts/wm-controls/chscheme.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | pkgs.writeShellApplication {
3 | name = "chscheme";
4 | runtimeInputs = with pkgs; [ base16-schemes fzf coreutils ];
5 | text = ''
6 | selected_scheme=$(/usr/bin/env ls "$(nix-build '' -A base16-schemes)"/share/themes | \
7 | sed 's/\.yaml//g' | \
8 | fzf --preview "cat $(nix-build '' -A base16-schemes)/share/themes/{}.yaml | \
9 | while IFS=\": \" read -r key value; do \
10 | if [[ \$key =~ base0[0-9A-F] ]]; then \
11 | clean_value=\$(echo \"\$value\" | tr -d '\"'); \
12 | r=\$((16#\''${clean_value:0:2})); \
13 | g=\$((16#\''${clean_value:2:2})); \
14 | b=\$((16#\''${clean_value:4:2})); \
15 | printf \"\\033[48;2;%d;%d;%dm %-20s %s \\033[0m\\n\" \$r \$g \$b \$key \$clean_value; \
16 | fi; \
17 | done")
18 |
19 | if [[ -z "$selected_scheme" ]]; then
20 | echo "Aborting color scheme change."
21 | exit 1
22 | fi
23 |
24 | if ! echo "$selected_scheme" | xargs -I {} sed -i '/^[[:space:]]*scheme\s*=\s*"/s/"[^"]*"/"{}"/' "$FLAKEPATH"/modules/sys/environment/stylix.nix; then
25 | echo "Failed to change color scheme."
26 | exit 1
27 | fi
28 |
29 | echo "Successfully changed system color scheme. Rebuild now?"
30 | select choice in "Yes" "No"; do
31 | case $choice in
32 | "Yes")
33 | rebuild
34 | exit 0
35 | ;;
36 | "No")
37 | echo "Exiting..."
38 | exit 0
39 | ;;
40 | esac
41 | done
42 | '';
43 | }
44 |
--------------------------------------------------------------------------------
/overlay/scripts/wm-controls/keyring.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | pkgs.writeShellApplication {
3 | name = "keyring";
4 | runtimeInputs = with pkgs; [
5 | pass
6 | findutils
7 | ripgrep
8 | fzf
9 | wl-clipboard
10 | coreutils
11 | ];
12 | text = ''
13 | #!/run/current-system/sw/bin/bash
14 |
15 | # get passwords from password store, remove .password store/ prefix and .gpg suffix, exlude .gpg-id file, open results in fzf
16 | pass_string=$(find "$HOME"/.password-store -type f | sed 's|.*/.password-store/||; s|\.gpg$||' | sed 's|^\([^/]*\)|\x1b[32m\1\x1b[0m|' | rg -v "\.git|.gpg-id" | sort -r | fzf --border --border-label="$(whoami)'s keyring" --ansi --layout=reverse)
17 |
18 | # prevents cliphist from writing passwords to the clipboard history
19 | pkill -STOP wl-paste
20 |
21 | # copy password
22 | pass -c "$pass_string" > /dev/null
23 | echo "Password copied. Clearing clipboard in 10 seconds."
24 |
25 | # start a timer for 10 seconds, clear clipboard, resume cliphist tracking
26 | nohup bash <<-EOF > /dev/null &
27 | sleep 10
28 | wl-copy -c
29 | pkill -CONT wl-paste
30 | EOF
31 |
32 | sleep 0.5
33 | exit 0
34 | '';
35 | }
36 |
--------------------------------------------------------------------------------
/overlay/scripts/wm-controls/mkscreenshots.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 |
3 | pkgs.writeShellApplication {
4 | name = "mkscreenshots";
5 | runtimeInputs = with pkgs; [ jq neofetch kitty coreutils nemo grimblast git ];
6 | text = ''
7 | if [ -n "$(hyprctl clients -j | jq -r '.[] | select(.workspace.name == "4")')" ]; then
8 | echo "There are windows in workspace 4. This script uses workspace 4, so move those windows and run it again."
9 | exit 1
10 | fi
11 |
12 | prev_workspace=$(hyprctl activeworkspace -j | jq '.id')
13 |
14 | hyprctl dispatch focusmonitor 0
15 |
16 | screenshotfetch() {
17 | neofetch
18 |
19 | kitty @ scroll-window 20-
20 |
21 | exec sleep infinity
22 | }
23 |
24 | closewindows() {
25 | hyprctl clients -j | jq -r '.[] | select(.workspace.name == "4") | .address' | while read -r addr; do
26 | hyprctl dispatch closewindow address:"$addr"
27 | done
28 | }
29 |
30 | temp_script=$(mktemp)
31 | screenshotfetch_var=$(declare -f screenshotfetch)
32 | echo "$screenshotfetch_var" > "$temp_script"
33 | echo "screenshotfetch" >> "$temp_script"
34 | chmod +x "$temp_script"
35 |
36 | hyprctl dispatch workspace 4
37 | hyprctl dispatch exec "[float;size 40% 25%;move 1% 66%] kitty bash -c '$temp_script'"
38 | hyprctl dispatch exec "[float;size 40% 50%;move 57% 8%] nemo"
39 |
40 | sleep 1
41 | grimblast save output "$FLAKEPATH"/assets/screens/desktop-neofetch.png
42 |
43 | closewindows
44 |
45 | hyprctl dispatch exec 'kitty nvim'
46 | hyprctl dispatch exec 'kitty yazi'
47 | hyprctl dispatch exec 'kitty'
48 |
49 | sleep 1
50 | grimblast save output "$FLAKEPATH"/assets/screens/desktop-busy.png
51 |
52 | (
53 | cd "$FLAKEPATH"
54 | latest_hash=$(git rev-parse HEAD)
55 | sed -i "s|\(https://github.com/pagedMov/nixos-config/commit/\)[a-f0-9]\{40\}|\1$latest_hash|" "$FLAKEPATH"/README.md
56 | )
57 |
58 | closewindows
59 |
60 | hyprctl dispatch workspace "$prev_workspace"
61 | '';
62 | }
63 |
--------------------------------------------------------------------------------
/overlay/scripts/wm-controls/moveonscreen.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | pkgs.writeShellApplication {
3 | name = "moveonscreen";
4 | runtimeInputs = with pkgs; [ hyprland jq coreutils gawk ];
5 | text = ''
6 | center_window=false
7 | if [[ ! $# -eq 0 ]] && [[ $1 == "--center" ]]; then
8 | center_window=true
9 | fi
10 |
11 | cursor_pos=$(hyprctl cursorpos | sed 's/,//')
12 | cursor_x=$(echo "$cursor_pos" | awk '{print $1}')
13 | cursor_y=$(echo "$cursor_pos" | awk '{print $2}')
14 |
15 |
16 | window_info=$(hyprctl activewindow -j)
17 | window_width=$(echo "$window_info" | jq ".size[0]")
18 | window_height=$(echo "$window_info" | jq ".size[1]")
19 |
20 |
21 | if [ "$center_window" = true ]; then
22 | cursor_x=$((cursor_x - window_width / 2))
23 | cursor_y=$((cursor_y - window_height / 2))
24 |
25 | if (( cursor_x < 10 )); then
26 | cursor_x=10
27 | fi
28 | if (( cursor_y < 54 )); then
29 | cursor_y=54
30 | fi
31 | fi
32 |
33 | monitors=$(hyprctl monitors -j)
34 |
35 | monitor_x_min=0
36 | monitor_x_max=0
37 | monitor_y_min=0
38 | monitor_y_max=0
39 | focused_monitor=-1
40 |
41 | for ((i = 0; i < $(echo "$monitors" | jq 'length'); i++)); do
42 | mon_x=$(echo "$monitors" | jq ".[$i].x")
43 | mon_y=$(echo "$monitors" | jq ".[$i].y")
44 | mon_width=$(echo "$monitors" | jq ".[$i].width")
45 | mon_height=$(echo "$monitors" | jq ".[$i].height")
46 | is_focused=$(echo "$monitors" | jq ".[$i].focused")
47 |
48 | if [ "$is_focused" = true ]; then
49 | monitor_x_min=$((mon_x + 10))
50 | monitor_x_max=$((mon_x + mon_width - 10))
51 | monitor_y_min=$((mon_y + 10))
52 | monitor_y_max=$((mon_y + mon_height - 10))
53 | focused_monitor=$i
54 | break
55 | fi
56 | done
57 |
58 | if [ "$focused_monitor" -eq -1 ]; then
59 | exit 1
60 | fi
61 |
62 | if (( cursor_x < monitor_x_min )); then
63 | adjusted_x=$monitor_x_min
64 | elif (( cursor_x + window_width > monitor_x_max )); then
65 | adjusted_x=$((monitor_x_max - window_width))
66 | else
67 | adjusted_x=$cursor_x
68 | fi
69 |
70 | if (( cursor_y < monitor_y_min )); then
71 | adjusted_y=$monitor_y_min
72 | elif (( cursor_y + window_height > monitor_y_max )); then
73 | adjusted_y=$((monitor_y_max - window_height))
74 | else
75 | adjusted_y=$cursor_y
76 | fi
77 |
78 | hyprctl dispatch moveactive exact "$adjusted_x $adjusted_y" > /dev/null 2>&1
79 | '';
80 | }
81 |
--------------------------------------------------------------------------------
/overlay/scripts/wm-controls/playshellsound.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 |
3 | pkgs.writeShellApplication {
4 | name = "playshellsound";
5 | runtimeInputs = with pkgs; [
6 | alsa-utils
7 | pkgs.myScripts.runbg
8 | ];
9 | text = ''
10 | if [ $# -ne 1 ]; then
11 | echo "Usage: playshellsound "
12 | exit 1
13 | fi
14 | if scheck; then
15 | runbg aplay "$1"
16 | else
17 | exit 1
18 | fi
19 | '';
20 | }
21 |
--------------------------------------------------------------------------------
/overlay/scripts/wm-controls/s_check.nix:
--------------------------------------------------------------------------------
1 | { pkgs, }:
2 | pkgs.writeShellApplication {
3 | name = "scheck";
4 | text = ''
5 | [ "$SOUNDS_ENABLED" = "true" ]
6 | '';
7 | }
8 |
--------------------------------------------------------------------------------
/overlay/scripts/wm-controls/switchmon.nix:
--------------------------------------------------------------------------------
1 | { pkgs, }:
2 | pkgs.writeShellApplication {
3 | name = "switchmon";
4 | text = ''
5 | #!/bin/zsh
6 |
7 | hyprctl dispatch focusmonitor "$(hyprctl -j monitors | jq -r '.[] | select(.focused == false) | .name')"
8 | '';
9 | }
10 |
--------------------------------------------------------------------------------