├── .envrc
├── .github
├── CODEOWNERS
└── workflows
│ └── check.yml
├── .gitignore
├── LICENSE
├── README.md
├── flake.lock
├── flake.nix
├── flake
├── default.nix
├── pkgs
│ ├── default.nix
│ ├── lightctl
│ │ └── default.nix
│ ├── networkctl
│ │ └── default.nix
│ └── volumectl
│ │ └── default.nix
├── pre-commit-hooks.nix
└── shell.nix
├── home
├── default.nix
├── modules
│ └── theme
│ │ └── default.nix
└── raexera
│ ├── config
│ ├── cursor.nix
│ ├── default.nix
│ ├── fontconfig.nix
│ ├── gtk.nix
│ ├── qt.nix
│ └── xdg.nix
│ ├── default.nix
│ ├── editors
│ └── vscode
│ │ ├── default.nix
│ │ ├── extensions.nix
│ │ ├── keybindings.nix
│ │ └── usersettings.nix
│ ├── home.nix
│ ├── packages
│ ├── default.nix
│ └── dev
│ │ ├── bun.nix
│ │ ├── default.nix
│ │ ├── go.nix
│ │ ├── python.nix
│ │ └── rust.nix
│ ├── programs
│ ├── default.nix
│ ├── fastfetch.nix
│ ├── firefox.nix
│ ├── gh.nix
│ ├── git.nix
│ ├── gpg.nix
│ ├── kitty.nix
│ ├── lazygit.nix
│ ├── mpv.nix
│ ├── obs-studio.nix
│ ├── ssh.nix
│ └── zathura.nix
│ ├── services
│ ├── blueman-applet.nix
│ ├── default.nix
│ ├── gnome-keyring.nix
│ ├── network-manager-applet.nix
│ └── udiskie.nix
│ ├── shell
│ └── zsh
│ │ ├── default.nix
│ │ └── programs
│ │ ├── bat.nix
│ │ ├── dircolors.nix
│ │ ├── direnv.nix
│ │ ├── eza.nix
│ │ ├── fzf.nix
│ │ ├── starship.nix
│ │ ├── yazi.nix
│ │ └── zoxide.nix
│ ├── wallpapers
│ ├── chifuri-wallpaper.jpg
│ └── nix-wallpaper.png
│ └── window-managers
│ └── hyprland
│ ├── config
│ ├── binds.nix
│ ├── rules.nix
│ └── settings.nix
│ ├── default.nix
│ ├── programs
│ ├── anyrun.nix
│ └── waybar.nix
│ └── services
│ ├── cliphist.nix
│ ├── dunst.nix
│ ├── hypridle.nix
│ ├── hyprlock.nix
│ ├── hyprpaper.nix
│ └── polkit-agent.nix
└── hosts
├── config
├── fonts
│ ├── default.nix
│ ├── fontconfig.nix
│ ├── fontdir.nix
│ └── packages.nix
├── hardware
│ ├── acpi_call
│ │ └── default.nix
│ ├── bluetooth
│ │ └── default.nix
│ ├── cpu
│ │ └── intel
│ │ │ └── default.nix
│ ├── gpu
│ │ ├── intel
│ │ │ └── default.nix
│ │ └── nvidia
│ │ │ └── default.nix
│ └── ssd
│ │ └── default.nix
├── nix
│ ├── cachix.nix
│ ├── default.nix
│ ├── nix.nix
│ └── nixpkgs.nix
├── programs
│ ├── default.nix
│ ├── neovim.nix
│ ├── nh.nix
│ └── xwayland.nix
├── security
│ └── default.nix
├── services
│ ├── default.nix
│ ├── networking.nix
│ └── openssh.nix
├── shell
│ └── default.nix
├── system
│ ├── boot.nix
│ ├── console.nix
│ ├── default.nix
│ ├── environment.nix
│ ├── i18n.nix
│ ├── locale.nix
│ ├── release.nix
│ ├── users.nix
│ └── zram.nix
└── window-managers
│ └── hyprland
│ └── default.nix
├── default.nix
├── minimal
├── default.nix
├── disk-configuration.nix
└── hardware-configuration.nix
└── yuki
├── default.nix
├── disk-configuration.nix
├── hardware-configuration.nix
├── power-management.nix
├── programs
├── dconf.nix
├── gnupg.nix
└── thunar.nix
├── services
├── blueman.nix
├── dbus.nix
├── gnome-keyring.nix
├── greetd.nix
├── gvfs.nix
├── mariadb.nix
├── pipewire.nix
└── postgresql.nix
└── virtualisation
├── containers.nix
├── docker.nix
└── podman.nix
/.envrc:
--------------------------------------------------------------------------------
1 | use flake
2 |
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | * @raexera
--------------------------------------------------------------------------------
/.github/workflows/check.yml:
--------------------------------------------------------------------------------
1 | name: "flake check"
2 | on:
3 | push:
4 | pull_request:
5 | workflow_dispatch:
6 | jobs:
7 | tests:
8 | runs-on: ubuntu-latest
9 | steps:
10 | - uses: actions/checkout@v4
11 | - uses: cachix/install-nix-action@v30
12 | with:
13 | install_url: https://nixos.org/nix/install
14 | extra_nix_config: |
15 | experimental-features = nix-command flakes
16 | - run: nix flake check --show-trace
17 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .direnv
2 | .vscode
3 | .pre-commit-config.yaml
4 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022-2024 raexera (raexera@gmail.com)
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://builtwithnix.org)
2 |
3 |
Yuki
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | > [!NOTE]
25 | >
26 | > **System Information:**
27 | >
28 | > - **OS:** NixOS
29 | > - **Window Manager:** Hyprland
30 | > - **Shell:** ZSH
31 | > - **Terminal:** Kitty
32 | > - **Editor:** Visual Studio Code
33 |
34 | ## About
35 |
36 | Yuki is a set of configurations crafted for NixOS and Home Manager, utilizing the power of [flakes](https://nixos.wiki/wiki/Flakes) and [flake-parts](https://github.com/hercules-ci/flake-parts) for optimal organization and efficiency.
37 |
38 | ## Credits
39 |
40 | Special thanks to the following individuals for their insights, feedback, and inspiration in this endeavor to develop this configuration:
41 |
42 |
43 | Fufexan •
44 | Moni-dz •
45 | NotAShelf •
46 | Sioodmy
47 |
48 |
--------------------------------------------------------------------------------
/flake.lock:
--------------------------------------------------------------------------------
1 | {
2 | "nodes": {
3 | "anyrun": {
4 | "inputs": {
5 | "flake-parts": "flake-parts",
6 | "nixpkgs": [
7 | "nixpkgs"
8 | ],
9 | "systems": "systems"
10 | },
11 | "locked": {
12 | "lastModified": 1731092955,
13 | "narHash": "sha256-L1hLXf4IDZ0KoXbFiSNNZJ7IrReEr/J+CLt6Rl4Ea3M=",
14 | "owner": "anyrun-org",
15 | "repo": "anyrun",
16 | "rev": "d2017f224b2bfd7e33573c7070e7c3e2960c7dcc",
17 | "type": "github"
18 | },
19 | "original": {
20 | "owner": "anyrun-org",
21 | "repo": "anyrun",
22 | "type": "github"
23 | }
24 | },
25 | "disko": {
26 | "inputs": {
27 | "nixpkgs": [
28 | "nixpkgs"
29 | ]
30 | },
31 | "locked": {
32 | "lastModified": 1733168902,
33 | "narHash": "sha256-8dupm9GfK+BowGdQd7EHK5V61nneLfr9xR6sc5vtDi0=",
34 | "owner": "nix-community",
35 | "repo": "disko",
36 | "rev": "785c1e02c7e465375df971949b8dcbde9ec362e5",
37 | "type": "github"
38 | },
39 | "original": {
40 | "owner": "nix-community",
41 | "repo": "disko",
42 | "type": "github"
43 | }
44 | },
45 | "flake-compat": {
46 | "flake": false,
47 | "locked": {
48 | "lastModified": 1696426674,
49 | "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
50 | "owner": "edolstra",
51 | "repo": "flake-compat",
52 | "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
53 | "type": "github"
54 | },
55 | "original": {
56 | "owner": "edolstra",
57 | "repo": "flake-compat",
58 | "type": "github"
59 | }
60 | },
61 | "flake-compat_2": {
62 | "flake": false,
63 | "locked": {
64 | "lastModified": 1696426674,
65 | "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
66 | "owner": "edolstra",
67 | "repo": "flake-compat",
68 | "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
69 | "type": "github"
70 | },
71 | "original": {
72 | "owner": "edolstra",
73 | "repo": "flake-compat",
74 | "type": "github"
75 | }
76 | },
77 | "flake-parts": {
78 | "inputs": {
79 | "nixpkgs-lib": [
80 | "anyrun",
81 | "nixpkgs"
82 | ]
83 | },
84 | "locked": {
85 | "lastModified": 1727826117,
86 | "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
87 | "owner": "hercules-ci",
88 | "repo": "flake-parts",
89 | "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
90 | "type": "github"
91 | },
92 | "original": {
93 | "owner": "hercules-ci",
94 | "repo": "flake-parts",
95 | "type": "github"
96 | }
97 | },
98 | "flake-parts_2": {
99 | "inputs": {
100 | "nixpkgs-lib": [
101 | "nixpkgs"
102 | ]
103 | },
104 | "locked": {
105 | "lastModified": 1730504689,
106 | "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
107 | "owner": "hercules-ci",
108 | "repo": "flake-parts",
109 | "rev": "506278e768c2a08bec68eb62932193e341f55c90",
110 | "type": "github"
111 | },
112 | "original": {
113 | "owner": "hercules-ci",
114 | "repo": "flake-parts",
115 | "type": "github"
116 | }
117 | },
118 | "flake-utils": {
119 | "inputs": {
120 | "systems": "systems_2"
121 | },
122 | "locked": {
123 | "lastModified": 1710146030,
124 | "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
125 | "owner": "numtide",
126 | "repo": "flake-utils",
127 | "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
128 | "type": "github"
129 | },
130 | "original": {
131 | "owner": "numtide",
132 | "repo": "flake-utils",
133 | "type": "github"
134 | }
135 | },
136 | "gitignore": {
137 | "inputs": {
138 | "nixpkgs": [
139 | "pre-commit-hooks",
140 | "nixpkgs"
141 | ]
142 | },
143 | "locked": {
144 | "lastModified": 1709087332,
145 | "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
146 | "owner": "hercules-ci",
147 | "repo": "gitignore.nix",
148 | "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
149 | "type": "github"
150 | },
151 | "original": {
152 | "owner": "hercules-ci",
153 | "repo": "gitignore.nix",
154 | "type": "github"
155 | }
156 | },
157 | "home-manager": {
158 | "inputs": {
159 | "nixpkgs": [
160 | "nixpkgs"
161 | ]
162 | },
163 | "locked": {
164 | "lastModified": 1733175814,
165 | "narHash": "sha256-zFOtOaqjzZfPMsm1mwu98syv3y+jziAq5DfWygaMtLg=",
166 | "owner": "nix-community",
167 | "repo": "home-manager",
168 | "rev": "bf23fe41082aa0289c209169302afd3397092f22",
169 | "type": "github"
170 | },
171 | "original": {
172 | "owner": "nix-community",
173 | "repo": "home-manager",
174 | "type": "github"
175 | }
176 | },
177 | "nix-vscode-extensions": {
178 | "inputs": {
179 | "flake-compat": "flake-compat",
180 | "flake-utils": "flake-utils",
181 | "nixpkgs": [
182 | "nixpkgs"
183 | ]
184 | },
185 | "locked": {
186 | "lastModified": 1733190961,
187 | "narHash": "sha256-inA9qApKHKzKgJGUQLZYTEW0YVeQo7Twl6x4SejUAGE=",
188 | "owner": "nix-community",
189 | "repo": "nix-vscode-extensions",
190 | "rev": "7564b2b1f1835c8b7349e797a42fb6dddbf61b26",
191 | "type": "github"
192 | },
193 | "original": {
194 | "owner": "nix-community",
195 | "repo": "nix-vscode-extensions",
196 | "type": "github"
197 | }
198 | },
199 | "nixpkgs": {
200 | "locked": {
201 | "lastModified": 1733015953,
202 | "narHash": "sha256-t4BBVpwG9B4hLgc6GUBuj3cjU7lP/PJfpTHuSqE+crk=",
203 | "owner": "NixOS",
204 | "repo": "nixpkgs",
205 | "rev": "ac35b104800bff9028425fec3b6e8a41de2bbfff",
206 | "type": "github"
207 | },
208 | "original": {
209 | "owner": "NixOS",
210 | "ref": "nixos-unstable",
211 | "repo": "nixpkgs",
212 | "type": "github"
213 | }
214 | },
215 | "nixpkgs-stable": {
216 | "locked": {
217 | "lastModified": 1730741070,
218 | "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
219 | "owner": "NixOS",
220 | "repo": "nixpkgs",
221 | "rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
222 | "type": "github"
223 | },
224 | "original": {
225 | "owner": "NixOS",
226 | "ref": "nixos-24.05",
227 | "repo": "nixpkgs",
228 | "type": "github"
229 | }
230 | },
231 | "pre-commit-hooks": {
232 | "inputs": {
233 | "flake-compat": "flake-compat_2",
234 | "gitignore": "gitignore",
235 | "nixpkgs": [
236 | "nixpkgs"
237 | ],
238 | "nixpkgs-stable": "nixpkgs-stable"
239 | },
240 | "locked": {
241 | "lastModified": 1732021966,
242 | "narHash": "sha256-mnTbjpdqF0luOkou8ZFi2asa1N3AA2CchR/RqCNmsGE=",
243 | "owner": "cachix",
244 | "repo": "git-hooks.nix",
245 | "rev": "3308484d1a443fc5bc92012435d79e80458fe43c",
246 | "type": "github"
247 | },
248 | "original": {
249 | "owner": "cachix",
250 | "repo": "git-hooks.nix",
251 | "type": "github"
252 | }
253 | },
254 | "root": {
255 | "inputs": {
256 | "anyrun": "anyrun",
257 | "disko": "disko",
258 | "flake-parts": "flake-parts_2",
259 | "home-manager": "home-manager",
260 | "nix-vscode-extensions": "nix-vscode-extensions",
261 | "nixpkgs": "nixpkgs",
262 | "pre-commit-hooks": "pre-commit-hooks",
263 | "rust-overlay": "rust-overlay",
264 | "systems": "systems_3"
265 | }
266 | },
267 | "rust-overlay": {
268 | "inputs": {
269 | "nixpkgs": [
270 | "nixpkgs"
271 | ]
272 | },
273 | "locked": {
274 | "lastModified": 1733193245,
275 | "narHash": "sha256-nwvKoPi3S6XyliqBRuC+01QFF0k94ZOvnoZtbGi/ObM=",
276 | "owner": "oxalica",
277 | "repo": "rust-overlay",
278 | "rev": "3458f7f946ba61d1a1069aedcc17d7b7616f23cd",
279 | "type": "github"
280 | },
281 | "original": {
282 | "owner": "oxalica",
283 | "repo": "rust-overlay",
284 | "type": "github"
285 | }
286 | },
287 | "systems": {
288 | "locked": {
289 | "lastModified": 1689347949,
290 | "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
291 | "owner": "nix-systems",
292 | "repo": "default-linux",
293 | "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
294 | "type": "github"
295 | },
296 | "original": {
297 | "owner": "nix-systems",
298 | "repo": "default-linux",
299 | "type": "github"
300 | }
301 | },
302 | "systems_2": {
303 | "locked": {
304 | "lastModified": 1681028828,
305 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
306 | "owner": "nix-systems",
307 | "repo": "default",
308 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
309 | "type": "github"
310 | },
311 | "original": {
312 | "owner": "nix-systems",
313 | "repo": "default",
314 | "type": "github"
315 | }
316 | },
317 | "systems_3": {
318 | "locked": {
319 | "lastModified": 1689347949,
320 | "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
321 | "owner": "nix-systems",
322 | "repo": "default-linux",
323 | "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
324 | "type": "github"
325 | },
326 | "original": {
327 | "owner": "nix-systems",
328 | "repo": "default-linux",
329 | "type": "github"
330 | }
331 | }
332 | },
333 | "root": "root",
334 | "version": 7
335 | }
336 |
--------------------------------------------------------------------------------
/flake.nix:
--------------------------------------------------------------------------------
1 | {
2 | # https://github.com/raexera/yuki
3 | description = "Yuki: NixOS and Home Manager Flake";
4 |
5 | outputs = inputs:
6 | inputs.flake-parts.lib.mkFlake {inherit inputs;} {
7 | systems = import inputs.systems;
8 |
9 | imports = [
10 | ./flake
11 | ./hosts
12 | ];
13 | };
14 |
15 | inputs = {
16 | systems.url = "github:nix-systems/default-linux";
17 | nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
18 |
19 | disko = {
20 | url = "github:nix-community/disko";
21 | inputs.nixpkgs.follows = "nixpkgs";
22 | };
23 |
24 | flake-parts = {
25 | url = "github:hercules-ci/flake-parts";
26 | inputs.nixpkgs-lib.follows = "nixpkgs";
27 | };
28 |
29 | home-manager = {
30 | url = "github:nix-community/home-manager";
31 | inputs.nixpkgs.follows = "nixpkgs";
32 | };
33 |
34 | nix-vscode-extensions = {
35 | url = "github:nix-community/nix-vscode-extensions";
36 | inputs.nixpkgs.follows = "nixpkgs";
37 | };
38 |
39 | pre-commit-hooks = {
40 | url = "github:cachix/git-hooks.nix";
41 | inputs.nixpkgs.follows = "nixpkgs";
42 | };
43 |
44 | rust-overlay = {
45 | url = "github:oxalica/rust-overlay";
46 | inputs.nixpkgs.follows = "nixpkgs";
47 | };
48 |
49 | # miscellaneous
50 | anyrun = {
51 | url = "github:anyrun-org/anyrun";
52 | inputs.nixpkgs.follows = "nixpkgs";
53 | };
54 | };
55 | }
56 |
--------------------------------------------------------------------------------
/flake/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | imports = [
3 | ./pkgs
4 |
5 | ./pre-commit-hooks.nix
6 | ./shell.nix
7 | ];
8 | }
9 |
--------------------------------------------------------------------------------
/flake/pkgs/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | perSystem = {pkgs, ...}: {
3 | packages = {
4 | lightctl = pkgs.callPackage ./lightctl {};
5 | networkctl = pkgs.callPackage ./networkctl {};
6 | volumectl = pkgs.callPackage ./volumectl {};
7 | };
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/flake/pkgs/lightctl/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | brightnessctl,
3 | libnotify,
4 | writeShellScriptBin,
5 | }:
6 | writeShellScriptBin "lightctl" ''
7 | case "$1" in
8 | up)
9 | ${brightnessctl}/bin/brightnessctl -q s "$2"%+
10 | ;;
11 | down)
12 | ${brightnessctl}/bin/brightnessctl -q s "$2"%-
13 | ;;
14 | esac
15 |
16 | brightness_percentage=$((($(${brightnessctl}/bin/brightnessctl g) * 100) / $(${brightnessctl}/bin/brightnessctl m)))
17 | ${libnotify}/bin/notify-send -u normal -a "LIGHTCTL" "Brightness: $brightness_percentage%" \
18 | -h string:x-canonical-private-synchronous:lightctl \
19 | -h int:value:"$brightness_percentage" \
20 | -i display-brightness-symbolic
21 | ''
22 |
--------------------------------------------------------------------------------
/flake/pkgs/networkctl/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | libnotify,
3 | util-linux,
4 | writeShellScriptBin,
5 | }:
6 | writeShellScriptBin "networkctl" ''
7 | toggle_network() {
8 | wifi_state="$(${util-linux}/bin/rfkill list wifi | grep -i 'Soft blocked: yes' > /dev/null && echo "off" || echo "on")"
9 | bluetooth_state="$(${util-linux}/bin/rfkill list bluetooth | grep -i 'Soft blocked: yes' > /dev/null && echo "off" || echo "on")"
10 |
11 | if [ "$wifi_state" = "on" ] || [ "$bluetooth_state" = "on" ]; then
12 | ${util-linux}/bin/rfkill block wifi
13 | ${util-linux}/bin/rfkill block bluetooth
14 | ${libnotify}/bin/notify-send -u normal -a "NETWORKCTL" "Airplane Mode Enabled" "Wi-Fi and Bluetooth disabled" -i airplane-mode-symbolic
15 | else
16 | ${util-linux}/bin/rfkill unblock wifi
17 | ${util-linux}/bin/rfkill unblock bluetooth
18 | ${libnotify}/bin/notify-send -u normal -a "NETWORKCTL" "Airplane Mode Disabled" "Wi-Fi and Bluetooth enabled" -i airplane-mode-disabled-symbolic
19 | fi
20 | }
21 |
22 | case "$1" in
23 | toggle-network)
24 | toggle_network
25 | ;;
26 | esac
27 | ''
28 |
--------------------------------------------------------------------------------
/flake/pkgs/volumectl/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | libnotify,
3 | libcanberra-gtk3,
4 | wireplumber,
5 | writeShellScriptBin,
6 | }:
7 | writeShellScriptBin "volumectl" ''
8 | case "$1" in
9 | up)
10 | ${wireplumber}/bin/wpctl set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ "$2%+"
11 | ;;
12 | down)
13 | ${wireplumber}/bin/wpctl set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ "$2%-"
14 | ;;
15 | toggle-mute)
16 | ${wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
17 | ;;
18 | toggle-mic-mute)
19 | ${wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
20 | ;;
21 | esac
22 |
23 | volume_percentage="$(${wireplumber}/bin/wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print int($2 * 100)}')"
24 | isMuted="$(${wireplumber}/bin/wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -o 'MUTED')"
25 | micMuted="$(${wireplumber}/bin/wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | grep -o 'MUTED')"
26 |
27 | if [ "$1" = "toggle-mic-mute" ]; then
28 | if [ -n "$micMuted" ]; then
29 | ${libnotify}/bin/notify-send -u normal -a "VOLUMECTL" "Microphone Muted" -i microphone-sensitivity-muted-symbolic
30 | else
31 | ${libnotify}/bin/notify-send -u normal -a "VOLUMECTL" "Microphone Unmuted" -i microphone-sensitivity-high-symbolic
32 | fi
33 | else
34 | if [ -n "$isMuted" ]; then
35 | ${libnotify}/bin/notify-send -u normal -a "VOLUMECTL" "Volume Muted" -i audio-volume-muted-symbolic
36 | else
37 | ${libnotify}/bin/notify-send -u normal -a "VOLUMECTL" "Volume: $volume_percentage%" \
38 | -h string:x-canonical-private-synchronous:volumectl \
39 | -h int:value:"$volume_percentage" \
40 | -i audio-volume-high-symbolic
41 |
42 | ${libcanberra-gtk3}/bin/canberra-gtk-play -i audio-volume-change -d "volumectl"
43 | fi
44 | fi
45 | ''
46 |
--------------------------------------------------------------------------------
/flake/pre-commit-hooks.nix:
--------------------------------------------------------------------------------
1 | {inputs, ...}: {
2 | imports = [inputs.pre-commit-hooks.flakeModule];
3 |
4 | perSystem.pre-commit = {
5 | check.enable = true;
6 |
7 | settings = {
8 | excludes = ["flake.lock"];
9 | hooks = {
10 | alejandra.enable = true;
11 | deadnix.enable = true;
12 | nil.enable = true;
13 | statix.enable = true;
14 | };
15 | };
16 | };
17 | }
18 |
--------------------------------------------------------------------------------
/flake/shell.nix:
--------------------------------------------------------------------------------
1 | {
2 | perSystem = {
3 | config,
4 | pkgs,
5 | ...
6 | }: {
7 | devShells.default = pkgs.mkShell {
8 | name = "yuki";
9 |
10 | shellHook = ''
11 | ${config.pre-commit.installationScript}
12 | '';
13 |
14 | DIRENV_LOG_FORMAT = "";
15 |
16 | packages = with pkgs; [
17 | alejandra
18 | deadnix
19 | git
20 | nil
21 | statix
22 | ];
23 | };
24 |
25 | formatter = pkgs.alejandra;
26 | };
27 | }
28 |
--------------------------------------------------------------------------------
/home/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | inputs,
3 | self,
4 | ...
5 | }: let
6 | specialArgs = {inherit inputs self;};
7 |
8 | sharedModules = [
9 | ./modules/theme
10 | ];
11 | in {
12 | home-manager = {
13 | # Extra `specialArgs` passed to home-manager
14 | extraSpecialArgs = specialArgs;
15 |
16 | # Using the system configuration's `pkgs` argument in home-manager
17 | useGlobalPkgs = true;
18 |
19 | # Installation of user packages through the {option} `users.users..packages` option
20 | useUserPackages = true;
21 |
22 | # Verbose output on activation
23 | verbose = true;
24 |
25 | # Per-user home-manager configuration
26 | users = {
27 | raexera = import ./raexera;
28 | };
29 |
30 | # Extra modules added to all users
31 | sharedModules =
32 | [
33 | {
34 | # Let home-manager install and manage itself
35 | programs.home-manager.enable = true;
36 |
37 | # Avoid installing multiple variants of the home-manager manual to save space
38 | manual = {
39 | html.enable = false;
40 | json.enable = false;
41 | manpages.enable = false;
42 | };
43 | }
44 | ]
45 | ++ sharedModules;
46 | };
47 | }
48 |
--------------------------------------------------------------------------------
/home/modules/theme/default.nix:
--------------------------------------------------------------------------------
1 | {lib, ...}: let
2 | inherit (lib) mkOption;
3 | inherit (lib.types) attrsOf path str;
4 | in {
5 | options.theme = {
6 | colorscheme = mkOption {
7 | type = attrsOf (attrsOf str);
8 | description = ''
9 | The colors used in the theming.
10 | '';
11 | };
12 |
13 | wallpaper = mkOption {
14 | type = path;
15 | description = ''
16 | Wallpaper image.
17 | '';
18 | };
19 | };
20 | }
21 |
--------------------------------------------------------------------------------
/home/raexera/config/cursor.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | home.pointerCursor = {
3 | name = "Bibata-Modern-Classic";
4 | package = pkgs.bibata-cursors;
5 | size = 24;
6 | gtk.enable = true;
7 | x11.enable = true;
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/home/raexera/config/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | imports = [
3 | ./cursor.nix
4 | ./fontconfig.nix
5 | ./gtk.nix
6 | ./qt.nix
7 | ./xdg.nix
8 | ];
9 | }
10 |
--------------------------------------------------------------------------------
/home/raexera/config/fontconfig.nix:
--------------------------------------------------------------------------------
1 | {
2 | fonts.fontconfig = {
3 | enable = true;
4 | defaultFonts = {
5 | monospace = ["GeistMono Nerd Font"];
6 | sansSerif = ["Geist" "Noto Color Emoji"];
7 | serif = ["Noto Serif" "Noto Color Emoji"];
8 | emoji = ["Noto Color Emoji"];
9 | };
10 | };
11 | }
12 |
--------------------------------------------------------------------------------
/home/raexera/config/gtk.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | pkgs,
4 | ...
5 | }: {
6 | gtk = {
7 | enable = true;
8 |
9 | font = {
10 | package = pkgs.geist-font;
11 | name = "Geist";
12 | size = 12;
13 | };
14 |
15 | iconTheme = {
16 | package = pkgs.papirus-icon-theme;
17 | name = "Papirus-Dark";
18 | };
19 |
20 | theme = {
21 | package = pkgs.colloid-gtk-theme;
22 | name = "Colloid-Dark";
23 | };
24 |
25 | gtk2 = {
26 | extraConfig = "gtk-application-prefer-dark-theme = true";
27 | configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
28 | };
29 |
30 | gtk3 = {
31 | bookmarks = [
32 | "file://${config.home.homeDirectory}/Dev"
33 | "file://${config.home.homeDirectory}/Documents"
34 | "file://${config.home.homeDirectory}/Downloads"
35 | "file://${config.home.homeDirectory}/Music"
36 | "file://${config.home.homeDirectory}/Pictures"
37 | "file://${config.home.homeDirectory}/Videos"
38 | ];
39 | extraConfig.gtk-application-prefer-dark-theme = true;
40 | };
41 |
42 | gtk4.extraConfig.gtk-application-prefer-dark-theme = true;
43 | };
44 |
45 | dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
46 | }
47 |
--------------------------------------------------------------------------------
/home/raexera/config/qt.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | pkgs,
4 | config,
5 | ...
6 | }: {
7 | qt = {
8 | enable = true;
9 | platformTheme.name = "qtct";
10 | style.name = "kvantum";
11 | };
12 |
13 | xdg.configFile = {
14 | "Kvantum" = {
15 | source = "${pkgs.colloid-kde}/share/Kvantum";
16 | recursive = true;
17 | };
18 |
19 | "Kvantum/kvantum.kvconfig".text = lib.generators.toINI {} {
20 | General.theme = "ColloidDark";
21 | };
22 |
23 | "qt5ct/qt5ct.conf".text = lib.generators.toINI {} {
24 | Appearance = {
25 | custom_palette = false;
26 | icon_theme = config.gtk.iconTheme.name;
27 | standard_dialogs = "xdgdesktopportal";
28 | style = "kvantum-dark";
29 | };
30 |
31 | Fonts = {
32 | fixed = ''"GeistMono Nerd Font,12,-1,5,50,0,0,0,0,0,Regular"'';
33 | general = ''"Geist,12,-1,5,50,0,0,0,0,0"'';
34 | };
35 | };
36 |
37 | "qt6ct/qt6ct.conf".text = lib.generators.toINI {} {
38 | Appearance = {
39 | custom_palette = false;
40 | icon_theme = config.gtk.iconTheme.name;
41 | standard_dialogs = "xdgdesktopportal";
42 | style = "kvantum-dark";
43 | };
44 |
45 | Fonts = {
46 | fixed = ''"GeistMono Nerd Font,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular"'';
47 | general = ''"Geist,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular"'';
48 | };
49 | };
50 | };
51 | }
52 |
--------------------------------------------------------------------------------
/home/raexera/config/xdg.nix:
--------------------------------------------------------------------------------
1 | {config, ...}: {
2 | xdg = {
3 | enable = true;
4 | cacheHome = config.home.homeDirectory + "/.local/cache";
5 | userDirs = {
6 | enable = true;
7 | createDirectories = true;
8 | extraConfig = {
9 | XDG_DEV_DIR = "${config.home.homeDirectory}/Dev";
10 | XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
11 | XDG_WALLPAPERS_DIR = "${config.xdg.userDirs.pictures}/Wallpapers";
12 | };
13 | };
14 | mimeApps = let
15 | imageViewer = ["org.gnome.Loupe"];
16 | audioPlayer = ["io.bassi.Amberol"];
17 | videoPlayer = ["io.github.celluloid_player.Celluloid"];
18 | webBrowser = ["brave-browser"];
19 |
20 | xdgAssociations = type: program: list:
21 | builtins.listToAttrs (map (e: {
22 | name = "${type}/${e}";
23 | value = program;
24 | })
25 | list);
26 |
27 | image = xdgAssociations "image" imageViewer ["png" "svg" "jpeg" "gif"];
28 | audio = xdgAssociations "audio" audioPlayer ["mp3" "flac" "wav" "aac"];
29 | video = xdgAssociations "video" videoPlayer ["mp4" "avi" "mkv"];
30 | browser =
31 | (xdgAssociations "application" webBrowser [
32 | "pdf"
33 | "json"
34 | "x-extension-htm"
35 | "x-extension-html"
36 | "x-extension-shtml"
37 | "x-extension-xht"
38 | "x-extension-xhtml"
39 | ])
40 | // (xdgAssociations "x-scheme-handler" webBrowser [
41 | "about"
42 | "ftp"
43 | "http"
44 | "https"
45 | "unknown"
46 | ]);
47 |
48 | # XDG MIME types
49 | associations = builtins.mapAttrs (_: v: (map (e: "${e}.desktop") v)) ({
50 | "text/html" = webBrowser;
51 | "text/plain" = ["codium"];
52 | "inode/directory" = ["thunar"];
53 | }
54 | // image
55 | // audio
56 | // video
57 | // browser);
58 | in {
59 | enable = true;
60 | defaultApplications = associations;
61 | };
62 | };
63 | }
64 |
--------------------------------------------------------------------------------
/home/raexera/default.nix:
--------------------------------------------------------------------------------
1 | {lib, ...}: {
2 | imports = [
3 | ./config
4 | ./editors/vscode
5 | ./packages
6 | ./programs
7 | ./services
8 | ./shell/zsh
9 | ./window-managers/hyprland
10 |
11 | ./home.nix
12 | ];
13 |
14 | # Catppuccin v0.1.3
15 | theme = {
16 | colorscheme = rec {
17 | colors = {
18 | rosewater = "F5E0DC";
19 | flamingo = "F2CDCD";
20 | pink = "F5C2E7";
21 | mauve = "DDB6F2";
22 | red = "F28FAD";
23 | maroon = "E8A2AF";
24 | peach = "F8BD96";
25 | yellow = "FAE3B0";
26 | green = "ABE9B3";
27 | teal = "B5E8E0";
28 | blue = "96CDFB";
29 | sky = "89DCEB";
30 | lavender = "C9CBFF";
31 | black0 = "0D1416"; # crust
32 | black1 = "111719"; # mantle
33 | black2 = "131A1C"; # base
34 | black3 = "192022"; # surface0
35 | black4 = "202729"; # surface1
36 | gray0 = "363D3E"; # surface2
37 | gray1 = "4A5051"; # overlay0
38 | gray2 = "5C6262"; # overlay1
39 | white = "C5C8C9"; # text
40 | };
41 |
42 | xcolors = lib.mapAttrsRecursive (_: color: "#${color}") colors;
43 | };
44 |
45 | wallpaper = ./wallpapers/chifuri-wallpaper.jpg;
46 | };
47 |
48 | wayland.windowManager.hyprland.settings = {
49 | monitor = [
50 | # name, resolution, position, scale
51 | "eDP-1, preferred, auto, 1.600000"
52 | ];
53 |
54 | device = {
55 | name = "cust0000:00-27c6:0123";
56 | enabled = false;
57 | };
58 | };
59 | }
60 |
--------------------------------------------------------------------------------
/home/raexera/editors/vscode/default.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | imports = [
3 | ./extensions.nix
4 | ./keybindings.nix
5 | ./usersettings.nix
6 | ];
7 |
8 | programs.vscode = {
9 | enable = true;
10 | package = pkgs.vscodium.override {
11 | commandLineArgs = "--password-store=gnome-libsecret";
12 | };
13 | };
14 | }
15 |
--------------------------------------------------------------------------------
/home/raexera/editors/vscode/extensions.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | programs.vscode = {
3 | mutableExtensionsDir = true;
4 | extensions = with pkgs.vscode-marketplace; [
5 | alefragnani.project-manager
6 | astro-build.astro-vscode
7 | bradlc.vscode-tailwindcss
8 | cardinal90.multi-cursor-case-preserve
9 | christian-kohler.npm-intellisense
10 | christian-kohler.path-intellisense
11 | dbaeumer.vscode-eslint
12 | eamodio.gitlens
13 | editorconfig.editorconfig
14 | emeraldwalk.runonsave
15 | esbenp.prettier-vscode
16 | formulahendry.auto-complete-tag
17 | formulahendry.code-runner
18 | golang.go
19 | jnoortheen.nix-ide
20 | meganrogge.template-string-converter
21 | mikestead.dotenv
22 | mkhl.direnv
23 | ms-azuretools.vscode-docker
24 | naumovs.color-highlight
25 | oderwat.indent-rainbow
26 | redhat.vscode-yaml
27 | renesaarsoo.sql-formatter-vsc
28 | rust-lang.rust-analyzer
29 | svelte.svelte-vscode
30 | tamasfe.even-better-toml
31 | usernamehw.errorlens
32 | yzhang.markdown-all-in-one
33 | ];
34 | };
35 | }
36 |
--------------------------------------------------------------------------------
/home/raexera/editors/vscode/keybindings.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.vscode.keybindings = [
3 | {
4 | "key" = "ctrl+`";
5 | "command" = "workbench.action.terminal.focus";
6 | "when" = "editorTextFocus";
7 | }
8 | {
9 | "key" = "ctrl+`";
10 | "command" = "workbench.action.focusActiveEditorGroup";
11 | "when" = "terminalFocus";
12 | }
13 | {
14 | "key" = "alt+f";
15 | "command" = "editor.action.formatDocument";
16 | "when" = "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor";
17 | }
18 | ];
19 | }
20 |
--------------------------------------------------------------------------------
/home/raexera/editors/vscode/usersettings.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | pkgs,
4 | ...
5 | }: {
6 | programs.vscode.userSettings = let
7 | general = {
8 | "extensions.autoCheckUpdates" = false;
9 | "extensions.autoUpdate" = false;
10 | "update.mode" = "none";
11 | "update.showReleaseNotes" = false;
12 | "redhat.telemetry.enabled" = false;
13 | "telemetry.telemetryLevel" = "off";
14 | };
15 |
16 | window = {
17 | "window.dialogStyle" = "custom";
18 | "window.titleBarStyle" = "custom";
19 | };
20 |
21 | files = {
22 | "files.autoSave" = "onWindowChange";
23 | "files.insertFinalNewline" = true;
24 | "files.trimTrailingWhitespace" = true;
25 | };
26 |
27 | editor = {
28 | "editor.bracketPairColorization.enabled" = true;
29 | "editor.bracketPairColorization.independentColorPoolPerBracketType" = true;
30 | "editor.cursorBlinking" = "smooth";
31 | "editor.cursorSmoothCaretAnimation" = "on";
32 | "editor.codeActionsOnSave"."source.fixAll" = "always";
33 | "editor.fontFamily" = "'GeistMono Nerd Font', 'monospace', monospace";
34 | "editor.fontLigatures" = true;
35 | "editor.fontSize" = 16;
36 | "editor.fontWeight" = "500";
37 | "editor.formatOnPaste" = true;
38 | "editor.formatOnSave" = true;
39 | "editor.formatOnType" = true;
40 | "editor.guides.bracketPairs" = "active";
41 | "editor.guides.bracketPairsHorizontal" = "active";
42 | "editor.guides.indentation" = true;
43 | "editor.inlayHints.enabled" = "on";
44 | "editor.inlayHints.padding" = true;
45 | "editor.inlineSuggest.enabled" = true;
46 | "editor.linkedEditing" = true;
47 | "editor.lineNumbers" = "on";
48 | "editor.minimap.enabled" = false;
49 | "editor.parameterHints.enabled" = true;
50 | "editor.scrollbar.horizontal" = "hidden";
51 | "editor.semanticHighlighting.enabled" = true;
52 | "editor.showUnused" = true;
53 | "editor.snippetSuggestions" = "top";
54 | "editor.stickyScroll.enabled" = true;
55 | "editor.tabCompletion" = "on";
56 | "editor.tabSize" = 2;
57 | "editor.trimAutoWhitespace" = true;
58 | "editor.wordWrap" = "on";
59 | "editor.wrappingIndent" = "indent";
60 | };
61 |
62 | workbench = {
63 | "workbench.activityBar.location" = "top";
64 | "workbench.editor.empty.hint" = "hidden";
65 | "workbench.sideBar.location" = "right";
66 | "workbench.startupEditor" = "none";
67 | "workbench.tree.indent" = 16;
68 | };
69 |
70 | terminal = {
71 | "terminal.integrated.fontFamily" = "'GeistMono Nerd Font Mono', 'monospace', monospace";
72 | "terminal.integrated.fontSize" = 16;
73 | "terminal.integrated.gpuAcceleration" = "on";
74 | "terminal.integrated.minimumContrastRatio" = 1;
75 | };
76 |
77 | theme = let
78 | inherit (config.theme.colorscheme) xcolors;
79 | in {
80 | "workbench.colorTheme" = "Catppuccin Mocha";
81 | "workbench.iconTheme" = "catppuccin-mocha";
82 | "catppuccin.accentColor" = "blue";
83 | "catppuccin.bracketMode" = "rainbow";
84 | "catppuccin.workbenchMode" = "default";
85 | "catppuccin.boldKeywords" = true;
86 | "catppuccin.italicKeywords" = true;
87 | "catppuccin.italicComments" = true;
88 | "catppuccin.syncWithIconPack" = true;
89 | "catppuccin.extraBordersEnabled" = false;
90 | "catppuccin.colorOverrides" = {
91 | "mocha" = {
92 | "rosewater" = "${xcolors.rosewater}";
93 | "flamingo" = "${xcolors.flamingo}";
94 | "pink" = "${xcolors.pink}";
95 | "mauve" = "${xcolors.mauve}";
96 | "red" = "${xcolors.red}";
97 | "maroon" = "${xcolors.maroon}";
98 | "peach" = "${xcolors.peach}";
99 | "yellow" = "${xcolors.yellow}";
100 | "green" = "${xcolors.green}";
101 | "teal" = "${xcolors.teal}";
102 | "blue" = "${xcolors.blue}";
103 | "sky" = "${xcolors.sky}";
104 | "lavender" = "${xcolors.lavender}";
105 | "crust" = "${xcolors.black0}";
106 | "mantle" = "${xcolors.black1}";
107 | "base" = "${xcolors.black2}";
108 | "surface0" = "${xcolors.black3}";
109 | "surface1" = "${xcolors.black4}";
110 | "surface2" = "${xcolors.gray0}";
111 | "overlay0" = "${xcolors.gray1}";
112 | "overlay1" = "${xcolors.gray2}";
113 | "text" = "${xcolors.white}";
114 | };
115 | };
116 | };
117 |
118 | # Extension settings
119 | extension = {
120 | # git
121 | "git.autofetch" = true;
122 | "git.enableCommitSigning" = true;
123 | "git.enableSmartCommit" = true;
124 | "git.openRepositoryInParentFolders" = "always";
125 |
126 | # errorLens
127 | "errorLens.gutterIconsEnabled" = true;
128 | "errorLens.gutterIconSet" = "defaultOutline";
129 |
130 | # eslint
131 | "eslint.format.enable" = true;
132 | "eslint.problems.shortenToSingleLine" = true;
133 | "eslint.validate" = [
134 | "javascript"
135 | "typescript"
136 | "javascriptreact"
137 | "typescriptreact"
138 | "astro"
139 | "svelte"
140 | ];
141 |
142 | # prettier
143 | "prettier.jsxSingleQuote" = true;
144 |
145 | # svelte
146 | "svelte.enable-ts-plugin" = true;
147 | };
148 |
149 | # Formatter settings
150 | formatter = {
151 | "[astro]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
152 | "[css]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
153 | "[html]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
154 | "[javascript]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
155 | "[json]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
156 | "[jsonc]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
157 | "[markdown]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
158 | "[nix]"."editor.defaultFormatter" = "jnoortheen.nix-ide";
159 | "[scss]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
160 | "[svelte]"."editor.defaultFormatter" = "svelte.svelte-vscode";
161 | "[typescript]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
162 | "[typescriptreact]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
163 | };
164 |
165 | # Language specific settings
166 | language = {
167 | # go
168 | "go.alternateTools" = {
169 | "delve" = "${pkgs.delve}/bin/dlv";
170 | "gofumpt" = "${pkgs.gofumpt}/bin/gofumpt";
171 | "golangci-lint" = "${pkgs.golangci-lint}/bin/golangci-lint";
172 | "gomodifytags" = "${pkgs.gomodifytags}/bin/gomodifytags";
173 | "gopls" = "${pkgs.gopls}/bin/gopls";
174 | "impl" = "${pkgs.impl}/bin/impl";
175 | "staticcheck" = "${pkgs.go-tools}/bin/staticcheck";
176 | };
177 | "go.inlayHints.assignVariableTypes" = true;
178 | "go.inlayHints.compositeLiteralFields" = true;
179 | "go.inlayHints.compositeLiteralTypes" = true;
180 | "go.inlayHints.constantValues" = true;
181 | "go.inlayHints.functionTypeParameters" = true;
182 | "go.inlayHints.parameterNames" = true;
183 | "go.inlayHints.rangeVariableTypes" = true;
184 | "go.lintTool" = "golangci-lint";
185 | "go.useLanguageServer" = true;
186 | "gopls" = {
187 | "formatting.gofumpt" = true;
188 | "ui.semanticTokens" = true;
189 | };
190 | "emeraldwalk.runonsave" = {
191 | "commands" = [
192 | {
193 | "cmd" = "${pkgs.goimports-reviser}/bin/goimports-reviser -rm-unused -set-alias -format -use-cache -output write \${file}";
194 | "match" = "\\.go$";
195 | }
196 | {
197 | "cmd" = "${pkgs.golines}/bin/golines \${file} -w";
198 | "match" = "\\.go$";
199 | }
200 | ];
201 | };
202 |
203 | # javascript
204 | "javascript.inlayHints.functionLikeReturnTypes.enabled" = true;
205 | "javascript.inlayHints.parameterNames.enabled" = "all";
206 | "javascript.inlayHints.parameterTypes.enabled" = true;
207 | "javascript.inlayHints.propertyDeclarationTypes.enabled" = true;
208 | "javascript.preferGoToSourceDefinition" = true;
209 | "javascript.suggest.completeFunctionCalls" = true;
210 |
211 | # nix
212 | "nix.enableLanguageServer" = true;
213 | "nix.serverPath" = "${pkgs.nil}/bin/nil";
214 | "nix.serverSettings"."nil"."formatting"."command" = ["${pkgs.alejandra}/bin/alejandra"];
215 |
216 | # typescript
217 | "typescript.inlayHints.functionLikeReturnTypes.enabled" = true;
218 | "typescript.inlayHints.parameterNames.enabled" = "all";
219 | "typescript.inlayHints.parameterTypes.enabled" = true;
220 | "typescript.inlayHints.propertyDeclarationTypes.enabled" = true;
221 | "typescript.preferGoToSourceDefinition" = true;
222 | "typescript.suggest.completeFunctionCalls" = true;
223 | };
224 | in
225 | general
226 | // window
227 | // files
228 | // editor
229 | // workbench
230 | // terminal
231 | // theme
232 | // extension
233 | // formatter
234 | // language;
235 | }
236 |
--------------------------------------------------------------------------------
/home/raexera/home.nix:
--------------------------------------------------------------------------------
1 | {
2 | home = {
3 | username = "raexera";
4 | homeDirectory = "/home/raexera";
5 | extraOutputsToInstall = ["doc" "devdoc"];
6 |
7 | # This value determines the Home Manager release that your
8 | # configuration is compatible with. This helps avoid breakage
9 | # when a new Home Manager release introduces backwards
10 | # incompatible changes.
11 | #
12 | # You can update Home Manager without changing this value. See
13 | # the Home Manager release notes for a list of state version
14 | # changes in each release.
15 | stateVersion = "25.05";
16 | };
17 | }
18 |
--------------------------------------------------------------------------------
/home/raexera/packages/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | self,
4 | ...
5 | }: {
6 | imports = [
7 | ./dev
8 | ];
9 |
10 | home.packages = with pkgs; [
11 | self.packages.${pkgs.system}.lightctl
12 | self.packages.${pkgs.system}.networkctl
13 | self.packages.${pkgs.system}.volumectl
14 |
15 | act
16 | amberol
17 | bc
18 | beekeeper-studio
19 | brave
20 | celluloid
21 | cloudflared
22 | dbmate
23 | discord
24 | du-dust
25 | duf
26 | fd
27 | ffmpeg-full
28 | ffmpegthumbnailer
29 | file
30 | foliate
31 | gcc
32 | genact
33 | ghostscript
34 | gnumake
35 | gobang
36 | grim
37 | grimblast
38 | grex
39 | hoppscotch
40 | imagemagick
41 | imv
42 | jaq
43 | jq
44 | just
45 | killall
46 | lazydocker
47 | lefthook
48 | libnotify
49 | loupe
50 | nodejs
51 | obsidian
52 | openssl
53 | ouch
54 | p7zip
55 | pm2
56 | pnpm
57 | pocketbase
58 | podman-compose
59 | postman
60 | pre-commit
61 | prettierd
62 | procs
63 | psmisc
64 | psutils
65 | pwvucontrol
66 | redis
67 | ripgrep
68 | rsync
69 | scc
70 | sd
71 | slack
72 | slurp
73 | speedtest-cli
74 | swappy
75 | syncthing
76 | tdesktop
77 | trash-cli
78 | tree
79 | typst
80 | unrar
81 | unzip
82 | upscayl
83 | watchexec
84 | wget
85 | wf-recorder
86 | wl-clipboard
87 | wrk
88 | xh
89 | youtube-music
90 | yq
91 | yt-dlp
92 | zip
93 | ];
94 | }
95 |
--------------------------------------------------------------------------------
/home/raexera/packages/dev/bun.nix:
--------------------------------------------------------------------------------
1 | {config, ...}: {
2 | programs.bun = {
3 | enable = true;
4 | };
5 |
6 | home.sessionPath = ["${config.home.homeDirectory}/.bun/bin"];
7 | }
8 |
--------------------------------------------------------------------------------
/home/raexera/packages/dev/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | imports = [
3 | ./bun.nix
4 | ./go.nix
5 | ./python.nix
6 | ./rust.nix
7 | ];
8 | }
9 |
--------------------------------------------------------------------------------
/home/raexera/packages/dev/go.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | pkgs,
4 | ...
5 | }: {
6 | programs.go = rec {
7 | enable = true;
8 | goPath = ".go";
9 | goBin = "${goPath}/bin";
10 | };
11 |
12 | home = {
13 | packages = with pkgs; [
14 | gofumpt
15 | goimports-reviser
16 | golangci-lint
17 | golines
18 | gomodifytags
19 | gopls
20 | gotests
21 | go-tools # staticcheck
22 | gotools # goimports
23 | delve
24 | impl
25 | revive
26 | ];
27 |
28 | sessionPath = ["${config.home.homeDirectory}/${config.programs.go.goBin}"];
29 | };
30 | }
31 |
--------------------------------------------------------------------------------
/home/raexera/packages/dev/python.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | home.packages = with pkgs; [
3 | (python3.withPackages (ps:
4 | with ps; [
5 | pip
6 | virtualenv
7 | ]))
8 |
9 | pipenv
10 | ];
11 | }
12 |
--------------------------------------------------------------------------------
/home/raexera/packages/dev/rust.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | pkgs,
4 | ...
5 | }: {
6 | home = {
7 | packages = with pkgs; [
8 | (rust-bin.stable.latest.default.override {
9 | extensions = ["rust-src"];
10 | })
11 | ];
12 |
13 | sessionPath = ["${config.home.homeDirectory}/.cargo/bin"];
14 | };
15 | }
16 |
--------------------------------------------------------------------------------
/home/raexera/programs/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | imports = [
3 | ./fastfetch.nix
4 | ./firefox.nix
5 | ./gh.nix
6 | ./git.nix
7 | ./gpg.nix
8 | ./kitty.nix
9 | ./lazygit.nix
10 | ./mpv.nix
11 | ./obs-studio.nix
12 | ./ssh.nix
13 | ./zathura.nix
14 | ];
15 | }
16 |
--------------------------------------------------------------------------------
/home/raexera/programs/fastfetch.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.fastfetch = {
3 | enable = true;
4 | settings = {
5 | modules = [
6 | # Header
7 | "title"
8 | "separator"
9 |
10 | # System Info
11 | "os"
12 | "host"
13 | "kernel"
14 | "packages"
15 |
16 | # Desktop Environment
17 | "de"
18 | "wm"
19 |
20 | # Shell/Terminal
21 | "shell"
22 | "terminal"
23 |
24 | # Hardware
25 | "display"
26 | "cpu"
27 | "gpu"
28 | "memory"
29 | "swap"
30 | "disk"
31 | ];
32 | };
33 | };
34 | }
35 |
--------------------------------------------------------------------------------
/home/raexera/programs/firefox.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.firefox = {
3 | enable = true;
4 |
5 | profiles.raexera = {
6 | settings = {
7 | "browser.tabs.inTitlebar" = 0;
8 | "browser.urlbar.trimHttps" = true;
9 | "browser.urlbar.trimURLs" = true;
10 | "gfx.canvas.accelerated" = true;
11 | "gfx.webrender.all" = true;
12 | "gfx.webrender.enabled" = true;
13 | "gfx.x11-egl.force-enabled" = true;
14 | "media.av1.enabled" = true;
15 | "media.ffmpeg.vaapi.enabled" = true;
16 | "media.hardware-video-decoding.force-enabled" = true;
17 | "media.rdd-ffmpeg.enabled" = true;
18 | "sidebar.revamp" = true;
19 | "sidebar.verticalTabs" = true;
20 | "svg.context-properties.content.enabled" = true;
21 | "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
22 | "widget.dmabuf.force-enabled" = true;
23 | };
24 | };
25 | };
26 | }
27 |
--------------------------------------------------------------------------------
/home/raexera/programs/gh.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.gh = {
3 | enable = true;
4 | settings = {
5 | git_protocol = "ssh";
6 | prompt = "enabled";
7 | };
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/home/raexera/programs/git.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | config,
4 | ...
5 | }: {
6 | programs.git = {
7 | enable = true;
8 | package = pkgs.gitFull;
9 |
10 | userName = "raexera";
11 | userEmail = "raexera@gmail.com";
12 |
13 | signing = {
14 | key = config.programs.gpg.settings.default-key;
15 | signByDefault = true;
16 | };
17 |
18 | lfs = {
19 | enable = true;
20 | skipSmudge = true;
21 | };
22 |
23 | extraConfig = {
24 | credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret";
25 |
26 | init.defaultBranch = "main";
27 | branch.autosetupmerge = "true";
28 | pull.ff = "only";
29 | color.ui = "auto";
30 |
31 | push = {
32 | default = "current";
33 | followTags = true;
34 | autoSetupRemote = true;
35 | };
36 |
37 | merge = {
38 | conflictstyle = "diff3";
39 | stat = "true";
40 | };
41 |
42 | rebase = {
43 | autoSquash = true;
44 | autoStash = true;
45 | };
46 |
47 | rerere = {
48 | enabled = true;
49 | autoupdate = true;
50 | };
51 | };
52 |
53 | aliases = {
54 | # Semantic commit message aliases
55 | chore = "!f() { git commit -m \"chore($1): $2\"; }; f";
56 | docs = "!f() { git commit -m \"docs($1): $2\"; }; f";
57 | feat = "!f() { git commit -m \"feat($1): $2\"; }; f";
58 | fix = "!f() { git commit -m \"fix($1): $2\"; }; f";
59 | refactor = "!f() { git commit -m \"refactor($1): $2\"; }; f";
60 | style = "!f() { git commit -m \"style($1): $2\"; }; f";
61 | test = "!f() { git commit -m \"test($1): $2\"; }; f";
62 | };
63 |
64 | ignores = [
65 | "*~"
66 | "*.swp"
67 | "*result*"
68 | ".direnv"
69 | "node_modules"
70 | ];
71 | };
72 | }
73 |
--------------------------------------------------------------------------------
/home/raexera/programs/gpg.nix:
--------------------------------------------------------------------------------
1 | {config, ...}: {
2 | programs.gpg = {
3 | enable = true;
4 | homedir = "${config.xdg.dataHome}/gnupg";
5 | settings = {
6 | default-key = "A987FE77C066A909";
7 | };
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/home/raexera/programs/kitty.nix:
--------------------------------------------------------------------------------
1 | {config, ...}: {
2 | programs.kitty = {
3 | enable = true;
4 | settings = let
5 | inherit (config.theme.colorscheme) xcolors;
6 | in {
7 | # Fonts
8 | font_family = "GeistMono Nerd Font Mono";
9 | bold_font = "auto";
10 | italic_font = "auto";
11 | bold_italic_font = "auto";
12 | disable_ligatures = "never";
13 | font_size = "12.0";
14 |
15 | # Cursor
16 | cursor_shape = "underline";
17 | cursor_underline_thickness = "1.5";
18 | cursor_blink_interval = "-1";
19 | cursor_stop_blinking_after = 0;
20 |
21 | # Scrollback
22 | scrollback_lines = 10000;
23 | touch_scroll_multiplier = "1.0";
24 | wheel_scroll_multiplier = "5.0";
25 |
26 | # Terminal bell
27 | enable_audio_bell = "no";
28 | visual_bell_duration = 0;
29 | window_alert_on_bell = "no";
30 | bell_on_tab = "no";
31 | command_on_bell = "none";
32 |
33 | # Window layout
34 | remember_window_size = "no";
35 | window_resize_step_cells = 1;
36 | window_resize_step_lines = 1;
37 | draw_minimal_borders = "yes";
38 | hide_window_decorations = "yes";
39 | inactive_text_alpha = "0.8";
40 | placement_strategy = "center";
41 | resize_in_steps = "no";
42 | window_margin_width = 0;
43 | window_padding_width = 15;
44 | confirm_os_window_close = 0;
45 |
46 | # Tab Bar
47 | active_tab_font_style = "bold";
48 | inactive_tab_font_style = "normal";
49 | tab_bar_edge = "bottom";
50 | tab_bar_min_tabs = 1;
51 | tab_bar_style = "powerline";
52 | tab_powerline_style = "slanted";
53 | tab_title_template = "{title}{' :{}:'.format(num_windows) if num_windows > 1 else ''}";
54 |
55 | # Color scheme
56 | background_opacity = "1.0";
57 | foreground = xcolors.white;
58 | background = xcolors.black2;
59 | selection_foreground = xcolors.black2;
60 | selection_background = xcolors.rosewater;
61 |
62 | # Cursor colors
63 | cursor = xcolors.rosewater;
64 | cursor_text_color = xcolors.black2;
65 |
66 | # URL underline color when hovering with mouse
67 | url_color = xcolors.rosewater;
68 |
69 | # Window border colors and terminal bell colors
70 | active_border_color = xcolors.blue;
71 | inactive_border_color = xcolors.gray0;
72 | bell_border_color = xcolors.yellow;
73 | visual_bell_color = "none";
74 |
75 | # Tab bar colors
76 | active_tab_foreground = xcolors.black1;
77 | active_tab_background = xcolors.blue;
78 | inactive_tab_foreground = xcolors.white;
79 | inactive_tab_background = xcolors.black2;
80 | tab_bar_background = xcolors.black1;
81 |
82 | # Colors for marks (marked text in the terminal)
83 | mark1_foreground = xcolors.black2;
84 | mark1_background = xcolors.lavender;
85 | mark2_foreground = xcolors.black2;
86 | mark2_background = xcolors.mauve;
87 | mark3_foreground = xcolors.black2;
88 | mark3_background = xcolors.sky;
89 |
90 | # The basic 16 colors
91 | # black
92 | color0 = xcolors.gray0;
93 | color8 = xcolors.gray1;
94 |
95 | # red
96 | color1 = xcolors.red;
97 | color9 = xcolors.red;
98 |
99 | # green
100 | color2 = xcolors.green;
101 | color10 = xcolors.green;
102 |
103 | # yellow
104 | color3 = xcolors.yellow;
105 | color11 = xcolors.yellow;
106 |
107 | # blue
108 | color4 = xcolors.blue;
109 | color12 = xcolors.blue;
110 |
111 | # magenta
112 | color5 = xcolors.pink;
113 | color13 = xcolors.pink;
114 |
115 | # cyan
116 | color6 = xcolors.sky;
117 | color14 = xcolors.sky;
118 |
119 | # white
120 | color7 = xcolors.white;
121 | color15 = xcolors.white;
122 | };
123 |
124 | keybindings = {
125 | # Clipboard
126 | "ctrl+shift+c" = "copy_to_clipboard";
127 | "ctrl+shift+v" = "paste_from_clipboard";
128 | "ctrl+shift+s" = "paste_from_selection";
129 |
130 | # Scrolling
131 | "ctrl+shift+up" = "scroll_line_up";
132 | "ctrl+shift+k" = "scroll_line_up";
133 | "ctrl+shift+down" = "scroll_line_down";
134 | "ctrl+shift+j" = "scroll_line_down";
135 | "ctrl+shift+page_up" = "scroll_page_up";
136 | "ctrl+shift+page_down" = "scroll_page_down";
137 | "ctrl+shift+home" = "scroll_home";
138 | "ctrl+shift+end" = "scroll_end";
139 | "ctrl+shift+h" = "show_scrollback";
140 |
141 | # Window management
142 | "ctrl+shift+enter" = "new_window";
143 | "ctrl+shift+n" = "new_os_window";
144 | "ctrl+shift+w" = "close_window";
145 | "ctrl+shift+]" = "next_window";
146 | "ctrl+shift+[" = "previous_window";
147 | "ctrl+shift+f" = "move_window_forward";
148 | "ctrl+shift+b" = "move_window_backward";
149 | "ctrl+shift+`" = "move_window_to_top";
150 | "ctrl+shift+r" = "start_resizing_window";
151 | "ctrl+shift+1" = "first_window";
152 | "ctrl+shift+2" = "second_window";
153 | "ctrl+shift+3" = "third_window";
154 | "ctrl+shift+4" = "fourth_window";
155 | "ctrl+shift+5" = "fifth_window";
156 | "ctrl+shift+6" = "sixth_window";
157 | "ctrl+shift+7" = "seventh_window";
158 | "ctrl+shift+8" = "eighth_window";
159 | "ctrl+shift+9" = "ninth_window";
160 | "ctrl+shift+0" = "tenth_window";
161 |
162 | # Tab management
163 | "ctrl+shift+right" = "next_tab";
164 | "ctrl+shift+left" = "previous_tab";
165 | "ctrl+shift+t" = "new_tab";
166 | "ctrl+shift+q" = "close_tab";
167 | "ctrl+shift+." = "move_tab_forward";
168 | "ctrl+shift+," = "move_tab_backward";
169 | "ctrl+shift+alt+t" = "set_tab_title";
170 |
171 | # Layout management
172 | "ctrl+shift+l" = "next_layout";
173 | "ctrl+alt+t" = "goto_layout tall";
174 | "ctrl+alt+s" = "goto_layout stack";
175 | "ctrl+alt+p" = "last_used_layout";
176 | "ctrl+alt+z" = "toggle_layout stack";
177 |
178 | # Font sizes
179 | "ctrl+shift+equal" = "change_font_size all +1.0";
180 | "ctrl+shift+minus" = "change_font_size all -1.0";
181 | "ctrl+shift+backspace" = "change_font_size all 0";
182 | };
183 | };
184 | }
185 |
--------------------------------------------------------------------------------
/home/raexera/programs/lazygit.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.lazygit = {
3 | enable = true;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/home/raexera/programs/mpv.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | programs.mpv = {
3 | enable = true;
4 | scripts = with pkgs.mpvScripts; [
5 | mpris
6 | sponsorblock
7 | thumbnail
8 | ];
9 | config = {
10 | gpu-context = "wayland";
11 | hwdec = "auto";
12 | osc = "no";
13 | profile = "gpu-hq";
14 | vo = "gpu";
15 | };
16 | };
17 | }
18 |
--------------------------------------------------------------------------------
/home/raexera/programs/obs-studio.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | programs.obs-studio = {
3 | enable = true;
4 | plugins = with pkgs.obs-studio-plugins; [
5 | droidcam-obs
6 | obs-gstreamer
7 | obs-vaapi
8 | obs-backgroundremoval
9 | ];
10 | };
11 | }
12 |
--------------------------------------------------------------------------------
/home/raexera/programs/ssh.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.ssh = {
3 | enable = true;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/home/raexera/programs/zathura.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.zathura = {
3 | enable = true;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/home/raexera/services/blueman-applet.nix:
--------------------------------------------------------------------------------
1 | {
2 | services.blueman-applet = {
3 | enable = true;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/home/raexera/services/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | imports = [
3 | ./blueman-applet.nix
4 | ./gnome-keyring.nix
5 | ./network-manager-applet.nix
6 | ./udiskie.nix
7 | ];
8 | }
9 |
--------------------------------------------------------------------------------
/home/raexera/services/gnome-keyring.nix:
--------------------------------------------------------------------------------
1 | {
2 | services.gnome-keyring = {
3 | enable = true;
4 | components = ["secrets" "ssh"];
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/home/raexera/services/network-manager-applet.nix:
--------------------------------------------------------------------------------
1 | {
2 | services.network-manager-applet = {
3 | enable = true;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/home/raexera/services/udiskie.nix:
--------------------------------------------------------------------------------
1 | {
2 | services.udiskie = {
3 | enable = true;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/home/raexera/shell/zsh/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | ...
6 | }: {
7 | imports = [
8 | ./programs/bat.nix
9 | ./programs/dircolors.nix
10 | ./programs/direnv.nix
11 | ./programs/eza.nix
12 | ./programs/fzf.nix
13 | ./programs/starship.nix
14 | ./programs/yazi.nix
15 | ./programs/zoxide.nix
16 | ];
17 |
18 | programs.zsh = {
19 | enable = true;
20 | dotDir = ".config/zsh";
21 | defaultKeymap = "viins";
22 |
23 | enableCompletion = true;
24 |
25 | autosuggestion = {
26 | enable = true;
27 | strategy = ["history" "completion"];
28 | };
29 |
30 | syntaxHighlighting = {
31 | enable = true;
32 | highlighters = ["main" "brackets" "pattern" "cursor" "regexp" "root" "line"];
33 | };
34 |
35 | historySubstringSearch = {
36 | enable = true;
37 | searchUpKey = ["^[[A"];
38 | searchDownKey = ["^[[B"];
39 | };
40 |
41 | history = {
42 | path = "${config.xdg.dataHome}/zsh/zsh_history";
43 | size = 10000;
44 | save = 10000;
45 | append = true;
46 | ignoreDups = true;
47 | ignoreAllDups = true;
48 | ignoreSpace = true;
49 | expireDuplicatesFirst = true;
50 | extended = true;
51 | share = true;
52 | };
53 |
54 | completionInit = ''
55 | zmodload zsh/complist
56 | autoload -U compinit; compinit
57 | _comp_options+=(globdots)
58 | '';
59 |
60 | initExtra = ''
61 | while read -r option; do
62 | setopt $option
63 | done <<-EOF
64 | ALWAYS_TO_END
65 | AUTO_CD
66 | AUTO_LIST
67 | AUTO_MENU
68 | AUTO_PARAM_SLASH
69 | AUTO_PUSHD
70 | CDABLE_VARS
71 | COMPLETE_IN_WORD
72 | HASH_LIST_ALL
73 | INTERACTIVE_COMMENTS
74 | NO_BEEP
75 | NOTIFY
76 | PATH_DIRS
77 | PUSHD_IGNORE_DUPS
78 | PUSHD_SILENT
79 | EOF
80 |
81 | while read -r option; do
82 | unsetopt $option
83 | done <<-EOF
84 | FLOW_CONTROL
85 | MENU_COMPLETE
86 | EOF
87 |
88 | # Ztyle pattern
89 | # :completion:::::
90 |
91 | zstyle ':completion:*' completer _complete _ignored _approximate
92 | zstyle ':completion:*' complete true
93 | zstyle ':completion:*' complete-options true
94 | zstyle ':completion:*' file-sort modification
95 | zstyle ':completion:*' group-name '''
96 | zstyle ':completion:*' keep-prefix true
97 | zstyle ':completion:*' list-colors ''${(s.:.)LS_COLORS}
98 | zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
99 | zstyle ':completion:*' menu select
100 | zstyle ':completion:*' verbose true
101 |
102 | zstyle ':completion:*:default' list-prompt '%S%M matches%s'
103 | zstyle ':completion:*:corrections' format '%F{yellow}!- %d (errors: %e) -!%f'
104 | zstyle ':completion:*:descriptions' format '%F{blue}-- %D %d --%f'
105 | zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f'
106 | zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f'
107 | zstyle ':completion:*:*:-command-:*:*' group-order aliases builtins functions commands
108 |
109 | zstyle ':completion:*' use-cache on
110 | zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/.zcompcache"
111 | '';
112 |
113 | shellAliases = let
114 | inherit (lib) getExe;
115 | inherit (pkgs) bat ripgrep dust procs;
116 | in {
117 | cat = "${getExe bat} --color=always --theme=base16 --style=plain --paging=never";
118 | du = "${getExe dust}";
119 | grep = "${getExe ripgrep}";
120 | ps = "${getExe procs}";
121 |
122 | cp = "cp -iv";
123 | rm = "rm -iv";
124 | mv = "mv -iv";
125 |
126 | nb = "nix-build";
127 | nd = "nix develop";
128 | nr = "nix run";
129 | ns = "nix-shell";
130 | nu = "nix-update";
131 |
132 | cleanup = "sudo nix-collect-garbage --delete-older-than 3d && nix-collect-garbage -d";
133 | bloat = "nix path-info -Sh /run/current-system";
134 | repair = "nix-store --verify --check-contents --repair";
135 | };
136 |
137 | plugins = with pkgs; [
138 | {
139 | name = "zsh-forgit";
140 | src = zsh-forgit;
141 | file = "share/zsh/zsh-forgit/forgit.plugin.zsh";
142 | }
143 | {
144 | name = "zsh-autopair";
145 | src = zsh-autopair;
146 | file = "share/zsh/zsh-autopair/autopair.zsh";
147 | }
148 | {
149 | name = "zsh-you-should-use";
150 | src = zsh-you-should-use;
151 | file = "share/zsh/plugins/you-should-use/you-should-use.plugin.zsh";
152 | }
153 | {
154 | name = "zsh-nix-shell";
155 | src = zsh-nix-shell;
156 | file = "share/zsh-nix-shell/nix-shell.plugin.zsh";
157 | }
158 | {
159 | name = "zsh-vi-mode";
160 | src = zsh-vi-mode;
161 | file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh";
162 | }
163 | ];
164 | };
165 | }
166 |
--------------------------------------------------------------------------------
/home/raexera/shell/zsh/programs/bat.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.bat = {
3 | enable = true;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/home/raexera/shell/zsh/programs/dircolors.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.dircolors = {
3 | enable = true;
4 | enableZshIntegration = true;
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/home/raexera/shell/zsh/programs/direnv.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.direnv = {
3 | enable = true;
4 | enableZshIntegration = true;
5 | nix-direnv.enable = true;
6 | };
7 |
8 | home.sessionVariables.DIRENV_LOG_FORMAT = "";
9 | }
10 |
--------------------------------------------------------------------------------
/home/raexera/shell/zsh/programs/eza.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.eza = {
3 | enable = true;
4 | enableZshIntegration = true;
5 | extraOptions = ["--group-directories-first" "--header"];
6 | colors = "always";
7 | icons = "always";
8 | git = true;
9 | };
10 | }
11 |
--------------------------------------------------------------------------------
/home/raexera/shell/zsh/programs/fzf.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.fzf = {
3 | enable = true;
4 | enableZshIntegration = true;
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/home/raexera/shell/zsh/programs/starship.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.starship = {
3 | enable = true;
4 | enableZshIntegration = true;
5 | settings = {
6 | scan_timeout = 10;
7 | add_newline = true;
8 | line_break.disabled = true;
9 | format = "$directory$git_branch$git_metrics$git_commit$git_state$git_status$all";
10 | character = {
11 | success_symbol = "[λ](green)";
12 | error_symbol = "[λ](red)";
13 | vimcmd_symbol = "[λ](green)";
14 | };
15 | directory = {
16 | home_symbol = "home";
17 | style = "cyan";
18 | };
19 | git_commit.tag_symbol = " tag ";
20 | git_branch = {
21 | style = "purple";
22 | symbol = "";
23 | };
24 | git_metrics = {
25 | added_style = "bold yellow";
26 | deleted_style = "bold red";
27 | disabled = false;
28 | };
29 | aws.symbol = "aws ";
30 | bun.symbol = "bun ";
31 | c.symbol = "C ";
32 | cobol.symbol = "cobol ";
33 | conda.symbol = "conda ";
34 | crystal.symbol = "cr ";
35 | cmake.symbol = "cmake ";
36 | daml.symbol = "daml ";
37 | dart.symbol = "dart ";
38 | deno.symbol = "deno ";
39 | dotnet.symbol = ".NET ";
40 | directory.read_only = " ro";
41 | docker_context.symbol = "docker ";
42 | elixir.symbol = "exs ";
43 | elm.symbol = "elm ";
44 | golang.symbol = "go ";
45 | guix_shell.symbol = "guix ";
46 | hg_branch.symbol = "hg ";
47 | java.symbol = "java ";
48 | julia.symbol = "jl ";
49 | kotlin.symbol = "kt ";
50 | lua.symbol = "lua ";
51 | memory_usage.symbol = "memory ";
52 | meson.symbol = "meson ";
53 | nim.symbol = "nim ";
54 | nix_shell.symbol = "nix ";
55 | ocaml.symbol = "ml ";
56 | opa.symbol = "opa ";
57 | nodejs.symbol = "nodejs ";
58 | package.symbol = "pkg ";
59 | perl.symbol = "pl ";
60 | php.symbol = "php ";
61 | pulumi.symbol = "pulumi ";
62 | purescript.symbol = "purs ";
63 | python.symbol = "py ";
64 | raku.symbol = "raku ";
65 | ruby.symbol = "rb ";
66 | rust.symbol = "rs ";
67 | scala.symbol = "scala ";
68 | spack.symbol = "spack ";
69 | sudo.symbol = "sudo ";
70 | swift.symbol = "swift ";
71 | terraform.symbol = "terraform ";
72 | zig.symbol = "zig ";
73 | };
74 | };
75 | }
76 |
--------------------------------------------------------------------------------
/home/raexera/shell/zsh/programs/yazi.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.yazi = {
3 | enable = true;
4 | enableZshIntegration = true;
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/home/raexera/shell/zsh/programs/zoxide.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.zoxide = {
3 | enable = true;
4 | enableZshIntegration = true;
5 | options = [
6 | "--cmd cd"
7 | ];
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/home/raexera/wallpapers/chifuri-wallpaper.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raexera/yuki/719f884bbc2eaa546b14d39cd46193423335b14d/home/raexera/wallpapers/chifuri-wallpaper.jpg
--------------------------------------------------------------------------------
/home/raexera/wallpapers/nix-wallpaper.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raexera/yuki/719f884bbc2eaa546b14d39cd46193423335b14d/home/raexera/wallpapers/nix-wallpaper.png
--------------------------------------------------------------------------------
/home/raexera/window-managers/hyprland/config/binds.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | wayland.windowManager.hyprland.settings = {
3 | bind = let
4 | defaultApp = type: "${pkgs.gtk3}/bin/gtk-launch $(${pkgs.xdg-utils}/bin/xdg-mime query default ${type})";
5 | browser = defaultApp "x-scheme-handler/https";
6 | editor = defaultApp "text/plain";
7 | fileManager = defaultApp "inode/directory";
8 | in
9 | [
10 | # Compositor commands
11 | "SUPER, P, pseudo"
12 | "SUPER, S, togglesplit"
13 | "SUPER, Space, togglefloating"
14 | "SUPER, Q, killactive"
15 | "SUPER, F, fullscreen"
16 | "SUPER, C, centerwindow"
17 | "SUPER_SHIFT, P, pin"
18 |
19 | # Move focus
20 | "SUPER, left, movefocus, l"
21 | "SUPER, H, movefocus, l"
22 | "SUPER, right, movefocus, r"
23 | "SUPER, L, movefocus, r"
24 | "SUPER, up, movefocus, u"
25 | "SUPER, K, movefocus, u"
26 | "SUPER, down, movefocus, d"
27 | "SUPER, J, movefocus, d"
28 |
29 | # Move windows
30 | "SUPER_SHIFT, left, movewindow, l"
31 | "SUPER_SHIFT, H, movewindow, l"
32 | "SUPER_SHIFT, right, movewindow, r"
33 | "SUPER_SHIFT, L, movewindow, r"
34 | "SUPER_SHIFT, up, movewindow, u"
35 | "SUPER_SHIFT, K, movewindow, u"
36 | "SUPER_SHIFT, down, movewindow, d"
37 | "SUPER_SHIFT, J, movewindow, d"
38 |
39 | # Cycle through windows
40 | "ALT, Tab, cyclenext"
41 | "ALT, Tab, bringactivetotop"
42 |
43 | # Special workspaces
44 | "SUPER, grave, togglespecialworkspace, magic"
45 | "SUPER_SHIFT, grave, movetoworkspace, special:magic"
46 |
47 | # Cycle workspaces
48 | "SUPER, bracketleft, workspace, m-1"
49 | "SUPER, bracketright, workspace, m+1"
50 |
51 | # Cycle monitors
52 | "SUPER_SHIFT, bracketleft, focusmonitor, l"
53 | "SUPER_SHIFT, bracketright, focusmonitor, r"
54 |
55 | # Send focused workspace to left/right monitors
56 | "SUPER_SHIFT ALT, bracketleft, movecurrentworkspacetomonitor, l"
57 | "SUPER_SHIFT ALT, bracketright, movecurrentworkspacetomonitor, r"
58 |
59 | # Application Shortcuts
60 | "SUPER, Return, exec, kitty"
61 | "SUPER, B, exec, ${browser}"
62 | "SUPER, E, exec, ${editor}"
63 | "SUPER, N, exec, ${fileManager}"
64 | "CTRL_ALT, L, exec, pgrep hyprlock || hyprlock"
65 |
66 | # Screenshot
67 | ", Print, exec, grimblast --notify copysave area"
68 | "CTRL, Print, exec, grimblast --notify --cursor copysave output"
69 | "ALT, Print, exec, grimblast --notify --cursor copysave screen"
70 | ]
71 | ++ builtins.concatLists (builtins.genList (
72 | x: let
73 | ws = let
74 | c = (x + 1) / 10;
75 | in
76 | builtins.toString (x + 1 - (c * 10));
77 | in [
78 | "SUPER, ${ws}, workspace, ${toString (x + 1)}"
79 | "SUPER_SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
80 | "ALT_SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}"
81 | ]
82 | )
83 | 10);
84 |
85 | binde = [
86 | # Resize windows
87 | "SUPER_CTRL, left, resizeactive, -20 0"
88 | "SUPER_CTRL, H, resizeactive, -20 0"
89 | "SUPER_CTRL, right, resizeactive, 20 0"
90 | "SUPER_CTRL, L, resizeactive, 20 0"
91 | "SUPER_CTRL, up, resizeactive, 0 -20"
92 | "SUPER_CTRL, K, resizeactive, 0 -20"
93 | "SUPER_CTRL, down, resizeactive, 0 20"
94 | "SUPER_CTRL, J, resizeactive, 0 20"
95 |
96 | # Move windows
97 | "SUPER_ALT, left, moveactive, -20 0"
98 | "SUPER_ALT, H, moveactive, -20 0"
99 | "SUPER_ALT, right, moveactive, 20 0"
100 | "SUPER_ALT, L, moveactive, 20 0"
101 | "SUPER_ALT, up, moveactive, 0 -20"
102 | "SUPER_ALT, K, moveactive, 0 -20"
103 | "SUPER_ALT, down, moveactive, 0 20"
104 | "SUPER_ALT, J, moveactive, 0 20"
105 | ];
106 |
107 | bindr = [
108 | # Launcher
109 | "SUPER, SUPER_L, exec, pkill anyrun || anyrun"
110 | ];
111 |
112 | bindl = [
113 | # Toggle mute
114 | ",XF86AudioMute, exec, volumectl toggle-mute"
115 | ",XF86AudioMicMute, exec, volumectl toggle-mic-mute"
116 |
117 | # Toggle airplane mode
118 | ",XF86RFKill, exec, networkctl toggle-network"
119 | ];
120 |
121 | bindle = [
122 | # Audio control
123 | ",XF86AudioRaiseVolume, exec, volumectl up 5"
124 | ",XF86AudioLowerVolume, exec, volumectl down 5"
125 |
126 | # Brightness control
127 | ",XF86MonBrightnessUp, exec, lightctl up 5"
128 | ",XF86MonBrightnessDown, exec, lightctl down 5"
129 | ];
130 |
131 | # Mouse bindings
132 | bindm = [
133 | "SUPER, mouse:272, movewindow"
134 | "SUPER, mouse:273, resizewindow"
135 | "SUPER ALT, mouse:272, resizewindow"
136 | ];
137 | };
138 | }
139 |
--------------------------------------------------------------------------------
/home/raexera/window-managers/hyprland/config/rules.nix:
--------------------------------------------------------------------------------
1 | {
2 | wayland.windowManager.hyprland.settings = {
3 | windowrulev2 = [
4 | "dimaround, class:^(gcr-prompter)$"
5 | "dimaround, class:^(polkit-gnome-authentication-agent-1)$"
6 | "dimaround, class:^(xdg-desktop-portal-gtk)$"
7 |
8 | "float, class:^(blueman-manager)$"
9 | "float, class:^(com.saivert.pwvucontrol)$"
10 | "float, class:^(io.bassi.Amberol)$"
11 | "float, class:^(io.github.celluloid_player.Celluloid)$"
12 | "float, class:^(mpv)$"
13 | "float, class:^(nm-applet)$"
14 | "float, class:^(nm-connection-editor)$"
15 | "float, class:^(org.gnome.Calculator)$"
16 | "float, class:^(org.gnome.Loupe)$"
17 | "float, class:^(thunar)$"
18 | "float, class:^(xdg-desktop-portal-gtk)$"
19 |
20 | "float, title:^(File Upload)(.*)$"
21 | "float, title:^(Library)(.*)$"
22 | "float, title:^(Open File)(.*)$"
23 | "float, title:^(Open Folder)(.*)$"
24 | "float, title:^(Save As)(.*)$"
25 | "float, title:^(Select a File)(.*)$"
26 |
27 | "float, title:^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$"
28 | "pin, title:^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$"
29 |
30 | "idleinhibit fullscreen, class:^(.*)$"
31 | "idleinhibit fullscreen, title:^(.*)$"
32 | "idleinhibit fullscreen, fullscreen:1"
33 |
34 | "suppressevent maximize, class:.*"
35 |
36 | "bordersize 0, floating:0, onworkspace:w[tv1]"
37 | "rounding 0, floating:0, onworkspace:w[tv1]"
38 | "bordersize 0, floating:0, onworkspace:f[1]"
39 | "rounding 0, floating:0, onworkspace:f[1]"
40 | ];
41 |
42 | workspace = [
43 | "w[tv1], gapsout:0, gapsin:0"
44 | "f[1], gapsout:0, gapsin:0"
45 | ];
46 | };
47 | }
48 |
--------------------------------------------------------------------------------
/home/raexera/window-managers/hyprland/config/settings.nix:
--------------------------------------------------------------------------------
1 | {config, ...}: {
2 | wayland.windowManager.hyprland.settings = let
3 | pointer = config.home.pointerCursor;
4 | inherit (config.theme.colorscheme) colors;
5 | in {
6 | env = [
7 | "CLUTTER_BACKEND,wayland"
8 | "GDK_BACKEND,wayland,x11,*"
9 | "SDL_VIDEODRIVER,wayland"
10 | "XDG_CURRENT_DESKTOP,Hyprland"
11 | "XDG_SESSION_DESKTOP,Hyprland"
12 | "XDG_SESSION_TYPE,wayland"
13 | "QT_AUTO_SCREEN_SCALE_FACTOR,1"
14 | "QT_QPA_PLATFORM,wayland;xcb"
15 | "QT_QPA_PLATFORMTHEME,qt5ct"
16 | "QT_STYLE_OVERRIDE,kvantum"
17 | "QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
18 | "GTK_THEME,${config.gtk.theme.name}"
19 | "XCURSOR_THEME,${pointer.name}"
20 | "XCURSOR_SIZE,${toString pointer.size}"
21 | ];
22 |
23 | exec-once = [
24 | "hyprctl setcursor ${pointer.name} ${toString pointer.size}"
25 | ];
26 |
27 | general = {
28 | gaps_in = 5;
29 | gaps_out = 10;
30 |
31 | border_size = 2;
32 | "col.active_border" = "rgb(${colors.blue})";
33 | "col.inactive_border" = "rgb(${colors.gray0})";
34 |
35 | resize_on_border = true;
36 |
37 | # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
38 | allow_tearing = false;
39 |
40 | layout = "dwindle";
41 | };
42 |
43 | dwindle = {
44 | pseudotile = true;
45 | preserve_split = true;
46 | };
47 |
48 | master = {
49 | new_status = "master";
50 | };
51 |
52 | decoration = {
53 | rounding = 12;
54 |
55 | active_opacity = 1.0;
56 | inactive_opacity = 1.0;
57 | fullscreen_opacity = 1.0;
58 |
59 | dim_inactive = false;
60 |
61 | blur.enabled = false;
62 | shadow.enabled = false;
63 | };
64 |
65 | animations = {
66 | enabled = true;
67 | first_launch_animation = true;
68 |
69 | bezier = [
70 | "easeOutQuart, 0.25, 1, 0.5, 1"
71 | ];
72 |
73 | animation = [
74 | "windows, 1, 3, easeOutQuart, slide"
75 | "layers, 1, 3, easeOutQuart, fade"
76 | "fade, 1, 3, easeOutQuart"
77 | "border, 1, 5, easeOutQuart"
78 | "workspaces, 1, 5, easeOutQuart, slide"
79 | "specialWorkspace, 1, 5, easeOutQuart, slidevert"
80 | ];
81 | };
82 |
83 | input = {
84 | kb_layout = "us";
85 | follow_mouse = 1;
86 | accel_profile = "flat";
87 |
88 | touchpad = {
89 | disable_while_typing = true;
90 | natural_scroll = true;
91 | tap-to-click = true;
92 | tap-and-drag = true;
93 | scroll_factor = 0.5;
94 | };
95 | };
96 |
97 | gestures = {
98 | workspace_swipe = true;
99 | workspace_swipe_forever = true;
100 | };
101 |
102 | misc = {
103 | animate_manual_resizes = true;
104 | animate_mouse_windowdragging = true;
105 | disable_autoreload = true;
106 | disable_hyprland_logo = true;
107 | force_default_wallpaper = 0;
108 | vfr = true;
109 | vrr = 1;
110 | };
111 |
112 | binds = {
113 | allow_workspace_cycles = true;
114 | };
115 |
116 | xwayland = {
117 | enabled = true;
118 | force_zero_scaling = true;
119 | };
120 |
121 | plugin = {
122 | hyprexpo = {
123 | columns = 3;
124 | gap_size = 4;
125 | bg_col = "rgb(${colors.black0})";
126 | enable_gesture = true;
127 | gesture_fingers = 3;
128 | gesture_distance = 300;
129 | gesture_positive = false;
130 | };
131 | };
132 | };
133 | }
134 |
--------------------------------------------------------------------------------
/home/raexera/window-managers/hyprland/default.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | imports = [
3 | ./config/binds.nix
4 | ./config/rules.nix
5 | ./config/settings.nix
6 | ./programs/anyrun.nix
7 | ./programs/waybar.nix
8 | ./services/cliphist.nix
9 | ./services/dunst.nix
10 | ./services/hypridle.nix
11 | ./services/hyprlock.nix
12 | ./services/hyprpaper.nix
13 | ./services/polkit-agent.nix
14 | ];
15 |
16 | wayland.windowManager.hyprland = {
17 | enable = true;
18 | plugins = with pkgs.hyprlandPlugins; [
19 | hyprexpo
20 | ];
21 | systemd = {
22 | enable = true;
23 | variables = ["--all"];
24 | };
25 | };
26 | }
27 |
--------------------------------------------------------------------------------
/home/raexera/window-managers/hyprland/programs/anyrun.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | inputs,
4 | pkgs,
5 | ...
6 | }: {
7 | imports = [
8 | inputs.anyrun.homeManagerModules.default
9 | ];
10 |
11 | programs.anyrun = {
12 | enable = true;
13 | config = {
14 | x.fraction = 0.5;
15 | y.fraction = 0.3;
16 | width.fraction = 0.5;
17 | hideIcons = false;
18 | ignoreExclusiveZones = false;
19 | layer = "overlay";
20 | hidePluginInfo = true;
21 | closeOnClick = false;
22 | showResultsImmediately = false;
23 | maxEntries = 10;
24 | plugins = with inputs.anyrun.packages.${pkgs.system}; [
25 | applications
26 | rink
27 | shell
28 | symbols
29 | ];
30 | };
31 |
32 | extraConfigFiles = {
33 | "applications.ron".text = ''
34 | Config(
35 | desktop_actions: true,
36 | max_entries: 10,
37 | terminal: Some("kitty"),
38 | )
39 | '';
40 | };
41 |
42 | extraCss = let
43 | inherit (config.theme.colorscheme) xcolors;
44 | in ''
45 | /* Global */
46 | * {
47 | all: unset;
48 | font-family: "GeistMono Nerd Font Propo", sans-serif;
49 | font-size: 11pt;
50 | font-weight: 500;
51 | transition: 300ms;
52 | }
53 |
54 | /* Modules */
55 | #window,
56 | #match,
57 | #entry,
58 | #plugin,
59 | #main {
60 | background: transparent;
61 | }
62 |
63 | /* Entry */
64 | #entry {
65 | background: ${xcolors.black3};
66 | border-radius: 12px;
67 | margin: 0.5rem;
68 | padding: 0.5rem;
69 | }
70 |
71 | /* Match */
72 | #match.activatable {
73 | background: ${xcolors.black3};
74 | padding: 0.5rem 1rem;
75 | }
76 |
77 | #match.activatable:first-child {
78 | border-radius: 12px 12px 0 0;
79 | }
80 |
81 | #match.activatable:last-child {
82 | border-radius: 0 0 12px 12px;
83 | }
84 |
85 | #match.activatable:only-child {
86 | border-radius: 12px;
87 | }
88 |
89 | /* Hover and selected states */
90 | #match:selected,
91 | #match:hover,
92 | #plugin:hover {
93 | background: lighter(${xcolors.black3});
94 | }
95 |
96 | /* Main container */
97 | box#main {
98 | background: ${xcolors.black0};
99 | border-radius: 12px;
100 | padding: 0.5rem;
101 | }
102 |
103 | /* Plugin within list */
104 | list > #plugin {
105 | border-radius: 12px;
106 | margin: 0.5rem;
107 | }
108 | '';
109 | };
110 | }
111 |
--------------------------------------------------------------------------------
/home/raexera/window-managers/hyprland/programs/waybar.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | pkgs,
4 | ...
5 | }: let
6 | inherit (config.theme.colorscheme) xcolors;
7 | in {
8 | programs.waybar = {
9 | enable = true;
10 | systemd = {
11 | enable = true;
12 | target = "graphical-session.target";
13 | };
14 | settings = [
15 | {
16 | layer = "top";
17 | position = "top";
18 | exclusive = true;
19 | fixed-center = true;
20 | gtk-layer-shell = true;
21 | spacing = 0;
22 | margin-top = 0;
23 | margin-bottom = 0;
24 | margin-left = 0;
25 | margin-right = 0;
26 | modules-left = [
27 | "image"
28 | "hyprland/workspaces"
29 | "idle_inhibitor"
30 | "hyprland/window"
31 | ];
32 | modules-right = [
33 | "group/network-modules"
34 | "group/wireplumber-modules"
35 | "group/backlight-modules"
36 | "group/battery-modules"
37 | "tray"
38 | "clock"
39 | "group/powermenu"
40 | ];
41 |
42 | "image" = {
43 | path = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
44 | size = 24;
45 | tooltip = false;
46 | };
47 |
48 | "hyprland/workspaces" = {
49 | format = "{id}";
50 | };
51 |
52 | idle_inhibitor = {
53 | format = "{icon}";
54 | format-icons = {
55 | activated = "";
56 | deactivated = "";
57 | };
58 | };
59 |
60 | "hyprland/window" = {
61 | format = "{title}";
62 | icon = true;
63 | icon-size = 24;
64 | separate-outputs = true;
65 | };
66 |
67 | "group/network-modules" = {
68 | modules = [
69 | "network#icon"
70 | "network#address"
71 | ];
72 | orientation = "inherit";
73 | };
74 | "network#icon" = {
75 | format-disconnected = "";
76 | format-ethernet = "";
77 | format-wifi = "";
78 | tooltip-format-wifi = "WiFi: {essid} ({signalStrength}%)\n {bandwidthUpBytes} {bandwidthDownBytes}";
79 | tooltip-format-ethernet = "Ethernet: {ifname}\n {bandwidthUpBytes} {bandwidthDownBytes}";
80 | tooltip-format-disconnected = "Disconnected";
81 | on-click = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor";
82 | };
83 | "network#address" = {
84 | format-disconnected = "Disconnected";
85 | format-ethernet = "{ipaddr}/{cidr}";
86 | format-wifi = "{essid}";
87 | tooltip-format-wifi = "WiFi: {essid} ({signalStrength}%)\n {bandwidthUpBytes} {bandwidthDownBytes}";
88 | tooltip-format-ethernet = "Ethernet: {ifname}\n {bandwidthUpBytes} {bandwidthDownBytes}";
89 | tooltip-format-disconnected = "Disconnected";
90 | };
91 |
92 | "group/wireplumber-modules" = {
93 | modules = [
94 | "wireplumber#icon"
95 | "wireplumber#volume"
96 | ];
97 | orientation = "inherit";
98 | };
99 | "wireplumber#icon" = {
100 | format = "{icon}";
101 | format-muted = "";
102 | format-icons = [
103 | ""
104 | ""
105 | ""
106 | ];
107 | on-click = "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle &> /dev/null";
108 | on-scroll-up = "${pkgs.wireplumber}/bin/wpctl set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 1%+ &> /dev/null";
109 | on-scroll-down = "${pkgs.wireplumber}/bin/wpctl set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 1%- &> /dev/null";
110 | tooltip-format = "Volume: {volume}%";
111 | };
112 | "wireplumber#volume" = {
113 | format = "{volume}%";
114 | tooltip-format = "Volume: {volume}%";
115 | };
116 |
117 | "group/backlight-modules" = {
118 | modules = [
119 | "backlight#icon"
120 | "backlight#percent"
121 | ];
122 | orientation = "inherit";
123 | };
124 | "backlight#icon" = {
125 | format = "{icon}";
126 | format-icons = [
127 | ""
128 | ""
129 | ""
130 | ];
131 | on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl set 1%+ &> /dev/null";
132 | on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl set 1%- &> /dev/null";
133 | tooltip-format = "Backlight: {percent}%";
134 | };
135 | "backlight#percent" = {
136 | format = "{percent}%";
137 | tooltip-format = "Backlight: {percent}%";
138 | };
139 |
140 | "group/battery-modules" = {
141 | modules = [
142 | "battery#icon"
143 | "battery#capacity"
144 | ];
145 | orientation = "inherit";
146 | };
147 | "battery#icon" = {
148 | format = "{icon}";
149 | format-charging = "";
150 | format-icons = [
151 | ""
152 | ""
153 | ""
154 | ""
155 | ""
156 | ""
157 | ""
158 | ""
159 | ""
160 | ""
161 | ""
162 | ];
163 | format-plugged = "";
164 | states = {
165 | warning = 30;
166 | critical = 15;
167 | };
168 | tooltip-format = "{timeTo}, {capacity}%";
169 | };
170 | "battery#capacity" = {
171 | format = "{capacity}%";
172 | tooltip-format = "{timeTo}, {capacity}%";
173 | };
174 |
175 | tray = {
176 | icon-size = 24;
177 | spacing = 10;
178 | show-passive-items = true;
179 | };
180 |
181 | clock = {
182 | actions = {
183 | on-scroll-down = "shift_down";
184 | on-scroll-up = "shift_up";
185 | };
186 | calendar = {
187 | format = {
188 | days = "{}";
189 | months = "{}";
190 | today = "{}";
191 | weekdays = "{}";
192 | };
193 | mode = "month";
194 | on-scroll = 1;
195 | };
196 | format = "{:%I:%M %p}";
197 | tooltip-format = "{calendar}";
198 | };
199 |
200 | "group/powermenu" = {
201 | drawer = {
202 | children-class = "powermenu-child";
203 | transition-duration = 300;
204 | transition-left-to-right = false;
205 | };
206 | modules = [
207 | "custom/power"
208 | "custom/lock"
209 | "custom/suspend"
210 | "custom/exit"
211 | "custom/reboot"
212 | ];
213 | orientation = "inherit";
214 | };
215 | "custom/power" = {
216 | format = "";
217 | on-click = "${pkgs.systemd}/bin/systemctl poweroff";
218 | tooltip = false;
219 | };
220 | "custom/lock" = {
221 | format = "";
222 | on-click = "${pkgs.systemd}/bin/loginctl lock-session";
223 | tooltip = false;
224 | };
225 | "custom/suspend" = {
226 | format = "";
227 | on-click = "${pkgs.systemd}/bin/systemctl suspend";
228 | tooltip = false;
229 | };
230 | "custom/exit" = {
231 | format = "";
232 | on-click = "${pkgs.systemd}/bin/loginctl terminate-user $USER";
233 | tooltip = false;
234 | };
235 | "custom/reboot" = {
236 | format = "";
237 | on-click = "${pkgs.systemd}/bin/systemctl reboot";
238 | tooltip = false;
239 | };
240 | }
241 | ];
242 |
243 | style = ''
244 | /* Global */
245 | * {
246 | all: unset;
247 | font-family: "GeistMono Nerd Font Propo", sans-serif;
248 | font-size: 11pt;
249 | font-weight: 500;
250 | }
251 |
252 | /* Menu */
253 | menu {
254 | background: ${xcolors.black0};
255 | border-radius: 12px;
256 | }
257 |
258 | menu separator {
259 | background: ${xcolors.black3};
260 | }
261 |
262 | menu menuitem {
263 | background: transparent;
264 | padding: 0.5rem;
265 | transition: 300ms linear;
266 | }
267 |
268 | menu menuitem:hover {
269 | background: lighter(${xcolors.black3});
270 | }
271 |
272 | menu menuitem:first-child {
273 | border-radius: 12px 12px 0 0;
274 | }
275 |
276 | menu menuitem:last-child {
277 | border-radius: 0 0 12px 12px;
278 | }
279 |
280 | menu menuitem:only-child {
281 | border-radius: 12px;
282 | }
283 |
284 | /* Tooltip */
285 | tooltip {
286 | background: ${xcolors.black0};
287 | border-radius: 12px;
288 | }
289 |
290 | tooltip label {
291 | margin: 0.5rem;
292 | }
293 |
294 | /* Waybar */
295 | window#waybar {
296 | background: ${xcolors.black0};
297 | }
298 |
299 | .modules-left {
300 | padding-left: 0.25rem;
301 | }
302 |
303 | .modules-right {
304 | padding-right: 0.25rem;
305 | }
306 |
307 | /* Modules */
308 | #workspaces,
309 | #workspaces button,
310 | #idle_inhibitor,
311 | #network-modules,
312 | #wireplumber-modules,
313 | #backlight-modules,
314 | #battery-modules,
315 | #tray,
316 | #clock,
317 | #custom-exit,
318 | #custom-lock,
319 | #custom-suspend,
320 | #custom-reboot,
321 | #custom-power {
322 | background: ${xcolors.black3};
323 | border-radius: 8px;
324 | margin: 0.5rem 0.25rem;
325 | transition: 300ms linear;
326 | }
327 |
328 | #image,
329 | #window,
330 | #network.address,
331 | #wireplumber.volume,
332 | #backlight.percent,
333 | #battery.capacity,
334 | #tray,
335 | #clock {
336 | padding: 0.25rem 0.75rem;
337 | }
338 |
339 | #idle_inhibitor,
340 | #network.icon,
341 | #wireplumber.icon,
342 | #backlight.icon,
343 | #battery.icon,
344 | #custom-exit,
345 | #custom-lock,
346 | #custom-suspend,
347 | #custom-reboot,
348 | #custom-power {
349 | background: ${xcolors.blue};
350 | color: ${xcolors.black3};
351 | border-radius: 8px;
352 | font-size: 13pt;
353 | padding: 0.25rem;
354 | min-width: 1.5rem;
355 | transition: 300ms linear;
356 | }
357 |
358 | /* Workspaces */
359 | #workspaces button {
360 | margin: 0;
361 | padding: 0.25rem;
362 | min-width: 1.5rem;
363 | }
364 |
365 | #workspaces button label {
366 | color: ${xcolors.white};
367 | }
368 |
369 | #workspaces button.empty label {
370 | color: ${xcolors.gray0};
371 | }
372 |
373 | #workspaces button.urgent label,
374 | #workspaces button.active label {
375 | color: ${xcolors.black3};
376 | }
377 |
378 | #workspaces button.urgent {
379 | background: ${xcolors.red};
380 | }
381 |
382 | #workspaces button.active {
383 | background: ${xcolors.blue};
384 | }
385 |
386 | /* Idle Inhibitor */
387 | #idle_inhibitor {
388 | background: ${xcolors.black3};
389 | color: ${xcolors.blue};
390 | }
391 |
392 | #idle_inhibitor.deactivated {
393 | color: ${xcolors.gray0};
394 | }
395 |
396 | /* Systray */
397 | #tray > .passive {
398 | -gtk-icon-effect: dim;
399 | }
400 |
401 | #tray > .needs-attention {
402 | -gtk-icon-effect: highlight;
403 | background: ${xcolors.red};
404 | }
405 |
406 | /* Hover effects */
407 | #workspaces button:hover,
408 | #idle_inhibitor:hover,
409 | #idle_inhibitor.deactivated:hover,
410 | #clock:hover {
411 | background: lighter(${xcolors.black3});
412 | }
413 |
414 | #workspaces button.urgent:hover {
415 | background: lighter(${xcolors.red});
416 | }
417 |
418 | #workspaces button.active:hover,
419 | #network.icon:hover,
420 | #wireplumber.icon:hover,
421 | #custom-exit:hover,
422 | #custom-lock:hover,
423 | #custom-suspend:hover,
424 | #custom-reboot:hover,
425 | #custom-power:hover {
426 | background: lighter(${xcolors.blue});
427 | }
428 |
429 | #workspaces button.urgent:hover label,
430 | #workspaces button.active:hover label,
431 | #network.icon:hover label,
432 | #wireplumber.icon:hover label,
433 | #custom-exit:hover label,
434 | #custom-lock:hover label,
435 | #custom-suspend:hover label,
436 | #custom-reboot:hover label,
437 | #custom-power:hover label {
438 | color: lighter(${xcolors.black3});
439 | }
440 |
441 | #workspaces button:hover label {
442 | color: lighter(${xcolors.white});
443 | }
444 |
445 | #workspaces button.empty:hover label {
446 | color: lighter(${xcolors.gray0});
447 | }
448 |
449 | #idle_inhibitor:hover {
450 | color: lighter(${xcolors.blue});
451 | }
452 |
453 | #idle_inhibitor.deactivated:hover {
454 | color: lighter(${xcolors.gray0});
455 | }
456 | '';
457 | };
458 | }
459 |
--------------------------------------------------------------------------------
/home/raexera/window-managers/hyprland/services/cliphist.nix:
--------------------------------------------------------------------------------
1 | {
2 | services.cliphist = {
3 | enable = true;
4 | allowImages = true;
5 | systemdTarget = "graphical-session.target";
6 | };
7 | }
8 |
--------------------------------------------------------------------------------
/home/raexera/window-managers/hyprland/services/dunst.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | pkgs,
4 | ...
5 | }: {
6 | services.dunst = {
7 | enable = true;
8 | iconTheme = {
9 | name = "Papirus-Dark";
10 | package = pkgs.papirus-icon-theme;
11 | };
12 | settings = let
13 | inherit (config.theme.colorscheme) xcolors;
14 | in {
15 | global = {
16 | alignment = "left";
17 | corner_radius = 12;
18 | ellipsize = "middle";
19 | enable_recursive_icon_lookup = true;
20 | follow = "mouse";
21 | font = "GeistMono Nerd Font Propo 12";
22 | force_xwayland = false;
23 | format = "%a\\n%s\\n%b";
24 | frame_color = "${xcolors.gray0}";
25 | frame_width = 2;
26 | gap_size = 5;
27 | hide_duplicate_count = false;
28 | horizontal_padding = 12;
29 | icon_corner_radius = 0;
30 | icon_position = "left";
31 | icon_theme = "Papirus-Dark";
32 | ignore_newline = false;
33 | indicate_hidden = true;
34 | layer = "overlay";
35 | line_height = 0;
36 | markup = "full";
37 | max_icon_size = 64;
38 | min_icon_size = 48;
39 | mouse_left_click = "do_action";
40 | mouse_middle_click = "close_all";
41 | mouse_right_click = "close_current";
42 | notification_limit = 20;
43 | offset = "(0, 10)";
44 | origin = "top-center";
45 | padding = 12;
46 | progress_bar = true;
47 | progress_bar_corner_radius = 12;
48 | progress_bar_frame_width = 0;
49 | progress_bar_height = 12;
50 | progress_bar_max_width = 300;
51 | progress_bar_min_width = 150;
52 | separator_color = "auto";
53 | separator_height = 2;
54 | show_indicators = true;
55 | sort = true;
56 | stack_duplicates = true;
57 | text_icon_padding = 12;
58 | vertical_alignment = "center";
59 | width = 300;
60 | word_wrap = true;
61 | };
62 |
63 | fullscreen_delay_everything.fullscreen = "delay";
64 |
65 | urgency_low = {
66 | background = "${xcolors.black0}";
67 | foreground = "${xcolors.white}";
68 | highlight = "${xcolors.blue}";
69 | frame_color = "${xcolors.gray0}";
70 | timeout = 2;
71 | };
72 |
73 | urgency_normal = {
74 | background = "${xcolors.black0}";
75 | foreground = "${xcolors.white}";
76 | highlight = "${xcolors.blue}";
77 | frame_color = "${xcolors.gray0}";
78 | timeout = 2;
79 | };
80 |
81 | urgency_critical = {
82 | background = "${xcolors.black0}";
83 | foreground = "${xcolors.white}";
84 | highlight = "${xcolors.blue}";
85 | frame_color = "${xcolors.red}";
86 | timeout = 10;
87 | };
88 | };
89 | };
90 | }
91 |
--------------------------------------------------------------------------------
/home/raexera/window-managers/hyprland/services/hypridle.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | lib,
4 | config,
5 | ...
6 | }: {
7 | services.hypridle = {
8 | enable = true;
9 | settings = {
10 | general = {
11 | lock_cmd = lib.getExe config.programs.hyprlock.package;
12 | before_sleep_cmd = "${pkgs.systemd}/bin/loginctl lock-session";
13 | after_sleep_cmd = "hyprctl dispatch dpms on";
14 | };
15 |
16 | listener = [
17 | {
18 | timeout = 300;
19 | on-timeout = "${pkgs.systemd}/bin/loginctl lock-session";
20 | }
21 | {
22 | timeout = 330;
23 | on-timeout = "hyprctl dispatch dpms off";
24 | on-resume = "hyprctl dispatch dpms on";
25 | }
26 | {
27 | timeout = 600;
28 | on-timeout = "${pkgs.systemd}/bin/systemctl suspend";
29 | }
30 | ];
31 | };
32 | };
33 | }
34 |
--------------------------------------------------------------------------------
/home/raexera/window-managers/hyprland/services/hyprlock.nix:
--------------------------------------------------------------------------------
1 | {config, ...}: {
2 | programs.hyprlock = {
3 | enable = true;
4 | settings = let
5 | inherit (config.theme.colorscheme) colors;
6 | in {
7 | general = {
8 | disable_loading_bar = true;
9 | hide_cursor = true;
10 | };
11 |
12 | background = [
13 | {
14 | monitor = "";
15 | path = "screenshot";
16 | blur_passes = 2;
17 | blur_size = 2;
18 | new_optimizations = true;
19 | ignore_opacity = false;
20 | }
21 | ];
22 |
23 | input-field = [
24 | {
25 | monitor = "";
26 | size = "300, 50";
27 | outline_thickness = 2;
28 | outer_color = "rgb(${colors.gray0})";
29 | inner_color = "rgb(${colors.black0})";
30 | font_color = "rgb(${colors.white})";
31 | check_color = "rgb(${colors.blue})";
32 | fail_color = "rgb(${colors.red})";
33 | fade_on_empty = false;
34 | placeholder_text = "Enter Password";
35 | dots_spacing = 0.2;
36 | dots_center = true;
37 | position = "0, 125";
38 | valign = "bottom";
39 | halign = "center";
40 | }
41 | ];
42 |
43 | label = [
44 | {
45 | monitor = "";
46 | text = "cmd[update:3600000] date +'%A, %B %d'";
47 | font_family = "GeistMono Nerd Font Propo Bold";
48 | font_size = 36;
49 | color = "rgb(${colors.white})";
50 | position = "0, -150";
51 | valign = "top";
52 | halign = "center";
53 | }
54 | {
55 | monitor = "";
56 | text = "$TIME";
57 | font_family = "GeistMono Nerd Font Propo Bold";
58 | font_size = 132;
59 | color = "rgb(${colors.white})";
60 | position = "0, -200";
61 | valign = "top";
62 | halign = "center";
63 | }
64 | {
65 | monitor = "";
66 | text = " $USER";
67 | font_family = "GeistMono Nerd Font Propo Bold";
68 | font_size = 24;
69 | color = "rgb(${colors.white})";
70 | position = "0, 200";
71 | valign = "bottom";
72 | halign = "center";
73 | }
74 | ];
75 | };
76 | };
77 | }
78 |
--------------------------------------------------------------------------------
/home/raexera/window-managers/hyprland/services/hyprpaper.nix:
--------------------------------------------------------------------------------
1 | {config, ...}: {
2 | services.hyprpaper = {
3 | enable = true;
4 | settings = {
5 | preload = ["${config.theme.wallpaper}"];
6 | wallpaper = [", ${config.theme.wallpaper}"];
7 | };
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/home/raexera/window-managers/hyprland/services/polkit-agent.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | systemd.user.services.polkit-gnome-authentication-agent-1 = {
3 | Unit = {
4 | PartOf = ["graphical-session.target"];
5 | After = ["graphical-session.target"];
6 | };
7 |
8 | Service = {
9 | Type = "simple";
10 | ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
11 | Restart = "on-failure";
12 | RestartSec = 1;
13 | TimeoutStopSec = 10;
14 | };
15 |
16 | Install = {
17 | WantedBy = ["graphical-session.target"];
18 | };
19 | };
20 | }
21 |
--------------------------------------------------------------------------------
/hosts/config/fonts/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | imports = [
3 | ./fontconfig.nix
4 | ./fontdir.nix
5 | ./packages.nix
6 | ];
7 | }
8 |
--------------------------------------------------------------------------------
/hosts/config/fonts/fontconfig.nix:
--------------------------------------------------------------------------------
1 | {
2 | fonts.fontconfig = {
3 | enable = true;
4 |
5 | antialias = true;
6 |
7 | hinting = {
8 | enable = true;
9 | autohint = false;
10 | style = "full";
11 | };
12 |
13 | subpixel = {
14 | lcdfilter = "default";
15 | rgba = "rgb";
16 | };
17 |
18 | defaultFonts = {
19 | monospace = ["GeistMono Nerd Font"];
20 | sansSerif = ["Geist" "Noto Color Emoji"];
21 | serif = ["Noto Serif" "Noto Color Emoji"];
22 | emoji = ["Noto Color Emoji"];
23 | };
24 | };
25 | }
26 |
--------------------------------------------------------------------------------
/hosts/config/fonts/fontdir.nix:
--------------------------------------------------------------------------------
1 | {
2 | fonts.fontDir = {
3 | enable = true;
4 | decompressFonts = true;
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/hosts/config/fonts/packages.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | fonts = {
3 | enableDefaultPackages = true;
4 |
5 | packages = with pkgs; [
6 | corefonts
7 | geist-font
8 | nerd-fonts.geist-mono
9 | noto-fonts
10 | noto-fonts-cjk-serif
11 | noto-fonts-cjk-sans
12 | vistafonts
13 | ];
14 | };
15 | }
16 |
--------------------------------------------------------------------------------
/hosts/config/hardware/acpi_call/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | ...
5 | }: {
6 | boot = lib.mkIf config.services.tlp.enable {
7 | kernelModules = ["acpi_call"];
8 | extraModulePackages = with config.boot.kernelPackages; [acpi_call];
9 | };
10 | }
11 |
--------------------------------------------------------------------------------
/hosts/config/hardware/bluetooth/default.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | hardware.bluetooth = {
3 | enable = true;
4 | powerOnBoot = false;
5 | package = pkgs.bluez5-experimental;
6 | settings = {
7 | General = {
8 | Experimental = true;
9 | FastConnectable = true;
10 | };
11 | };
12 | };
13 | }
14 |
--------------------------------------------------------------------------------
/hosts/config/hardware/cpu/intel/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | ...
5 | }: {
6 | hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
7 | }
8 |
--------------------------------------------------------------------------------
/hosts/config/hardware/gpu/intel/default.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | boot.initrd.kernelModules = ["i915"];
3 |
4 | hardware.graphics = {
5 | extraPackages = with pkgs; [
6 | intel-media-driver
7 | intel-compute-runtime
8 | vpl-gpu-rt
9 | ];
10 | extraPackages32 = with pkgs.driversi686Linux; [
11 | intel-media-driver
12 | ];
13 | };
14 | }
15 |
--------------------------------------------------------------------------------
/hosts/config/hardware/gpu/nvidia/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | ...
5 | }: let
6 | inherit (lib) mkIf mkDefault versionOlder;
7 |
8 | # Use the latest possible nvidia package
9 | nvStable = config.boot.kernelPackages.nvidiaPackages.stable.version;
10 | nvBeta = config.boot.kernelPackages.nvidiaPackages.beta.version;
11 |
12 | nvidiaPackage =
13 | if (versionOlder nvBeta nvStable)
14 | then config.boot.kernelPackages.nvidiaPackages.stable
15 | else config.boot.kernelPackages.nvidiaPackages.beta;
16 |
17 | pCfg = config.hardware.nvidia.prime;
18 | in {
19 | boot = {
20 | kernelModules = [
21 | "nvidia"
22 | "nvidia_modeset"
23 | "nvidia_drm"
24 | "nvidia_uvm"
25 | ];
26 |
27 | blacklistedKernelModules = ["nouveau"];
28 | };
29 |
30 | environment.sessionVariables = {
31 | GBM_BACKEND = "nvidia-drm";
32 | __GLX_VENDOR_LIBRARY_NAME = "nvidia";
33 | NVD_BACKEND = "direct";
34 | };
35 |
36 | hardware.nvidia = {
37 | package = mkDefault nvidiaPackage;
38 | open = mkDefault false;
39 |
40 | powerManagement.enable = mkDefault true;
41 | dynamicBoost.enable = mkDefault true;
42 | modesetting.enable = mkDefault true;
43 |
44 | prime.offload = {
45 | enable = mkIf (pCfg.nvidiaBusId != "" && (pCfg.intelBusId != "" || pCfg.amdgpuBusId != "")) true;
46 | enableOffloadCmd = mkIf pCfg.offload.enable true;
47 | };
48 | };
49 | }
50 |
--------------------------------------------------------------------------------
/hosts/config/hardware/ssd/default.nix:
--------------------------------------------------------------------------------
1 | {lib, ...}: {
2 | services.fstrim = {
3 | enable = lib.mkDefault true;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/hosts/config/nix/cachix.nix:
--------------------------------------------------------------------------------
1 | {
2 | nix.settings = {
3 | substituters = [
4 | "https://cache.nixos.org?priority=10"
5 |
6 | "https://anyrun.cachix.org"
7 | "https://hyprland.cachix.org"
8 | "https://nix-community.cachix.org"
9 | ];
10 |
11 | trusted-public-keys = [
12 | "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
13 |
14 | "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
15 | "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
16 | "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
17 | ];
18 | };
19 | }
20 |
--------------------------------------------------------------------------------
/hosts/config/nix/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | imports = [
3 | ./cachix.nix
4 | ./nix.nix
5 | ./nixpkgs.nix
6 | ];
7 | }
8 |
--------------------------------------------------------------------------------
/hosts/config/nix/nix.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | inputs,
4 | lib,
5 | pkgs,
6 | ...
7 | }: {
8 | nix = {
9 | package = pkgs.lix;
10 |
11 | # Pin the registry to avoid downloading and evaling a new nixpkgs version every time
12 | registry = let
13 | flakeInputs = lib.filterAttrs (_: v: lib.isType "flake" v) inputs;
14 | in
15 | lib.mapAttrs (_: v: {flake = v;}) flakeInputs;
16 |
17 | # Set the path for channels compat
18 | nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
19 |
20 | settings = {
21 | auto-optimise-store = true;
22 | builders-use-substitutes = true;
23 | experimental-features = ["nix-command" "flakes"];
24 | flake-registry = "/etc/nix/registry.json";
25 | keep-derivations = true;
26 | keep-outputs = true;
27 | trusted-users = ["root" "@wheel"];
28 | };
29 | };
30 |
31 | # We need git for flakes
32 | environment.systemPackages = [pkgs.git];
33 | }
34 |
--------------------------------------------------------------------------------
/hosts/config/nix/nixpkgs.nix:
--------------------------------------------------------------------------------
1 | {inputs, ...}: {
2 | nixpkgs = {
3 | config = {
4 | allowUnfree = true;
5 | };
6 |
7 | overlays = [
8 | inputs.nix-vscode-extensions.overlays.default
9 | inputs.rust-overlay.overlays.default
10 | ];
11 | };
12 | }
13 |
--------------------------------------------------------------------------------
/hosts/config/programs/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | imports = [
3 | ./neovim.nix
4 | ./nh.nix
5 | ./xwayland.nix
6 | ];
7 | }
8 |
--------------------------------------------------------------------------------
/hosts/config/programs/neovim.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.neovim = {
3 | enable = true;
4 | defaultEditor = true;
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/hosts/config/programs/nh.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nh = {
3 | enable = true;
4 | flake = "/home/raexera/.yuki";
5 | clean = {
6 | enable = true;
7 | extraArgs = "--keep-since 1w";
8 | };
9 | };
10 | }
11 |
--------------------------------------------------------------------------------
/hosts/config/programs/xwayland.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.xwayland = {
3 | enable = true;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/hosts/config/security/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | security = {
3 | # Allow hyprlock to unlock the screen
4 | pam.services.hyprlock = {};
5 |
6 | # Enable polkit
7 | polkit.enable = true;
8 |
9 | # Enable the RealtimeKit system service
10 | rtkit.enable = true;
11 |
12 | # Don't ask for password for wheel group
13 | sudo.wheelNeedsPassword = false;
14 |
15 | # Enable Trusted Platform Module 2 support
16 | tpm2.enable = true;
17 | };
18 | }
19 |
--------------------------------------------------------------------------------
/hosts/config/services/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | imports = [
3 | ./networking.nix
4 | ./openssh.nix
5 | ];
6 | }
7 |
--------------------------------------------------------------------------------
/hosts/config/services/networking.nix:
--------------------------------------------------------------------------------
1 | {
2 | networking = {
3 | networkmanager = {
4 | enable = true;
5 | wifi = {
6 | backend = "iwd";
7 | powersave = true;
8 | };
9 | };
10 |
11 | firewall = {
12 | enable = true;
13 | allowedTCPPorts = [
14 | 8081
15 | 4321
16 | ];
17 | checkReversePath = "loose";
18 | };
19 | };
20 | }
21 |
--------------------------------------------------------------------------------
/hosts/config/services/openssh.nix:
--------------------------------------------------------------------------------
1 | {
2 | services.openssh = {
3 | enable = true;
4 | settings = {
5 | PermitRootLogin = "no";
6 | PasswordAuthentication = false;
7 | KbdInteractiveAuthentication = false;
8 | X11Forwarding = false;
9 | };
10 | };
11 | }
12 |
--------------------------------------------------------------------------------
/hosts/config/shell/default.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | programs.zsh = {
3 | enable = true;
4 | enableCompletion = true;
5 | autosuggestions.enable = true;
6 | syntaxHighlighting.enable = true;
7 | };
8 |
9 | environment = {
10 | shells = [pkgs.zsh];
11 | pathsToLink = ["/share/zsh"];
12 | };
13 |
14 | users.defaultUserShell = pkgs.zsh;
15 | }
16 |
--------------------------------------------------------------------------------
/hosts/config/system/boot.nix:
--------------------------------------------------------------------------------
1 | {
2 | boot = {
3 | consoleLogLevel = 3;
4 |
5 | initrd = {
6 | verbose = false;
7 | systemd.enable = true;
8 | };
9 |
10 | kernelParams = [
11 | "quiet"
12 | "splash"
13 | "loglevel=3"
14 | "udev.log_level=3"
15 | "rd.udev.log_level=3"
16 | "systemd.show_status=auto"
17 | "rd.systemd.show_status=auto"
18 | ];
19 |
20 | loader = {
21 | efi = {
22 | canTouchEfiVariables = true;
23 | efiSysMountPoint = "/boot";
24 | };
25 |
26 | systemd-boot = {
27 | enable = true;
28 | editor = false;
29 | configurationLimit = 5;
30 | };
31 |
32 | timeout = 0; # Spam space to enter the boot menu
33 | };
34 |
35 | plymouth = {
36 | enable = true;
37 | theme = "bgrt";
38 | };
39 |
40 | tmp.cleanOnBoot = true;
41 | };
42 | }
43 |
--------------------------------------------------------------------------------
/hosts/config/system/console.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | console = {
3 | earlySetup = true;
4 | font = "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz";
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/hosts/config/system/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | imports = [
3 | ./boot.nix
4 | ./console.nix
5 | ./environment.nix
6 | ./i18n.nix
7 | ./locale.nix
8 | ./release.nix
9 | ./users.nix
10 | ./zram.nix
11 | ];
12 | }
13 |
--------------------------------------------------------------------------------
/hosts/config/system/environment.nix:
--------------------------------------------------------------------------------
1 | {
2 | environment = {
3 | localBinInPath = true;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/hosts/config/system/i18n.nix:
--------------------------------------------------------------------------------
1 | {
2 | i18n = {
3 | defaultLocale = "en_US.UTF-8";
4 | supportedLocales = [
5 | "en_US.UTF-8/UTF-8"
6 | "ja_JP.UTF-8/UTF-8"
7 | ];
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/hosts/config/system/locale.nix:
--------------------------------------------------------------------------------
1 | {lib, ...}: {
2 | time = {
3 | timeZone = lib.mkDefault "Asia/Jakarta";
4 | hardwareClockInLocalTime = lib.mkDefault true;
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/hosts/config/system/release.nix:
--------------------------------------------------------------------------------
1 | {
2 | # This option defines the first version of NixOS you have installed on this particular machine,
3 | # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
4 | #
5 | # Most users should NEVER change this value after the initial install, for any reason,
6 | # even if you've upgraded your system to a new NixOS release.
7 | #
8 | # This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
9 | # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
10 | # to actually do that.
11 | #
12 | # This value being lower than the current NixOS release does NOT mean your system is
13 | # out of date, out of support, or vulnerable.
14 | #
15 | # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
16 | # and migrated your data accordingly.
17 | #
18 | # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
19 | system.stateVersion = "25.05"; # Did you read the comment?
20 | }
21 |
--------------------------------------------------------------------------------
/hosts/config/system/users.nix:
--------------------------------------------------------------------------------
1 | {
2 | users.users.raexera = {
3 | isNormalUser = true;
4 | uid = 1000;
5 | extraGroups = [
6 | "wheel"
7 | "audio"
8 | "video"
9 | "input"
10 | "network"
11 | "networkmanager"
12 | "plugdev"
13 | "libvirtd"
14 | "mysql"
15 | "docker"
16 | "podman"
17 | "git"
18 | ];
19 | };
20 | }
21 |
--------------------------------------------------------------------------------
/hosts/config/system/zram.nix:
--------------------------------------------------------------------------------
1 | {
2 | zramSwap = {
3 | enable = true;
4 | memoryPercent = 50;
5 | priority = 100;
6 | algorithm = "zstd";
7 | };
8 |
9 | boot.kernel.sysctl = {
10 | "vm.swappiness" = 180;
11 | "vm.watermark_boost_factor" = 0;
12 | "vm.watermark_scale_factor" = 125;
13 | "vm.page-cluster" = 0;
14 | };
15 | }
16 |
--------------------------------------------------------------------------------
/hosts/config/window-managers/hyprland/default.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | programs.hyprland = {
3 | enable = true;
4 | };
5 |
6 | xdg.portal = {
7 | enable = true;
8 | xdgOpenUsePortal = true;
9 | config = {
10 | common.default = ["gtk"];
11 | hyprland.default = ["gtk" "hyprland"];
12 | };
13 |
14 | extraPortals = [
15 | pkgs.xdg-desktop-portal-gtk
16 | ];
17 | };
18 |
19 | # Enable ozone wayland support
20 | environment.sessionVariables.NIXOS_OZONE_WL = "1";
21 | }
22 |
--------------------------------------------------------------------------------
/hosts/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | inputs,
3 | self,
4 | ...
5 | }: {
6 | flake.nixosConfigurations = let
7 | inherit (inputs.nixpkgs) lib;
8 | inherit (lib) nixosSystem;
9 | inherit (lib.attrsets) recursiveUpdate;
10 | inherit (lib.lists) concatLists flatten singleton;
11 |
12 | # Core modules from external inputs
13 | nixosModules = [
14 | inputs.disko.nixosModules.default
15 | inputs.home-manager.nixosModules.default
16 | ];
17 |
18 | # Path to the home-manager module directory
19 | homeModules = self + /home;
20 |
21 | # Common configuration shared across all systems
22 | sharedConfig = [
23 | ./config/nix
24 | ./config/programs
25 | ./config/security
26 | ./config/services
27 | ./config/shell
28 | ./config/system
29 | ];
30 |
31 | # Function to create a NixOS configuration for a specific hostname and system
32 | # Arguments:
33 | # - hostname: The hostname of the system
34 | # - system: The system architecture
35 | # - modules (optional): Additional modules to include
36 | # - specialArgs (optional): Additional special arguments passed to the system
37 | mkNixosSystem = {
38 | hostname,
39 | system,
40 | ...
41 | } @ args:
42 | nixosSystem {
43 | modules =
44 | concatLists [
45 | (singleton {
46 | networking.hostName = args.hostname;
47 | nixpkgs.hostPlatform = args.system;
48 | })
49 |
50 | (flatten (
51 | concatLists [
52 | (singleton ./${args.hostname})
53 | (args.modules or [])
54 | ]
55 | ))
56 | ]
57 | ++ sharedConfig;
58 |
59 | specialArgs = recursiveUpdate {
60 | inherit inputs self;
61 | } (args.specialArgs or {});
62 | };
63 | in {
64 | # Lenovo Yoga Slim 7 Pro X (14IAH7)
65 | yuki = mkNixosSystem {
66 | hostname = "yuki";
67 | system = "x86_64-linux";
68 | modules = [nixosModules homeModules];
69 | };
70 |
71 | minimal = mkNixosSystem {
72 | hostname = "minimal";
73 | system = "x86_64-linux";
74 | modules = [nixosModules];
75 | };
76 | };
77 | }
78 |
--------------------------------------------------------------------------------
/hosts/minimal/default.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | imports = [
3 | ./disk-configuration.nix
4 | ./hardware-configuration.nix
5 | ];
6 |
7 | boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
8 |
9 | services.btrfs.autoScrub.enable = true;
10 | }
11 |
--------------------------------------------------------------------------------
/hosts/minimal/disk-configuration.nix:
--------------------------------------------------------------------------------
1 | {
2 | disko.devices = {
3 | disk = {
4 | main = {
5 | type = "disk";
6 | device = "/dev/nvme0n1";
7 | content = {
8 | type = "gpt";
9 | partitions = {
10 | ESP = {
11 | size = "1G";
12 | type = "EF00";
13 | content = {
14 | type = "filesystem";
15 | format = "vfat";
16 | mountpoint = "/boot";
17 | mountOptions = ["umask=0077"];
18 | };
19 | };
20 | root = {
21 | size = "100%";
22 | content = {
23 | type = "btrfs";
24 | extraArgs = ["-f"];
25 | subvolumes = {
26 | "/root" = {
27 | mountpoint = "/";
28 | mountOptions = ["compress=zstd" "noatime"];
29 | };
30 | "/home" = {
31 | mountpoint = "/home";
32 | mountOptions = ["compress=zstd" "noatime"];
33 | };
34 | "/nix" = {
35 | mountpoint = "/nix";
36 | mountOptions = ["compress=zstd" "noatime"];
37 | };
38 | };
39 | };
40 | };
41 | };
42 | };
43 | };
44 | };
45 | };
46 | }
47 |
--------------------------------------------------------------------------------
/hosts/minimal/hardware-configuration.nix:
--------------------------------------------------------------------------------
1 | {lib, ...}: {
2 | boot = {
3 | initrd = {
4 | availableKernelModules = ["nvme" "sd_mod" "thunderbolt" "usb_storage" "xhci_pci"];
5 | kernelModules = ["ideapad_laptop"];
6 | };
7 | kernelModules = ["kvm-intel"];
8 | kernelParams = ["nowatchdog"];
9 | };
10 |
11 | hardware.enableRedistributableFirmware = lib.mkDefault true;
12 |
13 | # √(3072² + 1920²) px / 14.5 in ≃ 250 dpi
14 | services.xserver.dpi = 250;
15 | }
16 |
--------------------------------------------------------------------------------
/hosts/yuki/default.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | imports = [
3 | ./disk-configuration.nix
4 | ./hardware-configuration.nix
5 | ./power-management.nix
6 |
7 | ./programs/dconf.nix
8 | ./programs/gnupg.nix
9 | ./programs/thunar.nix
10 | ./services/blueman.nix
11 | ./services/dbus.nix
12 | ./services/gnome-keyring.nix
13 | ./services/greetd.nix
14 | ./services/gvfs.nix
15 | ./services/mariadb.nix
16 | ./services/pipewire.nix
17 | ./services/postgresql.nix
18 | ./virtualisation/containers.nix
19 | ./virtualisation/docker.nix
20 | ./virtualisation/podman.nix
21 |
22 | ../config/fonts
23 | ../config/hardware/acpi_call
24 | ../config/hardware/bluetooth
25 | ../config/hardware/cpu/intel
26 | ../config/hardware/gpu/intel
27 | ../config/hardware/gpu/nvidia
28 | ../config/hardware/ssd
29 | ../config/window-managers/hyprland
30 | ];
31 |
32 | boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
33 |
34 | hardware = {
35 | graphics = {
36 | enable = true;
37 | enable32Bit = true;
38 | };
39 |
40 | nvidia = {
41 | prime = {
42 | intelBusId = "PCI:0:2:0";
43 | nvidiaBusId = "PCI:1:0:0";
44 | };
45 | };
46 |
47 | nvidia-container-toolkit.enable = true;
48 | };
49 |
50 | services = {
51 | btrfs.autoScrub.enable = true;
52 |
53 | fwupd.enable = true;
54 |
55 | hardware.bolt.enable = true;
56 | };
57 |
58 | # Intel Core i7-12700H (Alder Lake)
59 | boot.kernelParams = ["i915.force_probe=46a6" "i915.enable_guc=3"];
60 |
61 | # NVIDIA GeForce RTX 3050 Mobile (Ampere)
62 | services.xserver.videoDrivers = ["nvidia"];
63 | }
64 |
--------------------------------------------------------------------------------
/hosts/yuki/disk-configuration.nix:
--------------------------------------------------------------------------------
1 | {
2 | disko.devices = {
3 | disk = {
4 | main = {
5 | type = "disk";
6 | device = "/dev/nvme0n1";
7 | content = {
8 | type = "gpt";
9 | partitions = {
10 | ESP = {
11 | size = "1G";
12 | type = "EF00";
13 | content = {
14 | type = "filesystem";
15 | format = "vfat";
16 | mountpoint = "/boot";
17 | mountOptions = ["umask=0077"];
18 | };
19 | };
20 | root = {
21 | size = "100%";
22 | content = {
23 | type = "btrfs";
24 | extraArgs = ["-f"];
25 | subvolumes = {
26 | "/root" = {
27 | mountpoint = "/";
28 | mountOptions = ["compress=zstd" "noatime"];
29 | };
30 | "/home" = {
31 | mountpoint = "/home";
32 | mountOptions = ["compress=zstd" "noatime"];
33 | };
34 | "/nix" = {
35 | mountpoint = "/nix";
36 | mountOptions = ["compress=zstd" "noatime"];
37 | };
38 | };
39 | };
40 | };
41 | };
42 | };
43 | };
44 | };
45 | };
46 | }
47 |
--------------------------------------------------------------------------------
/hosts/yuki/hardware-configuration.nix:
--------------------------------------------------------------------------------
1 | {lib, ...}: {
2 | boot = {
3 | initrd = {
4 | availableKernelModules = ["nvme" "sd_mod" "thunderbolt" "usb_storage" "xhci_pci"];
5 | kernelModules = ["ideapad_laptop"];
6 | };
7 | kernelModules = ["kvm-intel"];
8 | kernelParams = ["nowatchdog"];
9 | };
10 |
11 | hardware.enableRedistributableFirmware = lib.mkDefault true;
12 |
13 | # √(3072² + 1920²) px / 14.5 in ≃ 250 dpi
14 | services.xserver.dpi = 250;
15 | }
16 |
--------------------------------------------------------------------------------
/hosts/yuki/power-management.nix:
--------------------------------------------------------------------------------
1 | {config, ...}: {
2 | environment.systemPackages = with config.boot.kernelPackages; [cpupower];
3 |
4 | powerManagement.powertop.enable = true;
5 |
6 | services = {
7 | acpid.enable = true;
8 |
9 | thermald.enable = true;
10 |
11 | tlp = {
12 | enable = true;
13 | settings = {
14 | CPU_SCALING_GOVERNOR_ON_AC = "performance";
15 | CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
16 | CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
17 | CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
18 | START_CHARGE_THRESH_BAT0 = 0;
19 | STOP_CHARGE_THRESH_BAT0 = 1; # battery conservation mode
20 | };
21 | };
22 |
23 | upower.enable = true;
24 | };
25 | }
26 |
--------------------------------------------------------------------------------
/hosts/yuki/programs/dconf.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.dconf = {
3 | enable = true;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/hosts/yuki/programs/gnupg.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | programs.gnupg.agent = {
3 | enable = true;
4 | pinentryPackage = pkgs.pinentry-gnome3;
5 | enableSSHSupport = true;
6 | };
7 | }
8 |
--------------------------------------------------------------------------------
/hosts/yuki/programs/thunar.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | programs.thunar = {
3 | enable = true;
4 | plugins = with pkgs.xfce; [
5 | thunar-archive-plugin
6 | thunar-dropbox-plugin
7 | thunar-media-tags-plugin
8 | thunar-volman
9 | ];
10 | };
11 |
12 | services.tumbler.enable = true;
13 | }
14 |
--------------------------------------------------------------------------------
/hosts/yuki/services/blueman.nix:
--------------------------------------------------------------------------------
1 | {
2 | services.blueman = {
3 | enable = true;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/hosts/yuki/services/dbus.nix:
--------------------------------------------------------------------------------
1 | {
2 | services.dbus = {
3 | enable = true;
4 | implementation = "broker";
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/hosts/yuki/services/gnome-keyring.nix:
--------------------------------------------------------------------------------
1 | {
2 | services.gnome.gnome-keyring = {
3 | enable = true;
4 | };
5 |
6 | programs.seahorse.enable = true;
7 | }
8 |
--------------------------------------------------------------------------------
/hosts/yuki/services/greetd.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | pkgs,
5 | ...
6 | }: {
7 | services.greetd = {
8 | enable = true;
9 | settings = {
10 | terminal.vt = 1;
11 | default_session = {
12 | command = lib.concatStringsSep " " [
13 | (lib.getExe pkgs.greetd.tuigreet)
14 | "--cmd '${lib.getExe config.programs.hyprland.package}'"
15 | "--remember"
16 | "--remember-session"
17 | "--asterisks"
18 | "--time"
19 | ];
20 | user = "greeter";
21 | };
22 | };
23 | };
24 |
25 | # Unlock GPG keyring on login
26 | security.pam.services.greetd.enableGnomeKeyring = true;
27 | }
28 |
--------------------------------------------------------------------------------
/hosts/yuki/services/gvfs.nix:
--------------------------------------------------------------------------------
1 | {
2 | services.gvfs = {
3 | enable = true;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/hosts/yuki/services/mariadb.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | services.mysql = {
3 | enable = true;
4 | package = pkgs.mariadb;
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/hosts/yuki/services/pipewire.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | pkgs,
4 | ...
5 | }: {
6 | services.pipewire = {
7 | enable = true;
8 | alsa.enable = true;
9 | alsa.support32Bit = true;
10 | audio.enable = true;
11 | jack.enable = true;
12 | pulse.enable = true;
13 | wireplumber = {
14 | enable = true;
15 | configPackages = [
16 | (pkgs.writeTextDir "share/bluetooth.lua.d/51-bluez-config.lua" ''
17 | bluez_monitor.properties = {
18 | ["bluez5.enable-sbc-xq"] = true,
19 | ["bluez5.enable-msbc"] = true,
20 | ["bluez5.enable-hw-volume"] = true,
21 | ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
22 | }
23 | '')
24 | ];
25 | };
26 | };
27 |
28 | hardware.pulseaudio.enable = lib.mkForce false;
29 | }
30 |
--------------------------------------------------------------------------------
/hosts/yuki/services/postgresql.nix:
--------------------------------------------------------------------------------
1 | {pkgs, ...}: {
2 | services.postgresql = {
3 | enable = true;
4 | enableTCPIP = true;
5 | authentication = pkgs.lib.mkOverride 10 ''
6 | #...
7 | #type database DBuser origin-address auth-method
8 | # ipv4
9 | host all all 127.0.0.1/32 scram-sha-256
10 | # ipv6
11 | host all all ::1/128 scram-sha-256
12 | # local
13 | local all all trust
14 | '';
15 | initialScript = pkgs.writeText "backend-initScript" ''
16 | CREATE ROLE nixcloud WITH LOGIN PASSWORD 'nixcloud' CREATEDB;
17 | CREATE DATABASE nixcloud;
18 | GRANT ALL PRIVILEGES ON DATABASE nixcloud TO nixcloud;
19 | '';
20 | };
21 | }
22 |
--------------------------------------------------------------------------------
/hosts/yuki/virtualisation/containers.nix:
--------------------------------------------------------------------------------
1 | {
2 | virtualisation.containers = {
3 | enable = true;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/hosts/yuki/virtualisation/docker.nix:
--------------------------------------------------------------------------------
1 | {
2 | virtualisation.docker = {
3 | enable = true;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/hosts/yuki/virtualisation/podman.nix:
--------------------------------------------------------------------------------
1 | {config, ...}: {
2 | virtualisation.podman = {
3 | enable = true;
4 | defaultNetwork.settings.dns_enabled = true;
5 | dockerCompat = !config.virtualisation.docker.enable;
6 | dockerSocket.enable = !config.virtualisation.docker.enable;
7 | };
8 | }
9 |
--------------------------------------------------------------------------------