Compare commits
341 Commits
i3-kickstarter
...
v0.1.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 721e74845a | |||
| 349ff8b5a1 | |||
| 4cf9b16faf | |||
| 8fc95549bf | |||
| f2dbaba802 | |||
| 538c81ca47 | |||
| 32161dd090 | |||
| a310ab4d4a | |||
| bc290e371b | |||
| b407453836 | |||
| 6ff9c397c8 | |||
| 033d50c738 | |||
| 7dc223a77e | |||
| c472654934 | |||
| 189a3a4689 | |||
| 1f0040a9dd | |||
| 5d8615cdb0 | |||
| 2f96ab5464 | |||
| c8bd133e49 | |||
| 5778d72dd4 | |||
| 01285af535 | |||
| e1cd93d6d1 | |||
| 714c45f5f9 | |||
| 87df015862 | |||
| c09091fa25 | |||
| 8b4a0a7055 | |||
| 78319f4ef6 | |||
| f66e73c5a6 | |||
| cf9d5acd95 | |||
| 98fed47741 | |||
| ed57391eb0 | |||
| fc4a44c023 | |||
| c158f17c63 | |||
| e61bd9ae14 | |||
| 4f6b899643 | |||
| 5d2cf3e5dd | |||
| befddfe476 | |||
| 204cb03922 | |||
| eebbb9f5e6 | |||
| ad76bb3451 | |||
| 0564357a9c | |||
| b44672d16c | |||
| 1164bebee4 | |||
| 29129215a5 | |||
| bc08dc1949 | |||
| 6e825eef7f | |||
| 6ae4d4ba80 | |||
| c34911ba26 | |||
| 82819ff091 | |||
| 12ef055135 | |||
| 5beb15c165 | |||
| cf6584ea71 | |||
| 3bbe86cb55 | |||
| 18c6e79d0c | |||
| 6fbefd0a67 | |||
| d502490bf6 | |||
| 3f6b5b321a | |||
| 2d06846467 | |||
| baac168826 | |||
| 78e5053ae5 | |||
| 25ac706450 | |||
| edff2bdc6c | |||
| 337f67109e | |||
| 450389400a | |||
| f52d604d42 | |||
| d12e3b979a | |||
| 7b482f8cfa | |||
| de1bc12b1b | |||
| a6fb453c9e | |||
| 32429619ab | |||
| cc6e5ea071 | |||
| ba29d32d80 | |||
| 0f08976902 | |||
| b3ac7784ca | |||
| b271e43df4 | |||
| 3dff682ceb | |||
| 8d05c3a204 | |||
| 887825d254 | |||
| 8061e07a00 | |||
| fa1cf24af5 | |||
| 1ab318b6db | |||
| 59493d03fa | |||
| c06504032c | |||
| cf80c7549e | |||
| e6b7e24a36 | |||
| 1b5a415d7a | |||
| 95d9cd0a27 | |||
| cca05de49b | |||
| fa9f23751c | |||
| cf33721ec1 | |||
| 52c72bd45d | |||
| c6e736d64b | |||
| c90d1c0208 | |||
| 5ed0ece058 | |||
| 8684376b98 | |||
| 03cee6582f | |||
| 86291af053 | |||
| 54bb672d9e | |||
| f34bf79884 | |||
| db9ebd5ffd | |||
| 64e384c18a | |||
| 1e325739b1 | |||
| 2bf5d295d4 | |||
| 040d8a210c | |||
| df63bce926 | |||
| b5707d8457 | |||
| cd4ed3679c | |||
| 55b6aadf00 | |||
| 849ecfd6b7 | |||
| ca60e962f0 | |||
| 7bf52e7a75 | |||
| 872caa0407 | |||
| 580a08841f | |||
| ff6442e588 | |||
| 271846703f | |||
| 298affd460 | |||
| d718c8084a | |||
| 39d35091d6 | |||
| cf9b184c9f | |||
| 4abe5d7b8d | |||
| 54ebad9151 | |||
| 3234d0db2e | |||
| c9b5a1d39b | |||
| fc8d43982b | |||
| c4a47b9e53 | |||
| 34182f3e45 | |||
| 87de22fec4 | |||
| 787010ac34 | |||
| 874a1ab939 | |||
| 95df12c59e | |||
| 25c0938a64 | |||
| 5731b52d3c | |||
| c7d88c1f57 | |||
| 678016e391 | |||
| e14d6f8405 | |||
| 588cbabbc2 | |||
| 7cc49c29f1 | |||
| 21b3d4ad37 | |||
| b6629a38a1 | |||
| a88afaaab3 | |||
| 2acda6e977 | |||
| d1dd9bfdd6 | |||
| 027d819860 | |||
| 7e02cc8566 | |||
| bacc1bf9cd | |||
| 6e7815ce22 | |||
| 0193f84847 | |||
| bb2c967981 | |||
| 8d24a094bf | |||
| cb0dc30c7e | |||
| 190d409992 | |||
| acd7f8308c | |||
| 4af3fa88dd | |||
| e90d2eca1e | |||
| 462f671a76 | |||
| 5d2371dda4 | |||
| 379032a40b | |||
| 65b5146dcb | |||
| 4c53b59e89 | |||
| 9bd5cac675 | |||
| 2e65d0aa03 | |||
| afc74dcf68 | |||
| e7e3d0040a | |||
| 14c174890e | |||
| dd472488b6 | |||
| ec4d00509e | |||
| aa0c789b6e | |||
| 016115faa5 | |||
| f6ade7c612 | |||
| 0bfd154437 | |||
| 9a752121ba | |||
| 3ea707245b | |||
| e31ae3f553 | |||
| c38db38207 | |||
| 6b364e19de | |||
| dae0504f5c | |||
| d53ed4ef7e | |||
| 530f8498a1 | |||
| ef3c903582 | |||
| 8314b91324 | |||
| ccd4752d04 | |||
| 1bfeeacf2f | |||
| bfac95b71e | |||
| b91508af5f | |||
| e51486a796 | |||
| 897af2712f | |||
| ed5b4d121c | |||
| 45a7973553 | |||
| a5f0922ba7 | |||
| 792a7e7bfc | |||
| 8f512eb0bd | |||
| 4936c0c46e | |||
| fe54e220e4 | |||
| 0c5b01b5f0 | |||
| 0024dff048 | |||
| 7c42d4d950 | |||
| dc0fc97cb9 | |||
| 86114a4db1 | |||
| 24ef3ed105 | |||
| be437c3417 | |||
| e2e75407c9 | |||
| b99f77e0de | |||
| 909409ff29 | |||
| 408d7dfd95 | |||
| de1d6fbf4c | |||
| e499f0ee37 | |||
| 0e194466d4 | |||
| 5da21ce346 | |||
| 0b4e365ce9 | |||
| 2ebbe3ae09 | |||
| 2a8a0d1c62 | |||
| a42c8f0aeb | |||
| f083f74825 | |||
| 4e0774e5d8 | |||
| 6582721050 | |||
| 609c9e53ff | |||
| 3a141b62df | |||
| 2865241acd | |||
| c6834707f0 | |||
| ef16db0bcd | |||
| b3b2136579 | |||
| dc2d5f1c6a | |||
| c935031234 | |||
| 0a16aa1b32 | |||
| ec485779ce | |||
| 1a474ec960 | |||
| e6b57d9d11 | |||
| 11fb1932ac | |||
| c224f9c773 | |||
| 86f3503245 | |||
| 7d99fab205 | |||
| d38bc4ff38 | |||
| d04f4109f2 | |||
| 0d53bea851 | |||
| dd2040568d | |||
| 89d8acd8eb | |||
| 3f24fa464d | |||
| 5b99c2ceca | |||
| df8a7e68e1 | |||
| 058031ad29 | |||
| a622057fb4 | |||
| 20ce65210b | |||
| 203edbffea | |||
| 226a3a2596 | |||
| 4f79b64f11 | |||
| 443d15e03b | |||
| 35b2b3f8be | |||
| f4428b9b23 | |||
| 814c29f72b | |||
| 5fd4a788df | |||
| 7f5cc5be23 | |||
| 3d93f5e624 | |||
| 967b408e41 | |||
| a81cfaf9fe | |||
| f971ec030d | |||
| ab11958597 | |||
| 6707783d0a | |||
| 9ec7a76e02 | |||
| 5a6bfc9e60 | |||
| be5f2338f6 | |||
| a880b9b20d | |||
| fedcf1bafd | |||
| c694c81215 | |||
| 5503e7bac0 | |||
| 7c7591e167 | |||
| d86aae96ff | |||
| ab1ecc49ed | |||
| 2baeb2e284 | |||
| 2c3df9ba1e | |||
| 4511f834af | |||
| 89653cabe4 | |||
| 4959da0b7e | |||
| 14f4ef912a | |||
| 08ffdb556e | |||
| 58d4005e4f | |||
| a2daad2719 | |||
| 4adbc39dc4 | |||
| 6710f34e50 | |||
| 32d6353cdc | |||
| 613e763f8b | |||
| bf762454c0 | |||
| d232f4a063 | |||
| 63471d7d80 | |||
| dcde7ff162 | |||
| 587d29656c | |||
| 2d60de8c72 | |||
| 8ae561fd0c | |||
| 7aaf208007 | |||
| 3d310ae45c | |||
| 79a8e9d293 | |||
| 848c6fbca2 | |||
| a862e0a55d | |||
| 0517d0e8df | |||
| ed27505556 | |||
| d8a4bde357 | |||
| e05f4bec8f | |||
| 373348e406 | |||
| 47a7828bc7 | |||
| abb7c84675 | |||
| 42c24dbb6f | |||
| 1237c68b8f | |||
| c0b1c5cba1 | |||
| 188607b2ae | |||
| 26252cf448 | |||
| daa9fe00b2 | |||
| 05dbbe4a64 | |||
| 79ff9977b9 | |||
| 5ca09cf75c | |||
| 78e620001f | |||
| 1b9801c15a | |||
| ffd4313dec | |||
| ad5f3da45f | |||
| 129302ac26 | |||
| be47ea74cd | |||
| f1c20d68f9 | |||
| 0716174fb7 | |||
| b25b6a48e2 | |||
| 162399ad8a | |||
| 79c424e08e | |||
| 381f0c5123 | |||
| e83aec85f1 | |||
| 1235f08891 | |||
| ed7ebb0802 | |||
| 82f0248cf6 | |||
| 88faaa950c | |||
| e9e63e6d4a | |||
| b8b4d843d6 | |||
| 99e12fde04 | |||
| bb47747529 | |||
| 4f4bccbb59 | |||
| ea35e5dc49 | |||
| b50cca1ec6 | |||
| 07d13c7cc9 | |||
| 57ed18fe8b | |||
| e3a9bea779 | |||
| 65e2672a68 | |||
| 8619d9a284 | |||
| 7619f7ca41 | |||
| 90c61f0625 | |||
| 1b95d4945f | |||
| 830605aeec |
@@ -0,0 +1,3 @@
|
|||||||
|
result
|
||||||
|
result/
|
||||||
|
.DS_Store
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2023 Ryan Yin
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
#
|
||||||
|
# NOTE: Makefile's target name should not be the same as one of the file or directory in the current directory,
|
||||||
|
# otherwise the target will not be executed!
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
#
|
||||||
|
# Nix commands related to the local machine
|
||||||
|
#
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
i3:
|
||||||
|
nixos-rebuild switch --flake .#ai_i3 --use-remote-sudo
|
||||||
|
|
||||||
|
hypr:
|
||||||
|
nixos-rebuild switch --flake .#ai_hyprland --use-remote-sudo
|
||||||
|
|
||||||
|
i3-debug:
|
||||||
|
nixos-rebuild switch --flake .#ai_i3 --use-remote-sudo --show-trace --verbose
|
||||||
|
|
||||||
|
hypr-debug:
|
||||||
|
nixos-rebuild switch --flake .#ai_hyprland --use-remote-sudo --show-trace --verbose
|
||||||
|
|
||||||
|
update:
|
||||||
|
nix flake update
|
||||||
|
|
||||||
|
history:
|
||||||
|
nix profile history --profile /nix/var/nix/profiles/system
|
||||||
|
|
||||||
|
gc:
|
||||||
|
# remove all generations older than 7 days
|
||||||
|
sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 7d
|
||||||
|
|
||||||
|
# garbage collect all unused nix store entries
|
||||||
|
sudo nix store gc --debug
|
||||||
|
|
||||||
|
# adjust brightness(x11)
|
||||||
|
# usage: make bright b=0.9
|
||||||
|
bright:
|
||||||
|
xrandr --output DP-2 --brightness $(b)
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
#
|
||||||
|
# Darwin related commands, harmonica is my macbook pro's hostname
|
||||||
|
#
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
darwin-set-proxy:
|
||||||
|
sudo python3 scripts/darwin_set_proxy.py
|
||||||
|
|
||||||
|
ha: darwin-set-proxy
|
||||||
|
nix build .#darwinConfigurations.harmonica.system
|
||||||
|
./result/sw/bin/darwin-rebuild switch --flake .
|
||||||
|
|
||||||
|
ha-debug: darwin-set-proxy
|
||||||
|
nix build .#darwinConfigurations.harmonica.system --show-trace --verbose
|
||||||
|
./result/sw/bin/darwin-rebuild switch --flake .#harmonica --show-trace --verbose
|
||||||
|
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
#
|
||||||
|
# Idols, Commands related to my remote distributed building cluster
|
||||||
|
#
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
add-idols-ssh-key:
|
||||||
|
ssh-add ~/.ssh/ai-idols
|
||||||
|
|
||||||
|
aqua: add-idols-ssh-key
|
||||||
|
nixos-rebuild --flake .#aquamarine --target-host aquamarine --build-host aquamarine switch --use-remote-sudo
|
||||||
|
|
||||||
|
aqua-debug: add-idols-ssh-key
|
||||||
|
nixos-rebuild --flake .#aquamarine --target-host aquamarine --build-host aquamarine switch --use-remote-sudo --show-trace --verbose
|
||||||
|
|
||||||
|
ruby: add-idols-ssh-key
|
||||||
|
nixos-rebuild --flake .#ruby --target-host ruby --build-host ruby switch --use-remote-sudo
|
||||||
|
|
||||||
|
ruby-debug: add-idols-ssh-key
|
||||||
|
nixos-rebuild --flake .#ruby --target-host ruby --build-host ruby switch --use-remote-sudo --show-trace --verbose
|
||||||
|
|
||||||
|
kana: add-idols-ssh-key
|
||||||
|
nixos-rebuild --flake .#kana --target-host kana --build-host kana switch --use-remote-sudo
|
||||||
|
|
||||||
|
kana-debug: add-idols-ssh-key
|
||||||
|
nixos-rebuild --flake .#kana --target-host kana --build-host kana switch --use-remote-sudo --show-trace --verbose
|
||||||
|
|
||||||
|
idols: aqua ruby kana
|
||||||
|
|
||||||
|
idols-debug: aqua-debug ruby-debug kana-debug
|
||||||
|
|
||||||
|
# only used once to setup the virtual machines
|
||||||
|
idols-image:
|
||||||
|
# take image for idols, and upload the image to proxmox nodes.
|
||||||
|
nom build .#aquamarine
|
||||||
|
scp result/vzdump-qemu-*.vma.zst root@gtr5:/var/lib/vz/dump
|
||||||
|
|
||||||
|
nom build .#ruby
|
||||||
|
scp result/vzdump-qemu-*.vma.zst root@s500plus:/var/lib/vz/dump
|
||||||
|
|
||||||
|
nom build .#kana
|
||||||
|
scp result/vzdump-qemu-*.vma.zst root@um560:/var/lib/vz/dump
|
||||||
|
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
#
|
||||||
|
# Misc, other useful commands
|
||||||
|
#
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
fmt:
|
||||||
|
# format the nix files in this repo
|
||||||
|
nix fmt
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -rf result
|
||||||
@@ -1,28 +1,206 @@
|
|||||||
# Nix Configuration
|
<h2 align="center">:snowflake: Ryan4Yin's Nix Config :snowflake:</h2>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/palette/macchiato.png" width="400" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://github.com/ryan4yin/nix-config/stargazers">
|
||||||
|
<img alt="Stargazers" src="https://img.shields.io/github/stars/ryan4yin/nix-config?style=for-the-badge&logo=starship&color=C9CBFF&logoColor=D9E0EE&labelColor=302D41"></a>
|
||||||
|
<a href="https://nixos.org/">
|
||||||
|
<img src="https://img.shields.io/badge/NixOS-23.05-informational.svg?style=for-the-badge&logo=nixos&color=F2CDCD&logoColor=D9E0EE&labelColor=302D41"></a>
|
||||||
|
<a href="https://github.com/ryan4yin/nixos-and-flakes-book">
|
||||||
|
<img src="https://img.shields.io/static/v1?label=Nix Flakes&message=learning&style=for-the-badge&logo=nixos&color=DDB6F2&logoColor=D9E0EE&labelColor=302D41"></a>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
This repository is home to the nix code that builds my systems.
|
This repository is home to the nix code that builds my systems.
|
||||||
|
|
||||||
|
|
||||||
## TODO
|
|
||||||
|
|
||||||
- vscode extensions - [nix-vscode-extensions](https://github.com/nix-community/nix-vscode-extensions)
|
|
||||||
- secret management - [sops-nix](https://github.com/Mic92/sops-nix)
|
|
||||||
- switch from i3wm to hyprland
|
|
||||||
- i3wm: old and stable, only support X11
|
|
||||||
- sway: compatible with i3wm, support Wayland. do not support Nvidia GPU officially.
|
|
||||||
- [hyprland](https://wiki.hyprland.org/Nix/Hyprland-on-NixOS/): project starts from 2022, support Wayland, envolving fast, good looking, support Nvidia GPU.
|
|
||||||
|
|
||||||
|
|
||||||
## Why Nix?
|
## Why Nix?
|
||||||
|
|
||||||
Nix allows for easy to manage, collaborative, reproducible deployments. This means that once something is setup and configured once, it works forever. If someone else shares their configuration, anyone can make use of it.
|
Nix allows for easy-to-manage, collaborative, reproducible deployments. This means that once something is setup and configured once, it works forever. If someone else shares their configuration, anyone can make use of it.
|
||||||
|
|
||||||
|
**Want to know Nix in detail? Looking for a beginner-friendly tutorial or best practices? Check out [NixOS & Nix Flakes Book - 🛠️ ❤️ An unofficial & opinionated :book: for beginners](https://github.com/ryan4yin/nixos-and-flakes-book)!**
|
||||||
|
|
||||||
## How to install Nix and Deploy this Flake?
|
> If you're using macOS, you can also check out [ryan4yin/nix-darwin-kickstarter](https://github.com/ryan4yin/nix-darwin-kickstarter) for a quick start.
|
||||||
|
|
||||||
After installed NixOS with `nix-command` & `flake` enabled, you can deploy this flake with the following command:
|
## Components
|
||||||
|
|
||||||
|
| | NixOS(Wayland) | NixOS(Xorg) |
|
||||||
|
| --------------------------- | :--------------------------------------------------------------------------------------------- | :------------------------------------------------------ |
|
||||||
|
| **Window Manager** | [Hyprland][Hyprland] | [i3][i3] |
|
||||||
|
| **Terminal Emulator** | [Kitty][Kitty] | [Kitty][Kitty] |
|
||||||
|
| **Bar** | [Waybar][Waybar] | [i3block][i3block] |
|
||||||
|
| **Application Launcher** | [wofi][wofi] | [rofi][rofi] |
|
||||||
|
| **Notification Daemon** | [Mako][Mako] | [Dunst][Dunst] |
|
||||||
|
| **Display Manager** | [GDM][GDM] | [GDM][GDM] |
|
||||||
|
| \***\*Color Scheme\*\*** | [Catppuccin][Catppuccin] | [Catppuccin][Catppuccin] |
|
||||||
|
| **network management tool** | [NetworkManager][NetworkManager] | [NetworkManager][NetworkManager] |
|
||||||
|
| **Input method framework** | [Fcitx5][Fcitx5] | [Fcitx5][Fcitx5] |
|
||||||
|
| **System resource monitor** | [Btop][Btop] | [Btop][Btop] |
|
||||||
|
| **File Manager** | [ranger][ranger] + [thunar][thunar] | [ranger][ranger] + [thunar][thunar] |
|
||||||
|
| **Shell** | [Nushell][Nushell] + [Starship][Starship] | [Nushell][Nushell] + [Starship][Starship] |
|
||||||
|
| **Music Player** | [mpd][mpd], [ncmpcpp][ncmpcpp], [mpc][mpc], [Netease-cloud-music-gtk][netease-cloud-music-gtk] | [Netease-cloud-music-gtk][netease-cloud-music-gtk] |
|
||||||
|
| **Media Player** | [mpv][mpv] | [mpv][mpv] |
|
||||||
|
| **Text Editor** | [Neovim][Neovim] | [Neovim][Neovim] |
|
||||||
|
| **Fonts** | [Nerd fonts][Nerd fonts] | [Nerd fonts][Nerd fonts] |
|
||||||
|
| **Image Viewer** | [imv][imv] | [feh][feh] |
|
||||||
|
| **Screenshot Software** | [grim][grim] | [flameshot](https://github.com/flameshot-org/flameshot) |
|
||||||
|
| **Screen Recording** | [OBS][OBS] | [OBS][OBS] |
|
||||||
|
|
||||||
|
Wallpapers: https://github.com/ryan4yin/wallpapers
|
||||||
|
|
||||||
|
## Hyprland + AstroNvim
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## I3 + AstroNvim
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
## Hosts
|
||||||
|
|
||||||
|
See [./hosts](./hosts) for details.
|
||||||
|
|
||||||
|
## How to Deploy this Flake?
|
||||||
|
|
||||||
|
> :red_circle: **IMPORTANT**: **You should NOT deploy this flake directly on your machine:exclamation: It will not succeed.** this flake contains my hardware configuration(such as [hardware-configuration.nix](hosts/idols/ai/hardware-configuration.nix)) which is not suitable for your hardware, and my private secrets repository [ryan4yin/nix-secrets](https://github.com/ryan4yin/nix-config/tree/main/secrets) that only I have access to. You may use this repo as a reference to build your own configuration.
|
||||||
|
|
||||||
|
After installing NixOS with `nix-command` & `flake` enabled, follow the steps below to deploy this flake.
|
||||||
|
|
||||||
|
For NixOS, use the following commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo nixos-rebuild switch .#nixos-test
|
# deploy one of the configuration based on the hostname
|
||||||
|
sudo nixos-rebuild switch --flake .#ai_i3
|
||||||
|
# sudo nixos-rebuild switch --flake .#ai_hyprland
|
||||||
|
|
||||||
|
# we can also deploy using `make`, which is defined in Makefile
|
||||||
|
make i3 # deploy my pc with i3 window manager
|
||||||
|
# make hypr # deploy my pc with hyprland compositor
|
||||||
|
|
||||||
|
# or we can deploy with details
|
||||||
|
make i3-debug
|
||||||
|
# make hypr-debug
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For MacOS, use the following commands:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# deploy the darwin configuration(harmonicia)
|
||||||
|
make ha
|
||||||
|
|
||||||
|
# deploy with details
|
||||||
|
make ha-debug
|
||||||
|
```
|
||||||
|
|
||||||
|
## Install Apps from Flatpak
|
||||||
|
|
||||||
|
We can install apps from flathub, which has a lot of apps that are not supported well in nixpkgs.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Add the Flathub repository
|
||||||
|
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||||
|
|
||||||
|
# install apps from flathub
|
||||||
|
flatpak install netease-cloud-music-gtk
|
||||||
|
|
||||||
|
# install 3d printer slicer - cura
|
||||||
|
flatpak install flathub com.ultimaker.cura
|
||||||
|
|
||||||
|
# or you can search apps from flathub
|
||||||
|
flatpak search <keyword>
|
||||||
|
# search on website is also supported: https://flathub.org/
|
||||||
|
```
|
||||||
|
|
||||||
|
## How to create & managage VM from this flake?
|
||||||
|
|
||||||
|
use `aquamarine` as an example, we can create a virtual machine with the following command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# 1. generate a proxmox vma image file
|
||||||
|
nom build .#aquamarine # `nom`(nix-output-monitor) can be replaced by the standard command `nix`
|
||||||
|
|
||||||
|
# 2. upload the genereated image to proxmox server's backup directory `/var/lib/vz/dump`
|
||||||
|
# please replace the vma file name with the one you generated in step 1.
|
||||||
|
scp result/vzdump-qemu-aquamarine-nixos-23.11.20230603.dd49825.vma.zst root@192.168.5.174:/var/lib/vz/dump
|
||||||
|
|
||||||
|
# 3. the image we uploaded will be listed in proxmox web ui's this page: [storage 'local'] -> [backups], we can restore a vm from it via the web ui now.
|
||||||
|
```
|
||||||
|
|
||||||
|
Once the virtual machine `aquamarine` is created, we can deploy updates to it with the following commands:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# 1. add the ssh key to ssh-agent
|
||||||
|
ssh-add ~/.ssh/ai-idols
|
||||||
|
|
||||||
|
# 2. deploy the configuration to the remote host, using the ssh key we added in step 1
|
||||||
|
# and the username defaults to `$USER`, it's `ryan` in my case.
|
||||||
|
nixos-rebuild --flake .#aquamarine --target-host aquamarine --build-host aquamarine switch --use-remote-sudo --verbose
|
||||||
|
|
||||||
|
# or we can replace the command above with the following command, which is defined in Makefile
|
||||||
|
make aqua
|
||||||
|
```
|
||||||
|
|
||||||
|
The commands above will build & deploy the configuration to `aquamarine`, the build process will be executed on `aquamarine` too, and the `--use-remote-sudo` option indicates that we will use `sudo` on the remote host.
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
Other dotfiles that inspired me:
|
||||||
|
|
||||||
|
- Nix Flakes
|
||||||
|
- [NixOS-CN/NixOS-CN-telegram](https://github.com/NixOS-CN/NixOS-CN-telegram)
|
||||||
|
- [notusknot/dotfiles-nix](https://github.com/notusknot/dotfiles-nix)
|
||||||
|
- [xddxdd/nixos-config](https://github.com/xddxdd/nixos-config)
|
||||||
|
- [bobbbay/dotfiles](https://github.com/bobbbay/dotfiles)
|
||||||
|
- [gytis-ivaskevicius/nixfiles](https://github.com/gytis-ivaskevicius/nixfiles)
|
||||||
|
- [fufexan/dotfiles](https://github.com/fufexan/dotfiles)
|
||||||
|
- [davidtwco/veritas](https://github.com/davidtwco/veritas)
|
||||||
|
- [gvolpe/nix-config](https://github.com/gvolpe/nix-config)
|
||||||
|
- [Ruixi-rebirth/flakes](https://github.com/Ruixi-rebirth/flakes)
|
||||||
|
- Hyprland
|
||||||
|
- [HeinzDev/Hyprland-dotfiles](https://github.com/HeinzDev/Hyprland-dotfiles)
|
||||||
|
- [notwidow/hyprland](https://github.com/notwidow/hyprland)
|
||||||
|
- I3 Window Manager
|
||||||
|
- [denisse-dev/dotfiles](https://github.com/denisse-dev/dotfiles)
|
||||||
|
- Neovim/AstroNvim
|
||||||
|
- [maxbrunet/dotfiles](https://github.com/maxbrunet/dotfiles): astronvim with nix flakes.
|
||||||
|
- Misc
|
||||||
|
- [1amSimp1e/dots](https://github.com/1amSimp1e/dots)
|
||||||
|
|
||||||
|
[Hyprland]: https://github.com/hyprwm/Hyprland
|
||||||
|
[i3]: https://github.com/i3/i3
|
||||||
|
[Kitty]: https://github.com/kovidgoyal/kitty
|
||||||
|
[Nushell]: https://github.com/nushell/nushell
|
||||||
|
[Starship]: https://github.com/starship/starship
|
||||||
|
[Waybar]: https://github.com/Alexays/Waybar
|
||||||
|
[i3block]: https://github.com/vivien/i3blocks
|
||||||
|
[rofi]: https://github.com/davatorium/rofi
|
||||||
|
[wofi]: https://hg.sr.ht/~scoopta/wofi
|
||||||
|
[Dunst]: https://github.com/dunst-project/dunst
|
||||||
|
[Fcitx5]: https://github.com/fcitx/fcitx5
|
||||||
|
[Btop]: https://github.com/aristocratos/btop
|
||||||
|
[mpv]: https://github.com/mpv-player/mpv
|
||||||
|
[Neovim]: https://github.com/neovim/neovim
|
||||||
|
[AstroNvim]: https://github.com/AstroNvim/AstroNvim
|
||||||
|
[flameshot]: https://github.com/flameshot-org/flameshot
|
||||||
|
[grim]: https://github.com/emersion/grim
|
||||||
|
[feh]: https://github.com/derf/feh
|
||||||
|
[imv]: https://sr.ht/~exec64/imv/
|
||||||
|
[OBS]: https://obsproject.com
|
||||||
|
[Mako]: https://github.com/emersion/mako
|
||||||
|
[Nerd fonts]: https://github.com/ryanoasis/nerd-fonts
|
||||||
|
[catppuccin]: https://github.com/catppuccin/catppuccin
|
||||||
|
[mpd]: https://github.com/MusicPlayerDaemon/MPD
|
||||||
|
[ncmpcpp]: https://github.com/ncmpcpp/ncmpcpp
|
||||||
|
[mpc]: https://github.com/MusicPlayerDaemon/mpc
|
||||||
|
[Netease-cloud-music-gtk]: https://github.com/gmg137/netease-cloud-music-gtk
|
||||||
|
[NetworkManager]: https://wiki.gnome.org/Projects/NetworkManager
|
||||||
|
[wl-clipboard]: https://github.com/bugaevc/wl-clipboard
|
||||||
|
[GDM]: https://wiki.archlinux.org/title/GDM
|
||||||
|
[thunar]: https://gitlab.xfce.org/xfce/thunar
|
||||||
|
[ranger]: https://github.com/ranger/ranger
|
||||||
|
[Catppuccin]: https://github.com/catppuccin/catppuccin
|
||||||
|
|||||||
|
After Width: | Height: | Size: 249 KiB |
|
After Width: | Height: | Size: 450 KiB |
|
After Width: | Height: | Size: 320 KiB |
|
After Width: | Height: | Size: 359 KiB |
|
After Width: | Height: | Size: 382 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 243 KiB |
|
After Width: | Height: | Size: 232 KiB |
|
After Width: | Height: | Size: 841 KiB |
@@ -1,28 +1,240 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-compat": {
|
"agenix": {
|
||||||
"flake": false,
|
"inputs": {
|
||||||
|
"darwin": "darwin",
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673956053,
|
"lastModified": 1689334118,
|
||||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
"narHash": "sha256-djk5AZv1yU84xlKFaVHqFWvH73U7kIRstXwUAnDJPsk=",
|
||||||
"owner": "edolstra",
|
"owner": "ryantm",
|
||||||
"repo": "flake-compat",
|
"repo": "agenix",
|
||||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
"rev": "0d8c5325fc81daf00532e3e26c6752f7bcde1143",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "edolstra",
|
"owner": "ryantm",
|
||||||
|
"repo": "agenix",
|
||||||
|
"rev": "0d8c5325fc81daf00532e3e26c6752f7bcde1143",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"astronvim": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690218353,
|
||||||
|
"narHash": "sha256-ELEmU6fyC/QzIhV8LmXGB65uEZrmHabIW79xSQiLu6I=",
|
||||||
|
"owner": "AstroNvim",
|
||||||
|
"repo": "AstroNvim",
|
||||||
|
"rev": "8fe945f07aebf8dd2006e7cb3f89c200e0e4adef",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "AstroNvim",
|
||||||
|
"ref": "v3.34.0",
|
||||||
|
"repo": "AstroNvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"catppuccin-alacritty": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1664239314,
|
||||||
|
"narHash": "sha256-w9XVtEe7TqzxxGUCDUR9BFkzLZjG8XrplXJ3lX6f+x0=",
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "alacritty",
|
||||||
|
"rev": "3c808cbb4f9c87be43ba5241bc57373c793d2f17",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "alacritty",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"catppuccin-bat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1668065083,
|
||||||
|
"narHash": "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=",
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "bat",
|
||||||
|
"rev": "ba4d16880d63e656acced2b7d4e034e4a93f74b1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "bat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"catppuccin-btop": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1686163899,
|
||||||
|
"narHash": "sha256-J3UezOQMDdxpflGax0rGBF/XMiKqdqZXuX4KMVGTxFk=",
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "btop",
|
||||||
|
"rev": "89ff712eb62747491a76a7902c475007244ff202",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "btop",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"catppuccin-cava": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1665489380,
|
||||||
|
"narHash": "sha256-hYC6ExtroRy2UoxGNHAzKm9MlTdJSegUWToat4VoN20=",
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "cava",
|
||||||
|
"rev": "ad3301b50786e22e31cbf4316985827d6f05845e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "cava",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"catppuccin-fcitx5": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1664946380,
|
||||||
|
"narHash": "sha256-uFaCbyrEjv4oiKUzLVFzw+UY54/h7wh2cntqeyYwGps=",
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "fcitx5",
|
||||||
|
"rev": "ce244cfdf43a648d984719fdfd1d60aab09f5c97",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "fcitx5",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"catppuccin-helix": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1680791535,
|
||||||
|
"narHash": "sha256-aa8KZ7/1TXcBqaV/TYOZ8rpusOf5QeQ9i2Upnncbziw=",
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "helix",
|
||||||
|
"rev": "5677c16dc95297a804caea9161072ff174018fdd",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "helix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"catppuccin-hyprland": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1683122293,
|
||||||
|
"narHash": "sha256-07B5QmQmsUKYf38oWU3+2C6KO4JvinuTwmW1Pfk8CT8=",
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "hyprland",
|
||||||
|
"rev": "99a88fd21fac270bd999d4a26cf0f4a4222c58be",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "hyprland",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"catppuccin-starship": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689246850,
|
||||||
|
"narHash": "sha256-nsRuxQFKbQkyEI4TXgvAjcroVdG+heKX5Pauq/4Ota0=",
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "starship",
|
||||||
|
"rev": "5629d2356f62a9f2f8efad3ff37476c19969bd4f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "starship",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"darwin": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"agenix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1673295039,
|
||||||
|
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
|
||||||
|
"owner": "lnl7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "lnl7",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1688025799,
|
||||||
|
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"nixpkgs-wayland",
|
||||||
|
"nix-eval-jobs",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1667395993,
|
"lastModified": 1688466019,
|
||||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
"narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689068808,
|
||||||
|
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -34,15 +246,16 @@
|
|||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
"agenix",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1682176386,
|
"lastModified": 1682203081,
|
||||||
"narHash": "sha256-xwYjQ8PjfdHlggi8Dq0PXWby/1oXegSUuNuBvoTcnpA=",
|
"narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "6169690ae38175295605d521bd778d999fbd85cd",
|
"rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -51,33 +264,189 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix-vscode-extensions": {
|
"home-manager_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"nixpkgs": [
|
||||||
"flake-utils": "flake-utils",
|
"nixpkgs"
|
||||||
"nixpkgs": "nixpkgs"
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1683076311,
|
"lastModified": 1687871164,
|
||||||
"narHash": "sha256-xGvR07+fR5g/89oVEQieKG/ZveGHZZyhxXcRouW0WCk=",
|
"narHash": "sha256-bBFlPthuYX322xOlpJvkjUBz0C+MOBjZdDOOJJ+G2jU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-vscode-extensions",
|
"repo": "home-manager",
|
||||||
"rev": "70d48e0c7eafdbcdaa9dac6c17f46a88872f7285",
|
"rev": "07c347bb50994691d7b0095f45ebd8838cf6bc38",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-vscode-extensions",
|
"ref": "release-23.05",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprland": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprland-protocols": "hyprland-protocols",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"wlroots": "wlroots",
|
||||||
|
"xdph": "xdph"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689766295,
|
||||||
|
"narHash": "sha256-2OuPIcw2WOUc/zjrH7JZHWe1byuMjqP6Zz7D4qsi10s=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "Hyprland",
|
||||||
|
"rev": "b08b72358ad549fd066e5be0fc3aa4c9df367607",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"ref": "v0.27.2",
|
||||||
|
"repo": "Hyprland",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprland-protocols": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1684265364,
|
||||||
|
"narHash": "sha256-AxNnWbthsuNx73HDQr0eBxrcE3+yfl/WsaXZqUFmkpQ=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-protocols",
|
||||||
|
"rev": "8c279b9fb0f2b031427dc5ef4eab53f2ed835530",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-protocols",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lib-aggregate": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690114105,
|
||||||
|
"narHash": "sha256-QOY9FXZ4pWjlDPdZKkLNNMHS+ct1+4wu8lrcua7+chw=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "lib-aggregate",
|
||||||
|
"rev": "d923660039d7e793712ba93f633778046f5e6087",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "lib-aggregate",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mysecrets": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689587139,
|
||||||
|
"narHash": "sha256-D3PDgAvBe6FKbrDIoBW/+wRgZc7RtqIVKcnQ6hwqEh8=",
|
||||||
|
"ref": "refs/heads/main",
|
||||||
|
"rev": "a136d8dacc58115edec9edaf6f201c5496e423e3",
|
||||||
|
"shallow": true,
|
||||||
|
"type": "git",
|
||||||
|
"url": "ssh://git@github.com/ryan4yin/nix-secrets.git"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"shallow": true,
|
||||||
|
"type": "git",
|
||||||
|
"url": "ssh://git@github.com/ryan4yin/nix-secrets.git"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-darwin": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs-darwin"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690431538,
|
||||||
|
"narHash": "sha256-Uml8ivMMOFPB9fNSDcw72imGHRdJpaK12sRm2DTLLe8=",
|
||||||
|
"owner": "lnl7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"rev": "16c07487ac9bc59f58b121d13160c67befa3342e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "lnl7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-eval-jobs": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"nixpkgs": "nixpkgs_4",
|
||||||
|
"treefmt-nix": "treefmt-nix"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690420922,
|
||||||
|
"narHash": "sha256-qnVkCp364/NqvGyA9tL6yVO0ZjNDaHcZWSEueNZ6CEE=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nix-eval-jobs",
|
||||||
|
"rev": "f360004d785937aa0a9ed19bbeec864dec37737b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nix-eval-jobs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixlib": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689469483,
|
||||||
|
"narHash": "sha256-2SBhY7rZQ/iNCxe04Eqxlz9YK9KgbaTMBssq3/BgdWY=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"rev": "02fea408f27186f139153e1ae88f8ab2abd9c22c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixos-generators": {
|
||||||
|
"inputs": {
|
||||||
|
"nixlib": "nixlib",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690133435,
|
||||||
|
"narHash": "sha256-YNZiefETggroaTLsLJG2M+wpF0pJPwiauKG4q48ddNU=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixos-generators",
|
||||||
|
"rev": "b1171de4d362c022130c92d7c8adc4bf2b83d586",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixos-generators",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1675763311,
|
"lastModified": 1677676435,
|
||||||
"narHash": "sha256-bz0Q2H3mxsF1CUfk26Sl9Uzi8/HFjGFD/moZHz1HebU=",
|
"narHash": "sha256-6FxdcmQr5JeZqsQvfinIMr0XcTyTuR7EXX0H3ANShpQ=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "fab09085df1b60d6a0870c8a89ce26d5a4a708c2",
|
"rev": "a08d6979dd7c82c4cef0dcc6ac45ab16051c1169",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -87,13 +456,129 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-darwin": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690558459,
|
||||||
|
"narHash": "sha256-5W7y1l2cLYPkpJGNlAja7XW2X2o9rjf0O1mo9nxS9jQ=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "48e82fe1b1c863ee26a33ce9bd39621d2ada0a33",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixpkgs-23.05-darwin",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-lib": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690073998,
|
||||||
|
"narHash": "sha256-qmK+VMvflwUzQSQl4XVP5kbodYLAKThNzq6mZrOM2Mo=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"rev": "d0545f65611a9625f161d0ff02627bc364e024f6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-unstable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690548937,
|
||||||
|
"narHash": "sha256-x3ZOPGLvtC0/+iFAg9Kvqm/8hTAIkGjc634SqtgaXTA=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "2a9d660ff0f7ffde9d73be328ee6e6f10ef66b28",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-wayland": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"lib-aggregate": "lib-aggregate",
|
||||||
|
"nix-eval-jobs": "nix-eval-jobs",
|
||||||
|
"nixpkgs": "nixpkgs_5"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690608929,
|
||||||
|
"narHash": "sha256-GUpBZvuDH+Hn3Dp7bg9RKt8mgUp4+y4uSxa/HFjZvaY=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs-wayland",
|
||||||
|
"rev": "90fb8a2b8fe1a2fe792e87825d3ec5c8b1e50de3",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs-wayland",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681920287,
|
"lastModified": 1688500189,
|
||||||
"narHash": "sha256-+/d6XQQfhhXVfqfLROJoqj3TuG38CAeoT6jO1g9r1k0=",
|
"narHash": "sha256-djYYiY4lzJOlXOnTHytH6BUugrxHDZjuGxTSrU4gt4M=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "78419edadf0fabbe5618643bd850b2f2198ed060",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690558459,
|
||||||
|
"narHash": "sha256-5W7y1l2cLYPkpJGNlAja7XW2X2o9rjf0O1mo9nxS9jQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "645bc49f34fa8eff95479f0345ff57e55b53437e",
|
"rev": "48e82fe1b1c863ee26a33ce9bd39621d2ada0a33",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-23.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_4": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690420098,
|
||||||
|
"narHash": "sha256-47kn22jGYlCeHQxdmqoZeR2jHhZpJjxYFgCXdClVadA=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "6d8c4bd21e6f9fb6c67bb599459f35cf9486e18b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_5": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690548937,
|
||||||
|
"narHash": "sha256-x3ZOPGLvtC0/+iFAg9Kvqm/8hTAIkGjc634SqtgaXTA=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "2a9d660ff0f7ffde9d73be328ee6e6f10ef66b28",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -103,15 +588,144 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nushell-scripts": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690635434,
|
||||||
|
"narHash": "sha256-luGIvcKOfhDorPfGfL449+eD+58MGo5jMCsNwIRJWt4=",
|
||||||
|
"owner": "nushell",
|
||||||
|
"repo": "nu_scripts",
|
||||||
|
"rev": "3ee56c6ec31fcc8dbffee85e1c73eb6fe0bbba8d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nushell",
|
||||||
|
"repo": "nu_scripts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"agenix": "agenix",
|
||||||
"nix-vscode-extensions": "nix-vscode-extensions",
|
"astronvim": "astronvim",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"catppuccin-alacritty": "catppuccin-alacritty",
|
||||||
|
"catppuccin-bat": "catppuccin-bat",
|
||||||
|
"catppuccin-btop": "catppuccin-btop",
|
||||||
|
"catppuccin-cava": "catppuccin-cava",
|
||||||
|
"catppuccin-fcitx5": "catppuccin-fcitx5",
|
||||||
|
"catppuccin-helix": "catppuccin-helix",
|
||||||
|
"catppuccin-hyprland": "catppuccin-hyprland",
|
||||||
|
"catppuccin-starship": "catppuccin-starship",
|
||||||
|
"home-manager": "home-manager_2",
|
||||||
|
"hyprland": "hyprland",
|
||||||
|
"mysecrets": "mysecrets",
|
||||||
|
"nix-darwin": "nix-darwin",
|
||||||
|
"nixos-generators": "nixos-generators",
|
||||||
|
"nixpkgs": "nixpkgs_3",
|
||||||
|
"nixpkgs-darwin": "nixpkgs-darwin",
|
||||||
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
|
"nixpkgs-wayland": "nixpkgs-wayland",
|
||||||
|
"nushell-scripts": "nushell-scripts",
|
||||||
|
"wallpapers": "wallpapers"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"treefmt-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs-wayland",
|
||||||
|
"nix-eval-jobs",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689620039,
|
||||||
|
"narHash": "sha256-BtNwghr05z7k5YMdq+6nbue+nEalvDepuA7qdQMAKoQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"rev": "719c2977f958c41fa60a928e2fbc50af14844114",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"wallpapers": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690648866,
|
||||||
|
"narHash": "sha256-e3xht5OhbMy550QPAwivh/FoSrm9KIc5gUWEEOqbzgg=",
|
||||||
|
"owner": "ryan4yin",
|
||||||
|
"repo": "wallpapers",
|
||||||
|
"rev": "1fc7ace1530b629e7de927b7595f9ec5c416880e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "ryan4yin",
|
||||||
|
"repo": "wallpapers",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"wlroots": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"host": "gitlab.freedesktop.org",
|
||||||
|
"lastModified": 1689611045,
|
||||||
|
"narHash": "sha256-3RTOlQabkNetQ4O4UzSf57JPco9VGVHhSU1ls5uKBeE=",
|
||||||
|
"owner": "wlroots",
|
||||||
|
"repo": "wlroots",
|
||||||
|
"rev": "7791ffe0584c4ac13c170e1661ce33bdbd4a9b9e",
|
||||||
|
"type": "gitlab"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"host": "gitlab.freedesktop.org",
|
||||||
|
"owner": "wlroots",
|
||||||
|
"repo": "wlroots",
|
||||||
|
"type": "gitlab"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xdph": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprland-protocols": [
|
||||||
|
"hyprland",
|
||||||
|
"hyprland-protocols"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1685385764,
|
||||||
|
"narHash": "sha256-r+XMyOoRXq+hlfjayb+fyi9kq2JK48TrwuNIAXqlj7U=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "xdg-desktop-portal-hyprland",
|
||||||
|
"rev": "4d9ff0c17716936e0b5ca577a39e263633901ed1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "xdg-desktop-portal-hyprland",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
"version": 7
|
"version": 7
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,115 +1,282 @@
|
|||||||
{
|
{
|
||||||
description = "NixOS configuration of Ryan Yin";
|
description = "NixOS & macOS configuration of Ryan Yin";
|
||||||
|
|
||||||
# flake 为了确保够纯,它不依赖系统自身的 /etc/nix/nix.conf,而是在 flake.nix 中通过 nixConfig 设置
|
##################################################################################################################
|
||||||
# 但是为了确保安全性,flake 默认仅允许直接设置少数 nixConfig 参数,其他参数都需要在执行 nix 命令时指定 `--accept-flake-config`,否则会被忽略
|
#
|
||||||
# <https://nixos.org/manual/nix/stable/command-ref/conf-file.html>
|
# Want to know Nix in details? Looking for a beginner-friendly tutorial?
|
||||||
# 如果有些包国内镜像下载不到,它仍然会走国外,这时候就得靠旁路由来解决了。
|
# Check out https://github.com/ryan4yin/nixos-and-flakes-book !
|
||||||
# 临时修改默认网关为旁路由: sudo ip route add default via 192.168.5.201
|
#
|
||||||
# sudo ip route del default via 192.168.5.201
|
##################################################################################################################
|
||||||
|
|
||||||
|
# The `outputs` function will return all the build results of the flake.
|
||||||
|
# A flake can have many use cases and different types of outputs,
|
||||||
|
# parameters in `outputs` are defined in `inputs` and can be referenced by their names.
|
||||||
|
# However, `self` is an exception, this special parameter points to the `outputs` itself (self-reference)
|
||||||
|
# The `@` syntax here is used to alias the attribute set of the inputs's parameter, making it convenient to use inside the function.
|
||||||
|
outputs = inputs @ {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
nixpkgs-unstable,
|
||||||
|
nix-darwin,
|
||||||
|
home-manager,
|
||||||
|
nixos-generators,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
username = "ryan";
|
||||||
|
userfullname = "Ryan Yin";
|
||||||
|
useremail = "xiaoyin_c@qq.com";
|
||||||
|
|
||||||
|
x64_system = "x86_64-linux";
|
||||||
|
x64_darwin = "x86_64-darwin";
|
||||||
|
allSystems = [x64_system x64_darwin];
|
||||||
|
|
||||||
|
nixosSystem = import ./lib/nixosSystem.nix;
|
||||||
|
macosSystem = import ./lib/macosSystem.nix;
|
||||||
|
in {
|
||||||
|
nixosConfigurations = let
|
||||||
|
# 星野 アイ, Hoshino Ai
|
||||||
|
idol_ai_modules_i3 = {
|
||||||
|
nixos-modules = [
|
||||||
|
./hosts/idols/ai
|
||||||
|
./modules/nixos/i3.nix
|
||||||
|
];
|
||||||
|
home-module = import ./home/linux/desktop-i3.nix;
|
||||||
|
};
|
||||||
|
idol_ai_modules_hyprland = {
|
||||||
|
nixos-modules = [
|
||||||
|
./hosts/idols/ai
|
||||||
|
./modules/nixos/hyprland.nix
|
||||||
|
];
|
||||||
|
home-module = import ./home/linux/desktop-hyprland.nix;
|
||||||
|
};
|
||||||
|
|
||||||
|
# 星野 愛久愛海, Hoshino Akuamarin
|
||||||
|
idol_aquamarine_modules = {
|
||||||
|
nixos-modules = [
|
||||||
|
./hosts/idols/aquamarine
|
||||||
|
];
|
||||||
|
home-module = import ./home/linux/server.nix;
|
||||||
|
};
|
||||||
|
|
||||||
|
# 星野 瑠美衣, Hoshino Rubii
|
||||||
|
idol_ruby_modules = {
|
||||||
|
nixos-modules = [
|
||||||
|
./hosts/idols/ruby
|
||||||
|
];
|
||||||
|
home-module = import ./home/linux/server.nix;
|
||||||
|
};
|
||||||
|
|
||||||
|
# 有馬 かな, Arima Kana
|
||||||
|
idol_kana_modules = {
|
||||||
|
nixos-modules = [
|
||||||
|
./hosts/idols/kana
|
||||||
|
];
|
||||||
|
home-module = import ./home/linux/server.nix;
|
||||||
|
};
|
||||||
|
|
||||||
|
system = x64_system;
|
||||||
|
specialArgs =
|
||||||
|
{
|
||||||
|
inherit username userfullname useremail;
|
||||||
|
# use unstable branch for some packages to get the latest updates
|
||||||
|
pkgs-unstable = import nixpkgs-unstable {
|
||||||
|
system = x64_system; # refer the `system` parameter form outer scope recursively
|
||||||
|
# To use chrome, we need to allow the installation of non-free software
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// inputs;
|
||||||
|
base_args = {
|
||||||
|
inherit home-manager nixos-generators system specialArgs;
|
||||||
|
};
|
||||||
|
stable_args = base_args // {inherit nixpkgs;};
|
||||||
|
unstable_args = base_args // {nixpkgs = nixpkgs-unstable;};
|
||||||
|
in {
|
||||||
|
# ai with i3 window manager
|
||||||
|
ai_i3 = nixosSystem (idol_ai_modules_i3 // stable_args);
|
||||||
|
# ai with hyprland compositor
|
||||||
|
ai_hyprland = nixosSystem (idol_ai_modules_hyprland // stable_args);
|
||||||
|
|
||||||
|
aquamarine = nixosSystem (idol_aquamarine_modules // stable_args);
|
||||||
|
ruby = nixosSystem (idol_ruby_modules // stable_args);
|
||||||
|
kana = nixosSystem (idol_kana_modules // stable_args);
|
||||||
|
};
|
||||||
|
|
||||||
|
# take system images for idols
|
||||||
|
# https://github.com/nix-community/nixos-generators
|
||||||
|
packages."${x64_system}" =
|
||||||
|
# genAttrs returns an attribute set with the given keys and values(host => image).
|
||||||
|
nixpkgs.lib.genAttrs [
|
||||||
|
"ai_i3"
|
||||||
|
"ai_hyprland"
|
||||||
|
] (
|
||||||
|
host:
|
||||||
|
self.nixosConfigurations.${host}.config.formats.iso
|
||||||
|
)
|
||||||
|
// nixpkgs.lib.genAttrs [
|
||||||
|
"aquamarine"
|
||||||
|
"ruby"
|
||||||
|
"kana"
|
||||||
|
] (
|
||||||
|
host:
|
||||||
|
self.nixosConfigurations.${host}.config.formats.proxmox
|
||||||
|
);
|
||||||
|
|
||||||
|
# macOS's configuration, for work.
|
||||||
|
darwinConfigurations = let
|
||||||
|
system = x64_darwin;
|
||||||
|
specialArgs =
|
||||||
|
{
|
||||||
|
inherit username userfullname useremail;
|
||||||
|
# use unstable branch for some packages to get the latest updates
|
||||||
|
pkgs-unstable = import nixpkgs-unstable {
|
||||||
|
inherit system; # refer the `system` parameter form outer scope recursively
|
||||||
|
# To use chrome, we need to allow the installation of non-free software
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// inputs;
|
||||||
|
base_args = {
|
||||||
|
inherit nix-darwin home-manager system specialArgs;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
harmonica = macosSystem (base_args // {
|
||||||
|
darwin-modules = [
|
||||||
|
./hosts/harmonica
|
||||||
|
];
|
||||||
|
home-module = import ./home/darwin;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
# format the nix code in this flake
|
||||||
|
# alejandra is a nix formatter with a beautiful output
|
||||||
|
formatter = nixpkgs.lib.genAttrs allSystems (
|
||||||
|
system:
|
||||||
|
nixpkgs.legacyPackages.${system}.alejandra
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
# This is the standard format for flake.nix. `inputs` are the dependencies of the flake,
|
||||||
|
# Each item in `inputs` will be passed as a parameter to the `outputs` function after being pulled and built.
|
||||||
|
inputs = {
|
||||||
|
# There are many ways to reference flake inputs. The most widely used is github:owner/name/reference,
|
||||||
|
# which represents the GitHub repository URL + branch/commit-id/tag.
|
||||||
|
|
||||||
|
# Official NixOS package source, using nixos's stable branch by default
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||||
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
# for macos
|
||||||
|
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-23.05-darwin";
|
||||||
|
nix-darwin = {
|
||||||
|
url = "github:lnl7/nix-darwin";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
||||||
|
};
|
||||||
|
|
||||||
|
# home-manager, used for managing user configuration
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager/release-23.05";
|
||||||
|
# The `follows` keyword in inputs is used for inheritance.
|
||||||
|
# Here, `inputs.nixpkgs` of home-manager is kept consistent with the `inputs.nixpkgs` of the current flake,
|
||||||
|
# to avoid problems caused by different versions of nixpkgs dependencies.
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
# modern window compositor
|
||||||
|
hyprland.url = "github:hyprwm/Hyprland/v0.27.2";
|
||||||
|
# community wayland nixpkgs
|
||||||
|
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
|
||||||
|
|
||||||
|
# generate iso/qcow2/docker/... image from nixos configuration
|
||||||
|
nixos-generators = {
|
||||||
|
url = "github:nix-community/nixos-generators";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
# secrets management, lock with git commit at 2023/7/15
|
||||||
|
agenix.url = "github:ryantm/agenix/0d8c5325fc81daf00532e3e26c6752f7bcde1143";
|
||||||
|
|
||||||
|
# AstroNvim is an aesthetic and feature-rich neovim config.
|
||||||
|
astronvim = {
|
||||||
|
url = "github:AstroNvim/AstroNvim/v3.34.0";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# useful nushell scripts, such as auto_completion
|
||||||
|
nushell-scripts = {
|
||||||
|
url = "github:nushell/nu_scripts";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# my private secrets, it's a private repository, you need to replace it with your own.
|
||||||
|
# use ssh protocol to authenticate via ssh-agent/ssh-key, and shallow clone to save time
|
||||||
|
mysecrets = {
|
||||||
|
url = "git+ssh://git@github.com/ryan4yin/nix-secrets.git?shallow=1";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# my wallpapers
|
||||||
|
wallpapers = {
|
||||||
|
url = "github:ryan4yin/wallpapers";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# color scheme - catppuccin
|
||||||
|
catppuccin-btop = {
|
||||||
|
url = "github:catppuccin/btop";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
catppuccin-fcitx5 = {
|
||||||
|
url = "github:catppuccin/fcitx5";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
catppuccin-bat = {
|
||||||
|
url = "github:catppuccin/bat";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
catppuccin-alacritty = {
|
||||||
|
url = "github:catppuccin/alacritty";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
catppuccin-helix = {
|
||||||
|
url = "github:catppuccin/helix";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
catppuccin-starship = {
|
||||||
|
url = "github:catppuccin/starship";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
catppuccin-hyprland = {
|
||||||
|
url = "github:catppuccin/hyprland";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
catppuccin-cava = {
|
||||||
|
url = "github:catppuccin/cava";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
# the nixConfig here only affects the flake itself, not the system configuration!
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
experimental-features = ["nix-command" "flakes"];
|
experimental-features = ["nix-command" "flakes"];
|
||||||
|
|
||||||
substituters = [
|
substituters = [
|
||||||
# replace official cache with a mirror located in China
|
# replace official cache with a mirror located in China
|
||||||
"https://mirrors.bfsu.edu.cn/nix-channels/store"
|
"https://mirrors.ustc.edu.cn/nix-channels/store"
|
||||||
"https://cache.nixos.org/"
|
"https://cache.nixos.org"
|
||||||
];
|
];
|
||||||
|
|
||||||
# nix community's cache server
|
# nix community's cache server
|
||||||
extra-substituters = [
|
extra-substituters = [
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
|
"https://nixpkgs-wayland.cachix.org"
|
||||||
];
|
];
|
||||||
extra-trusted-public-keys = [
|
extra-trusted-public-keys = [
|
||||||
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# 这是 flake.nix 的标准格式,inputs 是 flake 的依赖,outputs 是 flake 的输出
|
|
||||||
# inputs 中的每一项都被拉取、构建后,被作为参数传递给 outputs 函数
|
|
||||||
inputs = {
|
|
||||||
# flake inputs 有很多种引用方式,应用最广泛的是 github 的引用方式
|
|
||||||
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # 使用 nixos-unstable 分支
|
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
|
||||||
# follows 是 inputs 中的继承语法
|
|
||||||
# 这里使 home-manager 的 nixpkgs 这个 inputs 与当前 flake 的 inputs.nixpkgs 保持一致,避免依赖的 nixpkgs 版本不一致导致问题
|
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
|
||||||
# vscode 插件库
|
|
||||||
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
|
|
||||||
};
|
|
||||||
|
|
||||||
# outputs 的参数都是 inputs 中定义的依赖项,可以通过它们的名称来引用。
|
|
||||||
# 不过 self 是个例外,这个特殊参数指向 outputs 自身(自引用),以及 flake 根目录
|
|
||||||
# 这里的 @ 语法将函数的参数 attribute set 取了个别名,方便在内部使用
|
|
||||||
outputs = inputs@{
|
|
||||||
self,
|
|
||||||
nixpkgs,
|
|
||||||
home-manager,
|
|
||||||
nix-vscode-extensions,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
# 名为 nixosConfigurations 的 outputs 会在执行 `nixos-rebuild switch --flake .` 时被使用
|
|
||||||
# 默认情况下会使用与主机 hostname 同名的 nixosConfigurations,但是也可以通过 `--flake .#<name>` 来指定
|
|
||||||
nixosConfigurations = {
|
|
||||||
# hostname 为 nixos-test 的主机会使用这个配置
|
|
||||||
# 这里使用了 nixpkgs.lib.nixosSystem 函数来构建配置,后面的 attributes set 是它的参数
|
|
||||||
# 在 nixos 上使用此命令部署配置:`nixos-rebuild switch --flake .#nixos-test`
|
|
||||||
nixos-test = nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
|
|
||||||
# modules 中每个参数,都是一个 NixOS Module <https://nixos.org/manual/nixos/stable/index.html#sec-modularity>
|
|
||||||
# NixOS Module 可以是一个 attribute set,也可以是一个返回 attribute set 的函数
|
|
||||||
# 如果是函数,那么它的参数就是当前的 NixOS Module 的参数.
|
|
||||||
# 根据 Nix Wiki 对 NixOS modules 的描述,NixOS modules 函数的参数可以有这四个(详见本仓库中的 modules 文件):
|
|
||||||
#
|
|
||||||
# config: The configuration of the entire system
|
|
||||||
# options: All option declarations refined with all definition and declaration references.
|
|
||||||
# pkgs: The attribute set extracted from the Nix package collection and enhanced with the nixpkgs.config option.
|
|
||||||
# modulesPath: The location of the module directory of NixOS.
|
|
||||||
#
|
|
||||||
# nix flake 的 modules 系统可将配置模块化,提升配置的可维护性
|
|
||||||
# 默认只能传上面这四个参数,如果需要传其他参数,必须使用 specialArgs
|
|
||||||
modules = [
|
|
||||||
./hosts/nixos-test
|
|
||||||
|
|
||||||
# home-manager 作为 nixos 的一个 module
|
|
||||||
# 这样在 nixos-rebuild switch 时,home-manager 也会被自动部署,不需要额外执行 home-manager switch 命令
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
|
|
||||||
# 使用 home-manager.extraSpecialArgs 自定义传递给 ./home 的参数
|
|
||||||
home-manager.extraSpecialArgs = inputs;
|
|
||||||
home-manager.users.ryan = import ./home;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
msi-rtx4090 = nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
|
|
||||||
modules = [
|
|
||||||
./hosts/msi-rtx4090
|
|
||||||
|
|
||||||
# home-manager 作为 nixos 的一个 module
|
|
||||||
# 这样在 nixos-rebuild switch 时,home-manager 也会被自动部署,不需要额外执行 home-manager switch 命令
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
|
|
||||||
# 使用 home-manager.extraSpecialArgs 自定义传递给 ./home 的参数
|
|
||||||
home-manager.extraSpecialArgs = inputs;
|
|
||||||
home-manager.users.ryan = import ./home;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
# 如果你在 x86_64-linux 平台上执行 nix build,那么默认会使用这个配置,或者也能通过 `.#<name>` 参数来指定非 default 的配置
|
|
||||||
# packages.x86_64-linux.default =
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenvNoCC,
|
||||||
|
fetchgit,
|
||||||
|
}:
|
||||||
|
stdenvNoCC.mkDerivation rec {
|
||||||
|
pname = "icomoon-feather-font";
|
||||||
|
version = "2023-05-06";
|
||||||
|
|
||||||
|
# 参考 https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ttf-icomoon-feather
|
||||||
|
src = fetchgit {
|
||||||
|
url = "https://github.com/adi1090x/polybar-themes.git";
|
||||||
|
rev = "47b66337a92a1afd2240ed7094ffcb039cc686cf"; # git commit id
|
||||||
|
sparseCheckout = ["fonts/feather.ttf"]; # only fetch the feather.ttf file
|
||||||
|
|
||||||
|
# the sha256 is used to verify the integrity of the downloaded source, and alse cache the build result.
|
||||||
|
# so if you copy other package src's sha256, you will get a cached build result of that package, and all configs in this file will be ignored.
|
||||||
|
# specify sha256 to empty and build it, then an error will indicate the correct sha256
|
||||||
|
sha256 = "sha256-R+UpUFkXDrxKcX7ljLara+1B1rOMdKGZiLQq1/ojgP4=";
|
||||||
|
};
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
install -Dm644 fonts/feather.ttf -t $out/share/fonts/truetype/
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://github.com/feathericons/feather";
|
||||||
|
description = "Icomoon feather font";
|
||||||
|
version = version;
|
||||||
|
longDescription = ''
|
||||||
|
Feather is a collection of simply beautiful open source icons.
|
||||||
|
Each icon is designed on a 24x24 grid with an emphasis on simplicity, consistency, and flexibility.
|
||||||
|
'';
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = [maintainers.ryan4yin];
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Home Manager's Submodules
|
||||||
|
|
||||||
|
1. `base`: The base module that is suitable for both Linux and macOS.
|
||||||
|
2. `linux`: Linux-specific configuration.
|
||||||
|
3. `darwin`: macOS-specific configuration.
|
||||||
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Home Manager's Base Submodules
|
||||||
|
|
||||||
|
2. `server`: Configuration which is suitable for both servers and desktops.
|
||||||
|
1. `desktop`: Configuration for desktop environments, such as Hyprland, I3, etc.
|
||||||
|
1. it import `server` as its submodule.
|
||||||
|
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
{pkgs, catppuccin-alacritty, ...}:
|
||||||
|
###########################################################
|
||||||
|
#
|
||||||
|
# Alacritty Configuration
|
||||||
|
#
|
||||||
|
# Useful Hot Keys for macOS:
|
||||||
|
# 1. Multi-Window: `command + N`
|
||||||
|
# 2. Increase Font Size: `command + =` | `command + +`
|
||||||
|
# 3. Decrease Font Size: `command + -` | `command + _`
|
||||||
|
# 4. And Other common shortcuts such as Copy, Paste, Cursor Move, etc.
|
||||||
|
#
|
||||||
|
# Useful Hot Keys for Linux:
|
||||||
|
# 1. Increase Font Size: `ctrl + shift + =` | `ctrl + shift + +`
|
||||||
|
# 2. Decrease Font Size: `ctrl + shift + -` | `ctrl + shift + _`
|
||||||
|
# 3. And Other common shortcuts such as Copy, Paste, Cursor Move, etc.
|
||||||
|
#
|
||||||
|
# Note: Alacritty do not have support for Tabs, and any graphic protocol.
|
||||||
|
#
|
||||||
|
###########################################################
|
||||||
|
{
|
||||||
|
xdg.configFile."alacritty/theme_catppuccin.yml".source = "${catppuccin-alacritty}/catppuccin-mocha.yml";
|
||||||
|
programs.alacritty = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile."alacritty/alacritty.yml".text =
|
||||||
|
''
|
||||||
|
import:
|
||||||
|
# all alacritty themes can be found at
|
||||||
|
# https://github.com/alacritty/alacritty-theme
|
||||||
|
- ~/.config/alacritty/theme_catppuccin.yml
|
||||||
|
|
||||||
|
window:
|
||||||
|
# Background opacity
|
||||||
|
#
|
||||||
|
# Window opacity as a floating point number from `0.0` to `1.0`.
|
||||||
|
# The value `0.0` is completely transparent and `1.0` is opaque.
|
||||||
|
opacity: 0.95
|
||||||
|
|
||||||
|
# Startup Mode (changes require restart)
|
||||||
|
#
|
||||||
|
# Values for `startup_mode`:
|
||||||
|
# - Windowed
|
||||||
|
# - Maximized
|
||||||
|
# - Fullscreen
|
||||||
|
#
|
||||||
|
# Values for `startup_mode` (macOS only):
|
||||||
|
# - SimpleFullscreen
|
||||||
|
startup_mode: Windowed
|
||||||
|
|
||||||
|
# Allow terminal applications to change Alacritty's window title.
|
||||||
|
dynamic_title: true
|
||||||
|
|
||||||
|
# Make `Option` key behave as `Alt` (macOS only):
|
||||||
|
# - OnlyLeft
|
||||||
|
# - OnlyRight
|
||||||
|
# - Both
|
||||||
|
# - None (default)
|
||||||
|
option_as_alt: Both
|
||||||
|
|
||||||
|
scrolling:
|
||||||
|
# Maximum number of lines in the scrollback buffer.
|
||||||
|
# Specifying '0' will disable scrolling.
|
||||||
|
history: 10000
|
||||||
|
|
||||||
|
# Scrolling distance multiplier.
|
||||||
|
#multiplier: 3
|
||||||
|
|
||||||
|
# Font configuration
|
||||||
|
font:
|
||||||
|
# Normal (roman) font face
|
||||||
|
bold:
|
||||||
|
family: JetBrainsMono Nerd Font
|
||||||
|
italic:
|
||||||
|
family: JetBrainsMono Nerd Font
|
||||||
|
normal:
|
||||||
|
family: JetBrainsMono Nerd Font
|
||||||
|
bold_italic:
|
||||||
|
# Font family
|
||||||
|
#
|
||||||
|
# If the bold italic family is not specified, it will fall back to the
|
||||||
|
# value specified for the normal font.
|
||||||
|
family: JetBrainsMono Nerd Font
|
||||||
|
''
|
||||||
|
+ (
|
||||||
|
if pkgs.stdenv.isDarwin
|
||||||
|
then ''
|
||||||
|
# Point size
|
||||||
|
size: 14
|
||||||
|
shell: # force nushell as default shell on macOS
|
||||||
|
program: /run/current-system/sw/bin/nu
|
||||||
|
''
|
||||||
|
else ''
|
||||||
|
# holder identation
|
||||||
|
# Point size
|
||||||
|
size: 13
|
||||||
|
''
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
../server
|
||||||
|
|
||||||
|
./neovim
|
||||||
|
|
||||||
|
./alacritty.nix
|
||||||
|
./development.nix
|
||||||
|
./helix.nix
|
||||||
|
./kitty.nix
|
||||||
|
./media.nix
|
||||||
|
./shell.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
pkgs-unstable,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
#############################################################
|
||||||
|
#
|
||||||
|
# Basic settings for development environment
|
||||||
|
#
|
||||||
|
# Please avoid to install language specific packages here(globally),
|
||||||
|
# instead, install them independently using dev-templates:
|
||||||
|
# https://github.com/the-nix-way/dev-templates
|
||||||
|
#
|
||||||
|
#############################################################
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
pkgs-unstable.devbox
|
||||||
|
|
||||||
|
# cloud native
|
||||||
|
skopeo
|
||||||
|
docker-compose
|
||||||
|
dive # explore docker layers
|
||||||
|
kubectl
|
||||||
|
kubernetes-helm
|
||||||
|
terraform
|
||||||
|
# terraformer # generate terraform configs from existing cloud resources
|
||||||
|
pulumi
|
||||||
|
pulumictl
|
||||||
|
k9s
|
||||||
|
# istioctl
|
||||||
|
|
||||||
|
# cloud provider
|
||||||
|
awscli2
|
||||||
|
aws-iam-authenticator
|
||||||
|
eksctl
|
||||||
|
|
||||||
|
# DO NOT install build tools for C/C++, set it per project by devShell instead
|
||||||
|
gnumake # used by this repo, to simplify the deployment
|
||||||
|
|
||||||
|
# python
|
||||||
|
(python311.withPackages (ps:
|
||||||
|
with ps; [
|
||||||
|
ipython
|
||||||
|
pandas
|
||||||
|
requests
|
||||||
|
pyquery
|
||||||
|
pyyaml
|
||||||
|
]))
|
||||||
|
|
||||||
|
# db related
|
||||||
|
dbeaver
|
||||||
|
mycli
|
||||||
|
pgcli
|
||||||
|
mongosh
|
||||||
|
sqlite
|
||||||
|
|
||||||
|
# embedded development
|
||||||
|
minicom
|
||||||
|
|
||||||
|
# other tools
|
||||||
|
k6 # load testing tool
|
||||||
|
mitmproxy # http/https proxy tool
|
||||||
|
protobuf # protocol buffer compiler
|
||||||
|
];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
direnv = {
|
||||||
|
enable = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
|
||||||
|
enableZshIntegration = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableNushellIntegration = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
{ pkgs, catppuccin-helix, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# https://github.com/catppuccin/helix
|
||||||
|
xdg.configFile."helix/themes".source = "${catppuccin-helix}/themes/default";
|
||||||
|
|
||||||
|
programs.helix = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.helix;
|
||||||
|
settings = {
|
||||||
|
theme = "catppuccin_mocha";
|
||||||
|
editor = {
|
||||||
|
line-number = "relative";
|
||||||
|
cursorline = true;
|
||||||
|
color-modes = true;
|
||||||
|
lsp.display-messages = true;
|
||||||
|
cursor-shape = {
|
||||||
|
insert = "bar";
|
||||||
|
normal = "block";
|
||||||
|
select = "underline";
|
||||||
|
};
|
||||||
|
indent-guides.render = true;
|
||||||
|
};
|
||||||
|
keys.normal = {
|
||||||
|
space.space = "file_picker";
|
||||||
|
space.w = ":w";
|
||||||
|
space.q = ":q";
|
||||||
|
esc = [ "collapse_selection" "keep_primary_selection" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
###########################################################
|
||||||
|
#
|
||||||
|
# Kitty Configuration
|
||||||
|
#
|
||||||
|
# Useful Hot Keys for macOS:
|
||||||
|
# 1. New Tab: `command + t`
|
||||||
|
# 2. Close Tab: `command + w`
|
||||||
|
# 3. Switch Tab: `shift + command + [` | `shift + command + ]`
|
||||||
|
# 4. Increase Font Size: `command + =` | `command + +`
|
||||||
|
# 5. Decrease Font Size: `command + -` | `command + _`
|
||||||
|
# 6. And Other common shortcuts such as Copy, Paste, Cursor Move, etc.
|
||||||
|
#
|
||||||
|
# Useful Hot Keys for Linux:
|
||||||
|
# 1. New Tab: `ctrl + shift + t`
|
||||||
|
# 2. Close Tab: `ctrl + shift + q`
|
||||||
|
# 3. Switch Tab: `ctrl + shift + right` | `ctrl + shift + left`
|
||||||
|
# 4. Increase Font Size: `ctrl + shift + =` | `ctrl + shift + +`
|
||||||
|
# 5. Decrease Font Size: `ctrl + shift + -` | `ctrl + shift + _`
|
||||||
|
# 6. And Other common shortcuts such as Copy, Paste, Cursor Move, etc.
|
||||||
|
#
|
||||||
|
###########################################################
|
||||||
|
{
|
||||||
|
programs.kitty = {
|
||||||
|
enable = true;
|
||||||
|
theme = "Catppuccin-Mocha"; # kitty has catppuccin theme built-in
|
||||||
|
font = {
|
||||||
|
name = "JetBrainsMono Nerd Font";
|
||||||
|
# use different font size on macOS
|
||||||
|
size =
|
||||||
|
if pkgs.stdenv.isDarwin
|
||||||
|
then 14
|
||||||
|
else 13;
|
||||||
|
};
|
||||||
|
|
||||||
|
settings =
|
||||||
|
{
|
||||||
|
background_opacity = "0.95";
|
||||||
|
macos_option_as_alt = true; # Option key acts as Alt on macOS
|
||||||
|
scrollback_lines = 10000;
|
||||||
|
enable_audio_bell = false;
|
||||||
|
}
|
||||||
|
// (
|
||||||
|
if pkgs.stdenv.isDarwin
|
||||||
|
then {
|
||||||
|
# macOS specific settings, force kitty to use nushell as default shell
|
||||||
|
shell = "/run/current-system/sw/bin/nu";
|
||||||
|
}
|
||||||
|
else {}
|
||||||
|
);
|
||||||
|
|
||||||
|
# macOS specific settings
|
||||||
|
darwinLaunchOptions = ["--start-as=fullscreen"];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
# processing audio/video
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
ffmpeg-full
|
||||||
|
|
||||||
|
# images
|
||||||
|
viu # Terminal image viewer with native support for iTerm and Kitty
|
||||||
|
imagemagick
|
||||||
|
graphviz
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# AstroNvim
|
||||||
|
|
||||||
|
My Neovim config based on [AstroNvim](https://github.com/AstroNvim/AstroNvim).
|
||||||
|
|
||||||
|
## Screenshots
|
||||||
|
|
||||||
|

|
||||||
@@ -0,0 +1,288 @@
|
|||||||
|
return {
|
||||||
|
colorscheme = "catppuccin",
|
||||||
|
|
||||||
|
options = {
|
||||||
|
opt = {
|
||||||
|
relativenumber = true, -- Show relative numberline
|
||||||
|
signcolumn = "auto", -- Show sign column when used only
|
||||||
|
spell = false, -- Spell checking
|
||||||
|
swapfile = false, -- Swapfile
|
||||||
|
smartindent = false; -- fix https://github.com/ryan4yin/nix-config/issues/4
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
plugins = {
|
||||||
|
"AstroNvim/astrocommunity",
|
||||||
|
-- colorscheme - catppuccin
|
||||||
|
{ import = "astrocommunity.colorscheme.catppuccin" },
|
||||||
|
-- Highly experimental plugin that completely replaces
|
||||||
|
-- the UI for messages, cmdline and the popupmenu.
|
||||||
|
{ import = "astrocommunity.utility.noice-nvim" },
|
||||||
|
-- Fully featured & enhanced replacement for copilot.vim
|
||||||
|
-- <Tab> work with both auto completion in cmp and copilot
|
||||||
|
{ import = "astrocommunity.media.vim-wakatime" },
|
||||||
|
{ import = "astrocommunity.motion.leap-nvim" },
|
||||||
|
{ import = "astrocommunity.motion.flit-nvim" },
|
||||||
|
{ import = "astrocommunity.scrolling.nvim-scrollbar" },
|
||||||
|
{ import = "astrocommunity.editing-support.auto-save-nvim" },
|
||||||
|
{ import = "astrocommunity.editing-support.todo-comments-nvim" },
|
||||||
|
-- Language Support
|
||||||
|
---- Frontend & NodeJS
|
||||||
|
{ import = "astrocommunity.pack.typescript-all-in-one" },
|
||||||
|
{ import = "astrocommunity.pack.tailwindcss" },
|
||||||
|
{ import = "astrocommunity.pack.html-css" },
|
||||||
|
{ import = "astrocommunity.pack.prisma" },
|
||||||
|
{ import = "astrocommunity.pack.vue" },
|
||||||
|
---- Configuration Language
|
||||||
|
{ import = "astrocommunity.pack.markdown" },
|
||||||
|
{ import = "astrocommunity.markdown-and-latex.glow-nvim" },
|
||||||
|
{ import = "astrocommunity.pack.json" },
|
||||||
|
{ import = "astrocommunity.pack.yaml" },
|
||||||
|
{ import = "astrocommunity.pack.toml" },
|
||||||
|
---- Backend
|
||||||
|
{ import = "astrocommunity.pack.lua" },
|
||||||
|
{ import = "astrocommunity.pack.go" },
|
||||||
|
{ import = "astrocommunity.pack.rust" },
|
||||||
|
{ import = "astrocommunity.pack.python" },
|
||||||
|
{ import = "astrocommunity.pack.java" },
|
||||||
|
-- { import = "astrocommunity.pack.nix" }, -- manually add config for nix, comment this one.
|
||||||
|
{ import = "astrocommunity.pack.proto" },
|
||||||
|
---- Operation & Cloud Native
|
||||||
|
{ import = "astrocommunity.pack.terraform" },
|
||||||
|
{ import = "astrocommunity.pack.bash" },
|
||||||
|
{ import = "astrocommunity.pack.cmake" },
|
||||||
|
{ import = "astrocommunity.pack.cpp" },
|
||||||
|
{ import = "astrocommunity.pack.docker" },
|
||||||
|
-- AI Assistant
|
||||||
|
{ import = "astrocommunity.completion.copilot-lua-cmp" },
|
||||||
|
-- Custom copilot-lua to enable filtypes: markdown
|
||||||
|
{
|
||||||
|
"zbirenbaum/copilot.lua",
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.filetypes = {
|
||||||
|
yaml = true;
|
||||||
|
markdown = true,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
---- Nushell
|
||||||
|
{
|
||||||
|
"LhKipp/nvim-nu",
|
||||||
|
config = function()
|
||||||
|
require'nu'.setup({
|
||||||
|
use_lsp_features = true, -- requires https://github.com/jose-elias-alvarez/null-ls.nvim
|
||||||
|
-- lsp_feature: all_cmd_names is the source for the cmd name completion.
|
||||||
|
-- It can be
|
||||||
|
-- * a string, which is interpreted as a shell command and the returned list is the source for completions (requires plenary.nvim)
|
||||||
|
-- * a list, which is the direct source for completions (e.G. all_cmd_names = {"echo", "to csv", ...})
|
||||||
|
-- * a function, returning a list of strings and the return value is used as the source for completions
|
||||||
|
all_cmd_names = [[nu -c 'help commands | get name | str join "\n"']]
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
{"nvim-treesitter/nvim-treesitter"},
|
||||||
|
{ "jose-elias-alvarez/null-ls.nvim"},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
-- File explorer(Custom configs)
|
||||||
|
{
|
||||||
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
opts = {
|
||||||
|
filesystem = {
|
||||||
|
filtered_items = {
|
||||||
|
visible = true, -- visible by default
|
||||||
|
hide_dotfiles = false,
|
||||||
|
hide_gitignored = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
-- The plugin offers the `:Refactor` command to refactor code.
|
||||||
|
-- TODO not work yet
|
||||||
|
{
|
||||||
|
"ThePrimeagen/refactoring.nvim",
|
||||||
|
dependencies = {
|
||||||
|
{"nvim-lua/plenary.nvim"},
|
||||||
|
{"nvim-treesitter/nvim-treesitter"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
-- The plugin offers the `:Spectre` command to search and replace.
|
||||||
|
-- TODO not work yet
|
||||||
|
{
|
||||||
|
"nvim-pack/nvim-spectre",
|
||||||
|
dependencies = {
|
||||||
|
{"nvim-lua/plenary.nvim"},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
-- Language Parser for syntax highlighting / indentation / folding / Incremental selection
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = function(_, opts)
|
||||||
|
local utils = require "astronvim.utils";
|
||||||
|
opts.indent.enable = false;
|
||||||
|
opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, {
|
||||||
|
-- neovim
|
||||||
|
"vim",
|
||||||
|
"lua",
|
||||||
|
-- operation & cloud native
|
||||||
|
"dockerfile",
|
||||||
|
"hcl",
|
||||||
|
"jsonnet",
|
||||||
|
"regex",
|
||||||
|
"terraform",
|
||||||
|
"nix",
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Install lsp, formmatter and others via home manager instead of Mason.nvim
|
||||||
|
-- LSP installations
|
||||||
|
{
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
-- overwrite ensure_installed to install lsp via home manager(except emmet_ls)
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.ensure_installed = {
|
||||||
|
"emmet_ls", -- not exist in nixpkgs, so install it via mason
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
-- Formatters/Linter installation
|
||||||
|
{
|
||||||
|
"jay-babu/mason-null-ls.nvim",
|
||||||
|
-- ensure_installed nothing
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.ensure_installed = nil
|
||||||
|
opts.automatic_installation = false
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"jose-elias-alvarez/null-ls.nvim",
|
||||||
|
opts = function(_, opts)
|
||||||
|
local null_ls = require "null-ls"
|
||||||
|
local code_actions = null_ls.builtins.code_actions
|
||||||
|
local diagnostics = null_ls.builtins.diagnostics
|
||||||
|
local formatting = null_ls.builtins.formatting
|
||||||
|
local hover = null_ls.builtins.hover
|
||||||
|
local completion = null_ls.builtins.completion
|
||||||
|
-- https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md
|
||||||
|
if type(opts.sources) == "table" then
|
||||||
|
vim.list_extend(opts.sources, {
|
||||||
|
-- Common Code Actions
|
||||||
|
code_actions.gitsigns,
|
||||||
|
-- common refactoring actions based off the Refactoring book by Martin Fowler
|
||||||
|
code_actions.refactoring,
|
||||||
|
code_actions.gomodifytags, -- Go - modify struct field tags
|
||||||
|
code_actions.impl, -- Go - generate interface method stubs
|
||||||
|
code_actions.shellcheck,
|
||||||
|
code_actions.proselint, -- English prose linter
|
||||||
|
code_actions.statix, -- Lints and suggestions for Nix.
|
||||||
|
|
||||||
|
-- Completion
|
||||||
|
completion.luasnip,
|
||||||
|
|
||||||
|
-- Diagnostic
|
||||||
|
diagnostics.actionlint, -- GitHub Actions workflow syntax checking
|
||||||
|
diagnostics.buf, -- check text in current buffer
|
||||||
|
diagnostics.checkmake, -- check Makefiles
|
||||||
|
diagnostics.deadnix, -- Scan Nix files for dead code.
|
||||||
|
|
||||||
|
-- Formatting
|
||||||
|
formatting.prettier, -- js/ts/vue/css/html/json/... formatter
|
||||||
|
diagnostics.hadolint, -- Dockerfile linter
|
||||||
|
formatting.black, -- Python formatter
|
||||||
|
formatting.ruff, -- extremely fast Python linter
|
||||||
|
formatting.goimports, -- Go formatter
|
||||||
|
formatting.shfmt, -- Shell formatter
|
||||||
|
formatting.rustfmt, -- Rust formatter
|
||||||
|
formatting.taplo, -- TOML formatteautoindentr
|
||||||
|
formatting.terraform_fmt, -- Terraform formatter
|
||||||
|
formatting.stylua, -- Lua formatter
|
||||||
|
formatting.alejandra, -- Nix formatter
|
||||||
|
formatting.sqlfluff.with({ -- SQL formatter
|
||||||
|
extra_args = { "--dialect", "postgres" }, -- change to your dialect
|
||||||
|
}),
|
||||||
|
formatting.nginx_beautifier, -- Nginx formatter
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
-- Debugger installation
|
||||||
|
{
|
||||||
|
"jay-babu/mason-nvim-dap.nvim",
|
||||||
|
-- overrides `require("mason-nvim-dap").setup(...)`
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.ensure_installed = nil
|
||||||
|
opts.automatic_installation = false
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Configure require("lazy").setup() options
|
||||||
|
lazy = {
|
||||||
|
defaults = { lazy = true },
|
||||||
|
performance = {
|
||||||
|
rtp = {
|
||||||
|
-- customize default disabled vim plugins
|
||||||
|
disabled_plugins = { };
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
lsp = {
|
||||||
|
config = {
|
||||||
|
-- the offset_enconding of clangd will confilicts whit null-ls
|
||||||
|
-- so we need to manually set it to utf-8
|
||||||
|
clangd = {
|
||||||
|
capabilities = {
|
||||||
|
offsetEncoding = "utf-8",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- enable servers that installed by home-manager instead of mason
|
||||||
|
servers = {
|
||||||
|
---- Frontend & NodeJS
|
||||||
|
"tsserver", -- typescript/javascript language server
|
||||||
|
"tailwindcss", -- tailwindcss language server
|
||||||
|
"html", -- html language server
|
||||||
|
"cssls", -- css language server
|
||||||
|
"prismals", -- prisma language server
|
||||||
|
"volar", -- vue language server
|
||||||
|
---- Configuration Language
|
||||||
|
"marksman", -- markdown ls
|
||||||
|
"jsonls", -- json language server
|
||||||
|
"yamlls", -- yaml language server
|
||||||
|
"taplo", -- toml language server
|
||||||
|
---- Backend
|
||||||
|
"lua_ls", -- lua
|
||||||
|
"gopls", -- go
|
||||||
|
"rust_analyzer", -- rust
|
||||||
|
"pyright", -- python
|
||||||
|
"ruff_lsp", -- extremely fast Python linter and code transformation
|
||||||
|
"jdtls", -- java
|
||||||
|
"nil_ls", -- nix language server
|
||||||
|
"bufls", -- protocol buffer language server
|
||||||
|
"zls", -- zig language server
|
||||||
|
---- Operation & Cloud Nativautoindente
|
||||||
|
"bashls", -- bash
|
||||||
|
"cmake", -- cmake language server
|
||||||
|
"clangd", -- c/c++
|
||||||
|
"dockerls", -- dockerfile
|
||||||
|
"jsonnet_ls", -- jsonnet language server
|
||||||
|
"terraformls", -- terraform hcl
|
||||||
|
},
|
||||||
|
formatting = {
|
||||||
|
disabled = {},
|
||||||
|
format_on_save = {
|
||||||
|
enabled = true,
|
||||||
|
allow_filetypes = {
|
||||||
|
"go",
|
||||||
|
"jsonnet",
|
||||||
|
"rust",
|
||||||
|
"terraform",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
-- Mapping data with "desc" stored directly by vim.keymap.set().
|
||||||
|
--
|
||||||
|
-- Please use this mappings table to set keyboard mapping since this is the
|
||||||
|
-- lower level configuration and more robust one. (which-key will
|
||||||
|
-- automatically pick-up stored data by this setting.)
|
||||||
|
local utils = require "astronvim.utils"
|
||||||
|
return {
|
||||||
|
-- first key is the mode
|
||||||
|
n = {
|
||||||
|
-- second key is the lefthand side of the map
|
||||||
|
-- mappings seen under group name "Buffer"
|
||||||
|
["<leader>bn"] = { "<cmd>tabnew<cr>", desc = "New tab" },
|
||||||
|
-- quick save
|
||||||
|
["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
|
||||||
|
["<leader>tp"] = { function() utils.toggle_term_cmd("ipython") end, desc = "ToggleTerm python" },
|
||||||
|
},
|
||||||
|
t = {
|
||||||
|
-- setting a mapping to false will disable it
|
||||||
|
-- ["<esc>"] = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,234 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
astronvim,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# AstroNvim's configuration and all its dependencies
|
||||||
|
#
|
||||||
|
# Related folders:
|
||||||
|
# nvim's config: `~/.config/nvim`
|
||||||
|
# astronvim's user configuration: `$XDG_CONFIG_HOME/astronvim/lua/user`
|
||||||
|
# all plugins will be installed into(by lazy.nvim): `~/.local/share/nvim/`
|
||||||
|
#
|
||||||
|
# For details: https://astronvim.com/
|
||||||
|
#
|
||||||
|
# Toggle visual mode: `v`
|
||||||
|
# Toggle visual block mode: `<Ctrl> + v` (select a block(vertically) of text)
|
||||||
|
#
|
||||||
|
# Add at the end of Multiple line: `:normal A<text>`
|
||||||
|
# Note that `:normal` execute `A<text>` on each line.
|
||||||
|
# `A` means append text at the end of the line.
|
||||||
|
# You need to select the lines via visual mode first.
|
||||||
|
#
|
||||||
|
# Add at the end of the visual block: `:A<text>`
|
||||||
|
# You need to select the block via visual block mode first.
|
||||||
|
# And then this command will append text at the end of the block on each line.
|
||||||
|
# If the position exceeds the end of the line, neovim will automatically add spaces
|
||||||
|
#
|
||||||
|
# Commands & shortcuts in AstroNvim
|
||||||
|
# Learn Neovim's Basics: `:Tutor`
|
||||||
|
# Opening file explorer: `<Space> + e`
|
||||||
|
# Focus Neotree to current file: `<Space> + o`
|
||||||
|
# Floating Terminal: `<Space> + tf`
|
||||||
|
# Horizontal Split Terminal: `<Space> + th`
|
||||||
|
# Vertical Split Terminal: `<Space> + tv`
|
||||||
|
# Open IPython REPL: `<Space> + tp`
|
||||||
|
# Opening LSP symbols: `<Space> + lS`
|
||||||
|
# Toggle line wrap: `<Space> + uw`
|
||||||
|
# Show line diagnostics: `gl`
|
||||||
|
# Go to definition: `gd`
|
||||||
|
#
|
||||||
|
# Switching between windows: `<Ctrl> + h/j/k/l`
|
||||||
|
# Resizing windows: `<Ctrl> + Up/Down/Left/Right`
|
||||||
|
# Note that on macOS, this is conflict with system's default shortcuts.
|
||||||
|
# You need disable them in System Preferences -> Keyboard -> Shortcuts -> Mission Control.
|
||||||
|
# Horizontal Split: `\`
|
||||||
|
# Vertical Split: `|`
|
||||||
|
# Next Buffer(Tab): `]b`
|
||||||
|
# Previous Buffer(Tab): `[b`
|
||||||
|
# Close Buffer: `<Space> + c`
|
||||||
|
#
|
||||||
|
# Toggle buffer auto formatting: `<Space> + uf`
|
||||||
|
# Format Document: `<Space> + lf`
|
||||||
|
# Comment Line: `<Space> + /`
|
||||||
|
# Can be used in visual mode
|
||||||
|
# Code Actions: `<Space> + la`
|
||||||
|
# Rename: `<Space> + lr`
|
||||||
|
# Open filepath/URL at cursor: `gx`
|
||||||
|
# This is a neovim builtin command
|
||||||
|
# Find files by name(fzf): `<Space> + ff`
|
||||||
|
# Grep string in files(repgrep): `<Space> + fw`
|
||||||
|
#
|
||||||
|
# Save Session: `<Space> + Ss`
|
||||||
|
# Last Session: `<Space> + Sl`
|
||||||
|
# Delete Session: `<Space> + Sd`
|
||||||
|
# Search Session: `<Space> + Sf`
|
||||||
|
# Load Current Directory Session:`<Space> + S.`
|
||||||
|
#
|
||||||
|
# Debugging: press `<Space> + D` to see the available bindings and options.
|
||||||
|
#
|
||||||
|
# Replace in the selected area: `:s/old/new/g` (will show `:'<,'>s/old/new/g`)
|
||||||
|
# Replace in the current line: The same as above
|
||||||
|
# Replace in the whole file: `:% s/old/new/g`
|
||||||
|
# Replace with regex: `:% s@\vhttp://(\w+)@https://\1@gc`
|
||||||
|
# 1. `\v` means means that in the regex pattern after it can be used without backslash escaping(similar to python's raw string).
|
||||||
|
# 2. `\1` means the first matched group in the pattern.
|
||||||
|
# Replace in the specific lines:
|
||||||
|
# 1. From the 10th line to the end of the file: `:10,$ s/old/new/g`
|
||||||
|
# or `:10,$ s@^@#@g`
|
||||||
|
# 2. From the 10th line to the 20th line: `:10,20 s/old/new/g`
|
||||||
|
#
|
||||||
|
# The postfix(flgas) in the above commands:
|
||||||
|
# 1. `g` means replace all the matched strings in the current line/file.
|
||||||
|
# 2. `c` means ask for confirmation before replacing.
|
||||||
|
# 3. `i` means ignore case.
|
||||||
|
#
|
||||||
|
# Joining a Selection of Lines With Space: `:join`
|
||||||
|
# Joining without spaces: `:join!`
|
||||||
|
#
|
||||||
|
# Toggle text's case: `~`
|
||||||
|
# Convert to uppercase: `U`
|
||||||
|
# Convert to lowercase: `u`
|
||||||
|
#
|
||||||
|
# Save the selected text to a file: `:w filename` (will show `:'<,'>w filename`)
|
||||||
|
#
|
||||||
|
# Search key pattern and Replace in Multiple Files:
|
||||||
|
# sed -ri "s/pattern_str/replace_str/g" $(grep "key_pattern" 'path_pattern' -rl)
|
||||||
|
#
|
||||||
|
# Search file name pattern and Replace in Multiple Files:
|
||||||
|
# sed -ri "s/pattern_str/replace_str/g" $(find . -name "pattern")
|
||||||
|
#
|
||||||
|
# ......
|
||||||
|
# See https://astronvim.com/Basic%20Usage/walkthrough
|
||||||
|
#
|
||||||
|
#e#############################################################################
|
||||||
|
{
|
||||||
|
xdg.configFile = {
|
||||||
|
# base config
|
||||||
|
"nvim" = {
|
||||||
|
# update AstroNvim
|
||||||
|
onChange = "${pkgs.neovim}/bin/nvim --headless +quitall";
|
||||||
|
source = astronvim;
|
||||||
|
};
|
||||||
|
# my cusotom astronvim config, astronvim will load it after base config
|
||||||
|
# https://github.com/AstroNvim/AstroNvim/blob/v3.32.0/lua/astronvim/bootstrap.lua#L15-L16
|
||||||
|
"astronvim/lua/user" = {
|
||||||
|
# update AstroNvim
|
||||||
|
onChange = "${pkgs.neovim}/bin/nvim --headless +quitall";
|
||||||
|
source = ./astronvim_user;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.config = {
|
||||||
|
programs.npm.npmrc = ''
|
||||||
|
prefix = ''${HOME}/.npm-global
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
neovim = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
|
||||||
|
viAlias = false;
|
||||||
|
vimAlias = true;
|
||||||
|
|
||||||
|
withPython3 = true;
|
||||||
|
withNodeJs = true;
|
||||||
|
extraPackages = [];
|
||||||
|
|
||||||
|
# currently we use lazy.nvim as neovim's package manager, so comment this one.
|
||||||
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
# search all the plugins using https://search.nixos.org/packages
|
||||||
|
luasnip
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
#-- c/c++
|
||||||
|
cmake
|
||||||
|
cmake-language-server
|
||||||
|
gnumake
|
||||||
|
checkmake
|
||||||
|
gcc # c/c++ compiler, required by nvim-treesitter!
|
||||||
|
llvmPackages.clang-unwrapped # c/c++ tools with clang-tools such as clangd
|
||||||
|
gdb
|
||||||
|
lldb
|
||||||
|
|
||||||
|
#-- python
|
||||||
|
nodePackages.pyright # python language server
|
||||||
|
python311Packages.black # python formatter
|
||||||
|
python311Packages.ruff-lsp
|
||||||
|
|
||||||
|
#-- rust
|
||||||
|
rust-analyzer
|
||||||
|
cargo # rust package manager
|
||||||
|
rustfmt
|
||||||
|
|
||||||
|
#-- zig
|
||||||
|
zls
|
||||||
|
|
||||||
|
#-- nix
|
||||||
|
nil
|
||||||
|
rnix-lsp
|
||||||
|
# nixd
|
||||||
|
statix # Lints and suggestions for the nix programming language
|
||||||
|
deadnix # Find and remove unused code in .nix source files
|
||||||
|
alejandra # Nix Code Formatter
|
||||||
|
|
||||||
|
#-- golang
|
||||||
|
go
|
||||||
|
gomodifytags
|
||||||
|
iferr # generate error handling code for go
|
||||||
|
impl # generate function implementation for go
|
||||||
|
gotools # contains tools like: godoc, goimports, etc.
|
||||||
|
gopls # go language server
|
||||||
|
delve # go debugger
|
||||||
|
|
||||||
|
#-- lua
|
||||||
|
stylua
|
||||||
|
lua-language-server
|
||||||
|
|
||||||
|
#-- bash
|
||||||
|
nodePackages.bash-language-server
|
||||||
|
shellcheck
|
||||||
|
shfmt
|
||||||
|
|
||||||
|
#-- javascript/typescript --#
|
||||||
|
nodePackages.typescript
|
||||||
|
nodePackages.typescript-language-server
|
||||||
|
# HTML/CSS/JSON/ESLint language servers extracted from vscode
|
||||||
|
nodePackages.vscode-langservers-extracted
|
||||||
|
nodePackages."@tailwindcss/language-server"
|
||||||
|
|
||||||
|
#-- CloudNative
|
||||||
|
nodePackages.dockerfile-language-server-nodejs
|
||||||
|
terraform
|
||||||
|
terraform-ls
|
||||||
|
jsonnet
|
||||||
|
jsonnet-language-server
|
||||||
|
hadolint # Dockerfile linter
|
||||||
|
|
||||||
|
#-- Others
|
||||||
|
taplo # TOML language server / formatter / validator
|
||||||
|
nodePackages.yaml-language-server
|
||||||
|
sqlfluff # SQL linter
|
||||||
|
actionlint # GitHub Actions linter
|
||||||
|
buf # protoc plugin for linting and formatting
|
||||||
|
proselint # English prose linter
|
||||||
|
|
||||||
|
#-- Misc
|
||||||
|
tree-sitter # common language parser/highlighter
|
||||||
|
nodePackages.prettier # common code formatter
|
||||||
|
marksman # language server for markdown
|
||||||
|
glow # markdown previewer
|
||||||
|
|
||||||
|
#-- Optional Requirements:
|
||||||
|
gdu # disk usage analyzer, required by AstroNvim
|
||||||
|
ripgrep # fast search tool, required by AstroNvim's '<leader>fw'(<leader> is space key)
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
{ nushell-scripts, ...}: {
|
||||||
|
programs.bash = {
|
||||||
|
# load the alias file for work
|
||||||
|
bashrcExtra = ''
|
||||||
|
alias_for_work=/etc/agenix/alias-for-work.bash
|
||||||
|
if [ -f $alias_for_work ]; then
|
||||||
|
. $alias_for_work
|
||||||
|
else
|
||||||
|
echo "No alias file found for work"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.nushell = {
|
||||||
|
# load the alias file for work
|
||||||
|
# the file must exist, otherwise nushell will complain about it!
|
||||||
|
#
|
||||||
|
# currently, nushell does not support conditional sourcing of files
|
||||||
|
# https://github.com/nushell/nushell/issues/8214
|
||||||
|
extraConfig = ''
|
||||||
|
source /etc/agenix/alias-for-work.nushell
|
||||||
|
use ${nushell-scripts}/custom-completions/git/git-completions.nu *
|
||||||
|
use ${nushell-scripts}/custom-completions/glow/glow-completions.nu *
|
||||||
|
use ${nushell-scripts}/custom-completions/make/make-completions.nu *
|
||||||
|
use ${nushell-scripts}/custom-completions/nix/nix-completions.nu *
|
||||||
|
use ${nushell-scripts}/custom-completions/man/man-completions.nu *
|
||||||
|
use ${nushell-scripts}/custom-completions/cargo/cargo-completions.nu *
|
||||||
|
use ${nushell-scripts}/custom-completions/zellij/zellij-completions.nu *
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
{...}: {
|
||||||
|
programs.bash = {
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
bashrcExtra = ''
|
||||||
|
export PATH="$PATH:$HOME/bin:$HOME/.local/bin:$HOME/go/bin"
|
||||||
|
'';
|
||||||
|
|
||||||
|
shellAliases = {
|
||||||
|
k = "kubectl";
|
||||||
|
|
||||||
|
urldecode = "python3 -c 'import sys, urllib.parse as ul; print(ul.unquote_plus(sys.stdin.read()))'";
|
||||||
|
urlencode = "python3 -c 'import sys, urllib.parse as ul; print(ul.quote_plus(sys.stdin.read()))'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{ catppuccin-bat, ...}: {
|
||||||
|
# a cat(1) clone with syntax highlighting and Git integration.
|
||||||
|
programs.bat = {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
pager = "less -FR";
|
||||||
|
theme = "Catppuccin-mocha";
|
||||||
|
};
|
||||||
|
themes = {
|
||||||
|
# https://raw.githubusercontent.com/catppuccin/bat/main/Catppuccin-mocha.tmTheme
|
||||||
|
Catppuccin-mocha = builtins.readFile "${catppuccin-bat}/Catppuccin-mocha.tmTheme";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
neofetch
|
||||||
|
ranger # terminal file manager(batteries included, with image preview support)
|
||||||
|
|
||||||
|
# archives
|
||||||
|
zip
|
||||||
|
xz
|
||||||
|
unzip
|
||||||
|
p7zip
|
||||||
|
|
||||||
|
# utils
|
||||||
|
ripgrep # recursively searches directories for a regex pattern
|
||||||
|
jq # A lightweight and flexible command-line JSON processor
|
||||||
|
yq-go # yaml processer https://github.com/mikefarah/yq
|
||||||
|
|
||||||
|
# networking tools
|
||||||
|
mtr # A network diagnostic tool
|
||||||
|
iperf3
|
||||||
|
dnsutils # `dig` + `nslookup`
|
||||||
|
ldns # replacement of `dig`, it provide the command `drill`
|
||||||
|
aria2 # A lightweight multi-protocol & multi-source command-line download utility
|
||||||
|
socat # replacement of openbsd-netcat
|
||||||
|
nmap # A utility for network discovery and security auditing
|
||||||
|
ipcalc # it is a calculator for the IPv4/v6 addresses
|
||||||
|
|
||||||
|
# misc
|
||||||
|
cowsay
|
||||||
|
file
|
||||||
|
which
|
||||||
|
tree
|
||||||
|
gnused
|
||||||
|
gnutar
|
||||||
|
gawk
|
||||||
|
zstd
|
||||||
|
caddy
|
||||||
|
gnupg
|
||||||
|
|
||||||
|
# nix related
|
||||||
|
#
|
||||||
|
# it provides the command `nom` works just like `nix
|
||||||
|
# with more details log output
|
||||||
|
nix-output-monitor
|
||||||
|
nodePackages.node2nix
|
||||||
|
|
||||||
|
# productivity
|
||||||
|
hugo # static site generator
|
||||||
|
glow # markdown previewer in terminal
|
||||||
|
];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
# modern vim
|
||||||
|
neovim = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
vimAlias = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# A modern replacement for ‘ls’
|
||||||
|
# useful in bash/zsh prompt, not in nushell.
|
||||||
|
exa = {
|
||||||
|
enable = true;
|
||||||
|
enableAliases = true;
|
||||||
|
git = true;
|
||||||
|
icons = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# A command-line fuzzy finder
|
||||||
|
fzf = {
|
||||||
|
enable = true;
|
||||||
|
# https://github.com/catppuccin/fzf
|
||||||
|
# catppuccin-mocha
|
||||||
|
colors = {
|
||||||
|
"bg+" = "#313244";
|
||||||
|
"bg" = "#1e1e2e";
|
||||||
|
"spinner" = "#f5e0dc";
|
||||||
|
"hl" = "#f38ba8";
|
||||||
|
"fg" = "#cdd6f4";
|
||||||
|
"header" = "#f38ba8";
|
||||||
|
"info" = "#cba6f7";
|
||||||
|
"pointer" = "#f5e0dc";
|
||||||
|
"marker" = "#f5e0dc";
|
||||||
|
"fg+" = "#cdd6f4";
|
||||||
|
"prompt" = "#cba6f7";
|
||||||
|
"hl+" = "#f38ba8";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# skim provides a single executable: sk.
|
||||||
|
# Basically anywhere you would want to use grep, try sk instead.
|
||||||
|
skim = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
./nushell
|
||||||
|
./tmux
|
||||||
|
./zellij
|
||||||
|
|
||||||
|
./bash.nix
|
||||||
|
./bat.nix
|
||||||
|
./core.nix
|
||||||
|
./git.nix
|
||||||
|
./starship.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
|
||||||
|
userfullname,
|
||||||
|
useremail,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# `programs.git` will generate the config file: ~/.config/git/config
|
||||||
|
# to make git use this config file, `~/.gitconfig` should not exist!
|
||||||
|
#
|
||||||
|
# https://git-scm.com/docs/git-config#Documentation/git-config.txt---global
|
||||||
|
home.activation.removeExistingGitconfig = lib.hm.dag.entryBefore ["checkLinkTargets"] ''
|
||||||
|
rm -f ~/.gitconfig
|
||||||
|
'';
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
lfs.enable = true;
|
||||||
|
|
||||||
|
userName = userfullname;
|
||||||
|
userEmail = useremail;
|
||||||
|
|
||||||
|
includes = [
|
||||||
|
{
|
||||||
|
# use diffrent email & name for work
|
||||||
|
path = "~/work/.gitconfig";
|
||||||
|
condition = "gitdir:~/work/";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
extraConfig = {
|
||||||
|
init.defaultBranch = "main";
|
||||||
|
push.autoSetupRemote = true;
|
||||||
|
pull.rebase = true;
|
||||||
|
|
||||||
|
# replace https with ssh
|
||||||
|
url = {
|
||||||
|
"ssh://git@github.com/" = {
|
||||||
|
insteadOf = "https://github.com/";
|
||||||
|
};
|
||||||
|
"ssh://git@gitlab.com/" = {
|
||||||
|
insteadOf = "https://gitlab.com/";
|
||||||
|
};
|
||||||
|
"ssh://git@bitbucket.com/" = {
|
||||||
|
insteadOf = "https://bitbucket.com/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# signing = {
|
||||||
|
# key = "xxx";
|
||||||
|
# signByDefault = true;
|
||||||
|
# };
|
||||||
|
|
||||||
|
delta = {
|
||||||
|
enable = true;
|
||||||
|
options = {
|
||||||
|
features = "side-by-side";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
aliases = {
|
||||||
|
# common aliases
|
||||||
|
br = "branch";
|
||||||
|
co = "checkout";
|
||||||
|
st = "status";
|
||||||
|
ls = "log --pretty=format:\"%C(yellow)%h%Cred%d\\\\ %Creset%s%Cblue\\\\ [%cn]\" --decorate";
|
||||||
|
ll = "log --pretty=format:\"%C(yellow)%h%Cred%d\\\\ %Creset%s%Cblue\\\\ [%cn]\" --decorate --numstat";
|
||||||
|
cm = "commit -m";
|
||||||
|
ca = "commit -am";
|
||||||
|
dc = "diff --cached";
|
||||||
|
amend = "commit --amend -m";
|
||||||
|
|
||||||
|
# aliases for submodule
|
||||||
|
update = "submodule update --init --recursive";
|
||||||
|
foreach = "submodule foreach";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
# Nushell Config File
|
||||||
|
#
|
||||||
|
# version = 0.81.1
|
||||||
|
|
||||||
|
# let's define some colors
|
||||||
|
|
||||||
|
# https://github.com/catppuccin/i3/blob/main/themes/catppuccin-mocha
|
||||||
|
let rosewater = "#f5e0dc"
|
||||||
|
let flamingo = "#f2cdcd"
|
||||||
|
let pink = "#f5c2e7"
|
||||||
|
let mauve = "#cba6f7"
|
||||||
|
let red = "#f38ba8"
|
||||||
|
let maroon = "#eba0ac"
|
||||||
|
let peach = "#fab387"
|
||||||
|
let green = "#a6e3a1"
|
||||||
|
let teal = "#94e2d5"
|
||||||
|
let sky = "#89dceb"
|
||||||
|
let sapphire = "#74c7ec"
|
||||||
|
let blue = "#89b4fa"
|
||||||
|
let lavender = "#b4befe"
|
||||||
|
let text = "#cdd6f4"
|
||||||
|
let subtext1 = "#bac2de"
|
||||||
|
let subtext0 = "#a6adc8"
|
||||||
|
let overlay2 = "#9399b2"
|
||||||
|
let overlay1 = "#7f849c"
|
||||||
|
let overlay0 = "#6c7086"
|
||||||
|
let surface2 = "#585b70"
|
||||||
|
let surface1 = "#45475a"
|
||||||
|
let surface0 = "#313244"
|
||||||
|
let base = "#1e1e2e"
|
||||||
|
let mantle = "#181825"
|
||||||
|
let crust = "#11111b"
|
||||||
|
|
||||||
|
# we're creating a theme here that uses the colors we defined above.
|
||||||
|
|
||||||
|
let catppuccin_theme = {
|
||||||
|
separator: $overlay2
|
||||||
|
leading_trailing_space_bg: $surface2
|
||||||
|
header: $red
|
||||||
|
date: $pink
|
||||||
|
filesize: $green
|
||||||
|
row_index: $text
|
||||||
|
bool: $peach
|
||||||
|
int: $red
|
||||||
|
duration: $sky
|
||||||
|
range: $sapphire
|
||||||
|
float: $lavender
|
||||||
|
string: $text
|
||||||
|
nothing: $overlay1
|
||||||
|
binary: $subtext1
|
||||||
|
cellpath: $subtext0
|
||||||
|
hints: dark_gray
|
||||||
|
|
||||||
|
shape_garbage: { fg: $overlay2 bg: $red attr: b}
|
||||||
|
shape_bool: $maroon
|
||||||
|
shape_int: { fg: $pink attr: b}
|
||||||
|
shape_float: { fg: $pink attr: b}
|
||||||
|
shape_range: { fg: $overlay0 attr: b}
|
||||||
|
shape_internalcall: { fg: $maroon attr: b}
|
||||||
|
shape_external: $mauve
|
||||||
|
shape_externalarg: { fg: $red attr: b}
|
||||||
|
shape_literal: $flamingo
|
||||||
|
shape_operator: $rosewater
|
||||||
|
shape_signature: { fg: $red attr: b}
|
||||||
|
shape_string: $red
|
||||||
|
shape_filepath: $peach
|
||||||
|
shape_globpattern: { fg: $teal attr: b}
|
||||||
|
shape_variable: $pink
|
||||||
|
shape_flag: { fg: $mauve attr: b}
|
||||||
|
shape_custom: {attr: b}
|
||||||
|
}
|
||||||
|
|
||||||
|
# The default config record. This is where much of your global configuration is setup.
|
||||||
|
let-env config = {
|
||||||
|
color_config: $catppuccin_theme # <-- this is the theme
|
||||||
|
use_ansi_coloring: true
|
||||||
|
|
||||||
|
# true or false to enable or disable the welcome banner at startup
|
||||||
|
show_banner: false
|
||||||
|
|
||||||
|
table: {
|
||||||
|
mode: rounded # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other
|
||||||
|
index_mode: always # "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" column
|
||||||
|
show_empty: true # show 'empty list' and 'empty record' placeholders for command output
|
||||||
|
trim: {
|
||||||
|
methodology: wrapping # wrapping or truncating
|
||||||
|
wrapping_try_keep_words: true # A strategy used by the 'wrapping' methodology
|
||||||
|
truncating_suffix: "..." # A suffix used by the 'truncating' methodology
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
completions: {
|
||||||
|
case_sensitive: false # set to true to enable case-sensitive completions
|
||||||
|
quick: true # set this to false to prevent auto-selecting completions when only one remains
|
||||||
|
partial: true # set this to false to prevent partial filling of the prompt
|
||||||
|
algorithm: "prefix" # prefix or fuzzy
|
||||||
|
external: {
|
||||||
|
enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up may be very slow
|
||||||
|
max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
|
||||||
|
completer: null # check 'carapace_completer' above as an example
|
||||||
|
}
|
||||||
|
}
|
||||||
|
filesize: {
|
||||||
|
metric: true # true => KB, MB, GB (ISO standard), false => KiB, MiB, GiB (Windows standard)
|
||||||
|
format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, zb, zib, auto
|
||||||
|
}
|
||||||
|
cursor_shape: {
|
||||||
|
emacs: line # block, underscore, line, blink_block, blink_underscore, blink_line (line is the default)
|
||||||
|
vi_insert: block # block, underscore, line , blink_block, blink_underscore, blink_line (block is the default)
|
||||||
|
vi_normal: underscore # block, underscore, line, blink_block, blink_underscore, blink_line (underscore is the default)
|
||||||
|
}
|
||||||
|
use_grid_icons: true
|
||||||
|
footer_mode: "25" # always, never, number_of_rows, auto
|
||||||
|
float_precision: 2 # the precision for displaying floats in tables
|
||||||
|
# buffer_editor: "emacs" # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.EDITOR and $env.VISUAL
|
||||||
|
bracketed_paste: true # enable bracketed paste, currently useless on windows
|
||||||
|
edit_mode: emacs # emacs, vi
|
||||||
|
shell_integration: true # enables terminal markers and a workaround to arrow keys stop working issue
|
||||||
|
render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt.
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{ config, ...}: {
|
||||||
|
programs.nushell = {
|
||||||
|
enable = true;
|
||||||
|
configFile.source = ./config.nu;
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
let-env PATH = ([
|
||||||
|
"${config.home.homeDirectory}/bin"
|
||||||
|
"${config.home.homeDirectory}/.local/bin"
|
||||||
|
"${config.home.homeDirectory}/go/bin"
|
||||||
|
|
||||||
|
($env.PATH | split row (char esep))
|
||||||
|
] | flatten)
|
||||||
|
'';
|
||||||
|
|
||||||
|
# home-manager will merge the cotent in `environmentVariables` with the `envFile.source`
|
||||||
|
# but basically, I set all environment variables via the shell-independent way, so I don't need to use those two options
|
||||||
|
#
|
||||||
|
# envFile.source = ./env.nu;
|
||||||
|
# environmentVariables = { FOO="bar"; };
|
||||||
|
|
||||||
|
shellAliases = {
|
||||||
|
k = "kubectl";
|
||||||
|
|
||||||
|
urldecode = "python3 -c 'import sys, urllib.parse as ul; print(ul.unquote_plus(sys.stdin.read()))'";
|
||||||
|
urlencode = "python3 -c 'import sys, urllib.parse as ul; print(ul.quote_plus(sys.stdin.read()))'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
{ catppuccin-starship, ...}: {
|
||||||
|
programs.starship = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
enableNushellIntegration = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
character = {
|
||||||
|
success_symbol = "[›](bold green)";
|
||||||
|
error_symbol = "[›](bold red)";
|
||||||
|
};
|
||||||
|
aws = {
|
||||||
|
symbol = "🅰 ";
|
||||||
|
};
|
||||||
|
gcloud = {
|
||||||
|
# do not show the account/project's info
|
||||||
|
# to avoid the leak of sensitive information when sharing the terminal
|
||||||
|
format = "on [$symbol$active(\($region\))]($style) ";
|
||||||
|
symbol = "🅶 ️";
|
||||||
|
};
|
||||||
|
|
||||||
|
palette = "catppuccin_mocha";
|
||||||
|
} // builtins.fromTOML (builtins.readFile "${catppuccin-starship}/palettes/mocha.toml");
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{pkgs, ...}: let
|
||||||
|
buildTmuxPlugin = pkgs.tmuxPlugins.mkTmuxPlugin;
|
||||||
|
in {
|
||||||
|
draculaTheme = buildTmuxPlugin {
|
||||||
|
pluginName = "dracula";
|
||||||
|
version = "v2.2.0";
|
||||||
|
src = builtins.fetchTarball {
|
||||||
|
name = "dracula-tmux-v2.2.0";
|
||||||
|
url = "https://github.com/dracula/tmux/archive/refs/tags/v2.2.0.tar.gz";
|
||||||
|
sha256 = "sha256:0v2k994yy4xx2iw8qxg7qphw46gq2qmg496i3a3h9b6jgwxqm7zn";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
plugins = pkgs.tmuxPlugins // pkgs.callPackage ./custom-plugins.nix {};
|
||||||
|
in {
|
||||||
|
programs.tmux = {
|
||||||
|
enable = true;
|
||||||
|
shell = "${pkgs.nushell}/bin/nu";
|
||||||
|
|
||||||
|
# Resize the window to the size of the smallest session for which it is the current window.
|
||||||
|
#
|
||||||
|
aggressiveResize = true;
|
||||||
|
|
||||||
|
# https://github.com/tmux-plugins/tmux-sensible
|
||||||
|
# tmux-sensible overwrites default tmux shortcuts, makes them more sane.
|
||||||
|
sensibleOnTop = true;
|
||||||
|
|
||||||
|
# extraConfig = builtins.readFile ./tmux.conf;
|
||||||
|
# keyMode = "vi"; # default is emacs
|
||||||
|
|
||||||
|
baseIndex = 1; # start index from 1
|
||||||
|
escapeTime = 0; # do not wait for escape key
|
||||||
|
terminal = "xterm-256color";
|
||||||
|
|
||||||
|
plugins = with plugins; [
|
||||||
|
draculaTheme # theme
|
||||||
|
{
|
||||||
|
# https://github.com/tmux-plugins/tmux-continuum
|
||||||
|
# Continuous saving of tmux environment. Automatic restore when tmux is started.
|
||||||
|
plugin = continuum;
|
||||||
|
extraConfig = ''
|
||||||
|
set -g @continuum-save-interval '15'
|
||||||
|
|
||||||
|
# Option to display current status of tmux continuum in tmux status line.
|
||||||
|
set -g status-right 'Continuum status: #{continuum_status}'
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# https://github.com/tmux-plugins/tmux-resurrect
|
||||||
|
# Manually persists tmux environment across system restarts.
|
||||||
|
# prefix + Ctrl-s - save
|
||||||
|
# prefix + Ctrl-r - restore
|
||||||
|
#
|
||||||
|
plugin = resurrect;
|
||||||
|
# Restore Neovim sessions
|
||||||
|
extraConfig = "set -g @resurrect-strategy-nvim 'session'";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# https://github.com/tmux-plugins/tmux-yank
|
||||||
|
# Enables copying to system clipboard.
|
||||||
|
plugin = yank;
|
||||||
|
}
|
||||||
|
# set -g @plugin 'tmux-plugins/tmux-cpu'
|
||||||
|
{
|
||||||
|
plugin = cpu;
|
||||||
|
extraConfig = ''
|
||||||
|
set -g status-right '#{cpu_bg_color} CPU: #{cpu_icon} #{cpu_percentage} | %a %h-%d %H:%M '
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,355 @@
|
|||||||
|
// If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true"
|
||||||
|
keybinds {
|
||||||
|
normal {
|
||||||
|
// uncomment this and adjust key if using copy_on_select=false
|
||||||
|
// bind "Alt c" { Copy; }
|
||||||
|
}
|
||||||
|
locked {
|
||||||
|
bind "Ctrl g" { SwitchToMode "Normal"; }
|
||||||
|
}
|
||||||
|
resize {
|
||||||
|
bind "Ctrl n" { SwitchToMode "Normal"; }
|
||||||
|
bind "h" "Left" { Resize "Increase Left"; }
|
||||||
|
bind "j" "Down" { Resize "Increase Down"; }
|
||||||
|
bind "k" "Up" { Resize "Increase Up"; }
|
||||||
|
bind "l" "Right" { Resize "Increase Right"; }
|
||||||
|
bind "H" { Resize "Decrease Left"; }
|
||||||
|
bind "J" { Resize "Decrease Down"; }
|
||||||
|
bind "K" { Resize "Decrease Up"; }
|
||||||
|
bind "L" { Resize "Decrease Right"; }
|
||||||
|
bind "=" "+" { Resize "Increase"; }
|
||||||
|
bind "-" { Resize "Decrease"; }
|
||||||
|
}
|
||||||
|
pane {
|
||||||
|
bind "Ctrl p" { SwitchToMode "Normal"; }
|
||||||
|
bind "h" "Left" { MoveFocus "Left"; }
|
||||||
|
bind "l" "Right" { MoveFocus "Right"; }
|
||||||
|
bind "j" "Down" { MoveFocus "Down"; }
|
||||||
|
bind "k" "Up" { MoveFocus "Up"; }
|
||||||
|
bind "p" { SwitchFocus; }
|
||||||
|
bind "n" { NewPane; SwitchToMode "Normal"; }
|
||||||
|
bind "d" { NewPane "Down"; SwitchToMode "Normal"; }
|
||||||
|
bind "r" { NewPane "Right"; SwitchToMode "Normal"; }
|
||||||
|
bind "x" { CloseFocus; SwitchToMode "Normal"; }
|
||||||
|
bind "f" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
|
||||||
|
bind "z" { TogglePaneFrames; SwitchToMode "Normal"; }
|
||||||
|
bind "w" { ToggleFloatingPanes; SwitchToMode "Normal"; }
|
||||||
|
bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "Normal"; }
|
||||||
|
bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0;}
|
||||||
|
}
|
||||||
|
move {
|
||||||
|
bind "Ctrl h" { SwitchToMode "Normal"; }
|
||||||
|
bind "n" "Tab" { MovePane; }
|
||||||
|
bind "p" { MovePaneBackwards; }
|
||||||
|
bind "h" "Left" { MovePane "Left"; }
|
||||||
|
bind "j" "Down" { MovePane "Down"; }
|
||||||
|
bind "k" "Up" { MovePane "Up"; }
|
||||||
|
bind "l" "Right" { MovePane "Right"; }
|
||||||
|
}
|
||||||
|
tab {
|
||||||
|
bind "Ctrl t" { SwitchToMode "Normal"; }
|
||||||
|
bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; }
|
||||||
|
bind "h" "Left" "Up" "k" { GoToPreviousTab; }
|
||||||
|
bind "l" "Right" "Down" "j" { GoToNextTab; }
|
||||||
|
bind "n" { NewTab; SwitchToMode "Normal"; }
|
||||||
|
bind "x" { CloseTab; SwitchToMode "Normal"; }
|
||||||
|
bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; }
|
||||||
|
bind "1" { GoToTab 1; SwitchToMode "Normal"; }
|
||||||
|
bind "2" { GoToTab 2; SwitchToMode "Normal"; }
|
||||||
|
bind "3" { GoToTab 3; SwitchToMode "Normal"; }
|
||||||
|
bind "4" { GoToTab 4; SwitchToMode "Normal"; }
|
||||||
|
bind "5" { GoToTab 5; SwitchToMode "Normal"; }
|
||||||
|
bind "6" { GoToTab 6; SwitchToMode "Normal"; }
|
||||||
|
bind "7" { GoToTab 7; SwitchToMode "Normal"; }
|
||||||
|
bind "8" { GoToTab 8; SwitchToMode "Normal"; }
|
||||||
|
bind "9" { GoToTab 9; SwitchToMode "Normal"; }
|
||||||
|
bind "Tab" { ToggleTab; }
|
||||||
|
}
|
||||||
|
scroll {
|
||||||
|
bind "Ctrl s" { SwitchToMode "Normal"; }
|
||||||
|
bind "e" { EditScrollback; SwitchToMode "Normal"; }
|
||||||
|
bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; }
|
||||||
|
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
|
||||||
|
bind "j" "Down" { ScrollDown; }
|
||||||
|
bind "k" "Up" { ScrollUp; }
|
||||||
|
bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
|
||||||
|
bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
|
||||||
|
bind "d" { HalfPageScrollDown; }
|
||||||
|
bind "u" { HalfPageScrollUp; }
|
||||||
|
// uncomment this and adjust key if using copy_on_select=false
|
||||||
|
// bind "Alt c" { Copy; }
|
||||||
|
}
|
||||||
|
search {
|
||||||
|
bind "Ctrl s" { SwitchToMode "Normal"; }
|
||||||
|
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
|
||||||
|
bind "j" "Down" { ScrollDown; }
|
||||||
|
bind "k" "Up" { ScrollUp; }
|
||||||
|
bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
|
||||||
|
bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
|
||||||
|
bind "d" { HalfPageScrollDown; }
|
||||||
|
bind "u" { HalfPageScrollUp; }
|
||||||
|
bind "n" { Search "down"; }
|
||||||
|
bind "p" { Search "up"; }
|
||||||
|
bind "c" { SearchToggleOption "CaseSensitivity"; }
|
||||||
|
bind "w" { SearchToggleOption "Wrap"; }
|
||||||
|
bind "o" { SearchToggleOption "WholeWord"; }
|
||||||
|
}
|
||||||
|
entersearch {
|
||||||
|
bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; }
|
||||||
|
bind "Enter" { SwitchToMode "Search"; }
|
||||||
|
}
|
||||||
|
renametab {
|
||||||
|
bind "Ctrl c" { SwitchToMode "Normal"; }
|
||||||
|
bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; }
|
||||||
|
}
|
||||||
|
renamepane {
|
||||||
|
bind "Ctrl c" { SwitchToMode "Normal"; }
|
||||||
|
bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; }
|
||||||
|
}
|
||||||
|
session {
|
||||||
|
bind "Ctrl o" { SwitchToMode "Normal"; }
|
||||||
|
bind "Ctrl s" { SwitchToMode "Scroll"; }
|
||||||
|
bind "d" { Detach; }
|
||||||
|
}
|
||||||
|
tmux {
|
||||||
|
bind "[" { SwitchToMode "Scroll"; }
|
||||||
|
bind "Ctrl b" { Write 2; SwitchToMode "Normal"; }
|
||||||
|
bind "\"" { NewPane "Down"; SwitchToMode "Normal"; }
|
||||||
|
bind "%" { NewPane "Right"; SwitchToMode "Normal"; }
|
||||||
|
bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
|
||||||
|
bind "c" { NewTab; SwitchToMode "Normal"; }
|
||||||
|
bind "," { SwitchToMode "RenameTab"; }
|
||||||
|
bind "p" { GoToPreviousTab; SwitchToMode "Normal"; }
|
||||||
|
bind "n" { GoToNextTab; SwitchToMode "Normal"; }
|
||||||
|
bind "Left" { MoveFocus "Left"; SwitchToMode "Normal"; }
|
||||||
|
bind "Right" { MoveFocus "Right"; SwitchToMode "Normal"; }
|
||||||
|
bind "Down" { MoveFocus "Down"; SwitchToMode "Normal"; }
|
||||||
|
bind "Up" { MoveFocus "Up"; SwitchToMode "Normal"; }
|
||||||
|
bind "h" { MoveFocus "Left"; SwitchToMode "Normal"; }
|
||||||
|
bind "l" { MoveFocus "Right"; SwitchToMode "Normal"; }
|
||||||
|
bind "j" { MoveFocus "Down"; SwitchToMode "Normal"; }
|
||||||
|
bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; }
|
||||||
|
bind "o" { FocusNextPane; }
|
||||||
|
bind "d" { Detach; }
|
||||||
|
bind "Space" { NextSwapLayout; }
|
||||||
|
bind "x" { CloseFocus; SwitchToMode "Normal"; }
|
||||||
|
}
|
||||||
|
shared_except "locked" {
|
||||||
|
bind "Ctrl g" { SwitchToMode "Locked"; }
|
||||||
|
bind "Ctrl q" { Quit; }
|
||||||
|
bind "Alt n" { NewPane; }
|
||||||
|
bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
|
||||||
|
bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; }
|
||||||
|
bind "Alt j" "Alt Down" { MoveFocus "Down"; }
|
||||||
|
bind "Alt k" "Alt Up" { MoveFocus "Up"; }
|
||||||
|
bind "Alt =" "Alt +" { Resize "Increase"; }
|
||||||
|
bind "Alt -" { Resize "Decrease"; }
|
||||||
|
bind "Alt [" { PreviousSwapLayout; }
|
||||||
|
bind "Alt ]" { NextSwapLayout; }
|
||||||
|
}
|
||||||
|
shared_except "normal" "locked" {
|
||||||
|
bind "Enter" "Esc" { SwitchToMode "Normal"; }
|
||||||
|
}
|
||||||
|
shared_except "pane" "locked" {
|
||||||
|
bind "Ctrl p" { SwitchToMode "Pane"; }
|
||||||
|
}
|
||||||
|
shared_except "resize" "locked" {
|
||||||
|
bind "Ctrl n" { SwitchToMode "Resize"; }
|
||||||
|
}
|
||||||
|
shared_except "scroll" "locked" {
|
||||||
|
bind "Ctrl s" { SwitchToMode "Scroll"; }
|
||||||
|
}
|
||||||
|
shared_except "session" "locked" {
|
||||||
|
bind "Ctrl o" { SwitchToMode "Session"; }
|
||||||
|
}
|
||||||
|
shared_except "tab" "locked" {
|
||||||
|
bind "Ctrl t" { SwitchToMode "Tab"; }
|
||||||
|
}
|
||||||
|
shared_except "move" "locked" {
|
||||||
|
bind "Ctrl h" { SwitchToMode "Move"; }
|
||||||
|
}
|
||||||
|
shared_except "tmux" "locked" {
|
||||||
|
bind "Ctrl b" { SwitchToMode "Tmux"; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
tab-bar { path "tab-bar"; }
|
||||||
|
status-bar { path "status-bar"; }
|
||||||
|
strider { path "strider"; }
|
||||||
|
compact-bar { path "compact-bar"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP
|
||||||
|
// eg. when terminal window with an active zellij session is closed
|
||||||
|
// Options:
|
||||||
|
// - detach (Default)
|
||||||
|
// - quit
|
||||||
|
//
|
||||||
|
// on_force_close "quit"
|
||||||
|
|
||||||
|
// Send a request for a simplified ui (without arrow fonts) to plugins
|
||||||
|
// Options:
|
||||||
|
// - true
|
||||||
|
// - false (Default)
|
||||||
|
//
|
||||||
|
// simplified_ui true
|
||||||
|
|
||||||
|
// Choose the path to the default shell that zellij will use for opening new panes
|
||||||
|
// Default: $SHELL
|
||||||
|
// Change to nushell
|
||||||
|
//
|
||||||
|
default_shell "nu"
|
||||||
|
|
||||||
|
// Toggle between having pane frames around the panes
|
||||||
|
// Options:
|
||||||
|
// - true (default)
|
||||||
|
// - false
|
||||||
|
//
|
||||||
|
// pane_frames true
|
||||||
|
|
||||||
|
// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible
|
||||||
|
// Options:
|
||||||
|
// - true (default)
|
||||||
|
// - false
|
||||||
|
//
|
||||||
|
// auto_layout true
|
||||||
|
|
||||||
|
// Define color themes for Zellij
|
||||||
|
// For more examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes
|
||||||
|
// Once these themes are defined, one of them should to be selected in the "theme" section of this file
|
||||||
|
//
|
||||||
|
themes {
|
||||||
|
// https://github.com/zellij-org/zellij/blob/main/zellij-utils/assets/themes/catppuccin.kdl
|
||||||
|
catppuccin-latte {
|
||||||
|
bg "#acb0be" // Surface2
|
||||||
|
fg "#acb0be" // Surface2
|
||||||
|
red "#d20f39"
|
||||||
|
green "#40a02b"
|
||||||
|
blue "#1e66f5"
|
||||||
|
yellow "#df8e1d"
|
||||||
|
magenta "#ea76cb" // Pink
|
||||||
|
orange "#fe640b" // Peach
|
||||||
|
cyan "#04a5e5" // Sky
|
||||||
|
black "#dce0e8" // Crust
|
||||||
|
white "#4c4f69" // Text
|
||||||
|
}
|
||||||
|
|
||||||
|
catppuccin-frappe {
|
||||||
|
bg "#626880" // Surface2
|
||||||
|
fg "#c6d0f5"
|
||||||
|
red "#e78284"
|
||||||
|
green "#a6d189"
|
||||||
|
blue "#8caaee"
|
||||||
|
yellow "#e5c890"
|
||||||
|
magenta "#f4b8e4" // Pink
|
||||||
|
orange "#ef9f76" // Peach
|
||||||
|
cyan "#99d1db" // Sky
|
||||||
|
black "#292c3c" // Mantle
|
||||||
|
white "#c6d0f5"
|
||||||
|
}
|
||||||
|
|
||||||
|
catppuccin-macchiato {
|
||||||
|
bg "#5b6078" // Surface2
|
||||||
|
fg "#cad3f5"
|
||||||
|
red "#ed8796"
|
||||||
|
green "#a6da95"
|
||||||
|
blue "#8aadf4"
|
||||||
|
yellow "#eed49f"
|
||||||
|
magenta "#f5bde6" // Pink
|
||||||
|
orange "#f5a97f" // Peach
|
||||||
|
cyan "#91d7e3" // Sky
|
||||||
|
black "#1e2030" // Mantle
|
||||||
|
white "#cad3f5"
|
||||||
|
}
|
||||||
|
|
||||||
|
catppuccin-mocha {
|
||||||
|
bg "#585b70" // Surface2
|
||||||
|
fg "#cdd6f4"
|
||||||
|
red "#f38ba8"
|
||||||
|
green "#a6e3a1"
|
||||||
|
blue "#89b4fa"
|
||||||
|
yellow "#f9e2af"
|
||||||
|
magenta "#f5c2e7" // Pink
|
||||||
|
orange "#fab387" // Peach
|
||||||
|
cyan "#89dceb" // Sky
|
||||||
|
black "#181825" // Mantle
|
||||||
|
white "#cdd6f4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Choose the theme that is specified in the themes section.
|
||||||
|
// Default: default
|
||||||
|
//
|
||||||
|
theme "catppuccin-mocha"
|
||||||
|
|
||||||
|
// The name of the default layout to load on startup
|
||||||
|
// Default: "default"
|
||||||
|
//
|
||||||
|
// default_layout "compact"
|
||||||
|
|
||||||
|
// Choose the mode that zellij uses when starting up.
|
||||||
|
// Default: normal
|
||||||
|
//
|
||||||
|
// default_mode "locked"
|
||||||
|
|
||||||
|
// Toggle enabling the mouse mode.
|
||||||
|
// On certain configurations, or terminals this could
|
||||||
|
// potentially interfere with copying text.
|
||||||
|
// Options:
|
||||||
|
// - true (default)
|
||||||
|
// - false
|
||||||
|
//
|
||||||
|
// mouse_mode false
|
||||||
|
|
||||||
|
// Configure the scroll back buffer size
|
||||||
|
// This is the number of lines zellij stores for each pane in the scroll back
|
||||||
|
// buffer. Excess number of lines are discarded in a FIFO fashion.
|
||||||
|
// Valid values: positive integers
|
||||||
|
// Default value: 10000
|
||||||
|
//
|
||||||
|
// scroll_buffer_size 10000
|
||||||
|
|
||||||
|
// Provide a command to execute when copying text. The text will be piped to
|
||||||
|
// the stdin of the program to perform the copy. This can be used with
|
||||||
|
// terminal emulators which do not support the OSC 52 ANSI control sequence
|
||||||
|
// that will be used by default if this option is not set.
|
||||||
|
// Examples:
|
||||||
|
//
|
||||||
|
// copy_command "xclip -selection clipboard" // x11
|
||||||
|
// copy_command "wl-copy" // wayland
|
||||||
|
// copy_command "pbcopy" // osx
|
||||||
|
|
||||||
|
// Choose the destination for copied text
|
||||||
|
// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard.
|
||||||
|
// Does not apply when using copy_command.
|
||||||
|
// Options:
|
||||||
|
// - system (default)
|
||||||
|
// - primary
|
||||||
|
//
|
||||||
|
// copy_clipboard "primary"
|
||||||
|
|
||||||
|
// Enable or disable automatic copy (and clear) of selection when releasing mouse
|
||||||
|
// Default: true
|
||||||
|
//
|
||||||
|
// copy_on_select false
|
||||||
|
|
||||||
|
// Path to the default editor to use to edit pane scrollbuffer
|
||||||
|
// Default: $EDITOR or $VISUAL
|
||||||
|
//
|
||||||
|
// scrollback_editor "/usr/bin/vim"
|
||||||
|
|
||||||
|
// When attaching to an existing session with other users,
|
||||||
|
// should the session be mirrored (true)
|
||||||
|
// or should each user have their own cursor (false)
|
||||||
|
// Default: false
|
||||||
|
//
|
||||||
|
// mirror_session true
|
||||||
|
|
||||||
|
// The folder in which Zellij will look for layouts
|
||||||
|
//
|
||||||
|
// layout_dir "/path/to/my/layout_dir"
|
||||||
|
|
||||||
|
// The folder in which Zellij will look for themes
|
||||||
|
//
|
||||||
|
// theme_dir "/path/to/my/theme_dir"
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{...}: {
|
||||||
|
programs.zellij = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".config/zellij/config.kdl".source = ./config.kdl;
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# Home Manager's Darwin Submodules
|
||||||
|
|
||||||
|
1. `core.nix`: some basic configuration.
|
||||||
|
2. `nushell.nix`: nushell's configuration for darwin.
|
||||||
|
3. `rime-squirrel.nix`: [rime-squirrel](https://github.com/rime/squirrel)'s configuration.
|
||||||
|
4. `default.nix`: the entrypoint of darwin's configuration, it import all the submodules above.
|
||||||
|
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
##########################################################################
|
||||||
|
#
|
||||||
|
# MacOS specific home configuration
|
||||||
|
#
|
||||||
|
##########################################################################
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.ssh = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# all my ssh private key are generated by `ssh-keygen -t ed25519 -C "ryan@nickname"`
|
||||||
|
# the config's format:
|
||||||
|
# Host — given the pattern used to match against the host name given on the command line.
|
||||||
|
# HostName — specify nickname or abbreviation for host
|
||||||
|
# IdentityFile — the location of your SSH key authentication file for the account.
|
||||||
|
# format in details:
|
||||||
|
# https://www.ssh.com/academy/ssh/config
|
||||||
|
extraConfig = ''
|
||||||
|
# a private key that is used during authentication will be added to ssh-agent if it is running
|
||||||
|
AddKeysToAgent yes
|
||||||
|
|
||||||
|
Host 192.168.*
|
||||||
|
# allow to securely use local SSH agent to authenticate on the remote machine.
|
||||||
|
# It has the same effect as adding cli option `ssh -A user@host`
|
||||||
|
ForwardAgent yes
|
||||||
|
# romantic holds my homelab~
|
||||||
|
IdentityFile ~/.ssh/romantic
|
||||||
|
# Specifies that ssh should only use the identity file explicitly configured above
|
||||||
|
# required to prevent sending default identity files first.
|
||||||
|
IdentitiesOnly yes
|
||||||
|
|
||||||
|
Host github.com
|
||||||
|
Hostname github.com
|
||||||
|
# github is controlled by gluttony~
|
||||||
|
IdentityFile ~/.ssh/harmonica
|
||||||
|
# Specifies that ssh should only use the identity file explicitly configured above
|
||||||
|
# required to prevent sending default identity files first.
|
||||||
|
IdentitiesOnly yes
|
||||||
|
'';
|
||||||
|
|
||||||
|
# use ssh-agent so we only need to input passphrase once
|
||||||
|
# run `ssh-add /path/to/key` for every identity file
|
||||||
|
# check imported keys by `ssh-add -l`
|
||||||
|
# TODO `ssh-add` can only add keys temporary, use gnome-keyring to unlock all keys after login.
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
{ username, ... }: {
|
||||||
|
imports = [
|
||||||
|
../base/desktop
|
||||||
|
|
||||||
|
./core.nix
|
||||||
|
./nushell.nix
|
||||||
|
./rime-squirrel.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Home Manager needs a bit of information about you and the
|
||||||
|
# paths it should manage.
|
||||||
|
home = {
|
||||||
|
username = username;
|
||||||
|
# set homeDirectory make build fail
|
||||||
|
homeDirectory = "/Users/${username}";
|
||||||
|
|
||||||
|
# This value determines the Home Manager release that your
|
||||||
|
# configuration is compatible with. This helps avoid breakage
|
||||||
|
# when a new Home Manager release introduces backwards
|
||||||
|
# incompatible changes.
|
||||||
|
#
|
||||||
|
# You can update Home Manager without changing this value. See
|
||||||
|
# the Home Manager release notes for a list of state version
|
||||||
|
# changes in each release.
|
||||||
|
stateVersion = "22.11";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Let Home Manager install and manage itself.
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{config, ...}: {
|
||||||
|
# nix-darwin do not set PATH for nushell! so we need to do it manually
|
||||||
|
# this is a workaround to add nix's PATH to nushell
|
||||||
|
programs.nushell.extraConfig = ''
|
||||||
|
let-env PATH = ([
|
||||||
|
"${config.home.homeDirectory}/bin"
|
||||||
|
"${config.home.homeDirectory}/.local/bin"
|
||||||
|
"${config.home.homeDirectory}/go/bin"
|
||||||
|
"/usr/local/bin"
|
||||||
|
"${config.home.homeDirectory}/.nix-profile/bin"
|
||||||
|
"/etc/profiles/per-user/${config.home.username}/bin"
|
||||||
|
"/run/current-system/sw/bin"
|
||||||
|
"/nix/var/nix/profiles/default/bin"
|
||||||
|
|
||||||
|
($env.PATH | split row (char esep))
|
||||||
|
] | flatten)
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# remove existing rime data (squirrel)
|
||||||
|
home.activation.removeExistingRimeData = lib.hm.dag.entryBefore ["checkLinkTargets"] ''
|
||||||
|
rm -rf "~/Library/Rime/build/flypy.prism.bin"
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Squirrel Input Method
|
||||||
|
home.file."Library/Rime" = {
|
||||||
|
# my custom squirrel data (flypy input method)
|
||||||
|
source = "${pkgs.flypy-squirrel}/share/rime-data";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
i18n.inputMethod = {
|
|
||||||
enabled = "fcitx5";
|
|
||||||
fcitx5.addons =
|
|
||||||
let
|
|
||||||
# 为了不使用默认的 rime-data,改用我自定义的小鹤音形数据,这里需要 override
|
|
||||||
# 参考 https://github.com/NixOS/nixpkgs/blob/e4246ae1e7f78b7087dce9c9da10d28d3725025f/pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix
|
|
||||||
config.packageOverrides = pkgs: {
|
|
||||||
fcitx5-rime = pkgs.fcitx5-rime.override {rimeDataPkgs = [
|
|
||||||
# 小鹤音形配置,配置来自 flypy.com 官方网盘的鼠须管配置压缩包「小鹤音形“鼠须管”for macOS.zip」
|
|
||||||
# 我仅修改了 default.yaml 文件,将其中的半角括号改为了直角括号「 与 」。
|
|
||||||
./rime-data-flypy
|
|
||||||
];};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
with pkgs; [
|
|
||||||
fcitx5-rime
|
|
||||||
fcitx5-configtool
|
|
||||||
fcitx5-chinese-addons
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,537 +0,0 @@
|
|||||||
# This file is a modified version based on default i3-config-wizard config
|
|
||||||
# Maintainer: ryan4yin [xiaoyin_c@qq.com]
|
|
||||||
|
|
||||||
#######################
|
|
||||||
# config starts here: #
|
|
||||||
#######################
|
|
||||||
|
|
||||||
# Font for window titles. Will also be used by the bar unless a different font
|
|
||||||
# is used in the bar {} block below.
|
|
||||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
|
||||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
|
||||||
font pango: Noto Sans Regular 10
|
|
||||||
|
|
||||||
# set the mod key to the winkey:
|
|
||||||
set $mod Mod4
|
|
||||||
|
|
||||||
#####################
|
|
||||||
# workspace layout: #
|
|
||||||
#####################
|
|
||||||
|
|
||||||
# default i3 tiling mode:
|
|
||||||
workspace_layout default
|
|
||||||
|
|
||||||
# i3 stacking layout:
|
|
||||||
# Each window will be fullscreen and tabbed top to bottom.
|
|
||||||
#workspace_layout stacking
|
|
||||||
|
|
||||||
# i3 tabbed layout:
|
|
||||||
# Each new window will open fullscreen as a tab (left to right)
|
|
||||||
#workspace_layout tabbed
|
|
||||||
|
|
||||||
##############################
|
|
||||||
# extra options for windows: #
|
|
||||||
##############################
|
|
||||||
|
|
||||||
#border indicator on windows:
|
|
||||||
new_window pixel 1
|
|
||||||
|
|
||||||
# thin borders
|
|
||||||
# hide_edge_borders both
|
|
||||||
|
|
||||||
# Set inner/outer gaps
|
|
||||||
gaps inner 6
|
|
||||||
gaps outer 3
|
|
||||||
|
|
||||||
# show window title bars (not officially supported with i3gaps)
|
|
||||||
#default_border normal
|
|
||||||
|
|
||||||
# window title alignment
|
|
||||||
#title_align center
|
|
||||||
|
|
||||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
|
||||||
floating_modifier $mod
|
|
||||||
|
|
||||||
# switch/iterate between workspaces
|
|
||||||
bindsym $mod+Tab workspace next
|
|
||||||
bindsym $mod+Shift+Tab workspace prev
|
|
||||||
|
|
||||||
# switch to workspace
|
|
||||||
bindsym $mod+1 workspace $ws1
|
|
||||||
bindsym $mod+2 workspace $ws2
|
|
||||||
bindsym $mod+3 workspace $ws3
|
|
||||||
bindsym $mod+4 workspace $ws4
|
|
||||||
bindsym $mod+5 workspace $ws5
|
|
||||||
bindsym $mod+6 workspace $ws6
|
|
||||||
bindsym $mod+7 workspace $ws7
|
|
||||||
bindsym $mod+8 workspace $ws8
|
|
||||||
bindsym $mod+9 workspace $ws9
|
|
||||||
bindsym $mod+0 workspace $ws10
|
|
||||||
|
|
||||||
# switch to workspace with numpad keys
|
|
||||||
bindcode $mod+87 workspace 1
|
|
||||||
bindcode $mod+88 workspace 2
|
|
||||||
bindcode $mod+89 workspace 3
|
|
||||||
bindcode $mod+83 workspace 4
|
|
||||||
bindcode $mod+84 workspace 5
|
|
||||||
bindcode $mod+85 workspace 6
|
|
||||||
bindcode $mod+79 workspace 7
|
|
||||||
bindcode $mod+80 workspace 8
|
|
||||||
bindcode $mod+81 workspace 9
|
|
||||||
bindcode $mod+90 workspace 10
|
|
||||||
|
|
||||||
# switch to workspace with numlock numpad keys
|
|
||||||
bindcode $mod+Mod2+87 workspace $ws1
|
|
||||||
bindcode $mod+Mod2+88 workspace $ws2
|
|
||||||
bindcode $mod+Mod2+89 workspace $ws3
|
|
||||||
bindcode $mod+Mod2+83 workspace $ws4
|
|
||||||
bindcode $mod+Mod2+84 workspace $ws5
|
|
||||||
bindcode $mod+Mod2+85 workspace $ws6
|
|
||||||
bindcode $mod+Mod2+79 workspace $ws7
|
|
||||||
bindcode $mod+Mod2+80 workspace $ws8
|
|
||||||
bindcode $mod+Mod2+81 workspace $ws9
|
|
||||||
bindcode $mod+Mod2+90 workspace $ws10
|
|
||||||
|
|
||||||
# move focused container to workspace
|
|
||||||
bindsym $mod+Shift+1 move container to workspace $ws1
|
|
||||||
bindsym $mod+Shift+2 move container to workspace $ws2
|
|
||||||
bindsym $mod+Shift+3 move container to workspace $ws3
|
|
||||||
bindsym $mod+Shift+4 move container to workspace $ws4
|
|
||||||
bindsym $mod+Shift+5 move container to workspace $ws5
|
|
||||||
bindsym $mod+Shift+6 move container to workspace $ws6
|
|
||||||
bindsym $mod+Shift+7 move container to workspace $ws7
|
|
||||||
bindsym $mod+Shift+8 move container to workspace $ws8
|
|
||||||
bindsym $mod+Shift+9 move container to workspace $ws9
|
|
||||||
bindsym $mod+Shift+0 move container to workspace $ws10
|
|
||||||
|
|
||||||
# move focused container to workspace with numpad keys
|
|
||||||
bindcode $mod+Shift+Mod2+87 move container to workspace $ws1
|
|
||||||
bindcode $mod+Shift+Mod2+88 move container to workspace $ws2
|
|
||||||
bindcode $mod+Shift+Mod2+89 move container to workspace $ws3
|
|
||||||
bindcode $mod+Shift+Mod2+83 move container to workspace $ws4
|
|
||||||
bindcode $mod+Shift+Mod2+84 move container to workspace $ws5
|
|
||||||
bindcode $mod+Shift+Mod2+85 move container to workspace $ws6
|
|
||||||
bindcode $mod+Shift+Mod2+79 move container to workspace $ws7
|
|
||||||
bindcode $mod+Shift+Mod2+80 move container to workspace $ws8
|
|
||||||
bindcode $mod+Shift+Mod2+81 move container to workspace $ws9
|
|
||||||
bindcode $mod+Shift+Mod2+90 move container to workspace $ws10
|
|
||||||
|
|
||||||
# move focused container to workspace with numpad keys
|
|
||||||
bindcode $mod+Shift+87 move container to workspace $ws1
|
|
||||||
bindcode $mod+Shift+88 move container to workspace $ws2
|
|
||||||
bindcode $mod+Shift+89 move container to workspace $ws3
|
|
||||||
bindcode $mod+Shift+83 move container to workspace $ws4
|
|
||||||
bindcode $mod+Shift+84 move container to workspace $ws5
|
|
||||||
bindcode $mod+Shift+85 move container to workspace $ws6
|
|
||||||
bindcode $mod+Shift+79 move container to workspace $ws7
|
|
||||||
bindcode $mod+Shift+80 move container to workspace $ws8
|
|
||||||
bindcode $mod+Shift+81 move container to workspace $ws9
|
|
||||||
bindcode $mod+Shift+90 move container to workspace $ws10
|
|
||||||
|
|
||||||
# resize window (you can also use the mouse for that):
|
|
||||||
#mode "resize" {
|
|
||||||
# These bindings trigger as soon as you enter the resize mode
|
|
||||||
# Pressing left will shrink the window's width.
|
|
||||||
# Pressing right will grow the window's width.
|
|
||||||
# Pressing up will shrink the window's height.
|
|
||||||
# Pressing down will grow the window's height.
|
|
||||||
# bindsym j resize shrink width 10 px or 10 ppt
|
|
||||||
# bindsym k resize grow height 10 px or 10 ppt
|
|
||||||
# bindsym l resize shrink height 10 px or 10 ppt
|
|
||||||
# bindsym ntilde resize grow width 10 px or 10 ppt
|
|
||||||
|
|
||||||
# same bindings, but for the arrow keys
|
|
||||||
# bindsym Left resize shrink width 10 px or 10 ppt
|
|
||||||
# bindsym Down resize grow height 10 px or 10 ppt
|
|
||||||
# bindsym Up resize shrink height 10 px or 10 ppt
|
|
||||||
# bindsym Right resize grow width 10 px or 10 ppt
|
|
||||||
|
|
||||||
# back to normal: Enter or Escape
|
|
||||||
# bindsym Return mode "default"
|
|
||||||
# bindsym Escape mode "default"
|
|
||||||
#}
|
|
||||||
|
|
||||||
bindsym $mod+r mode "resize"
|
|
||||||
|
|
||||||
######################################
|
|
||||||
# keybindings for different actions: #
|
|
||||||
######################################
|
|
||||||
|
|
||||||
# start a terminal
|
|
||||||
bindsym $mod+Return exec alacritty
|
|
||||||
|
|
||||||
# kill focused window
|
|
||||||
bindsym $mod+q kill
|
|
||||||
|
|
||||||
# exit-menu
|
|
||||||
bindsym $mod+Shift+e exec ~/.config/i3/scripts/powermenu
|
|
||||||
|
|
||||||
# Lock the system
|
|
||||||
# lock with a picture:
|
|
||||||
#bindsym $mod+l exec i3lock -i ~/.config/i3/i3-lock-screen.png -p default|win -t
|
|
||||||
# lock by blurring the screen:
|
|
||||||
bindsym $mod+l exec ~/.config/i3/scripts/blur-lock
|
|
||||||
|
|
||||||
# reload the configuration file
|
|
||||||
bindsym $mod+Shift+c reload
|
|
||||||
|
|
||||||
# restart i3 inplace (preserves your layout/session, can be used to update i3)
|
|
||||||
bindsym $mod+Shift+r restart
|
|
||||||
|
|
||||||
# keybinding in fancy rofi (automated):
|
|
||||||
bindsym F1 exec ~/.config/i3/scripts/keyhint-2
|
|
||||||
# alternative
|
|
||||||
# keybinding list in editor:
|
|
||||||
# bindsym $mod+F1 exec xed ~/.config/i3/keybindings
|
|
||||||
|
|
||||||
# Backlight control
|
|
||||||
bindsym XF86MonBrightnessUp exec xbacklight +10 && notify-send "Brightness - $(xbacklight -get | cut -d '.' -f 1)%"
|
|
||||||
bindsym XF86MonBrightnessDown exec xbacklight -10 && notify-send "Brightness - $(xbacklight -get | cut -d '.' -f 1)%"
|
|
||||||
|
|
||||||
# change focus
|
|
||||||
bindsym $mod+j focus left
|
|
||||||
bindsym $mod+k focus down
|
|
||||||
bindsym $mod+b focus up
|
|
||||||
bindsym $mod+o focus right
|
|
||||||
|
|
||||||
# alternatively, you can use the cursor keys:
|
|
||||||
bindsym $mod+Left focus left
|
|
||||||
bindsym $mod+Down focus down
|
|
||||||
bindsym $mod+Up focus up
|
|
||||||
bindsym $mod+Right focus right
|
|
||||||
|
|
||||||
# move focused window
|
|
||||||
bindsym $mod+Shift+j move left
|
|
||||||
bindsym $mod+Shift+k move down
|
|
||||||
bindsym $mod+Shift+b move up
|
|
||||||
bindsym $mod+Shift+o move right
|
|
||||||
|
|
||||||
# alternatively, you can use the cursor keys:
|
|
||||||
bindsym $mod+Shift+Left move left
|
|
||||||
bindsym $mod+Shift+Down move down
|
|
||||||
bindsym $mod+Shift+Up move up
|
|
||||||
bindsym $mod+Shift+Right move right
|
|
||||||
|
|
||||||
# split in horizontal orientation
|
|
||||||
bindsym $mod+h split h
|
|
||||||
|
|
||||||
# split in vertical orientation
|
|
||||||
bindsym $mod+v split v
|
|
||||||
|
|
||||||
# enter fullscreen mode for the focused container
|
|
||||||
bindsym $mod+f fullscreen toggle
|
|
||||||
|
|
||||||
# change container layout (stacked, tabbed, toggle split)
|
|
||||||
bindsym $mod+s layout stacking
|
|
||||||
bindsym $mod+g layout tabbed
|
|
||||||
bindsym $mod+e layout toggle split
|
|
||||||
|
|
||||||
# toggle tiling / floating
|
|
||||||
bindsym $mod+Shift+space floating toggle
|
|
||||||
|
|
||||||
# change focus between tiling / floating windows
|
|
||||||
bindsym $mod+space focus mode_toggle
|
|
||||||
|
|
||||||
# focus the parent container
|
|
||||||
bindsym $mod+a focus parent
|
|
||||||
|
|
||||||
# open new empty workspace
|
|
||||||
bindsym $mod+Shift+n exec ~/.config/i3/scripts/empty_workspace
|
|
||||||
|
|
||||||
# Multimedia Keys
|
|
||||||
|
|
||||||
# volume
|
|
||||||
bindsym XF86AudioRaiseVolume exec amixer -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks
|
|
||||||
bindsym XF86AudioLowerVolume exec amixer -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks
|
|
||||||
|
|
||||||
# gradular volume control
|
|
||||||
bindsym $mod+XF86AudioRaiseVolume exec amixer -D pulse sset Master 1%+ && pkill -RTMIN+1 i3blocks
|
|
||||||
bindsym $mod+XF86AudioLowerVolume exec amixer -D pulse sset Master 1%- && pkill -RTMIN+1 i3blocks
|
|
||||||
|
|
||||||
# mute
|
|
||||||
bindsym XF86AudioMute exec amixer sset Master toggle && killall -USR1 i3blocks
|
|
||||||
|
|
||||||
# audio control
|
|
||||||
bindsym XF86AudioPlay exec playerctl play
|
|
||||||
bindsym XF86AudioPause exec playerctl pause
|
|
||||||
bindsym XF86AudioNext exec playerctl next
|
|
||||||
bindsym XF86AudioPrev exec playerctl previous
|
|
||||||
|
|
||||||
# Redirect sound to headphones
|
|
||||||
bindsym $mod+p exec /usr/local/bin/switch-audio-port
|
|
||||||
|
|
||||||
## App shortcuts
|
|
||||||
bindsym $mod+w exec /usr/bin/firefox
|
|
||||||
bindsym $mod+n exec /usr/bin/thunar
|
|
||||||
bindsym Print exec scrot ~/%Y-%m-%d-%T-screenshot.png && notify-send "Screenshot saved to ~/$(date +"%Y-%m-%d-%T")-screenshot.png"
|
|
||||||
|
|
||||||
# Power Profiles menu switcher (rofi)
|
|
||||||
bindsym $mod+Shift+p exec ~/.config/i3/scripts/power-profiles
|
|
||||||
|
|
||||||
##########################################
|
|
||||||
# configuration for workspace behaviour: #
|
|
||||||
##########################################
|
|
||||||
|
|
||||||
# Define names for default workspaces for which we configure key bindings later on.
|
|
||||||
# We use variables to avoid repeating the names in multiple places.
|
|
||||||
set $ws1 "1:"
|
|
||||||
set $ws2 "2:"
|
|
||||||
set $ws3 "3:"
|
|
||||||
set $ws4 "4:"
|
|
||||||
set $ws5 "5:"
|
|
||||||
set $ws6 "6"
|
|
||||||
set $ws7 "7"
|
|
||||||
set $ws8 "8"
|
|
||||||
set $ws9 "9"
|
|
||||||
set $ws10 "10"
|
|
||||||
|
|
||||||
# use workspaces on different displays:
|
|
||||||
# where you have to replace VGA-0/HDMI-0 with the names for your displays
|
|
||||||
# you can get from xrandr command
|
|
||||||
#workspace $ws1 output VGA-0
|
|
||||||
#workspace $ws2 output VGA-0
|
|
||||||
#workspace $ws3 output HDMI-0
|
|
||||||
#workspace $ws4 output HDMI-0
|
|
||||||
#workspace $ws5 output HDMI-0
|
|
||||||
|
|
||||||
# bind program to workspace and focus to them on startup:
|
|
||||||
assign [class="Terminal"] $ws1
|
|
||||||
assign [class="(?i)firefox"] $ws2
|
|
||||||
assign [class="Thunar"] $ws3
|
|
||||||
assign [class="thunderbird"] $ws4
|
|
||||||
assign [class="TelegramDesktop"] $ws5
|
|
||||||
|
|
||||||
# automatic set focus new window if it opens on another workspace than the current:
|
|
||||||
for_window [class=Terminal] focus
|
|
||||||
for_window [class=(?i)firefox] focus
|
|
||||||
for_window [class=Thunar] focus
|
|
||||||
for_window [class=Thunderbird] focus
|
|
||||||
for_window [class=TelegramDesktop] focus
|
|
||||||
|
|
||||||
##############
|
|
||||||
# compositor #
|
|
||||||
##############
|
|
||||||
|
|
||||||
# transparency
|
|
||||||
# options could need changes, related to used GPU and drivers.
|
|
||||||
# to find the right setting consult the archwiki or ask at the forum.
|
|
||||||
#
|
|
||||||
# picom: https://wiki.archlinux.org/title/Picom
|
|
||||||
# manpage: https://man.archlinux.org/man/picom.1.en
|
|
||||||
# The default configuration is available in /etc/xdg/picom.conf
|
|
||||||
# For modifications, it can be copied to ~/.config/picom/picom.conf or ~/.config/picom.conf
|
|
||||||
# install picom package (yay -S picom)
|
|
||||||
# start using default config
|
|
||||||
exec_always --no-startup-id picom -b
|
|
||||||
#
|
|
||||||
# for custom config:
|
|
||||||
#exec_always --no-startup-id picom --config ~/.config/picom.conf
|
|
||||||
|
|
||||||
#############################################
|
|
||||||
# autostart applications/services on login: #
|
|
||||||
#############################################
|
|
||||||
|
|
||||||
#get auth work with polkit-gnome
|
|
||||||
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
|
||||||
|
|
||||||
# dex execute .desktop files + apps using /etc/xdg/autostart.
|
|
||||||
exec --no-startup-id dex --autostart --environment i3
|
|
||||||
|
|
||||||
# num lock activated
|
|
||||||
#exec --no-startup-id numlockx on
|
|
||||||
|
|
||||||
# start a script to setup displays
|
|
||||||
# uncomment the next line, use arandr to setup displays and save the file as monitor:
|
|
||||||
# exec --no-startup-id ~/.screenlayout/monitor.sh
|
|
||||||
|
|
||||||
# set wallpaper
|
|
||||||
# exec --no-startup-id sleep 2 && nitrogen --restore
|
|
||||||
exec --no-startup-id sleep 1 && feh --bg-fill ~/.config/i3/wallpaper.jpg
|
|
||||||
|
|
||||||
# set powersavings for display:
|
|
||||||
exec --no-startup-id xset s 480 dpms 600 600 600
|
|
||||||
|
|
||||||
# disable power saving (for example if using xscreensaver)
|
|
||||||
#exec --no-startup-id xset -dpms
|
|
||||||
|
|
||||||
# use xautolock to use autosuspend rules for mobile devices
|
|
||||||
# https://wiki.archlinux.org/title/Session_lock#xautolock
|
|
||||||
#exec --no-startup-id xautolock -time 60 -locker "systemctl suspend"
|
|
||||||
|
|
||||||
|
|
||||||
# xscreensaver
|
|
||||||
# https://www.jwz.org/xscreensaver
|
|
||||||
#exec --no-startup-id xscreensaver --no-splash
|
|
||||||
|
|
||||||
# Desktop notifications
|
|
||||||
# dunst config used ~/.config/dunst/dunstrc
|
|
||||||
# set alternative config if needed:
|
|
||||||
#exec --no-startup-id /usr/bin/dunst --config ~/.config/dunst/dunstrc
|
|
||||||
# may yneed to run dbus-launch explicitly:
|
|
||||||
#exec --no-startup-id dbus-launch /usr/bin/dunst
|
|
||||||
exec --no-startup-id /usr/bin/dunst
|
|
||||||
|
|
||||||
|
|
||||||
# autotiling script
|
|
||||||
# https://github.com/nwg-piotr/autotiling
|
|
||||||
# `yay -S autotiling ; (it is in AUR)
|
|
||||||
#exec_always --no-startup-id autotiling
|
|
||||||
|
|
||||||
# Autostart apps as you like
|
|
||||||
#exec --no-startup-id sleep 2 && Terminal
|
|
||||||
#exec --no-startup-id sleep 3 && thunar
|
|
||||||
|
|
||||||
###############
|
|
||||||
# system tray #
|
|
||||||
###############
|
|
||||||
# if you do not use dex: exec --no-startup-id dex --autostart --environment i3
|
|
||||||
# you need to have tray apps started manually one by one:
|
|
||||||
|
|
||||||
# start blueberry app for managing bluetooth devices from tray:
|
|
||||||
#exec --no-startup-id blueberry-tray
|
|
||||||
|
|
||||||
# networkmanager-applet
|
|
||||||
#exec --no-startup-id nm-applet
|
|
||||||
|
|
||||||
##################
|
|
||||||
# floating rules #
|
|
||||||
##################
|
|
||||||
|
|
||||||
# set floating (nontiling) for apps needing it
|
|
||||||
for_window [class="Yad" instance="yad"] floating enable
|
|
||||||
for_window [class="Galculator" instance="galculator"] floating enable
|
|
||||||
for_window [class="Blueberry.py" instance="blueberry.py"] floating enable
|
|
||||||
|
|
||||||
# set floating (nontiling) for special apps
|
|
||||||
for_window [class="Xsane" instance="xsane"] floating enable
|
|
||||||
for_window [class="Pavucontrol" instance="pavucontrol"] floating enable
|
|
||||||
for_window [class="qt5ct" instance="qt5ct"] floating enable
|
|
||||||
for_window [class="Blueberry.py" instance="blueberry.py"] floating enable
|
|
||||||
for_window [class="Bluetooth-sendto" instance="bluetooth-sendto"] floating enable
|
|
||||||
for_window [class="Pamac-manager"] floating enable
|
|
||||||
for_window [window_role="About"] floating enable
|
|
||||||
|
|
||||||
# set border of floating window
|
|
||||||
for_window [class="urxvt"] border pixel 1
|
|
||||||
|
|
||||||
# set size of floating window
|
|
||||||
#for_window [window_role="(?i)GtkFileChooserDialog"] resize set 640 480 #to set size of file choose dialog
|
|
||||||
#for_window [class=".*"] resize set 640 480 #to change size of all floating windows
|
|
||||||
|
|
||||||
# set position of floating window
|
|
||||||
#for_window [class=".*"] move position center
|
|
||||||
|
|
||||||
######################################
|
|
||||||
# color settings for bar and windows #
|
|
||||||
######################################
|
|
||||||
|
|
||||||
# Define colors variables:
|
|
||||||
set $darkbluetrans #08052be6
|
|
||||||
set $darkblue #08052b
|
|
||||||
set $lightblue #5294e2
|
|
||||||
set $urgentred #e53935
|
|
||||||
set $white #ffffff
|
|
||||||
set $black #000000
|
|
||||||
set $purple #e345ff
|
|
||||||
set $darkgrey #383c4a
|
|
||||||
set $grey #b0b5bd
|
|
||||||
set $mediumgrey #8b8b8b
|
|
||||||
set $yellowbrown #e1b700
|
|
||||||
|
|
||||||
# define colors for windows:
|
|
||||||
#class border bground text indicator child_border
|
|
||||||
client.focused $lightblue $darkblue $white $mediumgrey $mediumgrey
|
|
||||||
client.unfocused $darkblue $darkblue $grey $darkgrey $darkgrey
|
|
||||||
client.focused_inactive $darkblue $darkblue $grey $black $black
|
|
||||||
client.urgent $urgentred $urgentred $white $yellowbrown $yellowbrown
|
|
||||||
|
|
||||||
############################################
|
|
||||||
# bar settings (input comes from i3blocks) #
|
|
||||||
############################################
|
|
||||||
|
|
||||||
# Start i3bar to display a workspace bar
|
|
||||||
# (plus the system information i3status finds out, if available)
|
|
||||||
bar {
|
|
||||||
font pango: Noto Sans Regular 10
|
|
||||||
status_command i3blocks -c ~/.config/i3/i3blocks.conf
|
|
||||||
position bottom
|
|
||||||
# i3bar_command i3bar --transparency
|
|
||||||
# it could be that you have no primary display set: set one (xrandr --output <output> --primary)
|
|
||||||
# reference: https://i3wm.org/docs/userguide.html#_tray_output
|
|
||||||
#tray_output primary
|
|
||||||
tray_padding 0
|
|
||||||
|
|
||||||
# When strip_workspace_numbers is set to yes,
|
|
||||||
# any workspace that has a name of the form
|
|
||||||
# “[n][:][NAME]” will display only the name.
|
|
||||||
strip_workspace_numbers yes
|
|
||||||
##strip_workspace_name no
|
|
||||||
|
|
||||||
colors {
|
|
||||||
separator $purple
|
|
||||||
background $darkgrey
|
|
||||||
statusline $white
|
|
||||||
# border bg txt indicator
|
|
||||||
focused_workspace $mediumgrey $grey $darkgrey $purple
|
|
||||||
active_workspace $lightblue $mediumgrey $darkgrey $purple
|
|
||||||
inactive_workspace $darkgrey $darkgrey $grey $purple
|
|
||||||
urgent_workspace $urgentred $urgentred $white $purple
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# you can add different bars for multidisplay setups on each display:
|
|
||||||
# set output HDMI-0 to the display you want the bar, --transparency can be set.
|
|
||||||
# Transparency needs rgba color codes to be used where the last two letters are the transparency factor see here:
|
|
||||||
# https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4
|
|
||||||
# #08052be6 --> e6=90%
|
|
||||||
|
|
||||||
# bar {
|
|
||||||
# font pango: Noto Sans Regular 10
|
|
||||||
# status_command i3blocks -c ~/.config/i3/i3blocks-2.conf
|
|
||||||
# i3bar_command i3bar --transparency
|
|
||||||
# output HDMI-0
|
|
||||||
# position bottom
|
|
||||||
#
|
|
||||||
# When strip_workspace_numbers is set to yes,
|
|
||||||
# any workspace that has a name of the form
|
|
||||||
# “[n][:][NAME]” will display only the name.
|
|
||||||
#strip_workspace_numbers yes
|
|
||||||
##strip_workspace_name no
|
|
||||||
#
|
|
||||||
# colors {
|
|
||||||
# separator $purple
|
|
||||||
# background $darkbluetrans
|
|
||||||
# statusline $white
|
|
||||||
# border bg txt indicator
|
|
||||||
# focused_workspace $lighterblue $lighterblue $darkblue $purple
|
|
||||||
# active_workspace $lightdblue $lightdblue $darkblue $purple
|
|
||||||
# inactive_workspace $darkblue $darkblue $lightdblue $purple
|
|
||||||
# urgent_workspace $urgentred $urgentred $white $purple
|
|
||||||
# }
|
|
||||||
#}
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Application menu handled by rofi: #
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
## rofi bindings fancy application menu ($mod+d /F9 optional disabled)
|
|
||||||
|
|
||||||
bindsym $mod+d exec rofi -modi drun -show drun \
|
|
||||||
-config ~/.config/rofi/rofidmenu.rasi
|
|
||||||
|
|
||||||
#bindsym F9 exec rofi -modi drun -show drun \
|
|
||||||
# -config ~/.config/rofi/rofidmenu.rasi
|
|
||||||
|
|
||||||
## rofi bindings for window menu ($mod+t /F10 optional disabled)
|
|
||||||
|
|
||||||
bindsym $mod+t exec rofi -show window \
|
|
||||||
-config ~/.config/rofi/rofidmenu.rasi
|
|
||||||
|
|
||||||
#bindsym F10 exec rofi -show window \
|
|
||||||
# -config ~/.config/rofi/rofidmenu.rasi
|
|
||||||
|
|
||||||
## rofi bindings to manage clipboard (install rofi-greenclip from the AUR)
|
|
||||||
|
|
||||||
#exec --no-startup-id greenclip daemon>/dev/null
|
|
||||||
#bindsym $mod+c exec --no-startup-id rofi -modi "clipboard:greenclip print" -show clipboard \
|
|
||||||
# -config ~/.config/rofi/rofidmenu.rasi
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
{
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
# i3 配置,基于 https://github.com/endeavouros-team/endeavouros-i3wm-setup
|
|
||||||
# 直接从当前文件夹中读取配置文件作为配置内容
|
|
||||||
|
|
||||||
# wallpaper, binary file
|
|
||||||
home.file.".config/i3/wallpaper.jpg".source = ../../wallpaper.jpg;
|
|
||||||
home.file.".config/i3/config".source = ./config;
|
|
||||||
home.file.".config/i3/i3blocks.conf".source = ./i3blocks.conf;
|
|
||||||
home.file.".config/i3/keybindings".source = ./keybindings;
|
|
||||||
home.file.".config/i3/scripts" = {
|
|
||||||
source = ./scripts;
|
|
||||||
# copy the scripts directory recursively
|
|
||||||
recursive = true;
|
|
||||||
executable = true; # make all scripts executable
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
# set cursor size and dpi for 4k monitor
|
|
||||||
xresources.properties = {
|
|
||||||
"Xcursor.size" = 16;
|
|
||||||
"Xft.dpi" = 192;
|
|
||||||
};
|
|
||||||
|
|
||||||
# 直接以 text 的方式,在 nix 配置文件中硬编码文件内容
|
|
||||||
# home.file.".xxx".text = ''
|
|
||||||
# xxx
|
|
||||||
# '';
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,179 +0,0 @@
|
|||||||
# i3blocks config file changed for EndeavourOS-i3 setup
|
|
||||||
|
|
||||||
# source is available here:
|
|
||||||
# https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/.config/i3/i3blocks.conf
|
|
||||||
# Maintainer: joekamprad [joekamprad@endeavouros.com]
|
|
||||||
# Former Visual Designer: Florent Valetti [@FLVAL EndeavourOS]
|
|
||||||
# created for i3wm setup on EndeavourOS
|
|
||||||
# https://endeavouros.com
|
|
||||||
|
|
||||||
# cheatsheet for icon fonts used on the block-bar:
|
|
||||||
# https://fontawesome.com/v4.7/cheatsheet/
|
|
||||||
|
|
||||||
# --> to update this run the following command:
|
|
||||||
# wget --backups=1 https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/.config/i3/i3blocks.conf -P ~/.config/i3/
|
|
||||||
|
|
||||||
# Please see man i3blocks for a complete reference!
|
|
||||||
# The man page is also hosted at http://vivien.github.io/i3blocks
|
|
||||||
|
|
||||||
|
|
||||||
# List of valid properties:
|
|
||||||
#
|
|
||||||
# align
|
|
||||||
# color
|
|
||||||
# command
|
|
||||||
# full_text
|
|
||||||
# instance
|
|
||||||
# interval
|
|
||||||
# label
|
|
||||||
# min_width
|
|
||||||
# name
|
|
||||||
# separator
|
|
||||||
# separator_block_width
|
|
||||||
# short_text
|
|
||||||
# signal
|
|
||||||
# urgent
|
|
||||||
|
|
||||||
# Global properties
|
|
||||||
#
|
|
||||||
# The top properties below are applied to every block, but can be overridden.
|
|
||||||
separator=false
|
|
||||||
markup=pango
|
|
||||||
|
|
||||||
#[Weather]
|
|
||||||
#command=~/.config/i3/scripts/openweather
|
|
||||||
# or:
|
|
||||||
#command=~/.config/i3/scripts/openweather-city
|
|
||||||
#interval=1800
|
|
||||||
#color=#7275b3
|
|
||||||
|
|
||||||
[terminal]
|
|
||||||
full_text=
|
|
||||||
color=#807dfe
|
|
||||||
command=i3-msg -q exec alacritty
|
|
||||||
|
|
||||||
[browser]
|
|
||||||
full_text=
|
|
||||||
color=#ff7f81
|
|
||||||
command=i3-msg -q exec firefox
|
|
||||||
|
|
||||||
[files]
|
|
||||||
full_text=
|
|
||||||
color=#7f3fbf
|
|
||||||
command=i3-msg -q exec thunar ~/
|
|
||||||
|
|
||||||
#[mail]
|
|
||||||
#full_text=
|
|
||||||
#color=#dbcb75
|
|
||||||
#command=i3-msg -q exec thunderbird
|
|
||||||
|
|
||||||
[simple-2]
|
|
||||||
full_text=: :
|
|
||||||
color=#717171
|
|
||||||
|
|
||||||
# Disk usage
|
|
||||||
#
|
|
||||||
# The directory defaults to $HOME if the instance is not specified.
|
|
||||||
# The script may be called with a optional argument to set the alert
|
|
||||||
# (defaults to 10 for 10%).
|
|
||||||
[disk]
|
|
||||||
label=
|
|
||||||
instance=/
|
|
||||||
command=~/.config/i3/scripts/disk
|
|
||||||
interval=30
|
|
||||||
|
|
||||||
# Memory usage
|
|
||||||
#
|
|
||||||
# The type defaults to "mem" if the instance is not specified.
|
|
||||||
[memory]
|
|
||||||
label=
|
|
||||||
command=~/.config/i3/scripts/memory
|
|
||||||
interval=2
|
|
||||||
|
|
||||||
[cpu_usage]
|
|
||||||
label=
|
|
||||||
command=~/.config/i3/scripts/cpu_usage
|
|
||||||
#min_width=CPU: 100.00%
|
|
||||||
interval=2
|
|
||||||
|
|
||||||
[CPU-temperature]
|
|
||||||
label=
|
|
||||||
command=~/.config/i3/scripts/temperature
|
|
||||||
interval=30
|
|
||||||
#T_WARN=70
|
|
||||||
#T_CRIT=90
|
|
||||||
#SENSOR_CHIP=""
|
|
||||||
# where SENSOR_CHIP can be find with sensors output
|
|
||||||
# can be used also for GPU temperature or other temperature sensors lm-sensors detects.
|
|
||||||
|
|
||||||
# showing name of connected network (enable for wifi use)
|
|
||||||
#[net]
|
|
||||||
#label=
|
|
||||||
#command=echo "$(LANG=C nmcli d | grep connected | awk '{print $4}')"
|
|
||||||
#interval=30
|
|
||||||
|
|
||||||
[bandwidth]
|
|
||||||
command=~/.config/i3/scripts/bandwidth2
|
|
||||||
interval=persist
|
|
||||||
|
|
||||||
# Battery indicator
|
|
||||||
# [battery]
|
|
||||||
# command=~/.config/i3/scripts/battery2
|
|
||||||
# # for alternative battery script change to battery1
|
|
||||||
# # change this to battery-pinebook-pro if you are running on pinebook-pro
|
|
||||||
# label=
|
|
||||||
# interval=30
|
|
||||||
|
|
||||||
[simple-2]
|
|
||||||
full_text=: :
|
|
||||||
color=#717171
|
|
||||||
|
|
||||||
[pavucontrol]
|
|
||||||
full_text=
|
|
||||||
command=pavucontrol
|
|
||||||
|
|
||||||
[volume-pulseaudio]
|
|
||||||
command=~/.config/i3/scripts/volume
|
|
||||||
instance=Master
|
|
||||||
interval=1
|
|
||||||
|
|
||||||
# display keyboard layout name
|
|
||||||
# for keyboard layouts switcher
|
|
||||||
# see i3 config file
|
|
||||||
# this needs xkblayout-state installed from the AUR:
|
|
||||||
# https://aur.archlinux.org/packages/xkblayout-state-git
|
|
||||||
#[keyboard-layout]
|
|
||||||
#command=~/.config/i3/scripts/keyboard-layout
|
|
||||||
#interval=2
|
|
||||||
|
|
||||||
[keybindings]
|
|
||||||
full_text=
|
|
||||||
command=~/.config/i3/scripts/keyhint
|
|
||||||
|
|
||||||
# power-profiles-daemon implementation:
|
|
||||||
# needs package power-profiles-daemon installed and the service running see here:
|
|
||||||
# https://wiki.archlinux.org/title/CPU_frequency_scaling#power-profiles-daemon
|
|
||||||
|
|
||||||
#set power-profile
|
|
||||||
[ppd_menu]
|
|
||||||
full_text=
|
|
||||||
command=~/.config/i3/scripts/power-profiles
|
|
||||||
color=#407437
|
|
||||||
|
|
||||||
#Show the current power-profile
|
|
||||||
[ppd-status]
|
|
||||||
command=~/.config/i3/scripts/ppd-status
|
|
||||||
interval=5
|
|
||||||
|
|
||||||
[time]
|
|
||||||
#label=
|
|
||||||
command=date '+%a %d %b %H:%M:%S'
|
|
||||||
interval=1
|
|
||||||
|
|
||||||
[shutdown_menu]
|
|
||||||
full_text=
|
|
||||||
command=~/.config/i3/scripts/powermenu
|
|
||||||
|
|
||||||
[simple-2]
|
|
||||||
full_text=: :
|
|
||||||
color=#717171
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
EndeavourOS i3wm Keybindings cheat sheet:
|
|
||||||
|
|
||||||
--> to update this run the following command:
|
|
||||||
wget --backups=1 https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/.config/i3/keybindings -P ~/.config/i3/
|
|
||||||
|
|
||||||
All sources and updates are available at GitHub:
|
|
||||||
https://github.com/endeavouros-team/endeavouros-i3wm-setup
|
|
||||||
|
|
||||||
For reference consult our WIKI:
|
|
||||||
https://discovery.endeavouros.com/window-tiling-managers/i3-wm/
|
|
||||||
|
|
||||||
= windows key
|
|
||||||
|
|
||||||
# start alacritty
|
|
||||||
+Return
|
|
||||||
|
|
||||||
# kill focused window
|
|
||||||
+q
|
|
||||||
|
|
||||||
# Application menu search by typing (fancy Rofi menu):
|
|
||||||
+d
|
|
||||||
|
|
||||||
# Window switcher menu (fancy Rofi menu):
|
|
||||||
+t
|
|
||||||
|
|
||||||
# fancy exit-menu on bottom right:
|
|
||||||
+Shift+e
|
|
||||||
|
|
||||||
# Lock the system
|
|
||||||
# lock with a picture or blurring the screen (options in config)
|
|
||||||
+l
|
|
||||||
|
|
||||||
# reload the configuration file
|
|
||||||
+Shift+c
|
|
||||||
|
|
||||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
|
||||||
+Shift+r
|
|
||||||
|
|
||||||
# keybinding in fancy rofi (automated)
|
|
||||||
F1
|
|
||||||
|
|
||||||
# full keybinding list in editor:
|
|
||||||
+F1
|
|
||||||
|
|
||||||
# change window focus
|
|
||||||
+j focus left
|
|
||||||
+k focus down
|
|
||||||
+b focus up
|
|
||||||
+o focus right
|
|
||||||
|
|
||||||
# alternatively, you can use the cursor keys:
|
|
||||||
+Left focus left
|
|
||||||
+Down focus down
|
|
||||||
+Up focus up
|
|
||||||
+Right focus right
|
|
||||||
|
|
||||||
# move a focused window
|
|
||||||
+Shift+j move left
|
|
||||||
+Shift+k move down
|
|
||||||
+Shift+b move up
|
|
||||||
+Shift+o move right
|
|
||||||
|
|
||||||
# alternatively, you can use the cursor keys:
|
|
||||||
+Shift+Left move left
|
|
||||||
+Shift+Down move down
|
|
||||||
+Shift+Up move up
|
|
||||||
+Shift+Right move right
|
|
||||||
|
|
||||||
# split in horizontal orientation
|
|
||||||
+h split h
|
|
||||||
|
|
||||||
# split in vertical orientation
|
|
||||||
+v split v
|
|
||||||
|
|
||||||
# enter fullscreen mode for the focused container
|
|
||||||
+f fullscreen toggle
|
|
||||||
|
|
||||||
# change container layout (stacked, tabbed, toggle split)
|
|
||||||
+s layout stacking
|
|
||||||
+g layout tabbed
|
|
||||||
+e layout toggle split
|
|
||||||
|
|
||||||
# toggle tiling / floating
|
|
||||||
+Shift+space floating toggle
|
|
||||||
|
|
||||||
# change focus between tiling / floating windows
|
|
||||||
+space focus mode_toggle
|
|
||||||
|
|
||||||
# focus the parent container
|
|
||||||
+a focus parent
|
|
||||||
|
|
||||||
# focus the child container
|
|
||||||
#+d focus child
|
|
||||||
|
|
||||||
# resize floating window
|
|
||||||
+right mouse button
|
|
||||||
|
|
||||||
## Multimedia Keys
|
|
||||||
|
|
||||||
# Redirect sound to headphones
|
|
||||||
+p
|
|
||||||
|
|
||||||
## App shortcuts
|
|
||||||
+w starts Firefox
|
|
||||||
+n starts Thunar
|
|
||||||
Button screenshot
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#simple Shellscript for i3blocks on Pinebook pro
|
|
||||||
#05012020 geri123@gmx.net Gerhard S.
|
|
||||||
#battery-symbols: on Manjaro you need the awesome-terminal-fonts package installed!
|
|
||||||
PERCENT=$(cat /sys/class/power_supply/cw2015-battery/capacity)
|
|
||||||
STATUS=$(cat /sys/class/power_supply/cw2015-battery/status)
|
|
||||||
case $((
|
|
||||||
$PERCENT >= 0 && $PERCENT <= 20 ? 1 :
|
|
||||||
$PERCENT > 20 && $PERCENT <= 40 ? 2 :
|
|
||||||
$PERCENT > 40 && $PERCENT <= 60 ? 3 :
|
|
||||||
$PERCENT > 60 && $PERCENT <= 80 ? 4 : 5)) in
|
|
||||||
#
|
|
||||||
(1) echo $STATUS:"" :$PERCENT%;;
|
|
||||||
(2) echo $STATUS:"" :$PERCENT%;;
|
|
||||||
(3) echo $STATUS:"" :$PERCENT%;;
|
|
||||||
(4) echo $STATUS:"" :$PERCENT%;;
|
|
||||||
(5) echo $STATUS:"" :$PERCENT%;;
|
|
||||||
esac
|
|
||||||
@@ -1,114 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
#
|
|
||||||
# Copyright 2014 Pierre Mavro <deimos@deimos.fr>
|
|
||||||
# Copyright 2014 Vivien Didelot <vivien@didelot.org>
|
|
||||||
#
|
|
||||||
# Licensed under the terms of the GNU GPL v3, or any later version.
|
|
||||||
#
|
|
||||||
# This script is meant to use with i3blocks. It parses the output of the "acpi"
|
|
||||||
# command (often provided by a package of the same name) to read the status of
|
|
||||||
# the battery, and eventually its remaining time (to full charge or discharge).
|
|
||||||
#
|
|
||||||
# The color will gradually change for a percentage below 85%, and the urgency
|
|
||||||
# (exit code 33) is set if there is less that 5% remaining.
|
|
||||||
|
|
||||||
# Edited by Andreas Lindlbauer <endeavouros.mousily@aleeas.com>
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use utf8;
|
|
||||||
|
|
||||||
# otherwise we get in console "Wide character in print at"
|
|
||||||
binmode(STDOUT, ':utf8');
|
|
||||||
|
|
||||||
# my $acpi;
|
|
||||||
my $upower;
|
|
||||||
my $percent;
|
|
||||||
my $bat_state;
|
|
||||||
my $status;
|
|
||||||
my $ac_adapt;
|
|
||||||
my $full_text;
|
|
||||||
my $short_text;
|
|
||||||
my $label = '😅';
|
|
||||||
my $bat_number = $ENV{BLOCK_INSTANCE} || 0;
|
|
||||||
|
|
||||||
open (UPOWER, "upower -i /org/freedesktop/UPower/devices/battery_BAT$bat_number | grep 'percentage' |") or die;
|
|
||||||
$upower = <UPOWER>;
|
|
||||||
close(UPOWER);
|
|
||||||
|
|
||||||
# fail on unexpected output
|
|
||||||
if ($upower !~ /: (\d+)%/) {
|
|
||||||
die "$upower\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
$percent = $1;
|
|
||||||
$full_text = "$percent%";
|
|
||||||
|
|
||||||
open (BAT_STATE, "upower -i /org/freedesktop/UPower/devices/battery_BAT$bat_number | grep 'state' |") or die;
|
|
||||||
$bat_state = <BAT_STATE>;
|
|
||||||
close(BAT_STATE);
|
|
||||||
|
|
||||||
if ($bat_state !~ /: (\w+)/) {
|
|
||||||
die "$bat_state\n";
|
|
||||||
}
|
|
||||||
$status = $1;
|
|
||||||
|
|
||||||
if ($status eq 'discharging') {
|
|
||||||
$full_text .= ' ';
|
|
||||||
} elsif ($status eq 'charging') {
|
|
||||||
$full_text .= ' ';
|
|
||||||
} elsif ($status eq 'Unknown') {
|
|
||||||
open (AC_ADAPTER, "acpi -a |") or die;
|
|
||||||
$ac_adapt = <AC_ADAPTER>;
|
|
||||||
close(AC_ADAPTER);
|
|
||||||
|
|
||||||
if ($ac_adapt =~ /: ([\w-]+)/) {
|
|
||||||
$ac_adapt = $1;
|
|
||||||
|
|
||||||
if ($ac_adapt eq 'on-line') {
|
|
||||||
$full_text .= ' CHR';
|
|
||||||
} elsif ($ac_adapt eq 'off-line') {
|
|
||||||
$full_text .= ' DIS';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$short_text = $full_text;
|
|
||||||
|
|
||||||
if ($percent < 20) {
|
|
||||||
$label = '';
|
|
||||||
} elsif ($percent < 45) {
|
|
||||||
$label = '';
|
|
||||||
} elsif ($percent < 70) {
|
|
||||||
$label = '';
|
|
||||||
} elsif ($percent < 95) {
|
|
||||||
$label = '';
|
|
||||||
} else {
|
|
||||||
$label = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
# print text
|
|
||||||
print " ${label}";
|
|
||||||
print " $full_text\n";
|
|
||||||
print " ${label}";
|
|
||||||
print " $short_text\n";
|
|
||||||
|
|
||||||
# consider color and urgent flag only on discharge
|
|
||||||
if ($status eq 'discharging') {
|
|
||||||
|
|
||||||
if ($percent < 20) {
|
|
||||||
print "#FF0000\n";
|
|
||||||
} elsif ($percent < 40) {
|
|
||||||
print "#FFAE00\n";
|
|
||||||
} elsif ($percent < 60) {
|
|
||||||
print "#FFF600\n";
|
|
||||||
} elsif ($percent < 85) {
|
|
||||||
print "#A8FF00\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($percent < 5) {
|
|
||||||
exit(33);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exit(0);
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
#
|
|
||||||
# Copyright (C) 2016 James Murphy
|
|
||||||
# Licensed under the GPL version 2 only
|
|
||||||
#
|
|
||||||
# A battery indicator blocklet script for i3blocks
|
|
||||||
|
|
||||||
from subprocess import check_output
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
|
|
||||||
config = dict(os.environ)
|
|
||||||
status = check_output(['acpi'], universal_newlines=True)
|
|
||||||
|
|
||||||
if not status:
|
|
||||||
# stands for no battery found
|
|
||||||
color = config.get("color_10", "red")
|
|
||||||
fulltext = "<span color='{}'><span font='FontAwesome'>\uf00d \uf240</span></span>".format(color)
|
|
||||||
percentleft = 100
|
|
||||||
else:
|
|
||||||
# if there is more than one battery in one laptop, the percentage left is
|
|
||||||
# available for each battery separately, although state and remaining
|
|
||||||
# time for overall block is shown in the status of the first battery
|
|
||||||
batteries = status.split("\n")
|
|
||||||
state_batteries=[]
|
|
||||||
commasplitstatus_batteries=[]
|
|
||||||
percentleft_batteries=[]
|
|
||||||
time = ""
|
|
||||||
for battery in batteries:
|
|
||||||
if battery!='':
|
|
||||||
state_batteries.append(battery.split(": ")[1].split(", ")[0])
|
|
||||||
commasplitstatus = battery.split(", ")
|
|
||||||
if not time:
|
|
||||||
time = commasplitstatus[-1].strip()
|
|
||||||
# check if it matches a time
|
|
||||||
time = re.match(r"(\d+):(\d+)", time)
|
|
||||||
if time:
|
|
||||||
time = ":".join(time.groups())
|
|
||||||
timeleft = " ({})".format(time)
|
|
||||||
else:
|
|
||||||
timeleft = ""
|
|
||||||
|
|
||||||
p = int(commasplitstatus[1].rstrip("%\n"))
|
|
||||||
if p>0:
|
|
||||||
percentleft_batteries.append(p)
|
|
||||||
commasplitstatus_batteries.append(commasplitstatus)
|
|
||||||
state = state_batteries[0]
|
|
||||||
commasplitstatus = commasplitstatus_batteries[0]
|
|
||||||
if percentleft_batteries:
|
|
||||||
percentleft = int(sum(percentleft_batteries)/len(percentleft_batteries))
|
|
||||||
else:
|
|
||||||
percentleft = 0
|
|
||||||
|
|
||||||
# stands for charging
|
|
||||||
color = config.get("color_charging", "yellow")
|
|
||||||
FA_LIGHTNING = "<span color='{}'><span font='FontAwesome'>\uf0e7</span></span>".format(color)
|
|
||||||
|
|
||||||
# stands for plugged in
|
|
||||||
FA_PLUG = "<span font='FontAwesome'>\uf1e6</span>"
|
|
||||||
|
|
||||||
# stands for using battery
|
|
||||||
FA_BATTERY = "<span font='FontAwesome'>\uf240</span>"
|
|
||||||
|
|
||||||
# stands for unknown status of battery
|
|
||||||
FA_QUESTION = "<span font='FontAwesome'>\uf128</span>"
|
|
||||||
|
|
||||||
|
|
||||||
if state == "Discharging":
|
|
||||||
fulltext = FA_BATTERY + " "
|
|
||||||
elif state == "Full":
|
|
||||||
fulltext = FA_PLUG + " "
|
|
||||||
timeleft = ""
|
|
||||||
elif state == "Unknown":
|
|
||||||
fulltext = FA_QUESTION + " " + FA_BATTERY + " "
|
|
||||||
timeleft = ""
|
|
||||||
else:
|
|
||||||
fulltext = FA_LIGHTNING + " " + FA_PLUG + " "
|
|
||||||
|
|
||||||
def color(percent):
|
|
||||||
if percent < 10:
|
|
||||||
# exit code 33 will turn background red
|
|
||||||
return config.get("color_10", "#FFFFFF")
|
|
||||||
if percent < 20:
|
|
||||||
return config.get("color_20", "#FF3300")
|
|
||||||
if percent < 30:
|
|
||||||
return config.get("color_30", "#FF6600")
|
|
||||||
if percent < 40:
|
|
||||||
return config.get("color_40", "#FF9900")
|
|
||||||
if percent < 50:
|
|
||||||
return config.get("color_50", "#FFCC00")
|
|
||||||
if percent < 60:
|
|
||||||
return config.get("color_60", "#FFFF00")
|
|
||||||
if percent < 70:
|
|
||||||
return config.get("color_70", "#FFFF33")
|
|
||||||
if percent < 80:
|
|
||||||
return config.get("color_80", "#FFFF66")
|
|
||||||
return config.get("color_full", "#FFFFFF")
|
|
||||||
|
|
||||||
form = '<span color="{}">{}%</span>'
|
|
||||||
fulltext += form.format(color(percentleft), percentleft)
|
|
||||||
#fulltext += timeleft
|
|
||||||
|
|
||||||
print(fulltext)
|
|
||||||
print(fulltext)
|
|
||||||
if percentleft < 10:
|
|
||||||
exit(33)
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
#!/usr/bin/env perl
|
|
||||||
#
|
|
||||||
# Copyright 2014 Pierre Mavro <deimos@deimos.fr>
|
|
||||||
# Copyright 2014 Vivien Didelot <vivien@didelot.org>
|
|
||||||
# Copyright 2014 Andreas Guldstrand <andreas.guldstrand@gmail.com>
|
|
||||||
#
|
|
||||||
# Licensed under the terms of the GNU GPL v3, or any later version.
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use utf8;
|
|
||||||
use Getopt::Long;
|
|
||||||
|
|
||||||
# default values
|
|
||||||
my $t_warn = $ENV{T_WARN} // 50;
|
|
||||||
my $t_crit = $ENV{T_CRIT} // 80;
|
|
||||||
my $cpu_usage = -1;
|
|
||||||
my $decimals = $ENV{DECIMALS} // 0;
|
|
||||||
my $label = $ENV{LABEL} // "";
|
|
||||||
|
|
||||||
sub help {
|
|
||||||
print "Usage: cpu_usage [-w <warning>] [-c <critical>] [-d <decimals>]\n";
|
|
||||||
print "-w <percent>: warning threshold to become yellow\n";
|
|
||||||
print "-c <percent>: critical threshold to become red\n";
|
|
||||||
print "-d <decimals>: Use <decimals> decimals for percentage (default is $decimals) \n";
|
|
||||||
exit 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
GetOptions("help|h" => \&help,
|
|
||||||
"w=i" => \$t_warn,
|
|
||||||
"c=i" => \$t_crit,
|
|
||||||
"d=i" => \$decimals,
|
|
||||||
);
|
|
||||||
|
|
||||||
# Get CPU usage
|
|
||||||
$ENV{LC_ALL}="en_US"; # if mpstat is not run under en_US locale, things may break, so make sure it is
|
|
||||||
open (MPSTAT, 'mpstat 1 1 |') or die;
|
|
||||||
while (<MPSTAT>) {
|
|
||||||
if (/^.*\s+(\d+\.\d+)[\s\x00]?$/) {
|
|
||||||
$cpu_usage = 100 - $1; # 100% - %idle
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close(MPSTAT);
|
|
||||||
|
|
||||||
$cpu_usage eq -1 and die 'Can\'t find CPU information';
|
|
||||||
|
|
||||||
# Print short_text, full_text
|
|
||||||
print "${label}";
|
|
||||||
printf "%02.${decimals}f%%\n", $cpu_usage;
|
|
||||||
print "${label}";
|
|
||||||
printf "%02.${decimals}f%%\n", $cpu_usage;
|
|
||||||
|
|
||||||
# Print color, if needed
|
|
||||||
if ($cpu_usage >= $t_crit) {
|
|
||||||
print "#FF0000\n";
|
|
||||||
exit 33;
|
|
||||||
} elsif ($cpu_usage >= $t_warn) {
|
|
||||||
print "#FFFC00\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
exit 0;
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
|
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
DIR="${DIR:-$BLOCK_INSTANCE}"
|
|
||||||
DIR="${DIR:-$HOME}"
|
|
||||||
ALERT_LOW="${ALERT_LOW:-$1}"
|
|
||||||
ALERT_LOW="${ALERT_LOW:-10}" # color will turn red under this value (default: 10%)
|
|
||||||
|
|
||||||
LOCAL_FLAG="-l"
|
|
||||||
if [ "$1" = "-n" ] || [ "$2" = "-n" ]; then
|
|
||||||
LOCAL_FLAG=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
df -h -P $LOCAL_FLAG "$DIR" | awk -v label="$LABEL" -v alert_low=$ALERT_LOW '
|
|
||||||
/\/.*/ {
|
|
||||||
# full text
|
|
||||||
print label $4
|
|
||||||
|
|
||||||
# short text
|
|
||||||
print label $4
|
|
||||||
|
|
||||||
use=$5
|
|
||||||
|
|
||||||
# no need to continue parsing
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
END {
|
|
||||||
gsub(/%$/,"",use)
|
|
||||||
if (100 - use < alert_low) {
|
|
||||||
# color
|
|
||||||
print "#FF0000"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
KBD=$(/usr/bin/xkblayout-state print '%s')
|
|
||||||
echo $KBD
|
|
||||||
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
Main() {
|
|
||||||
source /usr/share/endeavouros/scripts/eos-script-lib-yad || return 1
|
|
||||||
|
|
||||||
local command=(
|
|
||||||
eos_yad --title="EndeavourOS i3-wm keybindings:" --no-buttons --geometry=400x345-15-400 --list
|
|
||||||
--column=key: --column=description: --column=command:
|
|
||||||
"ESC" "close this app" ""
|
|
||||||
"=" "modkey" "(set mod Mod4)"
|
|
||||||
"+enter" "open a terminal" ""
|
|
||||||
"+Shift+n" "new empty workspace" ""
|
|
||||||
"+w" "open Browser" ""
|
|
||||||
"+n" "open Filebrowser" ""
|
|
||||||
"+d" "app menu" ""
|
|
||||||
"+q" "close focused app" ""
|
|
||||||
"Print-key" "screenshot" ""
|
|
||||||
"+Shift+e" "logout menu" ""
|
|
||||||
"F1" "open keybinding helper" ""
|
|
||||||
)
|
|
||||||
|
|
||||||
"${command[@]}"
|
|
||||||
}
|
|
||||||
|
|
||||||
Main "$@"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
I3_CONFIG=$HOME/.config/i3/config
|
|
||||||
mod_key=$(sed -nre 's/^set \$mod (.*)/\1/p' ${I3_CONFIG})
|
|
||||||
grep "^bindsym" ${I3_CONFIG} \
|
|
||||||
| sed "s/-\(-\w\+\)\+//g;s/\$mod/${mod_key}/g;s/Mod1/Alt/g;s/exec //;s/bindsym //;s/^\s\+//;s/^\([^ ]\+\) \(.\+\)$/\2: \1/;s/^\s\+//" \
|
|
||||||
| tr -s ' ' \
|
|
||||||
| rofi -dmenu -theme ~/.config/rofi/rofikeyhint.rasi
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
|
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
TYPE="${BLOCK_INSTANCE:-mem}"
|
|
||||||
|
|
||||||
awk -v type=$TYPE '
|
|
||||||
/^MemTotal:/ {
|
|
||||||
mem_total=$2
|
|
||||||
}
|
|
||||||
/^MemFree:/ {
|
|
||||||
mem_free=$2
|
|
||||||
}
|
|
||||||
/^Buffers:/ {
|
|
||||||
mem_free+=$2
|
|
||||||
}
|
|
||||||
/^Cached:/ {
|
|
||||||
mem_free+=$2
|
|
||||||
}
|
|
||||||
/^SwapTotal:/ {
|
|
||||||
swap_total=$2
|
|
||||||
}
|
|
||||||
/^SwapFree:/ {
|
|
||||||
swap_free=$2
|
|
||||||
}
|
|
||||||
END {
|
|
||||||
if (type == "swap") {
|
|
||||||
free=swap_free/1024/1024
|
|
||||||
used=(swap_total-swap_free)/1024/1024
|
|
||||||
total=swap_total/1024/1024
|
|
||||||
} else {
|
|
||||||
free=mem_free/1024/1024
|
|
||||||
used=(mem_total-mem_free)/1024/1024
|
|
||||||
total=mem_total/1024/1024
|
|
||||||
}
|
|
||||||
|
|
||||||
pct=0
|
|
||||||
if (total > 0) {
|
|
||||||
pct=used/total*100
|
|
||||||
}
|
|
||||||
|
|
||||||
# full text
|
|
||||||
# printf("%.1fG/%.1fG (%.f%%)\n", used, total, pct)
|
|
||||||
|
|
||||||
# short text
|
|
||||||
printf("%.f%%\n", pct)
|
|
||||||
|
|
||||||
# color
|
|
||||||
if (pct > 90) {
|
|
||||||
print("#FF0000")
|
|
||||||
} else if (pct > 80) {
|
|
||||||
print("#FFAE00")
|
|
||||||
} else if (pct > 70) {
|
|
||||||
print("#FFF600")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
' /proc/meminfo
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# Edited by Andreas Lindlbauer <endeavouros.mousily@aleeas.com>
|
|
||||||
|
|
||||||
temps=("#0600FF" "#0500FF" "#0400FF" "#0300FF" "#0200FF" "#0100FF" "#0000FF" "#0002FF" "#0012FF" "#0022FF" "#0032FF" "#0044FF" "#0054FF" "#0064FF" "#0074FF" "#0084FF" "#0094FF" "#00A4FF" "#00B4FF" "#00C4FF" "#00D4FF" "#00E4FF" "#00FFF4" "#00FFD0" "#00FFA8" "#00FF83" "#00FF5C" "#00FF36" "#00FF10" "#17FF00" "#3EFF00" "#65FF00" "#B0FF00" "#FDFF00" "#FFF000" "#FFDC00" "#FFC800" "#FFB400" "#FFA000" "#FF8C00" "#FF7800" "#FF6400" "#FF5000" "#FF3C00" "#FF2800" "#FF1400" "#FF0000")
|
|
||||||
|
|
||||||
command -v jq >/dev/null 2>&1 || { echo >&2 "Program 'jq' required but it is not installed.
|
|
||||||
Aborting."; exit 1; }
|
|
||||||
command -v wget >/dev/null 2>&1 || { echo >&2 "Program 'wget' required but is not installed.
|
|
||||||
Aborting."; exit 1; }
|
|
||||||
|
|
||||||
# To use this script you need to create an API key here https://home.openweathermap.org
|
|
||||||
# You need to put your Open Weather APIKEY here:
|
|
||||||
APIKEY="keykeykey"
|
|
||||||
# And get your Latitute and Longitudes to put in here:
|
|
||||||
LAT="XX.XXXX"
|
|
||||||
LON="XX.XXXX"
|
|
||||||
URL="http://api.openweathermap.org/data/2.5/onecall?lat=${LAT}&lon=${LON}&units=metric&exclude=minutely,hourly,daily&APPID=${APIKEY}"
|
|
||||||
WEATHER_RESPONSE=$(wget -qO- "${URL}")
|
|
||||||
|
|
||||||
WEATHER_CONDITION=$(echo "$WEATHER_RESPONSE" | jq '.current.weather[0].main' | sed 's/"//g')
|
|
||||||
WEATHER_TEMP=$(echo "$WEATHER_RESPONSE" | jq '.current.feels_like')
|
|
||||||
WEATHER_INT=${WEATHER_TEMP%.*}
|
|
||||||
|
|
||||||
TIME_NOW=$( echo "$WEATHER_RESPONSE" | jq '.current.dt')
|
|
||||||
SUNRISE=$( echo "$WEATHER_RESPONSE" | jq '.current.sunrise')
|
|
||||||
SUNSET=$( echo "$WEATHER_RESPONSE" | jq '.current.sunset')
|
|
||||||
DESCRIPTION=$( echo "$WEATHER_RESPONSE" | jq '.current.weather[0].description' | sed 's/"//g')
|
|
||||||
WEATHER_ALERT=$( echo "$WEATHER_RESPONSE" | jq '.alerts[0].event' | sed 's/"//g')
|
|
||||||
DAYTIME="n"
|
|
||||||
|
|
||||||
if [[ "$TIME_NOW" > "$SUNRISE" ]] && [[ "$TIME_NOW" < "$SUNSET" ]]; then
|
|
||||||
DAYTIME="d"
|
|
||||||
fi
|
|
||||||
|
|
||||||
case $WEATHER_CONDITION in
|
|
||||||
'Clouds')
|
|
||||||
if [ "$DAYTIME" == "d" ]; then
|
|
||||||
WEATHER_ICON=""
|
|
||||||
else
|
|
||||||
WEATHER_ICON=""
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
'Rain')
|
|
||||||
WEATHER_ICON=""
|
|
||||||
;;
|
|
||||||
'Drizzle')
|
|
||||||
if [ "$DAYTIME" == "d" ]; then
|
|
||||||
WEATHER_ICON=""
|
|
||||||
else
|
|
||||||
WEATHER_ICON=""
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
'Thunderstorm')
|
|
||||||
WEATHER_ICON=""
|
|
||||||
;;
|
|
||||||
'Snow')
|
|
||||||
WEATHER_ICON=""
|
|
||||||
;;
|
|
||||||
'Clear')
|
|
||||||
if [ "$DAYTIME" == "d" ]; then
|
|
||||||
WEATHER_ICON=""
|
|
||||||
else
|
|
||||||
WEATHER_ICON=""
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
WEATHER_ICON="🌫"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
WEATHER_COLOR="#FFFFFF"
|
|
||||||
if [ "$WEATHER_INT" -lt "-11" ]; then
|
|
||||||
WEATHER_COLOR="#0000FF"
|
|
||||||
elif [ "$WEATHER_INT" -gt 35 ]; then
|
|
||||||
WEATHER_COLOR="#FF0000"
|
|
||||||
else
|
|
||||||
WEATHER_INT=$(( WEATHER_INT + 11 ))
|
|
||||||
WEATHER_COLOR="${temps[$WEATHER_INT]}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
full_text="${WEATHER_ICON} ${WEATHER_TEMP}°C: ${DESCRIPTION} "
|
|
||||||
if [ "$WEATHER_ALERT" != "null" ]; then
|
|
||||||
WARN_START=$(echo "$WEATHER_RESPONSE" | jq '.alerts[0].start')
|
|
||||||
WARN_END=$(echo "$WEATHER_RESPONSE" | jq '.alerts[0].end')
|
|
||||||
WARN_START=$(date -d @"$WARN_START" +%a_%k:%M)
|
|
||||||
WARN_END=$(date -d @"$WARN_END" +%a_%k:%M)
|
|
||||||
full_text="${WEATHER_ICON} ${WEATHER_TEMP}°C: ${DESCRIPTION} ${WEATHER_ALERT} from ${WARN_START} to ${WARN_END} "
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
echo "${full_text}"
|
|
||||||
echo "${WEATHER_TEMP}°C "
|
|
||||||
echo "${WEATHER_COLOR}"
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
command -v jq >/dev/null 2>&1 || { echo >&2 "Program 'jq' required but it is not installed.
|
|
||||||
Aborting."; exit 1; }
|
|
||||||
command -v wget >/dev/null 2>&1 || { echo >&2 "Program 'wget' required but is not installed.
|
|
||||||
Aborting."; exit 1; }
|
|
||||||
|
|
||||||
# To use this script you need to create an API key here https://home.openweathermap.org
|
|
||||||
# You need to put your Open Weather APIKEY here:
|
|
||||||
APIKEY="keykey"
|
|
||||||
# find your City ID here: https://openweathermap.org/
|
|
||||||
# search for your city and copy the ID from the URL inside the browser.
|
|
||||||
CITY_ID="idid"
|
|
||||||
URL="http://api.openweathermap.org/data/2.5/weather?id=${CITY_ID}&units=metric&APPID=${APIKEY}"
|
|
||||||
|
|
||||||
WEATHER_RESPONSE=$(wget -qO- "${URL}")
|
|
||||||
|
|
||||||
WEATHER_CONDITION=$(echo $WEATHER_RESPONSE | jq '.weather[0].main' | sed 's/"//g')
|
|
||||||
WEATHER_TEMP=$(echo $WEATHER_RESPONSE | jq '.main.temp')
|
|
||||||
WIND_DIR=$( echo "$WEATHER_RESPONSE" | jq '.wind.deg')
|
|
||||||
WIND_SPEED=$( echo "$WEATHER_RESPONSE" | jq '.wind.speed')
|
|
||||||
|
|
||||||
WIND_SPEED=$(awk "BEGIN {print 60*60*$WIND_SPEED/1000}")
|
|
||||||
WIND_DIR=$(awk "BEGIN {print int(($WIND_DIR % 360)/22.5)}")
|
|
||||||
DIR_ARRAY=( N NNE NE ENE E ESE SE SSE S SSW SW WSW W WNW NW NNW N )
|
|
||||||
WIND_DIR=${DIR_ARRAY[WIND_DIR]}
|
|
||||||
|
|
||||||
case $WEATHER_CONDITION in
|
|
||||||
'Clouds')
|
|
||||||
WEATHER_ICON=""
|
|
||||||
;;
|
|
||||||
'Rain')
|
|
||||||
WEATHER_ICON=""
|
|
||||||
;;
|
|
||||||
'Snow')
|
|
||||||
WEATHER_ICON=""
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
WEATHER_ICON=""
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo "${WEATHER_ICON} ${WEATHER_TEMP}°C: ${WIND_SPEED} km/h ${WIND_DIR}"
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# Weather
|
|
||||||
[Weather]
|
|
||||||
command=~/.config/i3/scripts/openweather
|
|
||||||
interval=1800
|
|
||||||
color=#7275b3
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
# power-profiles-daemon implementation:
|
|
||||||
# needs package power-profiles-daemon installed and the service running see here:
|
|
||||||
# https://wiki.archlinux.org/title/CPU_frequency_scaling#power-profiles-daemon
|
|
||||||
# used in i3-blocks: ~/.config/i3/i3blocks.conf together with: ~/.config/i3/scripts/power-profiles
|
|
||||||
|
|
||||||
# script to show current power profile
|
|
||||||
|
|
||||||
current_profile=$(powerprofilesctl get)
|
|
||||||
echo "$current_profile"
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
#!/usr/bin/env perl
|
|
||||||
# Copyright 2014 Pierre Mavro <deimos@deimos.fr>
|
|
||||||
# Copyright 2014 Vivien Didelot <vivien@didelot.org>
|
|
||||||
# Copyright 2014 Andreas Guldstrand <andreas.guldstrand@gmail.com>
|
|
||||||
# Copyright 2014 Benjamin Chretien <chretien at lirmm dot fr>
|
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# Edited by Andreas Lindlbauer <endeavouros.mousily@aleeas.com>
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use utf8;
|
|
||||||
use Getopt::Long;
|
|
||||||
|
|
||||||
binmode(STDOUT, ":utf8");
|
|
||||||
|
|
||||||
# default values
|
|
||||||
my $t_warn = $ENV{T_WARN} || 70;
|
|
||||||
my $t_crit = $ENV{T_CRIT} || 90;
|
|
||||||
my $chip = $ENV{SENSOR_CHIP} || "";
|
|
||||||
my $temperature = -9999;
|
|
||||||
my $label = "😀 ";
|
|
||||||
|
|
||||||
sub help {
|
|
||||||
print "Usage: temperature [-w <warning>] [-c <critical>] [--chip <chip>]\n";
|
|
||||||
print "-w <percent>: warning threshold to become yellow\n";
|
|
||||||
print "-c <percent>: critical threshold to become red\n";
|
|
||||||
print "--chip <chip>: sensor chip\n";
|
|
||||||
exit 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
GetOptions("help|h" => \&help,
|
|
||||||
"w=i" => \$t_warn,
|
|
||||||
"c=i" => \$t_crit,
|
|
||||||
"chip=s" => \$chip);
|
|
||||||
|
|
||||||
# Get chip temperature
|
|
||||||
open (SENSORS, "sensors -u $chip |") or die;
|
|
||||||
while (<SENSORS>) {
|
|
||||||
if (/^\s+temp1_input:\s+[\+]*([\-]*\d+\.\d)/) {
|
|
||||||
$temperature = $1;
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close(SENSORS);
|
|
||||||
|
|
||||||
$temperature eq -9999 and die 'Cannot find temperature';
|
|
||||||
|
|
||||||
if ($temperature < 45) {
|
|
||||||
$label = '';
|
|
||||||
} elsif ($temperature < 55) {
|
|
||||||
$label = '';
|
|
||||||
} elsif ($temperature < 65) {
|
|
||||||
$label = '';
|
|
||||||
} elsif ($temperature < 75) {
|
|
||||||
$label = '';
|
|
||||||
} else {
|
|
||||||
$label = '';
|
|
||||||
}
|
|
||||||
# Print short_text, full_text
|
|
||||||
print "${label}";
|
|
||||||
print " $temperature°C\n";
|
|
||||||
print "${label}";
|
|
||||||
print " $temperature°C\n";
|
|
||||||
|
|
||||||
# Print color, if needed
|
|
||||||
if ($temperature >= $t_crit) {
|
|
||||||
print "#FF0000\n";
|
|
||||||
exit 33;
|
|
||||||
} elsif ($temperature >= $t_warn) {
|
|
||||||
print "#FFFC00\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
exit 0;
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
|
|
||||||
# Copyright (C) 2014 Alexander Keller <github@nycroth.com>
|
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
# original source: https://github.com/vivien/i3blocks-contrib/tree/master/volume
|
|
||||||
# check the readme: https://github.com/vivien/i3blocks-contrib/blob/master/volume/README.md
|
|
||||||
#------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# The second parameter overrides the mixer selection
|
|
||||||
# For PulseAudio users, eventually use "pulse"
|
|
||||||
# For Jack/Jack2 users, use "jackplug"
|
|
||||||
# For ALSA users, you may use "default" for your primary card
|
|
||||||
# or you may use hw:# where # is the number of the card desired
|
|
||||||
if [[ -z "$MIXER" ]] ; then
|
|
||||||
MIXER="default"
|
|
||||||
if command -v pulseaudio >/dev/null 2>&1 && pulseaudio --check ; then
|
|
||||||
# pulseaudio is running, but not all installations use "pulse"
|
|
||||||
if amixer -D pulse info >/dev/null 2>&1 ; then
|
|
||||||
MIXER="pulse"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
[ -n "$(lsmod | grep jack)" ] && MIXER="jackplug"
|
|
||||||
MIXER="${2:-$MIXER}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# The instance option sets the control to report and configure
|
|
||||||
# This defaults to the first control of your selected mixer
|
|
||||||
# For a list of the available, use `amixer -D $Your_Mixer scontrols`
|
|
||||||
if [[ -z "$SCONTROL" ]] ; then
|
|
||||||
SCONTROL="${BLOCK_INSTANCE:-$(amixer -D $MIXER scontrols |
|
|
||||||
sed -n "s/Simple mixer control '\([^']*\)',0/\1/p" |
|
|
||||||
head -n1
|
|
||||||
)}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# The first parameter sets the step to change the volume by (and units to display)
|
|
||||||
# This may be in in % or dB (eg. 5% or 3dB)
|
|
||||||
if [[ -z "$STEP" ]] ; then
|
|
||||||
STEP="${1:-5%}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# AMIXER(1):
|
|
||||||
# "Use the mapped volume for evaluating the percentage representation like alsamixer, to be
|
|
||||||
# more natural for human ear."
|
|
||||||
NATURAL_MAPPING=${NATURAL_MAPPING:-0}
|
|
||||||
if [[ "$NATURAL_MAPPING" != "0" ]] ; then
|
|
||||||
AMIXER_PARAMS="-M"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
|
||||||
|
|
||||||
capability() { # Return "Capture" if the device is a capture device
|
|
||||||
amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL |
|
|
||||||
sed -n "s/ Capabilities:.*cvolume.*/Capture/p"
|
|
||||||
}
|
|
||||||
|
|
||||||
volume() {
|
|
||||||
amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL $(capability)
|
|
||||||
}
|
|
||||||
|
|
||||||
format() {
|
|
||||||
|
|
||||||
perl_filter='if (/.*\[(\d+%)\] (\[(-?\d+.\d+dB)\] )?\[(on|off)\]/)'
|
|
||||||
perl_filter+='{CORE::say $4 eq "off" ? "MUTE" : "'
|
|
||||||
# If dB was selected, print that instead
|
|
||||||
perl_filter+=$([[ $STEP = *dB ]] && echo '$3' || echo '$1')
|
|
||||||
perl_filter+='"; exit}'
|
|
||||||
output=$(perl -ne "$perl_filter")
|
|
||||||
echo "$LABEL$output"
|
|
||||||
}
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
3) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) toggle ;; # right click, mute/unmute
|
|
||||||
4) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) ${STEP}+ unmute ;; # scroll up, increase
|
|
||||||
5) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) ${STEP}- unmute ;; # scroll down, decrease
|
|
||||||
esac
|
|
||||||
|
|
||||||
volume | format
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
# Copyright (C) 2021 Andreas Lindlbauer
|
|
||||||
# Licensed under the terms of EUPLv1.2.
|
|
||||||
#
|
|
||||||
# i3blocks blocklet script to monitor the (nord)vpn connection
|
|
||||||
|
|
||||||
vpnstatus="📢"
|
|
||||||
nordvpn_output=$(nordvpn status | cat -v | head -1 | sed -e 's/\^M-^M ^M//g' )
|
|
||||||
if [ "${nordvpn_output}" = "Status: Connected" ]; then
|
|
||||||
vpnstatus="🥸"
|
|
||||||
elif [ "${nordvpn_output}" = "A new version of NordVPN is available! Please update the application." ]; then
|
|
||||||
nordvpn_output=$(nordvpn status | cat -v | head -2 | tail -1 | sed -e 's/\^M-^M ^M//g' )
|
|
||||||
if [ "${nordvpn_output}" = "Status: Connected" ]; then
|
|
||||||
vpnstatus="🥴"
|
|
||||||
elif [ "${nordvpn_output}" = "Status: Disconnected" ]; then
|
|
||||||
vpnstatus="📢"
|
|
||||||
fi
|
|
||||||
elif [ "${nordvpn_output}" = "Status: Disconnected" ]; then
|
|
||||||
vpnstatus="📢"
|
|
||||||
elif [[ "$nordvpn_output" == *\/* ]] || [[ "$nordvpn_output" == *\\* ]]; then
|
|
||||||
vpnstatus="Something's very wrong"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$vpnstatus"
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Home Manager's Linux Submodules
|
||||||
|
|
||||||
|
1. `base`: The base module that is suitable for any NixOS environment.
|
||||||
|
2. `desktop`: Configuration for desktop environments, such as Hyprland, I3, etc.
|
||||||
|
3. `fcitx5`: fcitx5's configuration(Chinese input method).
|
||||||
|
4. `hyprland`: Hyprland's configuration.
|
||||||
|
5. `i3`: i3's configuration.
|
||||||
|
6. `server.nix`: Configuration which is suitable for both servers and desktops. It import only `base` as its submodule.
|
||||||
|
1. used by all my nixos servers.
|
||||||
|
6. `desktop-hyprland.nix`: the entrypoint of hyprland's configuration, it import all the submodules above, except `i3`.
|
||||||
|
1. used by my hyprland desktop.
|
||||||
|
7. `desktop-i3.nix`: the entrypoint of i3's configuration, it import all the submodules above, except `hyprland`.
|
||||||
|
1. used by my i3 desktop.
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{ catppuccin-btop, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# https://github.com/catppuccin/btop/blob/main/themes/catppuccin_mocha.theme
|
||||||
|
home.file.".config/btop/themes".source = "${catppuccin-btop}/themes";
|
||||||
|
|
||||||
|
# replacement of htop/nmon
|
||||||
|
programs.btop = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
color_theme = "catppuccin_mocha";
|
||||||
|
theme_background = false; # make btop transparent
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./btop.nix
|
||||||
|
./shell.nix
|
||||||
|
./system-tools.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,27 +1,23 @@
|
|||||||
{config, ...}: let
|
{config, nushell-scripts, ...}: let
|
||||||
d = config.xdg.dataHome;
|
d = config.xdg.dataHome;
|
||||||
c = config.xdg.configHome;
|
c = config.xdg.configHome;
|
||||||
cache = config.xdg.cacheHome;
|
cache = config.xdg.cacheHome;
|
||||||
in {
|
in rec {
|
||||||
imports = [
|
|
||||||
./nushell
|
|
||||||
./common.nix
|
|
||||||
./starship.nix
|
|
||||||
./terminals.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# add environment variables
|
# add environment variables
|
||||||
home.sessionVariables = {
|
systemd.user.sessionVariables = {
|
||||||
# clean up ~
|
# clean up ~
|
||||||
LESSHISTFILE = cache + "/less/history";
|
LESSHISTFILE = cache + "/less/history";
|
||||||
LESSKEY = c + "/less/lesskey";
|
LESSKEY = c + "/less/lesskey";
|
||||||
WINEPREFIX = d + "/wine";
|
WINEPREFIX = d + "/wine";
|
||||||
XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority";
|
|
||||||
|
# set this variable make i3 failed to start
|
||||||
|
# related issue:
|
||||||
|
# https://github.com/sddm/sddm/issues/871
|
||||||
|
# XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority";
|
||||||
|
|
||||||
# set default applications
|
# set default applications
|
||||||
EDITOR = "vim";
|
|
||||||
BROWSER = "firefox";
|
BROWSER = "firefox";
|
||||||
TERMINAL = "alacritty";
|
TERM = "xterm-256color";
|
||||||
|
|
||||||
# enable scrolling in git diff
|
# enable scrolling in git diff
|
||||||
DELTA_PAGER = "less -R";
|
DELTA_PAGER = "less -R";
|
||||||
@@ -29,7 +25,5 @@ in {
|
|||||||
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
|
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.shellAliases = {
|
home.sessionVariables = systemd.user.sessionVariables;
|
||||||
k = "kubectl";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
# Linux Only Packages, not available on Darwin
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
nmon
|
||||||
|
iotop
|
||||||
|
iftop
|
||||||
|
|
||||||
|
# misc
|
||||||
|
libnotify
|
||||||
|
wireguard-tools # manage wireguard vpn manually, via wg-quick
|
||||||
|
|
||||||
|
# need to run `conda-install` before using it
|
||||||
|
# need to run `conda-shell` before using command `conda`
|
||||||
|
# conda is not available for MacOS
|
||||||
|
conda
|
||||||
|
|
||||||
|
# system call monitoring
|
||||||
|
strace # system call monitoring
|
||||||
|
ltrace # library call monitoring
|
||||||
|
lsof # list open files
|
||||||
|
|
||||||
|
# system tools
|
||||||
|
sysstat
|
||||||
|
lm_sensors # for `sensors` command
|
||||||
|
ethtool
|
||||||
|
pciutils # lspci
|
||||||
|
usbutils # lsusb
|
||||||
|
hdparm # for disk performance, command
|
||||||
|
dmidecode # a tool that reads information about your system's hardware from the BIOS according to the SMBIOS/DMI standard
|
||||||
|
];
|
||||||
|
|
||||||
|
# auto mount usb drives
|
||||||
|
services = {
|
||||||
|
udiskie.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
# syncthing.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
{ username, ... }: {
|
||||||
|
imports = [
|
||||||
|
../base/desktop
|
||||||
|
|
||||||
|
./base
|
||||||
|
./fcitx5
|
||||||
|
./desktop
|
||||||
|
|
||||||
|
./hyprland
|
||||||
|
];
|
||||||
|
|
||||||
|
# Home Manager needs a bit of information about you and the
|
||||||
|
# paths it should manage.
|
||||||
|
home = {
|
||||||
|
username = username;
|
||||||
|
homeDirectory = "/home/${username}";
|
||||||
|
|
||||||
|
# This value determines the Home Manager release that your
|
||||||
|
# configuration is compatible with. This helps avoid breakage
|
||||||
|
# when a new Home Manager release introduces backwards
|
||||||
|
# incompatible changes.
|
||||||
|
#
|
||||||
|
# You can update Home Manager without changing this value. See
|
||||||
|
# the Home Manager release notes for a list of state version
|
||||||
|
# changes in each release.
|
||||||
|
stateVersion = "22.11";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Let Home Manager install and manage itself.
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
}
|
||||||
@@ -1,20 +1,19 @@
|
|||||||
{ config, pkgs, ... }:
|
{ username, ... }: {
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
../base/desktop
|
||||||
|
|
||||||
|
./base
|
||||||
./fcitx5
|
./fcitx5
|
||||||
|
./desktop
|
||||||
|
|
||||||
./i3
|
./i3
|
||||||
./programs
|
|
||||||
./rofi
|
|
||||||
./shell
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Home Manager needs a bit of information about you and the
|
# Home Manager needs a bit of information about you and the
|
||||||
# paths it should manage.
|
# paths it should manage.
|
||||||
home = {
|
home = {
|
||||||
username = "ryan";
|
username = username;
|
||||||
homeDirectory = "/home/ryan";
|
homeDirectory = "/home/${username}";
|
||||||
|
|
||||||
# This value determines the Home Manager release that your
|
# This value determines the Home Manager release that your
|
||||||
# configuration is compatible with. This helps avoid breakage
|
# configuration is compatible with. This helps avoid breakage
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# creative
|
||||||
|
# blender # 3d modeling
|
||||||
|
# gimp # image editing, I prefer using figma in browser instead of this one
|
||||||
|
inkscape # vector graphics
|
||||||
|
krita # digital painting
|
||||||
|
musescore # music notation
|
||||||
|
reaper # audio production
|
||||||
|
|
||||||
|
# this app consumes a lot of storage, so do not install it currently
|
||||||
|
# kicad # 3d printing, eletrical engineering
|
||||||
|
];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
# live streaming
|
||||||
|
obs-studio.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./creative.nix
|
||||||
|
./immutable-file.nix
|
||||||
|
./media.nix
|
||||||
|
./ssh.nix
|
||||||
|
./wallpaper.nix
|
||||||
|
./xdg.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# GUI apps
|
||||||
|
insomnia # REST client
|
||||||
|
wireshark # network analyzer
|
||||||
|
|
||||||
|
# e-book viewer(.epub/.mobi/...)
|
||||||
|
# do not support .pdf
|
||||||
|
foliate
|
||||||
|
|
||||||
|
# instant messaging
|
||||||
|
telegram-desktop
|
||||||
|
discord
|
||||||
|
qq # https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/networking/instant-messengers/qq
|
||||||
|
|
||||||
|
# remote desktop(rdp connect)
|
||||||
|
remmina
|
||||||
|
freerdp # required by remmina
|
||||||
|
|
||||||
|
# misc
|
||||||
|
flameshot
|
||||||
|
];
|
||||||
|
|
||||||
|
# GitHub CLI tool
|
||||||
|
programs.gh = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
##############################################################################################
|
||||||
|
#
|
||||||
|
# Provide a option `home.immutable-file`, it works like `home.file` but make the generated file immutable.
|
||||||
|
#
|
||||||
|
# Copy from https://github.com/iosmanthus/nixos-config/blob/349917b/modules/immutable-file.nix
|
||||||
|
#
|
||||||
|
# this module use the `chattr +i` to make the file immutable, `i` indicates `immutable`,
|
||||||
|
# it's a i-node flags only works on Linux.
|
||||||
|
#
|
||||||
|
# TODO not used yet, need to test it.
|
||||||
|
#
|
||||||
|
##############################################################################################
|
||||||
|
with lib; let
|
||||||
|
cfg = config.home.immutable-file;
|
||||||
|
immutableFileOpts = {...}: {
|
||||||
|
options = {
|
||||||
|
src = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
};
|
||||||
|
dst = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
mkImmutableFile = pkgs.writeScript "make_immutable_file" ''
|
||||||
|
# $1: dst
|
||||||
|
# $2: src
|
||||||
|
if [ ! -d "$(dirname $1)" ]; then
|
||||||
|
mkdir -p $1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f $1 ]; then
|
||||||
|
sudo chattr -i $1
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo cp $2 $1
|
||||||
|
sudo chattr +i $1
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
options.home.immutable-file = mkOption {
|
||||||
|
type = with types; attrsOf (submodule immutableFileOpts);
|
||||||
|
default = {};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf (cfg != {}) {
|
||||||
|
home.activation =
|
||||||
|
mapAttrs'
|
||||||
|
(name: {
|
||||||
|
src,
|
||||||
|
dst,
|
||||||
|
}:
|
||||||
|
nameValuePair
|
||||||
|
"make-immutable-${name}"
|
||||||
|
(lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||||
|
${mkImmutableFile} ${dst} ${src}
|
||||||
|
''))
|
||||||
|
cfg;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,30 +1,38 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
catppuccin-cava,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
# media - control and enjoy audio/video
|
# media - control and enjoy audio/video
|
||||||
{
|
{
|
||||||
# imports = [
|
|
||||||
# ];
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# audio control
|
# audio control
|
||||||
pavucontrol
|
pavucontrol
|
||||||
playerctl
|
playerctl
|
||||||
pulsemixer
|
pulsemixer
|
||||||
# images
|
imv # simple image viewer
|
||||||
imv
|
|
||||||
|
nvtop
|
||||||
|
|
||||||
|
# video/audio tools
|
||||||
|
cava # for visualizing audio
|
||||||
|
libva-utils
|
||||||
|
vdpauinfo
|
||||||
|
vulkan-tools
|
||||||
|
glxinfo
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# https://github.com/catppuccin/cava
|
||||||
|
home.file.".config/cava/config".text = ''
|
||||||
|
# custom cava config
|
||||||
|
'' + builtins.readFile "${catppuccin-cava}/mocha.cava";
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
mpv = {
|
mpv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultProfiles = ["gpu-hq"];
|
defaultProfiles = ["gpu-hq"];
|
||||||
scripts = [pkgs.mpvScripts.mpris];
|
scripts = [pkgs.mpvScripts.mpris];
|
||||||
};
|
};
|
||||||
|
|
||||||
obs-studio.enable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
programs.ssh = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# all my ssh private key are generated by `ssh-keygen -t ed25519 -C "ryan@nickname"`
|
||||||
|
# the config's format:
|
||||||
|
# Host — given the pattern used to match against the host name given on the command line.
|
||||||
|
# HostName — specify nickname or abbreviation for host
|
||||||
|
# IdentityFile — the location of your SSH key authentication file for the account.
|
||||||
|
# format in details:
|
||||||
|
# https://www.ssh.com/academy/ssh/config
|
||||||
|
extraConfig = ''
|
||||||
|
# a private key that is used during authentication will be added to ssh-agent if it is running
|
||||||
|
AddKeysToAgent yes
|
||||||
|
|
||||||
|
Host 192.168.*
|
||||||
|
# allow to securely use local SSH agent to authenticate on the remote machine.
|
||||||
|
# It has the same effect as adding cli option `ssh -A user@host`
|
||||||
|
ForwardAgent yes
|
||||||
|
# romantic holds my homelab~
|
||||||
|
IdentityFile ~/.ssh/romantic
|
||||||
|
# Specifies that ssh should only use the identity file explicitly configured above
|
||||||
|
# required to prevent sending default identity files first.
|
||||||
|
IdentitiesOnly yes
|
||||||
|
|
||||||
|
Host github.com
|
||||||
|
# github is controlled by gluttony~
|
||||||
|
IdentityFile ~/.ssh/gluttony
|
||||||
|
# Specifies that ssh should only use the identity file explicitly configured above
|
||||||
|
# required to prevent sending default identity files first.
|
||||||
|
IdentitiesOnly yes
|
||||||
|
|
||||||
|
Host gtr5
|
||||||
|
HostName 192.168.5.172
|
||||||
|
Port 22
|
||||||
|
|
||||||
|
Host um560
|
||||||
|
HostName 192.168.5.173
|
||||||
|
Port 22
|
||||||
|
|
||||||
|
Host s500plus
|
||||||
|
HostName 192.168.5.174
|
||||||
|
Port 22
|
||||||
|
'';
|
||||||
|
|
||||||
|
# use ssh-agent so we only need to input passphrase once
|
||||||
|
# run `ssh-add /path/to/key` for every identity file
|
||||||
|
# check imported keys by `ssh-add -l`
|
||||||
|
# TODO `ssh-add` can only add keys temporary, use gnome-keyring to unlock all keys after login.
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{ wallpapers, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# https://github.com/ryan4yin/wallpapers
|
||||||
|
home.file.".config/wallpapers".source = wallpapers;
|
||||||
|
home.file.".local/bin/wallpaper_random" = {
|
||||||
|
source = "${wallpapers}/wallpaper_random.py";
|
||||||
|
executable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
# XDG stands for "Cross-Desktop Group", with X used to mean "cross".
|
||||||
|
# It's a bunch of specifications from freedesktop.org intended to standardize desktops and
|
||||||
|
# other GUI applications on various systems (primarily Unix-like) to be interoperable:
|
||||||
|
# https://www.freedesktop.org/wiki/Specifications/
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
xdg-utils # provides cli tools such as `xdg-mime` `xdg-open`
|
||||||
|
xdg-user-dirs
|
||||||
|
];
|
||||||
|
|
||||||
|
xdg = {
|
||||||
|
enable = true;
|
||||||
|
cacheHome = config.home.homeDirectory + "/.local/cache";
|
||||||
|
|
||||||
|
# manage $XDG_CONFIG_HOME/mimeapps.list
|
||||||
|
# xdg search all desktop entries from $XDG_DATA_DIRS, check it by command:
|
||||||
|
# echo $XDG_DATA_DIRS
|
||||||
|
# the system-level desktop entries can be list by command:
|
||||||
|
# ls -l /run/current-system/sw/share/applications/
|
||||||
|
# the user-level desktop entries can be list by command(user ryan):
|
||||||
|
# ls /etc/profiles/per-user/ryan/share/applications/
|
||||||
|
mimeApps = {
|
||||||
|
enable = true;
|
||||||
|
defaultApplications = let
|
||||||
|
browser = ["firefox.desktop"];
|
||||||
|
in {
|
||||||
|
"application/json" = browser;
|
||||||
|
"application/pdf" = browser; # TODO: pdf viewer
|
||||||
|
|
||||||
|
"text/html" = browser;
|
||||||
|
"text/xml" = browser;
|
||||||
|
"application/xml" = browser;
|
||||||
|
"application/xhtml+xml" = browser;
|
||||||
|
"application/xhtml_xml" = browser;
|
||||||
|
"application/rdf+xml" = browser;
|
||||||
|
"application/rss+xml" = browser;
|
||||||
|
"application/x-extension-htm" = browser;
|
||||||
|
"application/x-extension-html" = browser;
|
||||||
|
"application/x-extension-shtml" = browser;
|
||||||
|
"application/x-extension-xht" = browser;
|
||||||
|
"application/x-extension-xhtml" = browser;
|
||||||
|
|
||||||
|
"x-scheme-handler/about" = browser;
|
||||||
|
"x-scheme-handler/ftp" = browser;
|
||||||
|
"x-scheme-handler/http" = browser;
|
||||||
|
"x-scheme-handler/https" = browser;
|
||||||
|
"x-scheme-handler/unknown" = browser;
|
||||||
|
|
||||||
|
"x-scheme-handler/discord" = ["discord.desktop"];
|
||||||
|
"x-scheme-handler/tg" = ["telegramdesktop.desktop"];
|
||||||
|
|
||||||
|
"audio/*" = ["mpv.desktop"];
|
||||||
|
"video/*" = ["mpv.dekstop"];
|
||||||
|
"image/*" = ["imv.desktop"];
|
||||||
|
"image/gif" = ["imv.desktop"];
|
||||||
|
"image/jpeg" = ["imv.desktop"];
|
||||||
|
"image/png" = ["imv.desktop"];
|
||||||
|
"image/webp" = ["imv.desktop"];
|
||||||
|
};
|
||||||
|
|
||||||
|
associations.removed =
|
||||||
|
{
|
||||||
|
# ......
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
userDirs = {
|
||||||
|
enable = true;
|
||||||
|
createDirectories = true;
|
||||||
|
extraConfig = {
|
||||||
|
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# Vertical Candidate List
|
||||||
|
Vertical Candidate List=False
|
||||||
|
# Use Per Screen DPI
|
||||||
|
PerScreenDPI=True
|
||||||
|
# Use mouse wheel to go to prev or next page
|
||||||
|
WheelForPaging=True
|
||||||
|
# Font
|
||||||
|
Font="Sans 10"
|
||||||
|
# Menu Font
|
||||||
|
MenuFont="Sans 10"
|
||||||
|
# Tray Font
|
||||||
|
TrayFont="Sans Bold 10"
|
||||||
|
# Tray Label Outline Color
|
||||||
|
TrayOutlineColor=#000000
|
||||||
|
# Tray Label Text Color
|
||||||
|
TrayTextColor=#ffffff
|
||||||
|
# Prefer Text Icon
|
||||||
|
PreferTextIcon=False
|
||||||
|
# Show Layout Name In Icon
|
||||||
|
ShowLayoutNameInIcon=True
|
||||||
|
# Use input method language to display text
|
||||||
|
UseInputMethodLangaugeToDisplayText=True
|
||||||
|
# Theme macchiato, frappe, latte, mocha
|
||||||
|
Theme=catppuccin-mocha
|
||||||
|
# Force font DPI on Wayland
|
||||||
|
ForceWaylandDPI=0
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
catppuccin-fcitx5,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
home.file.".config/fcitx5/profile".source = ./profile;
|
||||||
|
|
||||||
|
# color schema
|
||||||
|
home.file.".local/share/fcitx5/themes".source = "${catppuccin-fcitx5}/src";
|
||||||
|
home.file.".config/fcitx5/conf/classicui.conf".source = ./classicui.conf;
|
||||||
|
|
||||||
|
# every time fcitx5 switch input method, it will modify ~/.config/fcitx5/profile file,
|
||||||
|
# which will override my config managed by home-manager
|
||||||
|
# so we need to remove it before everytime we rebuild the config
|
||||||
|
home.activation.removeExistingFcitx5Profile = lib.hm.dag.entryBefore ["checkLinkTargets"] ''
|
||||||
|
rm -f "${config.xdg.configHome}/fcitx5/profile"
|
||||||
|
'';
|
||||||
|
|
||||||
|
i18n.inputMethod = {
|
||||||
|
enabled = "fcitx5";
|
||||||
|
fcitx5.addons = with pkgs; [
|
||||||
|
# for flypy chinese input method
|
||||||
|
fcitx5-rime
|
||||||
|
# needed enable rime using configtool after installed
|
||||||
|
fcitx5-configtool
|
||||||
|
fcitx5-chinese-addons
|
||||||
|
# fcitx5-mozc # japanese input method
|
||||||
|
fcitx5-gtk # gtk im module
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.sessionVariables = {
|
||||||
|
# copy from https://github.com/nix-community/home-manager/blob/master/modules/i18n/input-method/fcitx5.nix
|
||||||
|
GLFW_IM_MODULE = "fcitx";
|
||||||
|
GTK_IM_MODULE = "fcitx";
|
||||||
|
QT_IM_MODULE = "fcitx";
|
||||||
|
XMODIFIERS = "@im=fcitx";
|
||||||
|
INPUT_METHOD = "fcitx";
|
||||||
|
IMSETTINGS_MODULE = "fcitx";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
[Groups/0]
|
||||||
|
# Group Name
|
||||||
|
Name=Other
|
||||||
|
# Layout
|
||||||
|
Default Layout=us
|
||||||
|
# Default Input Method
|
||||||
|
DefaultIM=rime
|
||||||
|
|
||||||
|
[Groups/0/Items/0]
|
||||||
|
# Name
|
||||||
|
Name=rime
|
||||||
|
# Layout
|
||||||
|
Layout=
|
||||||
|
|
||||||
|
[GroupOrder]
|
||||||
|
0=Other
|
||||||
|
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
{pkgs, catppuccin-hyprland, ...}: {
|
||||||
|
imports = [
|
||||||
|
./wayland-apps.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Only available on home-manager's master branch(2023/7/25)
|
||||||
|
# wayland.windowManager.hyprland = {
|
||||||
|
# enable = true;
|
||||||
|
# };
|
||||||
|
|
||||||
|
# hyprland configs, based on https://github.com/notwidow/hyprland
|
||||||
|
home.file.".config/hypr" = {
|
||||||
|
source = ./hypr-conf;
|
||||||
|
# copy the scripts directory recursively
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
home.file.".config/hypr/themes".source = "${catppuccin-hyprland}/themes";
|
||||||
|
|
||||||
|
# gtk's theme settings, generate files:
|
||||||
|
# 1. ~/.gtkrc-2.0
|
||||||
|
# 2. ~/.config/gtk-3.0/settings.ini
|
||||||
|
# 3. ~/.config/gtk-4.0/settings.ini
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
# https://github.com/catppuccin/gtk
|
||||||
|
name = "Catppuccin-Macchiato-Compact-Pink-dark";
|
||||||
|
package = pkgs.catppuccin-gtk.override {
|
||||||
|
accents = [ "pink" ];
|
||||||
|
size = "compact";
|
||||||
|
tweaks = [ "rimless" "black" ];
|
||||||
|
variant = "macchiato";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# music player - mpd
|
||||||
|
home.file.".config/mpd" = {
|
||||||
|
source = ./mpd;
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# allow fontconfig to discover fonts and configurations installed through home.packages
|
||||||
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
|
systemd.user.sessionVariables = {
|
||||||
|
"NIXOS_OZONE_WL" = "1"; # for any ozone-based browser & electron apps to run on wayland
|
||||||
|
"MOZ_ENABLE_WAYLAND" = "1"; # for firefox to run on wayland
|
||||||
|
"MOZ_WEBRENDER" = "1";
|
||||||
|
|
||||||
|
# for hyprland with nvidia gpu, ref https://wiki.hyprland.org/Nvidia/
|
||||||
|
"LIBVA_DRIVER_NAME" = "nvidia";
|
||||||
|
"XDG_SESSION_TYPE" = "wayland";
|
||||||
|
"GBM_BACKEND" = "nvidia-drm";
|
||||||
|
"__GLX_VENDOR_LIBRARY_NAME" = "nvidia";
|
||||||
|
"WLR_NO_HARDWARE_CURSORS" = "1";
|
||||||
|
"WLR_EGL_NO_MODIFIRES" = "1";
|
||||||
|
};
|
||||||
|
|
||||||
|
# this is for xwayland
|
||||||
|
# set dpi for 4k monitor
|
||||||
|
xresources.properties = {
|
||||||
|
"Xft.dpi" = 162;
|
||||||
|
};
|
||||||
|
|
||||||
|
# set Xcursor.theme & Xcursor.size in ~/.Xresources automatically
|
||||||
|
home.pointerCursor = {
|
||||||
|
name = "Qogir-dark";
|
||||||
|
package = pkgs.qogir-theme;
|
||||||
|
size = 64;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,214 @@
|
|||||||
|
## Hyprland configuration file
|
||||||
|
|
||||||
|
# color-scheme: cappuccin-mocha
|
||||||
|
source=~/.config/hypr/themes/mocha.conf
|
||||||
|
|
||||||
|
#-- Output ----------------------------------------------------
|
||||||
|
# Configure your Display resolution, offset, scale and Monitors here, use `hyprctl monitors` to get the info.
|
||||||
|
|
||||||
|
# format:
|
||||||
|
# monitor=name,resolution,position,scale
|
||||||
|
monitor=DP-2,3840x2160@144,0x0,1.6
|
||||||
|
workspace=DP-2,1
|
||||||
|
|
||||||
|
#-- Input ----------------------------------------------------
|
||||||
|
# Configure mouse and touchpad here.
|
||||||
|
input {
|
||||||
|
kb_layout=us
|
||||||
|
kb_variant=
|
||||||
|
kb_model=
|
||||||
|
kb_options=
|
||||||
|
kb_rules=
|
||||||
|
follow_mouse=1
|
||||||
|
natural_scroll=0
|
||||||
|
force_no_accel=0
|
||||||
|
# repeat_rate=
|
||||||
|
# repeat_delay=
|
||||||
|
numlock_by_default=1
|
||||||
|
}
|
||||||
|
|
||||||
|
#-- General ----------------------------------------------------
|
||||||
|
# General settings like MOD key, Gaps, Colors, etc.
|
||||||
|
general {
|
||||||
|
sensitivity=2.0
|
||||||
|
apply_sens_to_raw=0
|
||||||
|
|
||||||
|
gaps_in=5
|
||||||
|
gaps_out=10
|
||||||
|
|
||||||
|
border_size=4
|
||||||
|
col.active_border=0xFFB4A1DB
|
||||||
|
col.inactive_border=0xFF343A40
|
||||||
|
}
|
||||||
|
|
||||||
|
#-- Decoration ----------------------------------------------------
|
||||||
|
# Decoration settings like Rounded Corners, Opacity, Blur, etc.
|
||||||
|
decoration {
|
||||||
|
rounding=8 # Original: rounding=-1
|
||||||
|
multisample_edges=0
|
||||||
|
|
||||||
|
active_opacity=1.0
|
||||||
|
inactive_opacity=0.9
|
||||||
|
fullscreen_opacity=1.0
|
||||||
|
|
||||||
|
blur=0
|
||||||
|
blur_size=3 # minimum 1
|
||||||
|
blur_passes=1 # minimum 1, more passes = more resource intensive.
|
||||||
|
blur_ignore_opacity=0
|
||||||
|
|
||||||
|
# Your blur "amount" is blur_size * blur_passes, but high blur_size (over around 5-ish) will produce artifacts.
|
||||||
|
# if you want heavy blur, you need to up the blur_passes.
|
||||||
|
# the more passes, the more you can up the blur_size without noticing artifacts.
|
||||||
|
}
|
||||||
|
|
||||||
|
#-- Animations ----------------------------------------------------
|
||||||
|
animations {
|
||||||
|
enabled=1
|
||||||
|
animation=windows,1,8,default,popin 80%
|
||||||
|
animation=fadeOut,1,8,default
|
||||||
|
animation=fadeIn,1,8,default
|
||||||
|
animation=workspaces,1,8,default
|
||||||
|
#animation=workspaces,1,6,overshot
|
||||||
|
}
|
||||||
|
|
||||||
|
#-- Dwindle ----------------------------------------------------
|
||||||
|
dwindle {
|
||||||
|
pseudotile=0 # enable pseudotiling on dwindle
|
||||||
|
}
|
||||||
|
|
||||||
|
#-- Window Rules ----------------------------------------------------
|
||||||
|
windowrule=float,foot-float
|
||||||
|
windowrule=float,yad|nm-connection-editor|pavucontrolk
|
||||||
|
windowrule=float,xfce-polkit|kvantummanager|qt5ct
|
||||||
|
windowrule=float,feh|imv|Gpicview|Gimp|nomacs
|
||||||
|
windowrule=float,VirtualBox Manager|qemu|Qemu-system-x86_64
|
||||||
|
windowrule=float,xfce4-appfinder
|
||||||
|
|
||||||
|
windowrule=float,foot-full
|
||||||
|
windowrule=move 0 0,foot-full
|
||||||
|
windowrule=size 100% 100%,foot-full
|
||||||
|
|
||||||
|
windowrule=float,wlogout
|
||||||
|
windowrule=move 0 0,wlogout
|
||||||
|
windowrule=size 100% 100%,wlogout
|
||||||
|
windowrule=animation slide,wlogout
|
||||||
|
|
||||||
|
#-- Keybindings ----------------------------------------------------
|
||||||
|
$term = kitty
|
||||||
|
$app_launcher = ~/.config/hypr/scripts/menu
|
||||||
|
$volume = ~/.config/hypr/scripts/volume
|
||||||
|
$backlight = ~/.config/hypr/scripts/brightness
|
||||||
|
$screenshot = ~/.config/hypr/scripts/screenshot
|
||||||
|
$lockscreen = ~/.config/hypr/scripts/lockscreen
|
||||||
|
$wlogout = ~/.config/hypr/scripts/wlogout
|
||||||
|
$colorpicker = ~/.config/hypr/scripts/colorpicker
|
||||||
|
$files = thunar
|
||||||
|
$editor = code # vscode
|
||||||
|
$browser = firefox
|
||||||
|
|
||||||
|
# -- Terminal --
|
||||||
|
bind=SUPER,Return,exec,$term
|
||||||
|
|
||||||
|
# -- Wofi --
|
||||||
|
bind=SUPER,D,exec,$app_launcher
|
||||||
|
|
||||||
|
# -- Hyprland --
|
||||||
|
bind=SUPER,Q,killactive,
|
||||||
|
bind=CTRLALT,Delete,exit,
|
||||||
|
bind=SUPER,F,fullscreen,
|
||||||
|
bind=SUPER,Space,togglefloating,
|
||||||
|
bind=SUPER,S,pseudo,
|
||||||
|
|
||||||
|
# -- Misc --
|
||||||
|
bind=SUPER,N,exec,nm-connection-editor # need install network-manager-applet
|
||||||
|
bind=SUPER,P,exec,$colorpicker
|
||||||
|
bind=CTRLALT,L,exec,$lockscreen
|
||||||
|
bind=SUPERSHIFT,X,exec,$wlogout
|
||||||
|
|
||||||
|
# -- Some nice mouse binds --
|
||||||
|
bindm=SUPER,mouse:272,movewindow
|
||||||
|
bindm=SUPER,mouse:273,resizewindow
|
||||||
|
|
||||||
|
# -- Function keys --
|
||||||
|
bind=,XF86MonBrightnessUp,exec,$backlight --inc
|
||||||
|
bind=,XF86MonBrightnessDown,exec,$backlight --dec
|
||||||
|
bind=,XF86AudioRaiseVolume,exec,$volume --inc
|
||||||
|
bind=,XF86AudioLowerVolume,exec,$volume --dec
|
||||||
|
bind=,XF86AudioMute,exec,$volume --toggle
|
||||||
|
bind=,XF86AudioMicMute,exec,$volume --toggle-mic
|
||||||
|
bind=,XF86AudioNext,exec,mpc next
|
||||||
|
bind=,XF86AudioPrev,exec,mpc prev
|
||||||
|
bind=,XF86AudioPlay,exec,mpc toggle
|
||||||
|
bind=,XF86AudioStop,exec,mpc stop
|
||||||
|
|
||||||
|
# -- Screenshots --
|
||||||
|
bind=,Print,exec,$screenshot --now
|
||||||
|
bind=SUPER,Print,exec,$screenshot --win
|
||||||
|
bind=CTRL,Print,exec,$screenshot --area
|
||||||
|
|
||||||
|
# Focus
|
||||||
|
bind=SUPER,left,movefocus,l
|
||||||
|
bind=SUPER,right,movefocus,r
|
||||||
|
bind=SUPER,up,movefocus,u
|
||||||
|
bind=SUPER,down,movefocus,d
|
||||||
|
|
||||||
|
# Move
|
||||||
|
bind=SUPERSHIFT,left,movewindow,l
|
||||||
|
bind=SUPERSHIFT,right,movewindow,r
|
||||||
|
bind=SUPERSHIFT,up,movewindow,u
|
||||||
|
bind=SUPERSHIFT,down,movewindow,d
|
||||||
|
|
||||||
|
# Resize
|
||||||
|
bind=SUPERCTRL,left,resizeactive,-20 0
|
||||||
|
bind=SUPERCTRL,right,resizeactive,20 0
|
||||||
|
bind=SUPERCTRL,up,resizeactive,0 -20
|
||||||
|
bind=SUPERCTRL,down,resizeactive,0 20
|
||||||
|
|
||||||
|
# Workspaces
|
||||||
|
bind=SUPER,1,workspace,1
|
||||||
|
bind=SUPER,2,workspace,2
|
||||||
|
bind=SUPER,3,workspace,3
|
||||||
|
bind=SUPER,4,workspace,4
|
||||||
|
bind=SUPER,5,workspace,5
|
||||||
|
bind=SUPER,6,workspace,6
|
||||||
|
bind=SUPER,7,workspace,7
|
||||||
|
bind=SUPER,8,workspace,8
|
||||||
|
bind=SUPER,9,workspace,9
|
||||||
|
bind=SUPER,0,workspace,10
|
||||||
|
|
||||||
|
# Send to Workspaces
|
||||||
|
bind=SUPERSHIFT,1,movetoworkspace,1
|
||||||
|
bind=SUPERSHIFT,2,movetoworkspace,2
|
||||||
|
bind=SUPERSHIFT,3,movetoworkspace,3
|
||||||
|
bind=SUPERSHIFT,4,movetoworkspace,4
|
||||||
|
bind=SUPERSHIFT,5,movetoworkspace,5
|
||||||
|
bind=SUPERSHIFT,6,movetoworkspace,6
|
||||||
|
bind=SUPERSHIFT,7,movetoworkspace,7
|
||||||
|
bind=SUPERSHIFT,8,movetoworkspace,8
|
||||||
|
bind=SUPERSHIFT,9,movetoworkspace,9
|
||||||
|
bind=SUPERSHIFT,0,movetoworkspace,10
|
||||||
|
|
||||||
|
bind=SUPER,mouse_down,workspace,e+1
|
||||||
|
bind=SUPER,mouse_up,workspace,e-1
|
||||||
|
|
||||||
|
#-- Startup ----------------------------------------------------
|
||||||
|
exec-once=~/.config/hypr/scripts/startup
|
||||||
|
|
||||||
|
|
||||||
|
#-- Fcitx5 input method ----------------------------------------------------
|
||||||
|
windowrule=pseudo,fcitx # enable this will make fcitx5 works, but fcitx5-configtool will not work!
|
||||||
|
exec-once=cp ~/.config/fcitx5/profile-bak ~/.config/fcitx5/profile # restore fcitx5 profile manged by nixos
|
||||||
|
exec-once=fcitx5 -d --replace # start fcitx5 daemon
|
||||||
|
bind=ALT,E,exec,pkill fcitx5 -9;sleep 1;fcitx5 -d --replace; sleep 1;fcitx5-remote -r
|
||||||
|
|
||||||
|
|
||||||
|
# -- Fix input method in vscode
|
||||||
|
exec-once = hyprctl setcursor "Bibata-Modern-Ice" 24
|
||||||
|
# 效果是 wayland 原生窗口缩放完全正常
|
||||||
|
# xwayland 窗口先渲染到 200% 再降到 hyprland config 里 monitor 设置的值,看上去和原生没啥区别
|
||||||
|
# 相比较一开始的方案输入法字体大小也正确了.唯一有点问题的可能是 xwayland 窗口下的鼠标指针大小不对
|
||||||
|
exec-once = xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2
|
||||||
|
exec-once = xrdb -merge ~/.Xresources
|
||||||
|
# env = GDK_SCALE,2
|
||||||
|
env = XCURSOR_SIZE,48
|
||||||
|
env = XCURSOR_THEME,"Bibata-Modern-Ice"
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
## Mako configuration file
|
||||||
|
|
||||||
|
# GLOBAL CONFIGURATION OPTIONS
|
||||||
|
max-history=100
|
||||||
|
sort=-time
|
||||||
|
|
||||||
|
# BINDING OPTIONS
|
||||||
|
on-button-left=dismiss
|
||||||
|
on-button-middle=none
|
||||||
|
on-button-right=dismiss-all
|
||||||
|
on-touch=dismiss
|
||||||
|
on-notify=exec mpv /usr/share/sounds/freedesktop/stereo/message.oga
|
||||||
|
|
||||||
|
# STYLE OPTIONS
|
||||||
|
font=JetBrains Mono 10
|
||||||
|
width=300
|
||||||
|
height=100
|
||||||
|
margin=10
|
||||||
|
padding=15
|
||||||
|
border-size=2
|
||||||
|
border-radius=0
|
||||||
|
icons=1
|
||||||
|
max-icon-size=48
|
||||||
|
icon-location=left
|
||||||
|
markup=1
|
||||||
|
actions=1
|
||||||
|
history=1
|
||||||
|
text-alignment=left
|
||||||
|
default-timeout=5000
|
||||||
|
ignore-timeout=0
|
||||||
|
max-visible=5
|
||||||
|
layer=overlay
|
||||||
|
anchor=top-right
|
||||||
|
|
||||||
|
background-color=#1e1e2e
|
||||||
|
text-color=#d9e0ee
|
||||||
|
border-color=#313244
|
||||||
|
progress-color=over #89b4fa
|
||||||
|
|
||||||
|
[urgency=low]
|
||||||
|
border-color=#313244
|
||||||
|
default-timeout=2000
|
||||||
|
|
||||||
|
[urgency=normal]
|
||||||
|
border-color=#313244
|
||||||
|
default-timeout=5000
|
||||||
|
|
||||||
|
[urgency=high]
|
||||||
|
border-color=#f38ba8
|
||||||
|
text-color=#f38ba8
|
||||||
|
default-timeout=0
|
||||||
|
|
||||||
|
[category=mpd]
|
||||||
|
border-color=#f9e2af
|
||||||
|
default-timeout=2000
|
||||||
|
group-by=category
|
||||||
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 27 KiB |