mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-02 11:12:09 +02:00
Compare commits
228 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a056244dd8 | ||
|
|
d7e1dd20d9 | ||
|
|
f1a7ba0f77 | ||
|
|
0540ee700d | ||
|
|
24d77739b9 | ||
|
|
6d4a886acb | ||
|
|
af0c00d1d0 | ||
|
|
23c3d86c73 | ||
|
|
64d63b8f52 | ||
|
|
6b43b76880 | ||
|
|
31e03a7fb8 | ||
|
|
c6d4c3f14b | ||
|
|
9f3521a716 | ||
|
|
767d687674 | ||
|
|
13312a62a1 | ||
|
|
a12fe9a81a | ||
|
|
c5e85ae57d | ||
|
|
0d8bfd7749 | ||
|
|
d8993672c1 | ||
|
|
fedd6a72ea | ||
|
|
36bd8b84e1 | ||
|
|
c43ae9578b | ||
|
|
911845949e | ||
|
|
76c47913ea | ||
|
|
fe1f7245b0 | ||
|
|
ceadb80791 | ||
|
|
cc27decf7a | ||
|
|
cbd2d465e9 | ||
|
|
de2a311f84 | ||
|
|
afedf85534 | ||
|
|
5af43b4194 | ||
|
|
10e01b3270 | ||
|
|
7c6aaf80c3 | ||
|
|
0fcc535f53 | ||
|
|
6fe18fb699 | ||
|
|
5ee6829136 | ||
|
|
01c55c2428 | ||
|
|
a21e14e5e6 | ||
|
|
b4ecbdb587 | ||
|
|
299f017b06 | ||
|
|
3e1c32ff6c | ||
|
|
7a72b4229d | ||
|
|
5a9dc62173 | ||
|
|
d146aa6af1 | ||
|
|
068f8722f0 | ||
|
|
f2cf006a02 | ||
|
|
c268e920c4 | ||
|
|
e9eed8212a | ||
|
|
8753ac2d0b | ||
|
|
13578f0f2f | ||
|
|
b8ceb39db9 | ||
|
|
b22bd95f9f | ||
|
|
b25ce91ca0 | ||
|
|
dac3b34e64 | ||
|
|
ae9427b508 | ||
|
|
cd3715664f | ||
|
|
8136b19187 | ||
|
|
a90a77a29d | ||
|
|
1006680dea | ||
|
|
d0ad3c6e6e | ||
|
|
2e6e17f224 | ||
|
|
61830ffe71 | ||
|
|
1cb855c181 | ||
|
|
c1eee689fd | ||
|
|
d6c080930d | ||
|
|
67b70c3e5c | ||
|
|
07f7654c69 | ||
|
|
2f5e5683e9 | ||
|
|
1f2a665ef0 | ||
|
|
58e16598b1 | ||
|
|
16896d0b37 | ||
|
|
3f2a7346c5 | ||
|
|
3e1255349b | ||
|
|
7f3757e530 | ||
|
|
d39656ad66 | ||
|
|
3d25e1799b | ||
|
|
c937ee3afc | ||
|
|
43b8be4931 | ||
|
|
31879f6186 | ||
|
|
0c34239fab | ||
|
|
104c816612 | ||
|
|
60d177ba39 | ||
|
|
b6cad25714 | ||
|
|
542f811107 | ||
|
|
4b80d21c00 | ||
|
|
ab80268f61 | ||
|
|
30cd88a6b0 | ||
|
|
28d59ed58e | ||
|
|
eb81d94717 | ||
|
|
f1c4eff2d6 | ||
|
|
d044e3dd2e | ||
|
|
6851655e0a | ||
|
|
c7e6aba945 | ||
|
|
669249bdaa | ||
|
|
31488b2534 | ||
|
|
638e37a4b4 | ||
|
|
422e3ffaf5 | ||
|
|
8e26c50b92 | ||
|
|
0ff65b95b5 | ||
|
|
0f6d9c16b5 | ||
|
|
a26a80596a | ||
|
|
1a1b5e9d07 | ||
|
|
ad194bb96d | ||
|
|
f8b20c8f20 | ||
|
|
6971afb3af | ||
|
|
50c3a83d84 | ||
|
|
33810fc79e | ||
|
|
cd8cbe7d65 | ||
|
|
e1bec5a053 | ||
|
|
1a53b35a1f | ||
|
|
968c7a922e | ||
|
|
aac1a100d8 | ||
|
|
38c9906ada | ||
|
|
14744197ac | ||
|
|
f374f6de9b | ||
|
|
e7ccac616d | ||
|
|
f76aee3783 | ||
|
|
4dd98a5554 | ||
|
|
c70507cebd | ||
|
|
dbc55aaa6f | ||
|
|
62a1a19d9d | ||
|
|
1ad395000d | ||
|
|
e54127637e | ||
|
|
2fc1d31961 | ||
|
|
9e53d48c68 | ||
|
|
0b1f3996cf | ||
|
|
b2688973f1 | ||
|
|
75fcb1c2be | ||
|
|
c587c47b79 | ||
|
|
d63ce02e5e | ||
|
|
2e371da2e5 | ||
|
|
c52a7766c2 | ||
|
|
d9337db684 | ||
|
|
e5f2161604 | ||
|
|
9151dc75d8 | ||
|
|
3ce26e6b88 | ||
|
|
84026e498e | ||
|
|
29ff0aa3dd | ||
|
|
fa76704fb5 | ||
|
|
5c59bfa474 | ||
|
|
b5a5efde90 | ||
|
|
7c1f56d6a3 | ||
|
|
b20bf2fbce | ||
|
|
dbcddb6115 | ||
|
|
56ef64700f | ||
|
|
458fe29a91 | ||
|
|
8785a2bd04 | ||
|
|
16c9d54a30 | ||
|
|
e26b4d0285 | ||
|
|
95d3326857 | ||
|
|
c5175cdaeb | ||
|
|
bb084f66e9 | ||
|
|
0960892340 | ||
|
|
34ef6d39f9 | ||
|
|
444340c880 | ||
|
|
acbc487772 | ||
|
|
305c11dc6d | ||
|
|
8a7a76297a | ||
|
|
f9c5e63136 | ||
|
|
1b70d8c5cf | ||
|
|
9f5a1ca09e | ||
|
|
1612dca680 | ||
|
|
f78389127a | ||
|
|
52c2187734 | ||
|
|
d1fadd9059 | ||
|
|
2ccd7409ca | ||
|
|
9e35e81a69 | ||
|
|
8a596d9d86 | ||
|
|
d8e807633c | ||
|
|
81ca5204bb | ||
|
|
ca54d98acf | ||
|
|
62b2ff0090 | ||
|
|
ee976873ce | ||
|
|
411b951332 | ||
|
|
71ec7d1390 | ||
|
|
3571c9da85 | ||
|
|
dee8dcddf8 | ||
|
|
85fa2c5f11 | ||
|
|
d3881d19af | ||
|
|
d16d6906b8 | ||
|
|
449ad7997e | ||
|
|
4d80db7ccb | ||
|
|
b314c9648f | ||
|
|
77ff7edce5 | ||
|
|
5ee186ca15 | ||
|
|
92c34e0c28 | ||
|
|
a38304d73b | ||
|
|
5fd0da5327 | ||
|
|
9ae7a67a40 | ||
|
|
48cb6d9065 | ||
|
|
62bc08a436 | ||
|
|
e0e933132b | ||
|
|
eba2fc481e | ||
|
|
15fa1daa8f | ||
|
|
de6a1f4529 | ||
|
|
04e34161b1 | ||
|
|
575e2d246b | ||
|
|
88ee45885b | ||
|
|
b48a197157 | ||
|
|
59c2ee28e1 | ||
|
|
4c32612a43 | ||
|
|
72e2184e0b | ||
|
|
a221b2d5c1 | ||
|
|
de60ad7c84 | ||
|
|
30293a616b | ||
|
|
16c76c92b3 | ||
|
|
d22a30be53 | ||
|
|
92e165396d | ||
|
|
b0899442ab | ||
|
|
991b456713 | ||
|
|
53dc030c22 | ||
|
|
afd27f2a92 | ||
|
|
6a5c430830 | ||
|
|
f04821fffe | ||
|
|
eeeaf1a7c4 | ||
|
|
2c42201b15 | ||
|
|
e3e7714f4c | ||
|
|
28ff9b7e6a | ||
|
|
c92d1ac1ad | ||
|
|
3d214c7c2d | ||
|
|
bfd689beab | ||
|
|
8879e0c222 | ||
|
|
794932ee3b | ||
|
|
d5e56f4092 | ||
|
|
ad0cc491f8 | ||
|
|
a90dfeac07 | ||
|
|
61ae19567a | ||
|
|
2ffa0a3abf |
15
.github/FUNDING.yml
vendored
Normal file
15
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||||
|
patreon: # Replace with a single Patreon username
|
||||||
|
open_collective: # Replace with a single Open Collective username
|
||||||
|
ko_fi: anotherhadi
|
||||||
|
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||||
|
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||||
|
liberapay: # Replace with a single Liberapay username
|
||||||
|
issuehunt: # Replace with a single IssueHunt username
|
||||||
|
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||||
|
polar: # Replace with a single Polar username
|
||||||
|
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
||||||
|
thanks_dev: # Replace with a single thanks.dev username
|
||||||
|
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||||
61
.github/assets/README_template.md
vendored
61
.github/assets/README_template.md
vendored
@@ -23,18 +23,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
**Nixy** is a **Hyprland** NixOS configuration with **home-manager**, **secrets**, and **custom theming** all in one place.
|
**Nixy simplifies and unifies** the Hyprland ecosystem with a modular, easily customizable setup. It provides a structured way to manage your system configuration and dotfiles with minimal effort.
|
||||||
It's a simple way to manage your system configuration and dotfiles.
|
It includes *home-manager*, *secrets*, and *custom theming* all in one place.
|
||||||
|
|
||||||
I'm Hadi, a french developer, student in infosec, enthusiastic about nix, golang & blockchains.
|
**Features:**
|
||||||
This is my own, **keyboard-centric**, and **minimalistic** NixOS configuration.
|
|
||||||
I enable vim-like keybindings everywhere I can, and I use a lot of custom scripts to make my life easier.
|
|
||||||
|
|
||||||
**Nixy key points:**
|
- 💻 Hyprland-centric: Preconfigured Hyprland ecosystem (Hyprlock, Hyprpanel, etc.)
|
||||||
|
- 🎨 Consistent Theming: Base16 & Stylix-powered themes
|
||||||
- Hypr-ecosystem first (hyprland, hyprlock, hyprpanel, hypridle, ...)
|
- ⌨️ Vim-like Everywhere: Unified keybindings (Hyprland, nvim, vimium, etc.)
|
||||||
- Stylix/base16 themes
|
|
||||||
- Vim-like keybindings everywhere (hyprland, qutebrowser, nvim, ...)
|
|
||||||
|
|
||||||
## Table of Content
|
## Table of Content
|
||||||
|
|
||||||
@@ -49,9 +45,9 @@ I enable vim-like keybindings everywhere I can, and I use a lot of custom script
|
|||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
### 🏠 home
|
### 🏠 /home (User-level configuration)
|
||||||
|
|
||||||
Those are the dotfiles and configuration files for user-level configuration
|
Contains **dotfiles and settings** that apply to your user environment.
|
||||||
|
|
||||||
**Subfolders:**
|
**Subfolders:**
|
||||||
|
|
||||||
@@ -59,35 +55,44 @@ Those are the dotfiles and configuration files for user-level configuration
|
|||||||
- `scripts` is a folder full of bash scripts (see [SCRIPTS.md](docs/SCRIPTS.md))
|
- `scripts` is a folder full of bash scripts (see [SCRIPTS.md](docs/SCRIPTS.md))
|
||||||
- `system` is some "desktop environment" configuration
|
- `system` is some "desktop environment" configuration
|
||||||
|
|
||||||
### 🐧 nixos
|
### 🐧 /nixos
|
||||||
|
|
||||||
Those are the system-level configurations. (audio, bluetooth, gpu, bootloader, ...)
|
Those are the system-level configurations. (audio, bluetooth, gpu, bootloader, ...)
|
||||||
|
|
||||||
### 🎨 themes
|
### 🎨 /themes
|
||||||
|
|
||||||
Those are the themes used in the system configuration. The `stylix` folder contains the [stylix](https://github.com/danth/stylix) defined themes, the `var` folder contains the variables not handled by stylix.
|
This folder contains all system themes. Mainly [stylix](https://stylix.danth.me/) configurations.
|
||||||
See avaiable themes in [THEMES.md](docs/THEMES.md)
|
Check out the available themes and learn how to create your own in [THEMES.md](docs/THEMES.md)
|
||||||
|
|
||||||
### 💻 hosts
|
### 💻 /hosts
|
||||||
|
|
||||||
Those are the host-specific configurations.
|
This directory contains host-specific configurations.
|
||||||
Each host contains a `configuration.nix` for system-level configuration, a `home.nix` for user-level configuration, and a `variables.nix` for config wide variables.
|
Each host includes:
|
||||||
|
|
||||||
|
- `configuration.nix` for system-wide settings
|
||||||
|
- `home.nix` for user-level configuration
|
||||||
|
- `variables.nix` for global variables
|
||||||
|
- `secrets/` for sensitive data
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Clone the repo
|
1. [Fork](https://github.com/anotherhadi/nixy/fork) this repo and clone it to your system:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://github.com/anotherhadi/nixy ~/.config/nixos
|
git clone https://github.com/anotherhadi/nixy ~/.config/nixos
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Copy the `hosts/laptop` folder, rename it to your system name, and change the variables inside the `variables.nix` file
|
2. Copy the `hosts/laptop` folder, rename it to match your system’s hostname, and update `variables.nix` with your machine’s settings.
|
||||||
3. Add your `hardware-configuration.nix` to your new host's folder
|
3. Copy your `hardware-configuration.nix` into your new host's folder to ensure proper hardware support.
|
||||||
4. Add your 'nixosConfigurations' inside `flake.nix`
|
4. Register your new host in `flake.nix` by adding it under nixosConfigurations.
|
||||||
|
|
||||||
> [!Important]
|
> [!Important]
|
||||||
> I added few `# CHANGEME` comments in the files to help you find what to change. Be sure to check them up.
|
> `# CHANGEME` comments are placed throughout the config to indicate necessary modifications.
|
||||||
> You can use `rg "CHANGEME"` to find them all with ripgrep.
|
> Use the following command to quickly locate them:
|
||||||
|
>
|
||||||
|
> ```sh
|
||||||
|
> rg "CHANGEME" ~/.config/nixos
|
||||||
|
> ```
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> When you add new files, don't forget to run `git add .` to add them to the git repository
|
> When you add new files, don't forget to run `git add .` to add them to the git repository
|
||||||
@@ -100,11 +105,11 @@ sudo nixos-rebuild switch --flake ~/.config/nixos#yourhostname
|
|||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
|
- [SERVER](docs/SERVER.md): Check out the server documentation
|
||||||
- [THEMES](docs/THEMES.md): How themes work and how to create your own
|
- [THEMES](docs/THEMES.md): How themes work and how to create your own
|
||||||
- [SCRIPTS](docs/SCRIPTS.md): Scripts that are available
|
- [SCRIPTS](docs/SCRIPTS.md): A list of available scripts and their usage
|
||||||
- [KEYBINDINGS-HYPRLAND](docs/KEYBINDINGS-HYPRLAND.md): Keybindings available in Hyprland
|
- [KEYBINDINGS-HYPRLAND](docs/KEYBINDINGS-HYPRLAND.md): Keybindings available in Hyprland
|
||||||
- [WALLPAPERS](https://github.com/anotherhadi/nixy-wallpapers): A collection of wallpapers for Nixy.
|
- [WALLPAPERS](https://github.com/anotherhadi/awesome-wallpapers): An awesome collection of wallpapers
|
||||||
|
|
||||||
- [TODO](docs/TODO.md): What's next (feel free to contribute)
|
|
||||||
- [CONTRIBUTING](docs/CONTRIBUTING.md): How to contribute
|
- [CONTRIBUTING](docs/CONTRIBUTING.md): How to contribute
|
||||||
- [LICENSE](LICENSE): MIT License
|
- [LICENSE](LICENSE): MIT License
|
||||||
|
|||||||
BIN
.github/assets/server_dashboard.png
vendored
Normal file
BIN
.github/assets/server_dashboard.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 160 KiB |
@@ -20,5 +20,5 @@ jobs:
|
|||||||
git config user.name github-actions
|
git config user.name github-actions
|
||||||
git config user.email github-actions@github.com
|
git config user.email github-actions@github.com
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Update KEYBINDINGS-HYPRLAND.md (auto)"
|
git commit -m "Update KEYBINDINGS-HYPRLAND.md (auto)" && git push
|
||||||
git push
|
exit 0
|
||||||
|
|||||||
4
.github/workflows/update-readme.yml
vendored
4
.github/workflows/update-readme.yml
vendored
@@ -27,5 +27,5 @@ jobs:
|
|||||||
git config user.name github-actions
|
git config user.name github-actions
|
||||||
git config user.email github-actions@github.com
|
git config user.email github-actions@github.com
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Update README.md (auto)"
|
git commit -m "Update README.md (auto)" && git push
|
||||||
git push
|
exit 0
|
||||||
|
|||||||
4
.github/workflows/update-scripts-docs.yml
vendored
4
.github/workflows/update-scripts-docs.yml
vendored
@@ -20,5 +20,5 @@ jobs:
|
|||||||
git config user.name github-actions
|
git config user.name github-actions
|
||||||
git config user.email github-actions@github.com
|
git config user.email github-actions@github.com
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Update SCRIPTS.md (auto)"
|
git commit -m "Update SCRIPTS.md (auto)" && git push
|
||||||
git push
|
exit 0
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1 @@
|
|||||||
todolist.md
|
|
||||||
.sops.yaml
|
.sops.yaml
|
||||||
|
|||||||
69
README.md
69
README.md
@@ -24,28 +24,24 @@
|
|||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
**Nixy** is a **Hyprland** NixOS configuration with **home-manager**, **secrets**, and **custom theming** all in one place.
|
**Nixy simplifies and unifies** the Hyprland ecosystem with a modular, easily customizable setup. It provides a structured way to manage your system configuration and dotfiles with minimal effort.
|
||||||
It's a simple way to manage your system configuration and dotfiles.
|
It includes *home-manager*, *secrets*, and *custom theming* all in one place.
|
||||||
|
|
||||||
I'm Hadi, a french developer, student in infosec, enthusiastic about nix, golang & blockchains.
|
**Features:**
|
||||||
This is my own, **keyboard-centric**, and **minimalistic** NixOS configuration.
|
|
||||||
I enable vim-like keybindings everywhere I can, and I use a lot of custom scripts to make my life easier.
|
|
||||||
|
|
||||||
**Nixy key points:**
|
- 💻 Hyprland-centric: Preconfigured Hyprland ecosystem (Hyprlock, Hyprpanel, etc.)
|
||||||
|
- 🎨 Consistent Theming: Base16 & Stylix-powered themes
|
||||||
- Hypr-ecosystem first (hyprland, hyprlock, hyprpanel, hypridle, ...)
|
- ⌨️ Vim-like Everywhere: Unified keybindings (Hyprland, nvim, vimium, etc.)
|
||||||
- Stylix/base16 themes
|
|
||||||
- Vim-like keybindings everywhere (hyprland, qutebrowser, nvim, ...)
|
|
||||||
|
|
||||||
## Table of Content
|
## Table of Content
|
||||||
|
|
||||||
- [Table of Content](#table-of-content)
|
- [Table of Content](#table-of-content)
|
||||||
- [Gallery](#gallery)
|
- [Gallery](#gallery)
|
||||||
- [Architecture](#architecture)
|
- [Architecture](#architecture)
|
||||||
- [🏠 home](#-home)
|
- [🏠 /home (User-level configuration)](#-home-user-level-configuration)
|
||||||
- [🐧 nixos](#-nixos)
|
- [🐧 /nixos](#-nixos)
|
||||||
- [🎨 themes](#-themes)
|
- [🎨 /themes](#-themes)
|
||||||
- [💻 hosts](#-hosts)
|
- [💻 /hosts](#-hosts)
|
||||||
- [Installation](#installation)
|
- [Installation](#installation)
|
||||||
- [Documentation](#documentation)
|
- [Documentation](#documentation)
|
||||||
|
|
||||||
@@ -58,9 +54,9 @@ I enable vim-like keybindings everywhere I can, and I use a lot of custom script
|
|||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
### 🏠 home
|
### 🏠 /home (User-level configuration)
|
||||||
|
|
||||||
Those are the dotfiles and configuration files for user-level configuration
|
Contains **dotfiles and settings** that apply to your user environment.
|
||||||
|
|
||||||
**Subfolders:**
|
**Subfolders:**
|
||||||
|
|
||||||
@@ -68,35 +64,44 @@ Those are the dotfiles and configuration files for user-level configuration
|
|||||||
- `scripts` is a folder full of bash scripts (see [SCRIPTS.md](docs/SCRIPTS.md))
|
- `scripts` is a folder full of bash scripts (see [SCRIPTS.md](docs/SCRIPTS.md))
|
||||||
- `system` is some "desktop environment" configuration
|
- `system` is some "desktop environment" configuration
|
||||||
|
|
||||||
### 🐧 nixos
|
### 🐧 /nixos
|
||||||
|
|
||||||
Those are the system-level configurations. (audio, bluetooth, gpu, bootloader, ...)
|
Those are the system-level configurations. (audio, bluetooth, gpu, bootloader, ...)
|
||||||
|
|
||||||
### 🎨 themes
|
### 🎨 /themes
|
||||||
|
|
||||||
Those are the themes used in the system configuration. The `stylix` folder contains the [stylix](https://github.com/danth/stylix) defined themes, the `var` folder contains the variables not handled by stylix.
|
This folder contains all system themes. Mainly [stylix](https://stylix.danth.me/) configurations.
|
||||||
See avaiable themes in [THEMES.md](docs/THEMES.md)
|
Check out the available themes and learn how to create your own in [THEMES.md](docs/THEMES.md)
|
||||||
|
|
||||||
### 💻 hosts
|
### 💻 /hosts
|
||||||
|
|
||||||
Those are the host-specific configurations.
|
This directory contains host-specific configurations.
|
||||||
Each host contains a `configuration.nix` for system-level configuration, a `home.nix` for user-level configuration, and a `variables.nix` for config wide variables.
|
Each host includes:
|
||||||
|
|
||||||
|
- `configuration.nix` for system-wide settings
|
||||||
|
- `home.nix` for user-level configuration
|
||||||
|
- `variables.nix` for global variables
|
||||||
|
- `secrets/` for sensitive data
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Clone the repo
|
1. [Fork](https://github.com/anotherhadi/nixy/fork) this repo and clone it to your system:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://github.com/anotherhadi/nixy ~/.config/nixos
|
git clone https://github.com/anotherhadi/nixy ~/.config/nixos
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Copy the `hosts/laptop` folder, rename it to your system name, and change the variables inside the `variables.nix` file
|
2. Copy the `hosts/laptop` folder, rename it to match your system’s hostname, and update `variables.nix` with your machine’s settings.
|
||||||
3. Add your `hardware-configuration.nix` to your new host's folder
|
3. Copy your `hardware-configuration.nix` into your new host's folder to ensure proper hardware support.
|
||||||
4. Add your 'nixosConfigurations' inside `flake.nix`
|
4. Register your new host in `flake.nix` by adding it under nixosConfigurations.
|
||||||
|
|
||||||
> [!Important]
|
> [!Important]
|
||||||
> I added few `# CHANGEME` comments in the files to help you find what to change. Be sure to check them up.
|
> `# CHANGEME` comments are placed throughout the config to indicate necessary modifications.
|
||||||
> You can use `rg "CHANGEME"` to find them all with ripgrep.
|
> Use the following command to quickly locate them:
|
||||||
|
>
|
||||||
|
> ```sh
|
||||||
|
> rg "CHANGEME" ~/.config/nixos
|
||||||
|
> ```
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> When you add new files, don't forget to run `git add .` to add them to the git repository
|
> When you add new files, don't forget to run `git add .` to add them to the git repository
|
||||||
@@ -109,11 +114,11 @@ sudo nixos-rebuild switch --flake ~/.config/nixos#yourhostname
|
|||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
|
- [SERVER](docs/SERVER.md): Check out the server documentation
|
||||||
- [THEMES](docs/THEMES.md): How themes work and how to create your own
|
- [THEMES](docs/THEMES.md): How themes work and how to create your own
|
||||||
- [SCRIPTS](docs/SCRIPTS.md): Scripts that are available
|
- [SCRIPTS](docs/SCRIPTS.md): A list of available scripts and their usage
|
||||||
- [KEYBINDINGS-HYPRLAND](docs/KEYBINDINGS-HYPRLAND.md): Keybindings available in Hyprland
|
- [KEYBINDINGS-HYPRLAND](docs/KEYBINDINGS-HYPRLAND.md): Keybindings available in Hyprland
|
||||||
- [WALLPAPERS](https://github.com/anotherhadi/nixy-wallpapers): A collection of wallpapers for Nixy.
|
- [WALLPAPERS](https://github.com/anotherhadi/awesome-wallpapers): An awesome collection of wallpapers
|
||||||
|
|
||||||
- [TODO](docs/TODO.md): What's next (feel free to contribute)
|
|
||||||
- [CONTRIBUTING](docs/CONTRIBUTING.md): How to contribute
|
- [CONTRIBUTING](docs/CONTRIBUTING.md): How to contribute
|
||||||
- [LICENSE](LICENSE): MIT License
|
- [LICENSE](LICENSE): MIT License
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
# Contributing to Nixy
|
# Contributing to Nixy
|
||||||
|
|
||||||
Everybody is invited and welcome to contribute to Nixy. There is a lot to do... Check the [TODO.md](./TODO.md) file!
|
Everybody is invited and welcome to contribute to Nixy. There is a lot to do... Check the issues!
|
||||||
|
|
||||||
The process is straight-forward.
|
The process is straight-forward.
|
||||||
|
|
||||||
- Read [How to get faster PR reviews](https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#best-practices-for-faster-reviews) by Kubernetes (but skip step 0 and 1)
|
- Read [How to get faster PR reviews](https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#best-practices-for-faster-reviews) by Kubernetes (but skip step 0 and 1)
|
||||||
- Fork Nixy [git repository](https://github.com/anotherhadi/nixy).
|
- Fork Nixy [git repository](https://github.com/anotherhadi/nixy).
|
||||||
- Write your changes (new theme, bug fixes, task in to-do, ...).
|
- Write your changes (new theme, bug fixes, issues fix, ...).
|
||||||
- Create a Pull Request against the main branch of Nixy.
|
- Create a Pull Request against the main branch of Nixy.
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> To update the README, change the `./docs/src/README_template.md` and run `./docs/scripts/create_readme.sh`
|
> To update the README, change the `./.github/assets/README_template.md`
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Don't push your host's folder
|
> Don't push your host's folder
|
||||||
|
|||||||
@@ -10,14 +10,14 @@
|
|||||||
| Move app to Workspace | SHIFT + SUPER + {Number} |
|
| Move app to Workspace | SHIFT + SUPER + {Number} |
|
||||||
| Kitty | SUPER + RETURN |
|
| Kitty | SUPER + RETURN |
|
||||||
| Thunar | SUPER + E |
|
| Thunar | SUPER + E |
|
||||||
| Qutebrowser | SUPER + B |
|
| Zen Browser | SUPER + B |
|
||||||
| Bitwarden | SUPER + K |
|
| Bitwarden | SUPER + K |
|
||||||
| Lock | SUPER + L |
|
| Lock | SUPER + L |
|
||||||
| Powermenu | SUPER + X |
|
| Powermenu | SUPER + X |
|
||||||
| Launcher | SUPER + SPACE |
|
| Launcher | SUPER + SPACE |
|
||||||
| Quickmenu | SUPER + C |
|
| Quickmenu | SUPER + C |
|
||||||
| Toggle HyprFocus | SHIFT + SUPER + SPACE |
|
| Toggle HyprFocus | SHIFT + SUPER + SPACE |
|
||||||
| "$mod,TAB, overview:toggle" | |
|
| Planify | SUPER + P |
|
||||||
| Close window | SUPER + Q |
|
| Close window | SUPER + Q |
|
||||||
| Toggle Floating | SUPER + T |
|
| Toggle Floating | SUPER + T |
|
||||||
| Toggle Fullscreen | SUPER + F |
|
| Toggle Fullscreen | SUPER + F |
|
||||||
@@ -34,7 +34,6 @@
|
|||||||
| Screenshot window | SHIFT + SUPER + PRINT |
|
| Screenshot window | SHIFT + SUPER + PRINT |
|
||||||
| Screenshot region then edit | ALTPRINT |
|
| Screenshot region then edit | ALTPRINT |
|
||||||
| Toggle hyprpanel | SHIFT + SUPER + T |
|
| Toggle hyprpanel | SHIFT + SUPER + T |
|
||||||
| Search on internet with wofi | SHIFT + SUPER + S |
|
|
||||||
| Clipboard picker with wofi | SHIFT + SUPER + C |
|
| Clipboard picker with wofi | SHIFT + SUPER + C |
|
||||||
| Emoji picker with wofi | SHIFT + SUPER + E |
|
| Emoji picker with wofi | SHIFT + SUPER + E |
|
||||||
| Toggle night shift | SUPER + F2 |
|
| Toggle night shift | SUPER + F2 |
|
||||||
|
|||||||
@@ -94,5 +94,6 @@ Usefull quick scripts
|
|||||||
|
|
||||||
- `menu` - Open wofi with drun mode. (wofi)
|
- `menu` - Open wofi with drun mode. (wofi)
|
||||||
- `powermenu` - Open power dropdown menu. (wofi)
|
- `powermenu` - Open power dropdown menu. (wofi)
|
||||||
|
- `quickmenu` - Open a dropdown menu with shortcuts and scripts. (wofi)
|
||||||
- `lock` - Lock the screen. (hyprlock)
|
- `lock` - Lock the screen. (hyprlock)
|
||||||
|
|
||||||
|
|||||||
62
docs/SERVER.md
Normal file
62
docs/SERVER.md
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
# SERVER
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
This document describes the architecture and setup of the self-hosted **NixOS server**, which is securely accessible via **Tailscale**. The server is designed for private, secure, and easily manageable self-hosting of various services.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## **Why This Setup?**
|
||||||
|
|
||||||
|
- **Private & Secure**: Services are only accessible through Tailscale, preventing exposure to the public internet.
|
||||||
|
- **Domain-based Access**: A custom domain (`example.org`) maps to the server's Tailscale IP, making service access simple and consistent.
|
||||||
|
- **Automatic SSL Certificates**: Using DNS-01 challenges, valid SSL certificates are generated even though the services are not publicly exposed.
|
||||||
|
- **Modular & Declarative**: Everything is managed through NixOS modules, ensuring reproducibility and easy configuration.
|
||||||
|
|
||||||
|
## **Self-Hosted Services**
|
||||||
|
|
||||||
|
The server hosts several key applications:
|
||||||
|
|
||||||
|
### **Core Infrastructure**
|
||||||
|
|
||||||
|
- **NGINX**: Reverse proxy for routing traffic to services via `example.org`.
|
||||||
|
- **Bitwarden**: A self-hosted password manager for secure credential storage.
|
||||||
|
- **Nextcloud**: A private cloud solution for file synchronization and collaboration.
|
||||||
|
|
||||||
|
### **Networking & Security**
|
||||||
|
|
||||||
|
- **AdGuard Home**: A self-hosted DNS ad blocker for network-wide ad and tracker filtering.
|
||||||
|
|
||||||
|
### **Monitoring & Storage**
|
||||||
|
|
||||||
|
- **Glance**: An awesome dashboard! (See the screenshot above)
|
||||||
|
- **Hoarder**: A self-hostable bookmark-everything app (links, notes and images)
|
||||||
|
|
||||||
|
### **Media & Content Management**
|
||||||
|
|
||||||
|
- **Arr Stack (Radarr, Sonarr, etc.)**: Automated media management tools for handling movies and TV shows. (legaly ofc)
|
||||||
|
|
||||||
|
## **How It Works**
|
||||||
|
|
||||||
|
1. **Domain Configuration**
|
||||||
|
- `example.org` is pointed to the Tailscale IP of the server. (cloudflare A record, not proxied)
|
||||||
|
- This allows for easy access without exposing services to the internet.
|
||||||
|
|
||||||
|
2. **SSL Certificate Generation**
|
||||||
|
- Certificates are obtained using a **DNS-01 challenge**, verifying domain ownership without requiring public access.
|
||||||
|
|
||||||
|
3. **NGINX Reverse Proxy**
|
||||||
|
- Routes incoming requests from `*.example.org` to the correct internal service.
|
||||||
|
- Ensures SSL termination and secure connections.
|
||||||
|
|
||||||
|
4. **Access Control**
|
||||||
|
- Only devices within the Tailscale network can reach the services.
|
||||||
|
- Firewall rules restrict access further based on necessity.
|
||||||
|
|
||||||
|
## What's Next?
|
||||||
|
|
||||||
|
I want to self-host:
|
||||||
|
|
||||||
|
- **A great todolist app**: One that is compatible with markdown & IOS
|
||||||
|
- **Cyberchef**
|
||||||
|
- **Maybe**: An app to manage finances
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
# Themes
|
# Themes
|
||||||
|
|
||||||
Themes are defined in `themes`. Those themes define the colors, fonts, icons, etc, used by Hyprland and the apps/programs installed.
|
Themes are defined in `themes`. Those themes define the colors, fonts, icons, etc, used by Hyprland and the apps/programs installed.
|
||||||
You can change the selected theme by changing the import statement of your host's configuration.nix file.
|
You can change the selected theme by changing the import statement of your host's variables.nix file.
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> To apply the theme to DuckDuckGo, follow the instructions in `$HOME/.duckduckgo-colorscheme.js`
|
> To apply the theme to DuckDuckGo, follow the instructions in `$HOME/.duckduckgo-colorscheme.js`
|
||||||
|
|||||||
10
docs/TODO.md
10
docs/TODO.md
@@ -1,10 +0,0 @@
|
|||||||
# Todolist
|
|
||||||
|
|
||||||
feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md))
|
|
||||||
|
|
||||||
- [ ] ${config.users.users.${user}.home} instead of "/home/${username}"
|
|
||||||
- [ ] Hyprpanel screenshot
|
|
||||||
- [ ] PIA Vpn (issue in progress)
|
|
||||||
- [ ] Webcord (system24 theme? Tui)
|
|
||||||
- [ ] check gvolpe/nix-config
|
|
||||||
- [ ] <https://github.com/isabelroses/dotfiles/blob/main/home/comfy/system/xdg.nix>
|
|
||||||
1124
flake.lock
generated
1124
flake.lock
generated
File diff suppressed because it is too large
Load Diff
52
flake.nix
52
flake.nix
@@ -1,49 +1,51 @@
|
|||||||
{
|
{
|
||||||
# https://github.com/anotherhadi/nixy
|
# https://github.com/anotherhadi/nixy
|
||||||
description = ''
|
description = ''
|
||||||
Nixy is a NixOS configuration with home-manager, secrets and custom theming all in one place.
|
Nixy simplifies and unifies the Hyprland ecosystem with a modular, easily customizable setup.
|
||||||
It's a simple way to manage your system configuration and dotfiles.
|
It provides a structured way to manage your system configuration and dotfiles with minimal effort.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
|
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
||||||
|
hyprpanel.url = "github:Jas-SinghFSU/HyprPanel";
|
||||||
|
stylix.url = "github:danth/stylix";
|
||||||
|
apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
|
||||||
|
zen-browser.url = "github:0xc000022070/zen-browser-flake";
|
||||||
|
nixcord.url = "github:kaylorben/nixcord";
|
||||||
|
sops-nix.url = "github:Mic92/sops-nix";
|
||||||
|
nixarr.url = "github:rasmus-kirk/nixarr";
|
||||||
|
anyrun.url = "github:fufexan/anyrun/launch-prefix";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nixvim = {
|
nixvim = {
|
||||||
url = "github:nix-community/nixvim";
|
url =
|
||||||
|
"github:nix-community/nixvim/d81f37256d0a8691b837b74979d27bf89be8ecdd";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
spicetify-nix = {
|
spicetify-nix = {
|
||||||
url = "github:Gerg-L/spicetify-nix";
|
url = "github:Gerg-L/spicetify-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
sops-nix = {
|
hyprspace = {
|
||||||
url = "github:Mic92/sops-nix";
|
url = "github:KZDKM/Hyprspace";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.hyprland.follows = "hyprland";
|
||||||
};
|
};
|
||||||
hyprspace = { url = "github:KZDKM/Hyprspace"; };
|
search-nixos-api.url = "github:anotherhadi/search-nixos-api";
|
||||||
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
|
||||||
hyprpolkitagent.url = "github:hyprwm/hyprpolkitagent";
|
|
||||||
hyprpanel.url = "github:Jas-SinghFSU/HyprPanel";
|
|
||||||
stylix.url = "github:danth/stylix";
|
|
||||||
apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
|
|
||||||
nur.url = "github:nix-community/NUR";
|
|
||||||
zen-browser.url =
|
|
||||||
"git+https://git.sr.ht/~canasta/zen-browser-flake/"; # updated flake
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ nixpkgs, ... }: {
|
outputs = inputs@{ nixpkgs, ... }: {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
nixy = # CHANGEME: This should match the 'hostname' in your variables.nix file
|
nixy =
|
||||||
|
# CHANGEME: This should match the 'hostname' in your variables.nix file
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
nixpkgs.overlays =
|
nixpkgs.overlays = [ inputs.hyprpanel.overlay ];
|
||||||
[ inputs.hyprpanel.overlay inputs.nur.overlays.default ];
|
|
||||||
_module.args = { inherit inputs; };
|
_module.args = { inherit inputs; };
|
||||||
}
|
}
|
||||||
inputs.nixos-hardware.nixosModules.omen-16-n0005ne # CHANGEME: check https://github.com/NixOS/nixos-hardware
|
inputs.nixos-hardware.nixosModules.omen-16-n0005ne # CHANGEME: check https://github.com/NixOS/nixos-hardware
|
||||||
@@ -52,7 +54,19 @@
|
|||||||
./hosts/laptop/configuration.nix # CHANGEME: change the path to match your host folder
|
./hosts/laptop/configuration.nix # CHANGEME: change the path to match your host folder
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
# Jack is my server
|
||||||
|
jack = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
{ _module.args = { inherit inputs; }; }
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
inputs.stylix.nixosModules.stylix
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
inputs.nixarr.nixosModules.default
|
||||||
|
inputs.search-nixos-api.nixosModules.search-nixos-api
|
||||||
|
./hosts/server/configuration.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
87
home/programs/anyrun/default.nix
Normal file
87
home/programs/anyrun/default.nix
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
{ pkgs, inputs, ... }: {
|
||||||
|
programs.anyrun = {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
plugins = with inputs.anyrun.packages.${pkgs.system}; [
|
||||||
|
applications
|
||||||
|
shell
|
||||||
|
randr
|
||||||
|
rink
|
||||||
|
symbols
|
||||||
|
translate
|
||||||
|
];
|
||||||
|
|
||||||
|
width.fraction = 0.25;
|
||||||
|
y.fraction = 0.3;
|
||||||
|
hidePluginInfo = true;
|
||||||
|
closeOnClick = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
extraCss = ''
|
||||||
|
* {
|
||||||
|
all: unset;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window,
|
||||||
|
#match,
|
||||||
|
#entry,
|
||||||
|
#plugin,
|
||||||
|
#main {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#match.activatable {
|
||||||
|
border-radius: 8px;
|
||||||
|
margin: 4px 0;
|
||||||
|
padding: 4px;
|
||||||
|
/* transition: 100ms ease-out; */
|
||||||
|
}
|
||||||
|
#match.activatable:first-child {
|
||||||
|
margin-top: 12px;
|
||||||
|
}
|
||||||
|
#match.activatable:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#match:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.05);
|
||||||
|
}
|
||||||
|
#match:selected {
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#entry {
|
||||||
|
background: rgba(255, 255, 255, 0.05);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 4px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
box#main {
|
||||||
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
box-shadow:
|
||||||
|
inset 0 0 0 1px rgba(255, 255, 255, 0.1),
|
||||||
|
0 30px 30px 15px rgba(0, 0, 0, 0.5);
|
||||||
|
border-radius: 20px;
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
extraConfigFiles = {
|
||||||
|
"applications.ron".text = ''
|
||||||
|
Config(
|
||||||
|
desktop_actions: false,
|
||||||
|
max_entries: 5,
|
||||||
|
terminal: Some("foot"),
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
|
||||||
|
"shell.ron".text = ''
|
||||||
|
Config(
|
||||||
|
prefix: ">"
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
9
home/programs/discord/default.nix
Normal file
9
home/programs/discord/default.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Discord is a popular chat application.
|
||||||
|
{ inputs, ... }: {
|
||||||
|
imports = [ inputs.nixcord.homeManagerModules.nixcord ];
|
||||||
|
|
||||||
|
programs.nixcord = {
|
||||||
|
enable = true;
|
||||||
|
config = { frameless = true; };
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# Legacy
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
home.packages = with pkgs; [ neofetch ];
|
home.packages = with pkgs; [ neofetch ];
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# Nerdfetch, a simple system info script written in bash
|
||||||
|
# Source: https://github.com/ThatOneCalculator/NerdFetch
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
nerdfetch = pkgs.writeShellScriptBin "nerdfetch" ''
|
nerdfetch = pkgs.writeShellScriptBin "nerdfetch" ''
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# Git configuration
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
let
|
let
|
||||||
username = config.var.git.username;
|
username = config.var.git.username;
|
||||||
@@ -21,6 +22,7 @@ in {
|
|||||||
];
|
];
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
init.defaultBranch = "main";
|
init.defaultBranch = "main";
|
||||||
|
pull.rebase = "false";
|
||||||
push.autoSetupRemote = true;
|
push.autoSetupRemote = true;
|
||||||
color.ui = "1";
|
color.ui = "1";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# Kitty is a fast, featureful, GPU based terminal emulator
|
||||||
{
|
{
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -20,9 +21,13 @@
|
|||||||
remember_window_size = "no";
|
remember_window_size = "no";
|
||||||
disable_ligatures = "never";
|
disable_ligatures = "never";
|
||||||
url_style = "curly";
|
url_style = "curly";
|
||||||
|
copy_on_select = "clipboard";
|
||||||
cursor_shape = "Underline";
|
cursor_shape = "Underline";
|
||||||
cursor_underline_thickness = 3;
|
cursor_underline_thickness = 3;
|
||||||
|
cursor_trail = 3;
|
||||||
|
cursor_trail_decay = "0.1 0.4";
|
||||||
window_padding_width = 10;
|
window_padding_width = 10;
|
||||||
|
open_url_with = "default";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# Lazygit is a simple terminal UI for git commands.
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
accent = "#${config.lib.stylix.colors.base0D}";
|
accent = "#${config.lib.stylix.colors.base0D}";
|
||||||
|
|||||||
@@ -1,120 +1,11 @@
|
|||||||
{
|
{
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
autoGroups = {
|
autoGroups = {
|
||||||
auto_quit.clear = true;
|
|
||||||
autoview.clear = true;
|
|
||||||
bufferline.clear = true;
|
|
||||||
checktime.clear = true;
|
|
||||||
create_dir.clear = true;
|
|
||||||
editorconfig_filetype.clear = true;
|
|
||||||
file_user_events.clear = true;
|
|
||||||
highlighturl.clear = true;
|
|
||||||
highlightyank.clear = true;
|
highlightyank.clear = true;
|
||||||
large_buf_settings.clear = true;
|
|
||||||
q_close_windows.clear = true;
|
q_close_windows.clear = true;
|
||||||
terminal_settings.clear = true;
|
|
||||||
unlist_quickfix.clear = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
autoCmd = [
|
autoCmd = [
|
||||||
# auto_quit
|
|
||||||
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L18-L46
|
|
||||||
{
|
|
||||||
desc =
|
|
||||||
"Quit neovim if more than one window is open and only sidebar windows are list";
|
|
||||||
event = "BufEnter";
|
|
||||||
group = "auto_quit";
|
|
||||||
|
|
||||||
callback.__raw = ''
|
|
||||||
function()
|
|
||||||
local wins = vim.api.nvim_tabpage_list_wins(0)
|
|
||||||
-- Both neo-tree and aerial will auto-quit if there is only a single window left
|
|
||||||
if #wins <= 1 then return end
|
|
||||||
local sidebar_fts = { aerial = true, ["neo-tree"] = true }
|
|
||||||
for _, winid in ipairs(wins) do
|
|
||||||
if vim.api.nvim_win_is_valid(winid) then
|
|
||||||
local bufnr = vim.api.nvim_win_get_buf(winid)
|
|
||||||
local filetype = vim.bo[bufnr].filetype
|
|
||||||
-- If any visible windows are not sidebars, early return
|
|
||||||
if not sidebar_fts[filetype] then
|
|
||||||
return
|
|
||||||
-- If the visible window is a sidebar
|
|
||||||
else
|
|
||||||
-- only count filetypes once, so remove a found sidebar from the detection
|
|
||||||
sidebar_fts[filetype] = nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if #vim.api.nvim_list_tabpages() > 1 then
|
|
||||||
vim.cmd.tabclose()
|
|
||||||
else
|
|
||||||
vim.cmd.qall()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
||||||
# autoview
|
|
||||||
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L49-L70
|
|
||||||
{
|
|
||||||
desc = "Save view with mkview for real files";
|
|
||||||
event = [ "BufWinLeave" "BufWritePost" "WinLeave" ];
|
|
||||||
group = "autoview";
|
|
||||||
|
|
||||||
callback.__raw = ''
|
|
||||||
function(event)
|
|
||||||
if vim.b[event.buf].view_activated then vim.cmd.mkview { mods = { emsg_silent = true } } end
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
{
|
|
||||||
desc =
|
|
||||||
"Try to load file view if available and enable view saving for real files";
|
|
||||||
event = "BufWinEnter";
|
|
||||||
group = "autoview";
|
|
||||||
|
|
||||||
callback.__raw = ''
|
|
||||||
function(event)
|
|
||||||
if not vim.b[event.buf].view_activated then
|
|
||||||
local filetype = vim.bo[event.buf].filetype
|
|
||||||
local buftype = vim.bo[event.buf].buftype
|
|
||||||
local ignore_filetypes = { "gitcommit", "gitrebase", "svg", "hgcommit" }
|
|
||||||
if buftype == "" and filetype and filetype ~= "" and not vim.tbl_contains(ignore_filetypes, filetype) then
|
|
||||||
vim.b[event.buf].view_activated = true
|
|
||||||
vim.cmd.loadview { mods = { emsg_silent = true } }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
||||||
# checktime
|
|
||||||
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L118-L122
|
|
||||||
{
|
|
||||||
desc = "Check if buffers changed on editor focus";
|
|
||||||
event = [ "FocusGained" "TermClose" "TermLeave" ];
|
|
||||||
group = "checktime";
|
|
||||||
command = "checktime";
|
|
||||||
}
|
|
||||||
|
|
||||||
# editorconfig_filetype
|
|
||||||
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L135-L144
|
|
||||||
{
|
|
||||||
desc =
|
|
||||||
"Configure editorconfig after filetype detection to override `ftplugin`s";
|
|
||||||
event = "FileType";
|
|
||||||
group = "editorconfig_filetype";
|
|
||||||
|
|
||||||
callback.__raw = ''
|
|
||||||
function(args)
|
|
||||||
if vim.F.if_nil(vim.b.editorconfig, vim.g.editorconfig, true) then
|
|
||||||
local editorconfig_avail, editorconfig = pcall(require, "editorconfig")
|
|
||||||
if editorconfig_avail then editorconfig.config(args.buf) end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
||||||
# highlightyank
|
# highlightyank
|
||||||
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L206-L211
|
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L206-L211
|
||||||
{
|
{
|
||||||
@@ -150,38 +41,6 @@
|
|||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
# terminal_settings
|
|
||||||
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L258-L266
|
|
||||||
{
|
|
||||||
desc = "Disable line number/fold column/sign column for terminals";
|
|
||||||
event = "TermOpen";
|
|
||||||
group = "terminal_settings";
|
|
||||||
|
|
||||||
callback.__raw = ''
|
|
||||||
function()
|
|
||||||
vim.opt_local.number = false
|
|
||||||
vim.opt_local.relativenumber = false
|
|
||||||
vim.opt_local.foldcolumn = "0"
|
|
||||||
vim.opt_local.signcolumn = "no"
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
||||||
# unlist_quickfix
|
|
||||||
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L270-L275
|
|
||||||
{
|
|
||||||
desc = "Unlist quickfix buffers";
|
|
||||||
event = "FileType";
|
|
||||||
group = "unlist_quickfix";
|
|
||||||
pattern = "qf";
|
|
||||||
|
|
||||||
callback.__raw = ''
|
|
||||||
function()
|
|
||||||
vim.opt_local.buflisted = false
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,15 +2,16 @@
|
|||||||
{ inputs, ... }: {
|
{ inputs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nixvim.homeManagerModules.nixvim
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
./plugins/lsp.nix
|
|
||||||
./plugins/tree.nix
|
|
||||||
./plugins/telescope.nix
|
|
||||||
./plugins/cmp.nix
|
./plugins/cmp.nix
|
||||||
./plugins/ui.nix
|
./plugins/floaterm.nix
|
||||||
./plugins/lualine.nix
|
./plugins/git.nix
|
||||||
./plugins/utils.nix
|
./plugins/lsp.nix
|
||||||
./plugins/dashboard.nix
|
|
||||||
./plugins/markdown.nix
|
./plugins/markdown.nix
|
||||||
|
./plugins/mini.nix
|
||||||
|
./plugins/picker.nix
|
||||||
|
./plugins/snacks.nix
|
||||||
|
./plugins/trouble.nix
|
||||||
|
./plugins/utils.nix
|
||||||
|
|
||||||
./options.nix
|
./options.nix
|
||||||
./keymaps.nix
|
./keymaps.nix
|
||||||
|
|||||||
@@ -12,31 +12,6 @@
|
|||||||
};
|
};
|
||||||
spec = [
|
spec = [
|
||||||
# General Mappings
|
# General Mappings
|
||||||
{
|
|
||||||
__unkeyed-1 = "<leader>c";
|
|
||||||
mode = [ "n" "v" ];
|
|
||||||
group = "+code";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
__unkeyed-1 = "<leader>d";
|
|
||||||
mode = [ "n" "v" ];
|
|
||||||
group = "+debug";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
__unkeyed-1 = "<leader>s";
|
|
||||||
mode = "n";
|
|
||||||
group = "+search";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
__unkeyed-1 = "<leader>m";
|
|
||||||
mode = "n";
|
|
||||||
group = "+markdown";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
__unkeyed-1 = "<leader>t";
|
|
||||||
mode = "n";
|
|
||||||
group = "+trouble";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
__unkeyed-1 = "<leader>u";
|
__unkeyed-1 = "<leader>u";
|
||||||
mode = "n";
|
mode = "n";
|
||||||
@@ -48,9 +23,9 @@
|
|||||||
group = "+windows";
|
group = "+windows";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
__unkeyed-1 = "<leader>h";
|
__unkeyed-1 = "<leader>c";
|
||||||
mode = "n";
|
mode = "n";
|
||||||
group = "+harpoon";
|
group = "+code";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
win = {
|
win = {
|
||||||
@@ -62,22 +37,6 @@
|
|||||||
|
|
||||||
keymaps = [
|
keymaps = [
|
||||||
# General Mappings
|
# General Mappings
|
||||||
{
|
|
||||||
key = "<leader>e";
|
|
||||||
action = "<cmd>Oil --float<cr>";
|
|
||||||
options.desc = "Oil";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "-";
|
|
||||||
action = "<cmd>Oil<cr>";
|
|
||||||
options.desc = "Oil";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>E";
|
|
||||||
action = "<cmd>Neotree toggle<cr>";
|
|
||||||
options.desc = "Neotree";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
key = "s";
|
key = "s";
|
||||||
action = "<cmd>lua require('flash').jump()<cr>";
|
action = "<cmd>lua require('flash').jump()<cr>";
|
||||||
@@ -88,7 +47,13 @@
|
|||||||
action = "<cmd>lua vim.lsp.buf.hover()<cr>";
|
action = "<cmd>lua vim.lsp.buf.hover()<cr>";
|
||||||
options.desc = "LSP Hover";
|
options.desc = "LSP Hover";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
key = "<C-tab>";
|
||||||
|
action = "<cmd>bnext<cr>";
|
||||||
|
options.desc = "Next Buffer";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Tmux
|
||||||
{
|
{
|
||||||
key = "<C-h>";
|
key = "<C-h>";
|
||||||
action = "<cmd>TmuxNavigateLeft<cr>";
|
action = "<cmd>TmuxNavigateLeft<cr>";
|
||||||
@@ -106,12 +71,29 @@
|
|||||||
action = "<cmd>TmuxNavigateRight<cr>";
|
action = "<cmd>TmuxNavigateRight<cr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
# UI
|
# Disable Arrow Keys in Normal Mode
|
||||||
{
|
{
|
||||||
key = "<leader>uz";
|
key = "<Up>";
|
||||||
action = "<cmd>ZenMode<cr>";
|
action = "<Nop>";
|
||||||
options.desc = "Toggle ZenMode";
|
options.desc = "Disable Up Arrow";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
key = "<Down>";
|
||||||
|
action = "<Nop>";
|
||||||
|
options.desc = "Disable Down Arrow";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<Left>";
|
||||||
|
action = "<Nop>";
|
||||||
|
options.desc = "Disable Left Arrow";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<Right>";
|
||||||
|
action = "<Nop>";
|
||||||
|
options.desc = "Disable Right Arrow";
|
||||||
|
}
|
||||||
|
|
||||||
|
# UI
|
||||||
{
|
{
|
||||||
key = "<leader>uw";
|
key = "<leader>uw";
|
||||||
action = "<cmd>set wrap!<cr>";
|
action = "<cmd>set wrap!<cr>";
|
||||||
@@ -125,7 +107,7 @@
|
|||||||
{
|
{
|
||||||
key = "<leader>us";
|
key = "<leader>us";
|
||||||
action = "<cmd>set spell!<cr>";
|
action = "<cmd>set spell!<cr>";
|
||||||
options.desc = "Toggle spellcheck";
|
options.desc = "Toggle spellLazyGitcheck";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
key = "<leader>uc";
|
key = "<leader>uc";
|
||||||
@@ -153,95 +135,6 @@
|
|||||||
options.desc = "Hide tabline";
|
options.desc = "Hide tabline";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Search
|
|
||||||
{
|
|
||||||
key = "<leader> ";
|
|
||||||
action = "<cmd>lua require('telescope.builtin').find_files()<cr>";
|
|
||||||
options.desc = "Telescope";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>sg";
|
|
||||||
action = "<cmd>lua require('telescope.builtin').live_grep()<cr>";
|
|
||||||
options.desc = "Livegrep";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>sf";
|
|
||||||
action = "<cmd>lua require('telescope.builtin').find_files()<cr>";
|
|
||||||
options.desc = "Find Files";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>sb";
|
|
||||||
action = "<cmd>lua require('telescope.builtin').buffers()<cr>";
|
|
||||||
options.desc = "Buffers";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>sh";
|
|
||||||
action = "<cmd>lua require('telescope.builtin').help_tags()<cr>";
|
|
||||||
options.desc = "Help Tags";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>sc";
|
|
||||||
action = "<cmd>lua require('telescope.builtin').commands()<cr>";
|
|
||||||
options.desc = "Commands";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>sm";
|
|
||||||
action = "<cmd>lua require('telescope.builtin').marks()<cr>";
|
|
||||||
options.desc = "Marks";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>so";
|
|
||||||
action = "<cmd>lua require('telescope.builtin').oldfiles()<cr>";
|
|
||||||
options.desc = "Oldfiles";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>ss";
|
|
||||||
action = "<cmd>lua require('telescope.builtin').spell_suggest()<cr>";
|
|
||||||
options.desc = "Spell Suggest";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>sr";
|
|
||||||
action = "<cmd>:noh<return><esc>";
|
|
||||||
options.desc = "Reset search";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>st";
|
|
||||||
action = "<cmd>TodoTelescope<cr>";
|
|
||||||
options.desc = "Todos";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Trouble
|
|
||||||
{
|
|
||||||
key = "<leader>tx";
|
|
||||||
action = "<cmd>Trouble diagnostics toggle<cr>";
|
|
||||||
options.desc = "Diagnostics (Trouble)";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>tX";
|
|
||||||
action = "<cmd>Trouble diagnostics toggle filter.buf=0<cr>";
|
|
||||||
options.desc = "Buffer Diagnostics (Trouble)";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>ts";
|
|
||||||
action = "<cmd>Trouble symbols toggle focus=false<cr>";
|
|
||||||
options.desc = "Symbols (Trouble)";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>tl";
|
|
||||||
action = "<cmd>Trouble lsp toggle focus=false win.position=right<cr>";
|
|
||||||
options.desc = "LSP Definitions / references / ... (Trouble)";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>tL";
|
|
||||||
action = "<cmd>Trouble loclist toggle<cr>";
|
|
||||||
options.desc = "Location List (Trouble)";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>tQ";
|
|
||||||
action = "<cmd>Trouble qflist toggle<cr>";
|
|
||||||
options.desc = "Quickfix List (Trouble)";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Windows
|
# Windows
|
||||||
{
|
{
|
||||||
key = "<leader>ws";
|
key = "<leader>ws";
|
||||||
@@ -258,53 +151,6 @@
|
|||||||
action = "<cmd>close<cr>";
|
action = "<cmd>close<cr>";
|
||||||
options.desc = "Close";
|
options.desc = "Close";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Code
|
|
||||||
{
|
|
||||||
key = "<leader>cd";
|
|
||||||
action = "<cmd>lua vim.lsp.buf.definition()<cr>";
|
|
||||||
options.desc = "LSP Definition";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>cr";
|
|
||||||
action = "<cmd>lua vim.lsp.buf.references()<cr>";
|
|
||||||
options.desc = "LSP References";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>ct";
|
|
||||||
action = "<cmd>lua vim.lsp.buf.type_definition()<cr>";
|
|
||||||
options.desc = "LSP Type Definition";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>ca";
|
|
||||||
action = "<cmd>lua vim.lsp.buf.code_action()<cr>";
|
|
||||||
options.desc = "LSP Code Action";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>cf";
|
|
||||||
action = "<cmd>lua vim.lsp.buf.formatting()<cr>";
|
|
||||||
options.desc = "LSP Formatting";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>cn";
|
|
||||||
action = "<cmd>lua vim.lsp.diagnostic.goto_next()<cr>";
|
|
||||||
options.desc = "LSP Next Diagnostic";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>cp";
|
|
||||||
action = "<cmd>lua vim.lsp.diagnostic.goto_prev()<cr>";
|
|
||||||
options.desc = "LSP Previous Diagnostic";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>cu";
|
|
||||||
action = "<cmd>lua require('dapui').toggle()<CR>";
|
|
||||||
options.desc = "Toggle Dapui";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>cb";
|
|
||||||
action = "<cmd>lua require('dap').toggle_breakpoint()<CR>";
|
|
||||||
options.desc = "Toggle breakpoint";
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
{
|
{
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
globals.mapleader = " ";
|
globals.mapleader = " ";
|
||||||
|
diagnostics = {
|
||||||
|
virtual_text = true;
|
||||||
|
virtual_improved = { current_line = "only"; };
|
||||||
|
};
|
||||||
opts = {
|
opts = {
|
||||||
autoindent = true;
|
autoindent = true;
|
||||||
|
|
||||||
@@ -38,11 +42,6 @@
|
|||||||
# Highlight current line
|
# Highlight current line
|
||||||
cursorline = true;
|
cursorline = true;
|
||||||
|
|
||||||
# Enable linematch diff algorithm
|
|
||||||
diffopt.__raw = ''
|
|
||||||
vim.list_extend(vim.opt.diffopt:get(), { "algorithm:histogram", "linematch:60" })
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Expand <Tab> to spaces
|
# Expand <Tab> to spaces
|
||||||
expandtab = true;
|
expandtab = true;
|
||||||
|
|
||||||
@@ -92,11 +91,6 @@
|
|||||||
# Number of spaces to use for indentation
|
# Number of spaces to use for indentation
|
||||||
shiftwidth = 2;
|
shiftwidth = 2;
|
||||||
|
|
||||||
# Disable search count wrap and startup messages
|
|
||||||
shortmess.__raw = ''
|
|
||||||
vim.tbl_deep_extend("force", vim.opt.shortmess:get(), { s = true, I = true })
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Disable showing modes in command line
|
# Disable showing modes in command line
|
||||||
showmode = false;
|
showmode = false;
|
||||||
|
|
||||||
@@ -133,10 +127,6 @@
|
|||||||
# Save undo history to undo file (in $XDG_STATE_HOME/nvim/undo)
|
# Save undo history to undo file (in $XDG_STATE_HOME/nvim/undo)
|
||||||
undofile = true;
|
undofile = true;
|
||||||
|
|
||||||
viewoptions.__raw = ''
|
|
||||||
vim.tbl_filter(function(val) return val ~= "curdir" end, vim.opt.viewoptions:get())
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Enable virtual edit in visual block mode
|
# Enable virtual edit in visual block mode
|
||||||
# This has the effect of selecting empty cells beyond lines boundaries
|
# This has the effect of selecting empty cells beyond lines boundaries
|
||||||
virtualedit = "block";
|
virtualedit = "block";
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
}
|
}
|
||||||
{ name = "nvim_lua"; }
|
{ name = "nvim_lua"; }
|
||||||
{ name = "mkdnflow"; }
|
{ name = "mkdnflow"; }
|
||||||
|
{ name = "render-markdown"; }
|
||||||
{ name = "path"; }
|
{ name = "path"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -1,153 +0,0 @@
|
|||||||
{ config, ... }:
|
|
||||||
let
|
|
||||||
accent = "#${config.lib.stylix.colors.base0D}";
|
|
||||||
muted = "#${config.lib.stylix.colors.base03}";
|
|
||||||
foreground = "#${config.lib.stylix.colors.base05}";
|
|
||||||
configDir = config.var.configDirectory;
|
|
||||||
in {
|
|
||||||
|
|
||||||
programs.nixvim.highlight = {
|
|
||||||
AlphaHeaderColor.fg = accent;
|
|
||||||
AlphaTextColor.fg = foreground;
|
|
||||||
AlphaShortcutColor.fg = muted;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.nixvim.plugins.alpha = {
|
|
||||||
enable = true;
|
|
||||||
layout = [
|
|
||||||
{
|
|
||||||
type = "padding";
|
|
||||||
val = 4;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
type = "text";
|
|
||||||
opts = {
|
|
||||||
position = "center";
|
|
||||||
hl = "AlphaHeaderColor";
|
|
||||||
};
|
|
||||||
val = [
|
|
||||||
" "
|
|
||||||
" ████ ██████ █████ ██ "
|
|
||||||
" ███████████ █████ "
|
|
||||||
" █████████ ███████████████████ ███ ███████████ "
|
|
||||||
" █████████ ███ █████████████ █████ ██████████████ "
|
|
||||||
" █████████ ██████████ █████████ █████ █████ ████ █████ "
|
|
||||||
" ███████████ ███ ███ █████████ █████ █████ ████ █████ "
|
|
||||||
" ██████ █████████████████████ ████ █████ █████ ████ ██████ "
|
|
||||||
" "
|
|
||||||
];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
type = "padding";
|
|
||||||
val = 4;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
type = "group";
|
|
||||||
|
|
||||||
val = [
|
|
||||||
{
|
|
||||||
type = "button";
|
|
||||||
val = " Find file";
|
|
||||||
on_press.__raw = "function() vim.cmd[[Telescope find_files]] end";
|
|
||||||
opts = {
|
|
||||||
shortcut = "nf";
|
|
||||||
position = "center";
|
|
||||||
cursor = 3;
|
|
||||||
width = 50;
|
|
||||||
align_shortcut = "right";
|
|
||||||
hl_shortcut = "AlphaShortcutColor";
|
|
||||||
hl = "AlphaTextColor";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
type = "button";
|
|
||||||
val = " New file";
|
|
||||||
on_press.__raw = "function() vim.cmd[[ene]] end";
|
|
||||||
opts = {
|
|
||||||
shortcut = "nn";
|
|
||||||
position = "center";
|
|
||||||
cursor = 3;
|
|
||||||
width = 50;
|
|
||||||
align_shortcut = "right";
|
|
||||||
hl_shortcut = "AlphaShortcutColor";
|
|
||||||
hl = "AlphaTextColor";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
type = "button";
|
|
||||||
val = " NixOs Config";
|
|
||||||
on_press.__raw = "function() vim.cmd[[Neotree ${configDir}]] end";
|
|
||||||
opts = {
|
|
||||||
shortcut = "nc";
|
|
||||||
position = "center";
|
|
||||||
cursor = 3;
|
|
||||||
width = 50;
|
|
||||||
align_shortcut = "right";
|
|
||||||
hl_shortcut = "AlphaShortcutColor";
|
|
||||||
hl = "AlphaTextColor";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
type = "button";
|
|
||||||
val = " Keybindings";
|
|
||||||
on_press.__raw =
|
|
||||||
"function() vim.cmd[[e ${configDir}/docs/KEYBINDINGS.md]] end";
|
|
||||||
opts = {
|
|
||||||
shortcut = "nc";
|
|
||||||
position = "center";
|
|
||||||
cursor = 3;
|
|
||||||
width = 50;
|
|
||||||
align_shortcut = "right";
|
|
||||||
hl_shortcut = "AlphaShortcutColor";
|
|
||||||
hl = "AlphaTextColor";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
type = "button";
|
|
||||||
val = " Recently used";
|
|
||||||
on_press.__raw = "function() vim.cmd[[Telescope oldfiles]] end";
|
|
||||||
opts = {
|
|
||||||
shortcut = "no";
|
|
||||||
position = "center";
|
|
||||||
cursor = 3;
|
|
||||||
width = 50;
|
|
||||||
align_shortcut = "right";
|
|
||||||
hl_shortcut = "AlphaShortcutColor";
|
|
||||||
hl = "AlphaTextColor";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
type = "button";
|
|
||||||
val = " Find text";
|
|
||||||
on_press.__raw = "function() vim.cmd[[Telescope live_grep]] end";
|
|
||||||
opts = {
|
|
||||||
shortcut = "nt";
|
|
||||||
position = "center";
|
|
||||||
cursor = 3;
|
|
||||||
width = 50;
|
|
||||||
align_shortcut = "right";
|
|
||||||
hl_shortcut = "AlphaShortcutColor";
|
|
||||||
hl = "AlphaTextColor";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
type = "button";
|
|
||||||
val = " Quit Neovim";
|
|
||||||
on_press.__raw = "function() vim.cmd[[qa]] end";
|
|
||||||
opts = {
|
|
||||||
shortcut = "nq";
|
|
||||||
position = "center";
|
|
||||||
cursor = 3;
|
|
||||||
width = 50;
|
|
||||||
align_shortcut = "right";
|
|
||||||
hl_shortcut = "AlphaShortcutColor";
|
|
||||||
hl = "AlphaTextColor";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
13
home/programs/nvim/plugins/floaterm.nix
Normal file
13
home/programs/nvim/plugins/floaterm.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{ config, ... }: {
|
||||||
|
programs.nixvim = {
|
||||||
|
plugins.floaterm.enable = true;
|
||||||
|
highlightOverride = {
|
||||||
|
FloatermBorder.fg = "#${config.lib.stylix.colors.base01}";
|
||||||
|
};
|
||||||
|
keymaps = [{
|
||||||
|
key = "<leader>cn";
|
||||||
|
action = "<cmd>FloatermNew --title=nixy nixy || sleep 10<cr>";
|
||||||
|
options.desc = "Nixy";
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
}
|
||||||
13
home/programs/nvim/plugins/git.nix
Normal file
13
home/programs/nvim/plugins/git.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
plugins = {
|
||||||
|
gitsigns.enable = true;
|
||||||
|
snacks.settings = { lazygit.enable = true; };
|
||||||
|
};
|
||||||
|
keymaps = [{
|
||||||
|
key = "<leader>gl";
|
||||||
|
action = "<cmd>lua Snacks.lazygit()<cr>";
|
||||||
|
options.desc = "LazyGit";
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -3,36 +3,21 @@
|
|||||||
lsp-format.enable = true;
|
lsp-format.enable = true;
|
||||||
lsp = {
|
lsp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
inlayHints = true;
|
||||||
servers = {
|
servers = {
|
||||||
bashls.enable = true;
|
bashls.enable = true;
|
||||||
clangd.enable = true;
|
|
||||||
gopls.enable = true;
|
gopls.enable = true;
|
||||||
eslint.enable = true;
|
|
||||||
ts_ls.enable = true;
|
ts_ls.enable = true;
|
||||||
nixd = {
|
nixd.enable = true;
|
||||||
enable = true;
|
|
||||||
extraOptions = {
|
|
||||||
expr = "import <nixpkgs> {}";
|
|
||||||
# fix- encoding: https://github.com/nix-community/nixvim/issues/2390
|
|
||||||
offset_encoding = "utf-8";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
tailwindcss.enable = true;
|
tailwindcss.enable = true;
|
||||||
html.enable = true;
|
html.enable = true;
|
||||||
svelte.enable = true;
|
svelte.enable = true;
|
||||||
marksman.enable = true;
|
|
||||||
};
|
|
||||||
keymaps.lspBuf = {
|
|
||||||
"gd" = "definition";
|
|
||||||
"gD" = "references";
|
|
||||||
"gt" = "type_definition";
|
|
||||||
"gi" = "implementation";
|
|
||||||
"K" = "hover";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
none-ls = {
|
none-ls = {
|
||||||
enable = true;
|
enable = true;
|
||||||
sources = {
|
sources = {
|
||||||
|
completion = { luasnip.enable = true; };
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
golangci_lint.enable = true;
|
golangci_lint.enable = true;
|
||||||
statix.enable = true;
|
statix.enable = true;
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
{
|
|
||||||
programs.nixvim.plugins.lualine = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
options.disabled_filetypes.statusline =
|
|
||||||
[ "dashboard" "alpha" "neo-tree" ];
|
|
||||||
|
|
||||||
alwaysDivideMiddle = true;
|
|
||||||
globalstatus = true;
|
|
||||||
ignoreFocus = [ "neo-tree" ];
|
|
||||||
extensions = [ "fzf" ];
|
|
||||||
componentSeparators = {
|
|
||||||
left = "|";
|
|
||||||
right = "|";
|
|
||||||
};
|
|
||||||
sectionSeparators = {
|
|
||||||
left = "█"; #
|
|
||||||
right = "█"; #
|
|
||||||
};
|
|
||||||
sections = {
|
|
||||||
lualine_a = [ "mode" ];
|
|
||||||
lualine_b = [ "branch" "diff" "diagnostics" ];
|
|
||||||
lualine_c = [ "filename" ];
|
|
||||||
lualine_x = [ "filetype" ];
|
|
||||||
lualine_y = [ "progress" ];
|
|
||||||
lualine_z = [ ''" " .. os.date("%R")'' ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -4,238 +4,29 @@ let
|
|||||||
muted = "#${config.lib.stylix.colors.base03}";
|
muted = "#${config.lib.stylix.colors.base03}";
|
||||||
in {
|
in {
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
# Markdown settings
|
|
||||||
extraFiles."after/ftplugin/markdown.lua".text = ''
|
extraFiles."after/ftplugin/markdown.lua".text = ''
|
||||||
vim.bo.tabstop = 2
|
vim.bo.tabstop = 2
|
||||||
vim.bo.shiftwidth = 2
|
vim.bo.shiftwidth = 2
|
||||||
vim.bo.expandtab = true
|
vim.bo.expandtab = true
|
||||||
|
vim.wo.cursorline = false
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Highlight colors
|
|
||||||
highlight = {
|
|
||||||
Headline1 = {
|
|
||||||
bg = "#4B4266";
|
|
||||||
fg = accent;
|
|
||||||
};
|
|
||||||
Headline2 = {
|
|
||||||
bg = "#3B575E";
|
|
||||||
fg = "#9FFEFE";
|
|
||||||
};
|
|
||||||
Headline3 = {
|
|
||||||
bg = "#3B5742";
|
|
||||||
fg = "#9FFE9F";
|
|
||||||
};
|
|
||||||
Headline4 = {
|
|
||||||
bg = "#574842";
|
|
||||||
fg = "#FECB9F";
|
|
||||||
};
|
|
||||||
|
|
||||||
RenderMarkdownTodo.fg = "#f78c6c";
|
|
||||||
RenderMarkdownWarning.fg = "#ff5370";
|
|
||||||
RenderMarkdownDone.fg = muted;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Plugins
|
# Plugins
|
||||||
plugins = {
|
plugins = {
|
||||||
# Paste images from clipboard
|
|
||||||
clipboard-image = {
|
|
||||||
enable = true;
|
|
||||||
settings = { default.img_dir = [ "%:p:h" "img" ]; };
|
|
||||||
};
|
|
||||||
|
|
||||||
# Zen mode
|
|
||||||
zen-mode = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
on_close = ''
|
|
||||||
function()
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
on_open = ''
|
|
||||||
function()
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
plugins = {
|
|
||||||
gitsigns = { enabled = false; };
|
|
||||||
options = {
|
|
||||||
enabled = true;
|
|
||||||
ruler = false;
|
|
||||||
showcmd = false;
|
|
||||||
laststatus = "0";
|
|
||||||
kitty = {
|
|
||||||
enabled = true;
|
|
||||||
font = "+4";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
window = {
|
|
||||||
backdrop = 0.95;
|
|
||||||
height = 1;
|
|
||||||
options = {
|
|
||||||
signcolumn = "no";
|
|
||||||
number = false;
|
|
||||||
relativenumber = false;
|
|
||||||
};
|
|
||||||
width = 0.8;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Display images in markdown
|
|
||||||
image = {
|
|
||||||
enable = true;
|
|
||||||
integrations.markdown = {
|
|
||||||
clearInInsertMode = true;
|
|
||||||
onlyRenderImageAtCursor = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# This one takes care of the markdown titles
|
|
||||||
headlines = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
markdown = {
|
|
||||||
headline_highlights =
|
|
||||||
[ "Headline1" "Headline2" "Headline3" "Headline4" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# MkdnFlow is a plugin that helps you navigate markdown files
|
|
||||||
mkdnflow = {
|
|
||||||
enable = true;
|
|
||||||
modules = { conceal = false; };
|
|
||||||
toDo.symbols = [ " " "-" "x" "!" "/" ];
|
|
||||||
mappings = {
|
|
||||||
MkdnCreateLink = false;
|
|
||||||
MkdnCreateLinkFromClipboard = {
|
|
||||||
key = "<leader>ml";
|
|
||||||
modes = [ "n" "v" ];
|
|
||||||
};
|
|
||||||
MkdnDecreaseHeading = {
|
|
||||||
key = "<leader>m-";
|
|
||||||
modes = "n";
|
|
||||||
};
|
|
||||||
MkdnDestroyLink = false;
|
|
||||||
MkdnEnter = {
|
|
||||||
key = "<CR>";
|
|
||||||
modes = [ "v" ];
|
|
||||||
};
|
|
||||||
MkdnExtendList = false;
|
|
||||||
|
|
||||||
MkdnFoldSection = {
|
|
||||||
key = "<leader>mf";
|
|
||||||
modes = "n";
|
|
||||||
};
|
|
||||||
|
|
||||||
MkdnUnfoldSection = {
|
|
||||||
key = "<leader>mF";
|
|
||||||
modes = "n";
|
|
||||||
};
|
|
||||||
|
|
||||||
MkdnFollowLink = {
|
|
||||||
key = "gd";
|
|
||||||
modes = "n";
|
|
||||||
};
|
|
||||||
MkdnGoBack = false;
|
|
||||||
MkdnGoForward = false;
|
|
||||||
MkdnIncreaseHeading = {
|
|
||||||
key = "<leader>m+";
|
|
||||||
modes = "n";
|
|
||||||
};
|
|
||||||
MkdnMoveSource = false;
|
|
||||||
MkdnNewListItem = false;
|
|
||||||
MkdnNewListItemAboveInsert = {
|
|
||||||
key = "O";
|
|
||||||
modes = "n";
|
|
||||||
};
|
|
||||||
MkdnNewListItemBelowInsert = {
|
|
||||||
key = "o";
|
|
||||||
modes = "n";
|
|
||||||
};
|
|
||||||
MkdnNextHeading = {
|
|
||||||
key = "<leader>m#";
|
|
||||||
modes = "n";
|
|
||||||
};
|
|
||||||
MkdnNextLink = false;
|
|
||||||
MkdnPrevLink = false;
|
|
||||||
MkdnPrevHeading = {
|
|
||||||
key = "<leader>m*";
|
|
||||||
modes = "n";
|
|
||||||
};
|
|
||||||
MkdnSTab = false;
|
|
||||||
MkdnTab = false;
|
|
||||||
MkdnTableNewColAfter = {
|
|
||||||
key = "<leader>mc";
|
|
||||||
modes = "n";
|
|
||||||
};
|
|
||||||
MkdnTableNewColBefore = {
|
|
||||||
key = "<leader>mC";
|
|
||||||
modes = "n";
|
|
||||||
};
|
|
||||||
MkdnTableNewRowAbove = {
|
|
||||||
key = "<leader>mR";
|
|
||||||
modes = "n";
|
|
||||||
};
|
|
||||||
MkdnTableNewRowBelow = {
|
|
||||||
key = "<leader>mr";
|
|
||||||
modes = "n";
|
|
||||||
};
|
|
||||||
MkdnTableNextCell = {
|
|
||||||
key = "<S-Tab>";
|
|
||||||
modes = "n";
|
|
||||||
};
|
|
||||||
MkdnTableNextRow = false;
|
|
||||||
MkdnTablePrevCell = {
|
|
||||||
key = "<S-Tab>";
|
|
||||||
modes = "n";
|
|
||||||
};
|
|
||||||
MkdnTablePrevRow = false;
|
|
||||||
MkdnToggleToDo = {
|
|
||||||
key = "<C-Space>";
|
|
||||||
modes = [ "n" "v" ];
|
|
||||||
};
|
|
||||||
MkdnUpdateNumbering = {
|
|
||||||
key = "<leader>mn";
|
|
||||||
modes = "n";
|
|
||||||
};
|
|
||||||
MkdnYankAnchorLink = {
|
|
||||||
key = "ya";
|
|
||||||
modes = "n";
|
|
||||||
};
|
|
||||||
MkdnYankFileAnchorLink = {
|
|
||||||
key = "yfa";
|
|
||||||
modes = "n";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Render UI elements
|
# Render UI elements
|
||||||
render-markdown = {
|
render-markdown = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = { completions.lsp.enabled = true; };
|
||||||
heading = { enabled = false; };
|
};
|
||||||
checkbox = {
|
|
||||||
unchecked = { highlight = "RenderMarkdownTodo"; };
|
mkdnflow = {
|
||||||
checked = { highlight = "RenderMarkdownDone"; };
|
enable = true;
|
||||||
custom = {
|
mappings = {
|
||||||
pending = {
|
MkdnTableNextCell = {
|
||||||
raw = "[-]";
|
key = "<S-Tab>";
|
||||||
rendered = " ";
|
modes = "i";
|
||||||
highlight = "RenderMarkdownTodo";
|
|
||||||
};
|
|
||||||
important = {
|
|
||||||
raw = "[!]";
|
|
||||||
rendered = " ";
|
|
||||||
highlight = "RenderMarkdownWarning";
|
|
||||||
};
|
|
||||||
cancel = {
|
|
||||||
raw = "[/]";
|
|
||||||
rendered = " ";
|
|
||||||
highlight = "RenderMarkdownWarning";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
MkdnTablePrevCell = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
22
home/programs/nvim/plugins/mini.nix
Normal file
22
home/programs/nvim/plugins/mini.nix
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{ config, ... }: {
|
||||||
|
programs.nixvim = {
|
||||||
|
plugins.mini = {
|
||||||
|
enable = true;
|
||||||
|
mockDevIcons = true;
|
||||||
|
modules = {
|
||||||
|
icons = { };
|
||||||
|
# TODO: Learn how to use this
|
||||||
|
bracketed = { };
|
||||||
|
git = { };
|
||||||
|
diff = { };
|
||||||
|
starter = { };
|
||||||
|
pairs = { };
|
||||||
|
notify = { lsp_progress.enable = false; };
|
||||||
|
indentscope = { };
|
||||||
|
cursorword = { };
|
||||||
|
comment = { };
|
||||||
|
starter = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
222
home/programs/nvim/plugins/picker.nix
Normal file
222
home/programs/nvim/plugins/picker.nix
Normal file
@@ -0,0 +1,222 @@
|
|||||||
|
{ config, ... }: {
|
||||||
|
programs.nixvim = {
|
||||||
|
highlightOverride = {
|
||||||
|
SnacksPicker = {
|
||||||
|
bg = "none";
|
||||||
|
nocombine = true;
|
||||||
|
};
|
||||||
|
SnacksPickerBorder = {
|
||||||
|
bg = "none";
|
||||||
|
fg = "#${config.lib.stylix.colors.base0D}";
|
||||||
|
};
|
||||||
|
SnacksPickerTree = { bg = "#${config.lib.stylix.colors.base00}"; };
|
||||||
|
FloatBorder = {
|
||||||
|
bg = "#${config.lib.stylix.colors.base00}";
|
||||||
|
fg = "#${config.lib.stylix.colors.base0D}";
|
||||||
|
};
|
||||||
|
NormalFloat = { bg = "#${config.lib.stylix.colors.base00}"; };
|
||||||
|
};
|
||||||
|
plugins = {
|
||||||
|
snacks.settings = {
|
||||||
|
picker.enable = true;
|
||||||
|
explorer.enable = true;
|
||||||
|
};
|
||||||
|
oil.enable = true;
|
||||||
|
which-key.settings.spec = [
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "<leader>f";
|
||||||
|
mode = "n";
|
||||||
|
group = "+find";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "<leader>g";
|
||||||
|
mode = "n";
|
||||||
|
group = "+git";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "<leader>s";
|
||||||
|
mode = "n";
|
||||||
|
group = "+search";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
keymaps = [
|
||||||
|
# Top Pickers & Explorer
|
||||||
|
{
|
||||||
|
key = "<leader> ";
|
||||||
|
action = "<cmd>lua Snacks.picker.smart()<cr>";
|
||||||
|
options.desc = "Smart Find Files";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>,";
|
||||||
|
action = "<cmd>lua Snacks.picker.buffers()<cr>";
|
||||||
|
options.desc = "Buffers";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>/";
|
||||||
|
action = "<cmd>lua Snacks.picker.grep()<cr>";
|
||||||
|
options.desc = "Grep";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>:";
|
||||||
|
action = "<cmd>lua Snacks.picker.command_history()<cr>";
|
||||||
|
options.desc = "Command History";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>e";
|
||||||
|
action = "<cmd>lua Snacks.explorer()<cr>";
|
||||||
|
options.desc = "File Explorer";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "-";
|
||||||
|
action = "<cmd>Oil<cr>";
|
||||||
|
options.desc = "Oil";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Find
|
||||||
|
{
|
||||||
|
key = "<leader>fb";
|
||||||
|
action = "<cmd>lua Snacks.picker.buffers()<cr>";
|
||||||
|
options.desc = "Buffers";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>fc";
|
||||||
|
action = ''
|
||||||
|
<cmd>lua Snacks.picker.files({ cwd = vim.fn.stdpath("config") })<cr>'';
|
||||||
|
options.desc = "Find Config File";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>ff";
|
||||||
|
action = "<cmd>lua Snacks.picker.files()<cr>";
|
||||||
|
options.desc = "Find Files";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>fg";
|
||||||
|
action = "<cmd>lua Snacks.picker.git_files()<cr>";
|
||||||
|
options.desc = "Find Git Files";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>fp";
|
||||||
|
action = "<cmd>lua Snacks.picker.projects()<cr>";
|
||||||
|
options.desc = "Projects";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>fr";
|
||||||
|
action = "<cmd>lua Snacks.picker.recent()<cr>";
|
||||||
|
options.desc = "Recent";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>fn";
|
||||||
|
action = "<cmd>lua Snacks.picker.notifications()<cr>";
|
||||||
|
options.desc = "Notification History";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>fe";
|
||||||
|
action = "<cmd>lua Snacks.picker.icons()<cr>";
|
||||||
|
options.desc = "Emoji";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Git
|
||||||
|
{
|
||||||
|
key = "<leader>gb";
|
||||||
|
action = "<cmd>lua Snacks.picker.git_branches()<cr>";
|
||||||
|
options.desc = "Git Branches";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>gL";
|
||||||
|
action = "<cmd>lua Snacks.picker.git_log()<cr>";
|
||||||
|
options.desc = "Git Log Line";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>gs";
|
||||||
|
action = "<cmd>lua Snacks.picker.git_status()<cr>";
|
||||||
|
options.desc = "Git Status";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>gS";
|
||||||
|
action = "<cmd>lua Snacks.picker.git_stash()<cr>";
|
||||||
|
options.desc = "Git Stash";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>gd";
|
||||||
|
action = "<cmd>lua Snacks.picker.git_diff()<cr>";
|
||||||
|
options.desc = "Git Diff (Hunks)";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>gf";
|
||||||
|
action = "<cmd>lua Snacks.picker.git_log_file()<cr>";
|
||||||
|
options.desc = "Git Log File";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Grep
|
||||||
|
{
|
||||||
|
key = "<leader>sb";
|
||||||
|
action = "<cmd>lua Snacks.picker.lines()<cr>";
|
||||||
|
options.desc = "Buffer Lines";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>st";
|
||||||
|
action = "<cmd>lua Snacks.picker.todo_comments()<cr>";
|
||||||
|
options.desc = "Todos";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sB";
|
||||||
|
action = "<cmd>lua Snacks.picker.grep_buffers()<cr>";
|
||||||
|
options.desc = "Grep Open Buffers";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sg";
|
||||||
|
action = "<cmd>lua Snacks.picker.grep()<cr>";
|
||||||
|
options.desc = "Grep";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sw";
|
||||||
|
action = "<cmd>lua Snacks.picker.grep_word()<cr>";
|
||||||
|
options.desc = "Visual selection or word";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sr";
|
||||||
|
action = "<cmd>nohlsearch<cr>";
|
||||||
|
options.desc = "Reset search";
|
||||||
|
}
|
||||||
|
|
||||||
|
# LSP
|
||||||
|
{
|
||||||
|
key = "gd";
|
||||||
|
action = "<cmd>lua Snacks.picker.lsp_definitions()<cr>";
|
||||||
|
options.desc = "Goto Definition";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "gD";
|
||||||
|
action = "<cmd>lua Snacks.picker.lsp_declarations()<cr>";
|
||||||
|
options.desc = "Goto Declaration";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "gr";
|
||||||
|
action = "<cmd>lua Snacks.picker.lsp_references()<cr>";
|
||||||
|
options.desc = "References";
|
||||||
|
options.nowait = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "gI";
|
||||||
|
action = "<cmd>lua Snacks.picker.lsp_implementations()<cr>";
|
||||||
|
options.desc = "Goto Implementation";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "gy";
|
||||||
|
action = "<cmd>lua Snacks.picker.lsp_type_definitions()<cr>";
|
||||||
|
options.desc = "Goto Type Definition";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>ss";
|
||||||
|
action = "<cmd>lua Snacks.picker.lsp_symbols()<cr>";
|
||||||
|
options.desc = "LSP Symbols";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sS";
|
||||||
|
action = "<cmd>lua Snacks.picker.lsp_workspace_symbols()<cr>";
|
||||||
|
options.desc = "LSP Workspace Symbols";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
40
home/programs/nvim/plugins/snacks.nix
Normal file
40
home/programs/nvim/plugins/snacks.nix
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
plugins.snacks = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
image = {
|
||||||
|
enable = true;
|
||||||
|
doc = { inline = false; };
|
||||||
|
};
|
||||||
|
quickfile.enable = true;
|
||||||
|
statuscolumn.enable = true;
|
||||||
|
zen.enable = true;
|
||||||
|
bufdelete.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
key = "<leader>uz";
|
||||||
|
action = "<cmd>lua Snacks.zen()<cr>";
|
||||||
|
options.desc = "Zen";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>ud";
|
||||||
|
action = "<cmd>lua Snacks.dim.enable()<cr>";
|
||||||
|
options.desc = "Dim";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>uD";
|
||||||
|
action = "<cmd>lua Snacks.dim.disable()<cr>";
|
||||||
|
options.desc = "Undim";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>wc";
|
||||||
|
action = "<cmd>lua Snacks.bufdelete.all()<cr>";
|
||||||
|
options.desc = "Close all buffers";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
{ config, ... }:
|
|
||||||
let
|
|
||||||
accent = "#${config.lib.stylix.colors.base0D}";
|
|
||||||
background = "#${config.lib.stylix.colors.base00}";
|
|
||||||
background-alt = "#${config.lib.stylix.colors.base01}";
|
|
||||||
in {
|
|
||||||
programs.nixvim = {
|
|
||||||
highlight = {
|
|
||||||
TelescopePromptPrefix.fg = accent;
|
|
||||||
TelescopeSelectionCaret = {
|
|
||||||
fg = accent;
|
|
||||||
bg = background-alt;
|
|
||||||
};
|
|
||||||
TelescopeSelection.bg = background-alt;
|
|
||||||
TelescopePromptTitle = {
|
|
||||||
bg = background;
|
|
||||||
fg = accent;
|
|
||||||
};
|
|
||||||
TelescopePromptNormal.bg = background;
|
|
||||||
TelescopePromptBorder = {
|
|
||||||
bg = background;
|
|
||||||
fg = accent;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
plugins.telescope = {
|
|
||||||
enable = true;
|
|
||||||
extensions.fzf-native = { enable = true; };
|
|
||||||
settings.defaults = { selection_caret = "❚ "; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
{
|
|
||||||
programs.nixvim = {
|
|
||||||
plugins = {
|
|
||||||
neo-tree.enable = true;
|
|
||||||
oil = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
default_file_explorer = false;
|
|
||||||
skip_confirm_for_simple_edits = true;
|
|
||||||
view_options.is_hidden_file = ''
|
|
||||||
function(name, bufnr)
|
|
||||||
return vim.startswith(name, ".") or name == "img"
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
win_options = {
|
|
||||||
concealcursor = "ncv";
|
|
||||||
conceallevel = 3;
|
|
||||||
cursorcolumn = false;
|
|
||||||
foldcolumn = "0";
|
|
||||||
list = false;
|
|
||||||
signcolumn = "no";
|
|
||||||
spell = false;
|
|
||||||
wrap = false;
|
|
||||||
};
|
|
||||||
float = { padding = 5; };
|
|
||||||
keymaps = {
|
|
||||||
"-" = "actions.parent";
|
|
||||||
"b" = "actions.parent";
|
|
||||||
"<C-c>" = "actions.close";
|
|
||||||
"<C-h>" = "actions.select_split";
|
|
||||||
"<C-l>" = "actions.refresh";
|
|
||||||
"<C-p>" = "actions.preview";
|
|
||||||
"<C-s>" = "actions.select_vsplit";
|
|
||||||
"<C-t>" = "actions.select_tab";
|
|
||||||
"<CR>" = "actions.select";
|
|
||||||
_ = "actions.open_cwd";
|
|
||||||
"`" = "actions.cd";
|
|
||||||
"g." = "actions.toggle_hidden";
|
|
||||||
"g?" = "actions.show_help";
|
|
||||||
"g\\" = "actions.toggle_trash";
|
|
||||||
gs = "actions.change_sort";
|
|
||||||
gx = "actions.open_external";
|
|
||||||
"~" = "actions.tcd";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
46
home/programs/nvim/plugins/trouble.nix
Normal file
46
home/programs/nvim/plugins/trouble.nix
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
home.packages = with pkgs; [ ctags ];
|
||||||
|
|
||||||
|
programs.nixvim = {
|
||||||
|
plugins = {
|
||||||
|
trouble.enable = true;
|
||||||
|
which-key.settings.spec = [{
|
||||||
|
__unkeyed-1 = "<leader>t";
|
||||||
|
mode = "n";
|
||||||
|
group = "+trouble";
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
key = "<leader>tx";
|
||||||
|
action = "<cmd>Trouble diagnostics toggle<cr>";
|
||||||
|
options.desc = "Diagnostics (Trouble)";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>tX";
|
||||||
|
action = "<cmd>Trouble diagnostics toggle filter.buf=0<cr>";
|
||||||
|
options.desc = "Buffer Diagnostics (Trouble)";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>ts";
|
||||||
|
action = "<cmd>Trouble symbols toggle focus=false<cr>";
|
||||||
|
options.desc = "Symbols (Trouble)";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>tl";
|
||||||
|
action = "<cmd>Trouble lsp toggle focus=false win.position=right<cr>";
|
||||||
|
options.desc = "LSP Definitions / references / ... (Trouble)";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>tL";
|
||||||
|
action = "<cmd>Trouble loclist toggle<cr>";
|
||||||
|
options.desc = "Location List (Trouble)";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>tQ";
|
||||||
|
action = "<cmd>Trouble qflist toggle<cr>";
|
||||||
|
options.desc = "Quickfix List (Trouble)";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
{ pkgs, ... }: {
|
|
||||||
home.packages = with pkgs; [ ctags ];
|
|
||||||
|
|
||||||
programs.nixvim.plugins = {
|
|
||||||
web-devicons.enable = true;
|
|
||||||
noice.enable = true;
|
|
||||||
gitsigns = {
|
|
||||||
enable = true;
|
|
||||||
settings.current_line_blame = false;
|
|
||||||
};
|
|
||||||
trouble.enable = true;
|
|
||||||
bufferline.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,16 +1,21 @@
|
|||||||
{ config, ... }: {
|
{ config, lib, pkgs, ... }: {
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
|
nixpkgs.config.allowUnfree = true; # For copilot
|
||||||
highlightOverride = {
|
highlightOverride = {
|
||||||
FloatBorder.fg = "#${config.lib.stylix.colors.base0D}";
|
WhichKeySeparator.bg = "#${config.lib.stylix.colors.base00}";
|
||||||
};
|
};
|
||||||
nixpkgs.config = { allowUnfree = true; };
|
|
||||||
plugins = {
|
plugins = {
|
||||||
copilot-vim.enable = true;
|
bufferline.enable = true;
|
||||||
|
copilot-vim = {
|
||||||
|
enable = true;
|
||||||
|
# FIXME: Temp issue solving
|
||||||
|
settings.node_command = lib.getExe pkgs.nodejs_20;
|
||||||
|
};
|
||||||
flash.enable = true;
|
flash.enable = true;
|
||||||
tmux-navigator.enable = true;
|
tmux-navigator.enable = true;
|
||||||
comment.enable = true;
|
|
||||||
nvim-autopairs.enable = true;
|
|
||||||
todo-comments.enable = true;
|
todo-comments.enable = true;
|
||||||
|
lualine = { enable = true; };
|
||||||
|
aerial.enable = true;
|
||||||
treesitter = {
|
treesitter = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nixGrammars = true;
|
nixGrammars = true;
|
||||||
@@ -21,5 +26,12 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
key = "<leader>ct";
|
||||||
|
action = "<cmd>AerialToggle<cr>";
|
||||||
|
options.desc = "Aerial (tags)";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ let
|
|||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
imports = [ ./duckduckgo-colorscheme.nix ];
|
imports = [ ../duckduckgo-colorscheme ];
|
||||||
|
|
||||||
programs.qutebrowser = {
|
programs.qutebrowser = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
# A duckduckgo colorscheme generated for the Stylix theme used.
|
|
||||||
{ config, ... }:
|
|
||||||
let
|
|
||||||
accent = config.lib.stylix.colors.base0D;
|
|
||||||
background = config.lib.stylix.colors.base00;
|
|
||||||
foreground = config.lib.stylix.colors.base05;
|
|
||||||
background-alt = config.lib.stylix.colors.base01;
|
|
||||||
foreground-alt = config.lib.stylix.colors.base06;
|
|
||||||
in {
|
|
||||||
home.file.".duckduckgo-colorscheme.js".text =
|
|
||||||
# js
|
|
||||||
''
|
|
||||||
// Go to DuckDuckGo settings page, open the console, paste the code and hit enter.
|
|
||||||
// based on https://ddg.codingcodax.dev/
|
|
||||||
// Cookies string for your theme
|
|
||||||
const cookie = '7=${background}; j=${background}; 9=${foreground}; aa=${foreground-alt}; 8=${foreground}; x=${accent}; 21=${background-alt};';
|
|
||||||
|
|
||||||
// Converts cookie string into formatted JSON
|
|
||||||
const cookieToJSON = (cookieRaw) => {
|
|
||||||
const cookieJson = {};
|
|
||||||
const items = cookieRaw.split(/[ ,]+/);
|
|
||||||
|
|
||||||
items.forEach((item) => {
|
|
||||||
const parts = item.split('=');
|
|
||||||
cookieJson[parts[0]] = parts[1];
|
|
||||||
});
|
|
||||||
|
|
||||||
return cookieJson;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Iterates over JSON, and adds to browser cookie store
|
|
||||||
const setCookies = (cookieJson) => {
|
|
||||||
Object.keys(cookieJson).forEach((key) => {
|
|
||||||
document.cookie = `''${key}=''${cookieJson [ key ]}`;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// Call set cookies, passing in formated cookie data
|
|
||||||
setCookies(cookieToJSON(cookie));
|
|
||||||
|
|
||||||
// All done, reload page for changes to take effect :)
|
|
||||||
location.reload();
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
@@ -19,7 +19,7 @@ in {
|
|||||||
defaultOptions = [
|
defaultOptions = [
|
||||||
"--margin=1"
|
"--margin=1"
|
||||||
"--layout=reverse"
|
"--layout=reverse"
|
||||||
"--border=rounded"
|
"--border=none"
|
||||||
"--info='hidden'"
|
"--info='hidden'"
|
||||||
"--header=''"
|
"--header=''"
|
||||||
"--prompt='/ '"
|
"--prompt='/ '"
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ in {
|
|||||||
settings = {
|
settings = {
|
||||||
add_newline = true;
|
add_newline = true;
|
||||||
format = lib.concatStrings [
|
format = lib.concatStrings [
|
||||||
|
"$nix_shell"
|
||||||
|
"$hostname"
|
||||||
"$directory"
|
"$directory"
|
||||||
"$git_branch"
|
"$git_branch"
|
||||||
"$git_state"
|
"$git_state"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# My shell configuration
|
# My shell configuration
|
||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
let fetch = config.var.theme.fetch; # neofetch, nerdfetch, pfetch
|
let fetch = config.theme.fetch; # neofetch, nerdfetch, pfetch
|
||||||
in {
|
in {
|
||||||
|
|
||||||
home.packages = with pkgs; [ bat ripgrep tldr sesh ];
|
home.packages = with pkgs; [ bat ripgrep tldr sesh ];
|
||||||
@@ -11,31 +11,51 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
autosuggestion.enable = true;
|
autosuggestion.enable = true;
|
||||||
syntaxHighlighting.enable = true;
|
syntaxHighlighting = {
|
||||||
|
enable = true;
|
||||||
|
highlighters = [ "main" "brackets" "pattern" "regexp" "root" "line" ];
|
||||||
|
};
|
||||||
historySubstringSearch.enable = true;
|
historySubstringSearch.enable = true;
|
||||||
|
|
||||||
initExtraFirst = ''
|
initExtraFirst =
|
||||||
bindkey -e
|
#bash
|
||||||
${if fetch == "neofetch" then
|
''
|
||||||
pkgs.neofetch + "/bin/neofetch"
|
bindkey -e
|
||||||
else if fetch == "nerdfetch" then
|
${if fetch == "neofetch" then
|
||||||
"nerdfetch"
|
pkgs.neofetch + "/bin/neofetch"
|
||||||
else if fetch == "pfetch" then
|
else if fetch == "nerdfetch" then
|
||||||
"echo; ${pkgs.pfetch}/bin/pfetch"
|
"nerdfetch"
|
||||||
else
|
else if fetch == "pfetch" then
|
||||||
""}
|
"echo; ${pkgs.pfetch}/bin/pfetch"
|
||||||
|
else
|
||||||
|
""}
|
||||||
|
|
||||||
function sesh-sessions() {
|
function sesh-sessions() {
|
||||||
session=$(sesh list -t -c | fzf --height 70% --reverse)
|
session=$(sesh list -t -c | fzf --height 70% --reverse)
|
||||||
[[ -z "$session" ]] && return
|
[[ -z "$session" ]] && return
|
||||||
sesh connect $session
|
sesh connect $session
|
||||||
}
|
}
|
||||||
|
|
||||||
zle -N sesh-sessions
|
function chatgptlist(){
|
||||||
bindkey -M emacs '\es' sesh-sessions
|
for arg in "$@"; do
|
||||||
bindkey -M vicmd '\es' sesh-sessions
|
echo "$arg:"
|
||||||
bindkey -M viins '\es' sesh-sessions
|
echo "\`\`\`"
|
||||||
'';
|
cat "$arg"
|
||||||
|
echo "\`\`\`"
|
||||||
|
echo
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function n4c() {
|
||||||
|
nix develop --no-write-lock-file --refresh "github:anotherhadi/nix4cyber#''${1:-all}"
|
||||||
|
}
|
||||||
|
|
||||||
|
zle -N sesh-sessions
|
||||||
|
bindkey -M emacs '\es' sesh-sessions
|
||||||
|
bindkey -M vicmd '\es' sesh-sessions
|
||||||
|
bindkey -M viins '\es' sesh-sessions
|
||||||
|
'';
|
||||||
|
|
||||||
history = {
|
history = {
|
||||||
ignoreDups = true;
|
ignoreDups = true;
|
||||||
@@ -76,13 +96,19 @@ in {
|
|||||||
open = "${pkgs.xdg-utils}/bin/xdg-open";
|
open = "${pkgs.xdg-utils}/bin/xdg-open";
|
||||||
icat = "${pkgs.kitty}/bin/kitty +kitten icat";
|
icat = "${pkgs.kitty}/bin/kitty +kitten icat";
|
||||||
ssh = "kitty +kitten ssh";
|
ssh = "kitty +kitten ssh";
|
||||||
|
cat =
|
||||||
|
"bat --theme=base16 --color=always --paging=never --tabs=2 --wrap=never --plain";
|
||||||
|
|
||||||
|
obsidian-no-gpu =
|
||||||
|
"env ELECTRON_OZONE_PLATFORM_HINT=auto obsidian --ozone-platform=x11";
|
||||||
wireguard-import = "nmcli connection import type wireguard file";
|
wireguard-import = "nmcli connection import type wireguard file";
|
||||||
|
|
||||||
notes =
|
notes =
|
||||||
"nvim ~/nextcloud/notes/index.md --cmd 'cd ~/nextcloud/notes' -c ':Telescope find_files'";
|
"nvim ~/nextcloud/notes/index.md --cmd 'cd ~/nextcloud/notes' -c ':Telescope find_files'";
|
||||||
note = "notes";
|
note = "notes";
|
||||||
|
|
||||||
|
nix-shell = "nix-shell --command zsh";
|
||||||
|
|
||||||
# git
|
# git
|
||||||
g = "lazygit";
|
g = "lazygit";
|
||||||
ga = "git add";
|
ga = "git add";
|
||||||
@@ -101,5 +127,78 @@ in {
|
|||||||
gaa = "git add .";
|
gaa = "git add .";
|
||||||
gcm = "git commit -m";
|
gcm = "git commit -m";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
initExtra = ''
|
||||||
|
# search history based on what's typed in the prompt
|
||||||
|
autoload -U history-search-end
|
||||||
|
zle -N history-beginning-search-backward-end history-search-end
|
||||||
|
zle -N history-beginning-search-forward-end history-search-end
|
||||||
|
bindkey "^[OA" history-beginning-search-backward-end
|
||||||
|
bindkey "^[OB" history-beginning-search-forward-end
|
||||||
|
|
||||||
|
# General completion behavior
|
||||||
|
zstyle ':completion:*' completer _extensions _complete _approximate
|
||||||
|
|
||||||
|
# Use cache
|
||||||
|
zstyle ':completion:*' use-cache on
|
||||||
|
zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/.zcompcache"
|
||||||
|
|
||||||
|
# Complete the alias
|
||||||
|
zstyle ':completion:*' complete true
|
||||||
|
|
||||||
|
# Autocomplete options
|
||||||
|
zstyle ':completion:*' complete-options true
|
||||||
|
|
||||||
|
# Completion matching control
|
||||||
|
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||||
|
zstyle ':completion:*' keep-prefix true
|
||||||
|
|
||||||
|
# Group matches and describe
|
||||||
|
zstyle ':completion:*' menu select
|
||||||
|
zstyle ':completion:*' list-grouped false
|
||||||
|
zstyle ':completion:*' list-separator '''
|
||||||
|
zstyle ':completion:*' group-name '''
|
||||||
|
zstyle ':completion:*' verbose yes
|
||||||
|
zstyle ':completion:*:matches' group 'yes'
|
||||||
|
zstyle ':completion:*:warnings' format '%F{red}%B-- No match for: %d --%b%f'
|
||||||
|
zstyle ':completion:*:messages' format '%d'
|
||||||
|
zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b'
|
||||||
|
zstyle ':completion:*:descriptions' format '[%d]'
|
||||||
|
|
||||||
|
# Colors
|
||||||
|
zstyle ':completion:*' list-colors ''${(s.:.)LS_COLORS}
|
||||||
|
|
||||||
|
# case insensitive tab completion
|
||||||
|
zstyle ':completion:*:*:cd:*' tag-order local-directories directory-stack path-directories
|
||||||
|
zstyle ':completion:*:*:cd:*:directory-stack' menu yes select
|
||||||
|
zstyle ':completion:*:-tilde-:*' group-order 'named-directories' 'path-directories' 'users' 'expand'
|
||||||
|
zstyle ':completion:*:*:-command-:*:*' group-order aliases builtins functions commands
|
||||||
|
zstyle ':completion:*' special-dirs true
|
||||||
|
zstyle ':completion:*' squeeze-slashes true
|
||||||
|
|
||||||
|
# Sort
|
||||||
|
zstyle ':completion:*' sort false
|
||||||
|
zstyle ":completion:*:git-checkout:*" sort false
|
||||||
|
zstyle ':completion:*' file-sort modification
|
||||||
|
zstyle ':completion:*:eza' sort false
|
||||||
|
zstyle ':completion:complete:*:options' sort false
|
||||||
|
zstyle ':completion:files' sort false
|
||||||
|
|
||||||
|
${lib.optionalString config.services.gpg-agent.enable ''
|
||||||
|
gnupg_path=$(ls $XDG_RUNTIME_DIR/gnupg)
|
||||||
|
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gnupg/$gnupg_path/S.gpg-agent.ssh"
|
||||||
|
''}
|
||||||
|
|
||||||
|
# Allow foot to pipe command output
|
||||||
|
function precmd {
|
||||||
|
if ! builtin zle; then
|
||||||
|
print -n "\e]133;D\e\\"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
function preexec {
|
||||||
|
print -n "\e]133;C\e\\"
|
||||||
|
}
|
||||||
|
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
let
|
let
|
||||||
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
|
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
|
||||||
accent = "${config.lib.stylix.colors.base0D}";
|
accent = "${config.lib.stylix.colors.base0D}";
|
||||||
|
background = "${config.lib.stylix.colors.base00}";
|
||||||
in {
|
in {
|
||||||
imports = [ inputs.spicetify-nix.homeManagerModules.default ];
|
imports = [ inputs.spicetify-nix.homeManagerModules.default ];
|
||||||
|
|
||||||
@@ -10,7 +11,7 @@ in {
|
|||||||
|
|
||||||
programs.spicetify = {
|
programs.spicetify = {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = lib.mkForce spicePkgs.themes.text;
|
theme = lib.mkForce spicePkgs.themes.dribbblish;
|
||||||
|
|
||||||
colorScheme = "custom";
|
colorScheme = "custom";
|
||||||
|
|
||||||
@@ -18,6 +19,9 @@ in {
|
|||||||
button = accent;
|
button = accent;
|
||||||
button-active = accent;
|
button-active = accent;
|
||||||
tab-active = accent;
|
tab-active = accent;
|
||||||
|
player = background;
|
||||||
|
main = background;
|
||||||
|
sidebar = background;
|
||||||
};
|
};
|
||||||
|
|
||||||
enabledExtensions = with spicePkgs.extensions; [
|
enabledExtensions = with spicePkgs.extensions; [
|
||||||
@@ -27,7 +31,7 @@ in {
|
|||||||
hidePodcasts
|
hidePodcasts
|
||||||
adblock
|
adblock
|
||||||
fullAppDisplay
|
fullAppDisplay
|
||||||
shuffle
|
keyboardShortcut
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
8
home/programs/tailscale/default.nix
Normal file
8
home/programs/tailscale/default.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Tailscale is a VPN service that works on top of WireGuard.
|
||||||
|
# It allows me to access my servers and devices from anywhere.
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
home.packages = with pkgs; [ tailscale tailscale-systray ];
|
||||||
|
|
||||||
|
wayland.windowManager.hyprland.settings.exec-once =
|
||||||
|
[ "${pkgs.tailscale-systray}/bin/tailscale-systray" ];
|
||||||
|
}
|
||||||
@@ -1,12 +1,40 @@
|
|||||||
# Thunar is a file explorer
|
# Thunar is a file explorer
|
||||||
{ pkgs, ... }: {
|
{ pkgs, config, ... }:
|
||||||
|
let user = config.var.username;
|
||||||
|
in {
|
||||||
# ctrl + m to toggle the menubar
|
# ctrl + m to toggle the menubar
|
||||||
home.packages = with pkgs.xfce; [
|
home.packages = with pkgs; [
|
||||||
thunar
|
xfce.thunar
|
||||||
xfconf
|
xfce.xfconf
|
||||||
tumbler
|
xfce.tumbler
|
||||||
thunar-archive-plugin
|
xfce.thunar-archive-plugin
|
||||||
thunar-volman
|
xfce.thunar-volman
|
||||||
|
xfce.thunar-media-tags-plugin
|
||||||
|
p7zip
|
||||||
|
unar
|
||||||
|
];
|
||||||
|
|
||||||
|
gtk = {
|
||||||
|
iconTheme = {
|
||||||
|
name = "WhiteSur";
|
||||||
|
package = pkgs.whitesur-icon-theme.override {
|
||||||
|
boldPanelIcons = true;
|
||||||
|
alternativeIcons = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
XDG_ICON_DIR = "${pkgs.whitesur-icon-theme}/share/icons/WhiteSur";
|
||||||
|
};
|
||||||
|
|
||||||
|
# bookmarks for the side pane
|
||||||
|
gtk.gtk3.bookmarks = [
|
||||||
|
"file:///home/${user}/Downloads Downloads"
|
||||||
|
"file:///home/${user}/Pictures Pictures"
|
||||||
|
"file:///home/${user}/nextcloud Nextcloud"
|
||||||
|
"file:///home/${user}/.config/nixos NixOS"
|
||||||
|
"file:///home/${user}/dev Development"
|
||||||
];
|
];
|
||||||
|
|
||||||
home.file.".config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml".text = ''
|
home.file.".config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml".text = ''
|
||||||
|
|||||||
@@ -1,86 +1,14 @@
|
|||||||
{ pkgs, config, inputs, ... }:
|
# Zen is a minimalistic web browser.
|
||||||
|
{ pkgs, inputs, ... }:
|
||||||
let
|
let
|
||||||
accent = "#${config.lib.stylix.colors.base0D}";
|
# Create a wrapper script for zen-browser with Wayland enabled
|
||||||
background = "#${config.lib.stylix.colors.base00}";
|
zenWithWayland = pkgs.symlinkJoin {
|
||||||
foreground = "#${config.lib.stylix.colors.base05}";
|
name = "zen-browser-wayland";
|
||||||
muted = "#${config.lib.stylix.colors.base03}";
|
paths = [ inputs.zen-browser.packages."${pkgs.system}".default ];
|
||||||
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
settings = ''
|
postBuild = ''
|
||||||
{
|
wrapProgram $out/bin/zen \
|
||||||
"config": {
|
--set MOZ_ENABLE_WAYLAND 1
|
||||||
"title" : "Welcome Home",
|
|
||||||
"openLinksInNewTab": false,
|
|
||||||
"locale": "fr-FR",
|
|
||||||
"colors": {
|
|
||||||
"primary": "${accent}",
|
|
||||||
"background": "${background}",
|
|
||||||
"foreground": "${foreground}",
|
|
||||||
"muted": "#${muted}"
|
|
||||||
},
|
|
||||||
"folders": [
|
|
||||||
{
|
|
||||||
"name": "Bookmarks",
|
|
||||||
"links": [
|
|
||||||
{"title": "MyNixOs", "url": "https://mynixos.com", "icon": ""},
|
|
||||||
{"title": "Github", "url": "https://github.com", "icon": ""},
|
|
||||||
{"title": "Proton", "url": "https://mail.proton.me/u/0/inbox", "icon": ""},
|
|
||||||
{"title": "Cloudflare One", "url": "https://one.dash.cloudflare.com/", "icon": ""},
|
|
||||||
{"title": "Chat GPT", "url": "https://chat.openai.com/", "icon": ""},
|
|
||||||
{"title": "Nixvim", "url": "https://nix-community.github.io/nixvim/", "icon": ""},
|
|
||||||
{"title": "Hyprland Wiki", "url": "https://wiki.hyprland.org/", "icon": ""},
|
|
||||||
{"title": "Youtube", "url": "https://youtube.com", "icon": ""},
|
|
||||||
{"title": "Figma", "url": "https://figma.com", "icon": ""},
|
|
||||||
{"title": "Server", "url": "https://home.anotherhadi.com", "icon": ""}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Work",
|
|
||||||
"links": [
|
|
||||||
{"title": "Outlook", "url": "https://outlook.office.com/mail/", "icon": ""},
|
|
||||||
{"title": "Office", "url": "https://www.office.com/?auth=2", "icon": ""},
|
|
||||||
{"title": "Teams", "url": "https://teams.microsoft.com/_", "icon": ""}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
|
|
||||||
homepage = pkgs.buildNpmPackage {
|
|
||||||
pname = "homepage";
|
|
||||||
version = "0.0.0";
|
|
||||||
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "anotherhadi";
|
|
||||||
repo = "homepage";
|
|
||||||
rev = "b77d35ed3596eb451bd2ec78063d7cc6e73c773d";
|
|
||||||
hash = "sha256-j/40922kfAh6zqJ4IRYpr66YXNNYsxuXwZ0aiJFJea0=";
|
|
||||||
};
|
|
||||||
|
|
||||||
# npmDepsHash = lib.fakeHash;
|
|
||||||
npmDepsHash = "sha256-bG+CHTq2Rst3JMxsjAC81KhK+G7WwsTVD1eyP87g0z4=";
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
npm install
|
|
||||||
cp ${
|
|
||||||
pkgs.writeText "src/routes/config.json" settings
|
|
||||||
} src/routes/config.json
|
|
||||||
npm run build
|
|
||||||
mkdir $out
|
|
||||||
mv build $out
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "homepage";
|
|
||||||
homepage = "https://github.com/anotherhadi/homepage";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
in {
|
in { home.packages = [ zenWithWayland ]; }
|
||||||
home.file.".config/homepage" = {
|
|
||||||
source = "${homepage}/build";
|
|
||||||
recursive = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = with pkgs;
|
|
||||||
[ inputs.zen-browser.packages."${system}".default ];
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -12,13 +12,18 @@ let
|
|||||||
# bash
|
# bash
|
||||||
''
|
''
|
||||||
hyprpanel-hide
|
hyprpanel-hide
|
||||||
hyprctl keyword "general:gaps_in" 0
|
|
||||||
hyprctl keyword "general:gaps_out" 0
|
hyprctl --batch "\
|
||||||
hyprctl keyword "general:border_size" 1
|
keyword animations:enabled 0;\
|
||||||
hyprctl keyword "decoration:rounding" 0
|
keyword decoration:shadow:enabled 0;\
|
||||||
hyprctl keyword "decoration:drop_shadow" false
|
keyword decoration:blur:enabled 0;\
|
||||||
hyprctl keyword "decoration:inactive_opacity" 0.98
|
keyword general:gaps_in 0;\
|
||||||
hyprctl keyword "decoration:active_opacity" 1
|
keyword general:gaps_out 0;\
|
||||||
|
keyword general:border_size 1;\
|
||||||
|
keyword decoration:rounding 0;\
|
||||||
|
keyword decoration:inactive_opacity 1;\
|
||||||
|
keyword decoration:active_opacity 1"
|
||||||
|
|
||||||
echo "1" > /tmp/hyprfocus
|
echo "1" > /tmp/hyprfocus
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ let
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
hyprpanel-reload = pkgs.writeShellScriptBin "hyprpanel-reload" ''
|
hyprpanel-reload = pkgs.writeShellScriptBin "hyprpanel-reload" ''
|
||||||
[ $(pgrep "ags") ] && pkill ags
|
[ $(pgrep "hyprpanel") ] && pkill hyprpanel
|
||||||
hyprctl dispatch exec hyprpanel
|
hyprctl dispatch exec hyprpanel
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ let
|
|||||||
";Update;nixy update"
|
";Update;nixy update"
|
||||||
";Collect Garbage;nixy gc"
|
";Collect Garbage;nixy gc"
|
||||||
";Clean Boot Menu;nixy cb"
|
";Clean Boot Menu;nixy cb"
|
||||||
|
";List generation;nixy listgen"
|
||||||
";Hyprland Keybindings;nvim ${configDirectory}/docs/KEYBINDINGS-HYPRLAND.md"
|
";Hyprland Keybindings;nvim ${configDirectory}/docs/KEYBINDINGS-HYPRLAND.md"
|
||||||
";Wallpapers;zen https://github.com/anotherhadi/nixy-wallpapers"
|
";Wallpapers;zen https://github.com/anotherhadi/nixy-wallpapers"
|
||||||
)
|
)
|
||||||
@@ -44,12 +45,13 @@ let
|
|||||||
command=$(echo "$line" | sed 's/^[^;]*;//;s/^[^;]*;//')
|
command=$(echo "$line" | sed 's/^[^;]*;//;s/^[^;]*;//')
|
||||||
|
|
||||||
exec "$command"
|
exec "$command"
|
||||||
exit 0
|
exit $?
|
||||||
}
|
}
|
||||||
|
|
||||||
[[ $1 == "" ]] && ui
|
[[ $1 == "" ]] && ui
|
||||||
|
|
||||||
if [[ $1 == "rebuild" ]];then
|
if [[ $1 == "rebuild" ]];then
|
||||||
|
cd ${configDirectory} && git add .
|
||||||
sudo nixos-rebuild switch --flake ${configDirectory}#${hostname}
|
sudo nixos-rebuild switch --flake ${configDirectory}#${hostname}
|
||||||
elif [[ $1 == "upgrade" ]];then
|
elif [[ $1 == "upgrade" ]];then
|
||||||
sudo nixos-rebuild switch --upgrade --flake '${configDirectory}#${hostname}'
|
sudo nixos-rebuild switch --upgrade --flake '${configDirectory}#${hostname}'
|
||||||
@@ -59,17 +61,8 @@ let
|
|||||||
cd ${configDirectory} && sudo nix-collect-garbage -d
|
cd ${configDirectory} && sudo nix-collect-garbage -d
|
||||||
elif [[ $1 == "cb" ]];then
|
elif [[ $1 == "cb" ]];then
|
||||||
sudo /run/current-system/bin/switch-to-configuration boot
|
sudo /run/current-system/bin/switch-to-configuration boot
|
||||||
elif [[ $1 == "remote" ]];then
|
elif [[ $1 == "listgen" ]];then
|
||||||
cd ~/.config/nixos && git add . && git commit -m "update" && git push
|
sudo nix-env -p /nix/var/nix/profiles/system --list-generations
|
||||||
ssh jack -S -C "cd /home/hadi/.config/nixos && git pull && sudo -S nixos-rebuild switch --flake ~/.config/nixos#jack"
|
|
||||||
elif [[ $1 == "loop" ]];then
|
|
||||||
while true; do
|
|
||||||
nixy
|
|
||||||
echo "Press enter to continue, e to exit"
|
|
||||||
read -n 1 REPLY
|
|
||||||
clear
|
|
||||||
[[ $REPLY == "e" ]] && exit 0
|
|
||||||
done
|
|
||||||
else
|
else
|
||||||
echo "Unknown argument"
|
echo "Unknown argument"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ let
|
|||||||
mode="output"
|
mode="output"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
${pkgs.grimblast}/bin/grimblast --notify --freeze copy $mode "$folder/$filename" || exit 1
|
${pkgs.grimblast}/bin/grimblast --notify --freeze copysave $mode "$folder/$filename" || exit 1
|
||||||
|
|
||||||
if [[ $2 == "swappy" ]];then
|
if [[ $2 == "swappy" ]];then
|
||||||
${pkgs.swappy}/bin/swappy -f "$folder/$filename" -o "$HOME/Pictures/$filename"
|
${pkgs.swappy}/bin/swappy -f "$folder/$filename" -o "$HOME/Pictures/$filename"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#-
|
#-
|
||||||
#- - `menu` - Open wofi with drun mode. (wofi)
|
#- - `menu` - Open wofi with drun mode. (wofi)
|
||||||
#- - `powermenu` - Open power dropdown menu. (wofi)
|
#- - `powermenu` - Open power dropdown menu. (wofi)
|
||||||
|
#- - `quickmenu` - Open a dropdown menu with shortcuts and scripts. (wofi)
|
||||||
#- - `lock` - Lock the screen. (hyprlock)
|
#- - `lock` - Lock the screen. (hyprlock)
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
@@ -14,13 +15,18 @@ let
|
|||||||
if pgrep wofi; then
|
if pgrep wofi; then
|
||||||
pkill wofi
|
pkill wofi
|
||||||
else
|
else
|
||||||
wofi -p " Apps" --show drun
|
wofi -p " Apps" --show drun &
|
||||||
|
# Quit when not focused anymore
|
||||||
|
sleep 0.2
|
||||||
|
while true; do
|
||||||
|
window=$(hyprctl activewindow | grep "wofi")
|
||||||
|
if [[ ! $window ]]; then
|
||||||
|
pkill wofi
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 0.2
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
# if pgrep tofi; then
|
|
||||||
# pkill tofi
|
|
||||||
# else
|
|
||||||
# tofi-drun --drun-launch=true
|
|
||||||
# fi
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
powermenu = pkgs.writeShellScriptBin "powermenu"
|
powermenu = pkgs.writeShellScriptBin "powermenu"
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
# Batsignal is a simple utility to send battery notifications.
|
|
||||||
{
|
|
||||||
services.batsignal = {
|
|
||||||
enable = true;
|
|
||||||
extraArgs = [ "-c 10" "-w 30" "-f disabled" ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
# Hypridle is a daemon that listens for user activity and runs commands when the user is idle.
|
# Hypridle is a daemon that listens for user activity and runs commands when the user is idle.
|
||||||
{ pkgs, ... }: {
|
{ pkgs, lib, ... }: {
|
||||||
services.hypridle = {
|
services.hypridle = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
@@ -24,4 +24,6 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
systemd.user.services.hypridle.Unit.After =
|
||||||
|
lib.mkForce "graphical-session.target";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
let
|
let
|
||||||
animationSpeed = config.var.theme.animation-speed;
|
animationSpeed = config.theme.animation-speed;
|
||||||
|
|
||||||
animationDuration = if animationSpeed == "slow" then
|
animationDuration = if animationSpeed == "slow" then
|
||||||
"4"
|
"4"
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
bind = [
|
bind = [
|
||||||
"$mod,RETURN, exec, ${pkgs.kitty}/bin/kitty" # Kitty
|
"$mod,RETURN, exec, uwsm app -- ${pkgs.kitty}/bin/kitty" # Kitty
|
||||||
"$mod,E, exec, ${pkgs.xfce.thunar}/bin/thunar" # Thunar
|
"$mod,E, exec, uwsm app -- ${pkgs.xfce.thunar}/bin/thunar" # Thunar
|
||||||
"$mod,B, exec, zen" # Qutebrowser
|
"$mod,B, exec, uwsm app -- zen-beta" # Zen Browser
|
||||||
"$mod,K, exec, ${pkgs.bitwarden}/bin/bitwarden" # Bitwarden
|
"$mod,K, exec, uwsm app -- ${pkgs.bitwarden}/bin/bitwarden" # Bitwarden
|
||||||
"$mod,L, exec, ${pkgs.hyprlock}/bin/hyprlock" # Lock
|
"$mod,L, exec, uwsm app -- ${pkgs.hyprlock}/bin/hyprlock" # Lock
|
||||||
"$mod,X, exec, powermenu" # Powermenu
|
"$mod,X, exec, powermenu" # Powermenu
|
||||||
"$mod,SPACE, exec, menu" # Launcher
|
"$mod,SPACE, exec, menu" # Launcher
|
||||||
"$mod,C, exec, quickmenu" # Quickmenu
|
"$mod,C, exec, quickmenu" # Quickmenu
|
||||||
"$shiftMod,SPACE, exec, hyprfocus-toggle" # Toggle HyprFocus
|
"$shiftMod,SPACE, exec, hyprfocus-toggle" # Toggle HyprFocus
|
||||||
# "$mod,TAB, overview:toggle" # Overview
|
"$mod,P, exec, uwsm app -- ${pkgs.planify}/bin/io.github.alainm23.planify" # Planify
|
||||||
|
|
||||||
"$mod,Q, killactive," # Close window
|
"$mod,Q, killactive," # Close window
|
||||||
"$mod,T, togglefloating," # Toggle Floating
|
"$mod,T, togglefloating," # Toggle Floating
|
||||||
@@ -30,7 +30,6 @@
|
|||||||
"ALT,PRINT, exec, screenshot region swappy" # Screenshot region then edit
|
"ALT,PRINT, exec, screenshot region swappy" # Screenshot region then edit
|
||||||
|
|
||||||
"$shiftMod,T, exec, hyprpanel-toggle" # Toggle hyprpanel
|
"$shiftMod,T, exec, hyprpanel-toggle" # Toggle hyprpanel
|
||||||
"$shiftMod,S, exec, ${pkgs.qutebrowser}/bin/qutebrowser :open $(wofi --show dmenu -L 1 -p ' Search on internet')" # Search on internet with wofi
|
|
||||||
"$shiftMod,C, exec, clipboard" # Clipboard picker with wofi
|
"$shiftMod,C, exec, clipboard" # Clipboard picker with wofi
|
||||||
"$shiftMod,E, exec, ${pkgs.wofi-emoji}/bin/wofi-emoji" # Emoji picker with wofi
|
"$shiftMod,E, exec, ${pkgs.wofi-emoji}/bin/wofi-emoji" # Emoji picker with wofi
|
||||||
"$mod,F2, exec, night-shift" # Toggle night shift
|
"$mod,F2, exec, night-shift" # Toggle night shift
|
||||||
|
|||||||
@@ -1,21 +1,24 @@
|
|||||||
# So best window tiling manager
|
# So best window tiling manager
|
||||||
{ pkgs, config, inputs, ... }:
|
{ pkgs, config, inputs, lib, ... }:
|
||||||
let
|
let
|
||||||
border-size = config.var.theme.border-size;
|
border-size = config.theme.border-size;
|
||||||
gaps-in = config.var.theme.gaps-in;
|
gaps-in = config.theme.gaps-in;
|
||||||
gaps-out = config.var.theme.gaps-out;
|
gaps-out = config.theme.gaps-out;
|
||||||
active-opacity = config.var.theme.active-opacity;
|
active-opacity = config.theme.active-opacity;
|
||||||
inactive-opacity = config.var.theme.inactive-opacity;
|
inactive-opacity = config.theme.inactive-opacity;
|
||||||
rounding = config.var.theme.rounding;
|
rounding = config.theme.rounding;
|
||||||
blur = config.var.theme.blur;
|
blur = config.theme.blur;
|
||||||
keyboardLayout = config.var.keyboardLayout;
|
keyboardLayout = config.var.keyboardLayout;
|
||||||
|
background = "rgb(" + config.lib.stylix.colors.base00 + ")";
|
||||||
in {
|
in {
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./animations.nix
|
./animations.nix
|
||||||
./bindings.nix
|
./bindings.nix
|
||||||
./polkitagent.nix
|
./polkitagent.nix
|
||||||
# ./hyprspace.nix
|
./keyboard-backlight.nix # CHANGEME: This is for my laptop only
|
||||||
|
# FIXME: Broken on unstable
|
||||||
|
# ./hyprspace.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
@@ -44,29 +47,34 @@ in {
|
|||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
systemd.enable = true;
|
systemd = {
|
||||||
package = inputs.hyprland.packages."${pkgs.system}".hyprland;
|
enable = false;
|
||||||
|
variables = [
|
||||||
|
"--all"
|
||||||
|
]; # https://wiki.hyprland.org/Nix/Hyprland-on-Home-Manager/#programs-dont-work-in-systemd-services-but-do-on-the-terminal
|
||||||
|
};
|
||||||
|
package = null;
|
||||||
|
portalPackage = null;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
"$mod" = "SUPER";
|
"$mod" = "SUPER";
|
||||||
"$shiftMod" = "SUPER_SHIFT";
|
"$shiftMod" = "SUPER_SHIFT";
|
||||||
|
|
||||||
exec-once = [
|
exec-once = [
|
||||||
"${pkgs.bitwarden}/bin/bitwarden"
|
"dbus-update-activation-environment --systemd --all &"
|
||||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
"systemctl --user enable --now hyprpaper.service &"
|
||||||
|
"systemctl --user enable --now hypridle.service &"
|
||||||
|
"systemctl --user enable --now nextcloud-client.service &"
|
||||||
];
|
];
|
||||||
|
|
||||||
monitor = [
|
monitor = [
|
||||||
"eDP-2,highres,0x0,1"
|
"eDP-2,highres,0x0,1" # My internal laptop screen
|
||||||
"DP-7, disable"
|
"desc:AOC U34G2G1 0x00000E06,3440x1440@99.98,auto,1" # My external monitor
|
||||||
"DP-8, disable"
|
"desc:United Microelectr Corporation UMC SHARP,3840x2160,auto,2" # TV
|
||||||
"DP-9, disable"
|
",prefered,auto,1" # default
|
||||||
"HDMI-A-1,3440x1440@99.98,auto,1"
|
|
||||||
",prefered,auto,1"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
env = [
|
env = [
|
||||||
"XDG_SESSION_TYPE,wayland"
|
|
||||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||||
"MOZ_ENABLE_WAYLAND,1"
|
"MOZ_ENABLE_WAYLAND,1"
|
||||||
"ANKI_WAYLAND,1"
|
"ANKI_WAYLAND,1"
|
||||||
@@ -78,8 +86,6 @@ in {
|
|||||||
"QT_QPA_PLATFORM=wayland,xcb"
|
"QT_QPA_PLATFORM=wayland,xcb"
|
||||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||||
"ELECTRON_OZONE_PLATFORM_HINT,auto"
|
"ELECTRON_OZONE_PLATFORM_HINT,auto"
|
||||||
# "GTK_THEME,FlatColor:dark"
|
|
||||||
# "GTK2_RC_FILES,/home/hadi/.local/share/themes/FlatColor/gtk-2.0/gtkrc"
|
|
||||||
"__GL_GSYNC_ALLOWED,0"
|
"__GL_GSYNC_ALLOWED,0"
|
||||||
"__GL_VRR_ALLOWED,0"
|
"__GL_VRR_ALLOWED,0"
|
||||||
"DISABLE_QT5_COMPAT,0"
|
"DISABLE_QT5_COMPAT,0"
|
||||||
@@ -88,7 +94,6 @@ in {
|
|||||||
"WLR_BACKEND,vulkan"
|
"WLR_BACKEND,vulkan"
|
||||||
"WLR_RENDERER,vulkan"
|
"WLR_RENDERER,vulkan"
|
||||||
"WLR_NO_HARDWARE_CURSORS,1"
|
"WLR_NO_HARDWARE_CURSORS,1"
|
||||||
"XDG_SESSION_TYPE,wayland"
|
|
||||||
"SDL_VIDEODRIVER,wayland"
|
"SDL_VIDEODRIVER,wayland"
|
||||||
"CLUTTER_BACKEND,wayland"
|
"CLUTTER_BACKEND,wayland"
|
||||||
"AQ_DRM_DEVICES,/dev/dri/card2:/dev/dri/card1" # CHANGEME: Related to the GPU
|
"AQ_DRM_DEVICES,/dev/dri/card2:/dev/dri/card1" # CHANGEME: Related to the GPU
|
||||||
@@ -104,8 +109,8 @@ in {
|
|||||||
gaps_in = gaps-in;
|
gaps_in = gaps-in;
|
||||||
gaps_out = gaps-out;
|
gaps_out = gaps-out;
|
||||||
border_size = border-size;
|
border_size = border-size;
|
||||||
border_part_of_window = true;
|
|
||||||
layout = "master";
|
layout = "master";
|
||||||
|
"col.inactive_border" = lib.mkForce background;
|
||||||
};
|
};
|
||||||
|
|
||||||
decoration = {
|
decoration = {
|
||||||
@@ -117,7 +122,10 @@ in {
|
|||||||
range = 20;
|
range = 20;
|
||||||
render_power = 3;
|
render_power = 3;
|
||||||
};
|
};
|
||||||
blur = { enabled = if blur then "true" else "false"; };
|
blur = {
|
||||||
|
enabled = if blur then "true" else "false";
|
||||||
|
size = 18;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
master = {
|
master = {
|
||||||
@@ -137,8 +145,39 @@ in {
|
|||||||
new_window_takes_over_fullscreen = 2;
|
new_window_takes_over_fullscreen = 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
windowrulev2 =
|
windowrulev2 = [
|
||||||
[ "float, tag:modal" "pin, tag:modal" "center, tag:modal" ];
|
"float, tag:modal"
|
||||||
|
"pin, tag:modal"
|
||||||
|
"center, tag:modal"
|
||||||
|
# telegram media viewer
|
||||||
|
"float, title:^(Media viewer)$"
|
||||||
|
|
||||||
|
# Bitwarden extension
|
||||||
|
"float, title:^(.*Bitwarden Password Manager.*)$"
|
||||||
|
|
||||||
|
# gnome calculator
|
||||||
|
"float, class:^(org.gnome.Calculator)$"
|
||||||
|
"size 360 490, class:^(org.gnome.Calculator)$"
|
||||||
|
|
||||||
|
# make Firefox/Zen PiP window floating and sticky
|
||||||
|
"float, title:^(Picture-in-Picture)$"
|
||||||
|
"pin, title:^(Picture-in-Picture)$"
|
||||||
|
|
||||||
|
# idle inhibit while watching videos
|
||||||
|
"idleinhibit focus, class:^(mpv|.+exe|celluloid)$"
|
||||||
|
"idleinhibit focus, class:^(zen)$, title:^(.*YouTube.*)$"
|
||||||
|
"idleinhibit fullscreen, class:^(zen)$"
|
||||||
|
|
||||||
|
"dimaround, class:^(gcr-prompter)$"
|
||||||
|
"dimaround, class:^(xdg-desktop-portal-gtk)$"
|
||||||
|
"dimaround, class:^(polkit-gnome-authentication-agent-1)$"
|
||||||
|
"dimaround, class:^(zen)$, title:^(File Upload)$"
|
||||||
|
|
||||||
|
# fix xwayland apps
|
||||||
|
"rounding 0, xwayland:1"
|
||||||
|
"center, class:^(.*jetbrains.*)$, title:^(Confirm Exit|Open Project|win424|win201|splash)$"
|
||||||
|
"size 640 400, class:^(.*jetbrains.*)$, title:^(splash)$"
|
||||||
|
];
|
||||||
|
|
||||||
layerrule = [ "noanim, launcher" "noanim, ^ags-.*" ];
|
layerrule = [ "noanim, launcher" "noanim, ^ags-.*" ];
|
||||||
|
|
||||||
@@ -160,6 +199,4 @@ in {
|
|||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.user.targets.hyprland-session.Unit.Wants =
|
|
||||||
[ "xdg-desktop-autostart.target" ];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
|
# Hyprspace is a hyprland plugin that provides a workspaces overview (three-finger swipe up) and a workspace switcher (three-finger down).
|
||||||
{ inputs, pkgs, ... }: {
|
{ inputs, pkgs, ... }: {
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
plugins = [ inputs.hyprspace.packages.${pkgs.system}.Hyprspace ];
|
plugins = [ inputs.hyprspace.packages.${pkgs.system}.Hyprspace ];
|
||||||
settings = {
|
settings = {
|
||||||
plugin = { overview = { autoDrag = false; }; };
|
plugin = {
|
||||||
|
overview = {
|
||||||
bind = [
|
centerAligned = true;
|
||||||
"$mod,TAB, overview:toggle" # Overview
|
hideTopLayers = true;
|
||||||
|
hideOverlayLayers = true;
|
||||||
];
|
showNewWorkspace = true;
|
||||||
|
exitOnClick = true;
|
||||||
|
exitOnSwitch = true;
|
||||||
|
drawActiveWorkspace = true;
|
||||||
|
autoDrag = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
32
home/system/hyprland/keyboard-backlight.nix
Normal file
32
home/system/hyprland/keyboard-backlight.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# Turn the keyboard red/off when the battery is low
|
||||||
|
{ pkgs, config, ... }:
|
||||||
|
let
|
||||||
|
keyboard-backlight = pkgs.writeShellScriptBin "keyboard-backlight" ''
|
||||||
|
function set_keyboard_backlight {
|
||||||
|
local color=$1
|
||||||
|
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone00
|
||||||
|
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone01
|
||||||
|
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone02
|
||||||
|
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone03
|
||||||
|
}
|
||||||
|
state="white"
|
||||||
|
while true; do
|
||||||
|
BATTERY_LEVEL=$(cat /sys/class/power_supply/BAT*/capacity)
|
||||||
|
if [[ $BATTERY_LEVEL -le 10 ]]; then
|
||||||
|
if [[ $state == "red" ]];then
|
||||||
|
state="white"
|
||||||
|
set_keyboard_backlight "000000"
|
||||||
|
else
|
||||||
|
state="red"
|
||||||
|
set_keyboard_backlight "FF0000"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
state="white"
|
||||||
|
set_keyboard_backlight ${config.lib.stylix.colors.base0D}
|
||||||
|
fi
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
wayland.windowManager.hyprland.settings.exec-once = [ keyboard-backlight ];
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{ inputs, pkgs, ... }: {
|
# HyprPolkitAgent is a simple polkit agent for wayland compositors
|
||||||
home.packages =
|
{ pkgs, ... }: {
|
||||||
[ inputs.hyprpolkitagent.packages."${pkgs.system}".hyprpolkitagent ];
|
home.packages = with pkgs; [ hyprpolkitagent ];
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings.exec-once =
|
wayland.windowManager.hyprland.settings.exec-once =
|
||||||
[ "systemctl --user start hyprpolkitagent" ];
|
[ "systemctl --user start hyprpolkitagent" ];
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
# Hyprlock is a lockscreen for Hyprland
|
# Hyprlock is a lockscreen for Hyprland
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
foreground = "rgba(216, 222, 233, 0.70)";
|
foreground = "rgba(${config.theme.textColorOnWallpaper}ee)";
|
||||||
imageStr = toString config.stylix.image;
|
|
||||||
font = config.stylix.fonts.serif.name;
|
font = config.stylix.fonts.serif.name;
|
||||||
in {
|
in {
|
||||||
programs.hyprlock = {
|
programs.hyprlock = {
|
||||||
@@ -17,7 +16,6 @@ in {
|
|||||||
# BACKGROUND
|
# BACKGROUND
|
||||||
background = {
|
background = {
|
||||||
monitor = "";
|
monitor = "";
|
||||||
path = imageStr;
|
|
||||||
blur_passes = 0;
|
blur_passes = 0;
|
||||||
contrast = 0.8916;
|
contrast = 0.8916;
|
||||||
brightness = 0.7172;
|
brightness = 0.7172;
|
||||||
@@ -73,8 +71,8 @@ in {
|
|||||||
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
|
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
|
||||||
dots_spacing = 0.2; # Scale of dots' absolute size, 0.0 - 1.0
|
dots_spacing = 0.2; # Scale of dots' absolute size, 0.0 - 1.0
|
||||||
dots_center = true;
|
dots_center = true;
|
||||||
outer_color = "rgba(255, 255, 255, 0)";
|
outer_color = "rgba(25, 25, 25, 0)";
|
||||||
inner_color = "rgba(255, 255, 255, 0.1)";
|
inner_color = "rgba(25, 25, 25, 0.1)";
|
||||||
font_color = foreground;
|
font_color = foreground;
|
||||||
fade_on_empty = false;
|
fade_on_empty = false;
|
||||||
font_family = font + " Bold";
|
font_family = font + " Bold";
|
||||||
|
|||||||
@@ -2,25 +2,28 @@
|
|||||||
# Display informations like workspaces, battery, wifi, ...
|
# Display informations like workspaces, battery, wifi, ...
|
||||||
{ inputs, config, ... }:
|
{ inputs, config, ... }:
|
||||||
let
|
let
|
||||||
transparentButtons = config.var.theme.bar.transparentButtons;
|
transparentButtons = config.theme.bar.transparentButtons;
|
||||||
|
|
||||||
accent = "#${config.lib.stylix.colors.base0D}";
|
accent = "#${config.lib.stylix.colors.base0D}";
|
||||||
accent-alt = "#${config.lib.stylix.colors.base03}";
|
accent-alt = "#${config.lib.stylix.colors.base03}";
|
||||||
background = "#${config.lib.stylix.colors.base00}";
|
background = "#${config.lib.stylix.colors.base00}";
|
||||||
background-alt = "#${config.lib.stylix.colors.base01}";
|
background-alt = "#${config.lib.stylix.colors.base01}";
|
||||||
foreground = "#${config.lib.stylix.colors.base05}";
|
foreground = "#${config.lib.stylix.colors.base05}";
|
||||||
|
foregroundOnWallpaper = "#${config.theme.textColorOnWallpaper}";
|
||||||
font = "${config.stylix.fonts.serif.name}";
|
font = "${config.stylix.fonts.serif.name}";
|
||||||
fontSize = "${toString config.stylix.fonts.sizes.desktop}";
|
fontSize = "${toString config.stylix.fonts.sizes.desktop}";
|
||||||
|
|
||||||
rounding = config.var.theme.rounding;
|
rounding = config.theme.rounding;
|
||||||
border-size = config.var.theme.border-size;
|
border-size = config.theme.border-size;
|
||||||
|
|
||||||
gaps-out = config.var.theme.gaps-out;
|
gaps-out = config.theme.gaps-out;
|
||||||
gaps-in = config.var.theme.gaps-in;
|
gaps-in = config.theme.gaps-in;
|
||||||
|
|
||||||
floating = config.var.theme.bar.floating;
|
floating = config.theme.bar.floating;
|
||||||
transparent = config.var.theme.bar.transparent;
|
transparent = config.theme.bar.transparent;
|
||||||
position = config.var.theme.bar.position;
|
position = config.theme.bar.position;
|
||||||
|
|
||||||
|
notificationOpacity = 90;
|
||||||
|
|
||||||
location = config.var.location;
|
location = config.var.location;
|
||||||
in {
|
in {
|
||||||
@@ -32,20 +35,22 @@ in {
|
|||||||
hyprland.enable = true;
|
hyprland.enable = true;
|
||||||
overwrite.enable = true;
|
overwrite.enable = true;
|
||||||
overlay.enable = true;
|
overlay.enable = true;
|
||||||
layout = {
|
settings = {
|
||||||
"bar.layouts" = {
|
layout = {
|
||||||
"0" = {
|
"bar.layouts" = {
|
||||||
"left" = [ "dashboard" "workspaces" "windowtitle" ];
|
"*" = {
|
||||||
"middle" = [ "media" ];
|
"left" = [ "dashboard" "workspaces" "windowtitle" ];
|
||||||
"right" = [
|
"middle" = [ "media" "cava" ];
|
||||||
"systray"
|
"right" = [
|
||||||
"volume"
|
"systray"
|
||||||
"bluetooth"
|
"volume"
|
||||||
"battery"
|
"bluetooth"
|
||||||
"network"
|
"battery"
|
||||||
"clock"
|
"network"
|
||||||
"notifications"
|
"clock"
|
||||||
];
|
"notifications"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -95,6 +100,7 @@ in {
|
|||||||
"menus.clock.weather.location" = "${location}";
|
"menus.clock.weather.location" = "${location}";
|
||||||
"menus.clock.weather.unit" = "metric";
|
"menus.clock.weather.unit" = "metric";
|
||||||
"menus.dashboard.powermenu.confirmation" = false;
|
"menus.dashboard.powermenu.confirmation" = false;
|
||||||
|
"menus.dashboard.powermenu.avatar.image" = "~/.face.icon";
|
||||||
|
|
||||||
"menus.dashboard.shortcuts.left.shortcut1.icon" = "";
|
"menus.dashboard.shortcuts.left.shortcut1.icon" = "";
|
||||||
"menus.dashboard.shortcuts.left.shortcut1.command" = "zen";
|
"menus.dashboard.shortcuts.left.shortcut1.command" = "zen";
|
||||||
@@ -145,7 +151,10 @@ in {
|
|||||||
+ (if transparentButtons && transparent then "00" else "")}";
|
+ (if transparentButtons && transparent then "00" else "")}";
|
||||||
"theme.bar.buttons.style" = "default";
|
"theme.bar.buttons.style" = "default";
|
||||||
"theme.bar.buttons.monochrome" = true;
|
"theme.bar.buttons.monochrome" = true;
|
||||||
"theme.bar.buttons.text" = "${foreground}";
|
"theme.bar.buttons.text" = if transparent && transparentButtons then
|
||||||
|
"${foregroundOnWallpaper}"
|
||||||
|
else
|
||||||
|
"${foreground}";
|
||||||
"theme.bar.buttons.background" =
|
"theme.bar.buttons.background" =
|
||||||
"${(if transparent then background else background-alt)
|
"${(if transparent then background else background-alt)
|
||||||
+ (if transparentButtons then "00" else "")}";
|
+ (if transparentButtons then "00" else "")}";
|
||||||
@@ -155,13 +164,6 @@ in {
|
|||||||
"theme.bar.buttons.notifications.hover" = "${background}";
|
"theme.bar.buttons.notifications.hover" = "${background}";
|
||||||
"theme.bar.buttons.notifications.total" = "${accent}";
|
"theme.bar.buttons.notifications.total" = "${accent}";
|
||||||
"theme.bar.buttons.notifications.icon" = "${accent}";
|
"theme.bar.buttons.notifications.icon" = "${accent}";
|
||||||
"theme.notification.background" = "${background-alt}";
|
|
||||||
"theme.notification.actions.background" = "${accent}";
|
|
||||||
"theme.notification.actions.text" = "${foreground}";
|
|
||||||
"theme.notification.label" = "${accent}";
|
|
||||||
"theme.notification.border" = "${background-alt}";
|
|
||||||
"theme.notification.text" = "${foreground}";
|
|
||||||
"theme.notification.labelicon" = "${accent}";
|
|
||||||
"theme.osd.bar_color" = "${accent}";
|
"theme.osd.bar_color" = "${accent}";
|
||||||
"theme.osd.bar_overflow_color" = "${accent-alt}";
|
"theme.osd.bar_overflow_color" = "${accent-alt}";
|
||||||
"theme.osd.icon" = "${background}";
|
"theme.osd.icon" = "${background}";
|
||||||
@@ -180,6 +182,25 @@ in {
|
|||||||
"bar.workspaces.showApplicationIcons" = true;
|
"bar.workspaces.showApplicationIcons" = true;
|
||||||
"bar.workspaces.showWsIcons" = true;
|
"bar.workspaces.showWsIcons" = true;
|
||||||
"theme.bar.dropdownGap" = "4.5em";
|
"theme.bar.dropdownGap" = "4.5em";
|
||||||
|
"theme.bar.menus.shadow" =
|
||||||
|
"${if transparent then "0 0 0 0" else "0px 0px 3px 1px #16161e"}";
|
||||||
|
"bar.customModules.cava.showIcon" = false;
|
||||||
|
"bar.customModules.cava.stereo" = true;
|
||||||
|
"bar.customModules.cava.showActiveOnly" = true;
|
||||||
|
"menus.power.lowBatteryNotification" = true;
|
||||||
|
"notifications.position" = "top right";
|
||||||
|
"notifications.showActionsOnHover" = true;
|
||||||
|
"theme.notification.enableShadow" = true;
|
||||||
|
"theme.notification.opacity" = notificationOpacity;
|
||||||
|
"theme.notification.background" = "${background-alt}";
|
||||||
|
"theme.notification.actions.background" = "${accent}";
|
||||||
|
"theme.notification.actions.text" = "${foreground}";
|
||||||
|
"theme.notification.label" = "${accent}";
|
||||||
|
"theme.notification.border" = "${background-alt}";
|
||||||
|
"theme.notification.text" = "${foreground}";
|
||||||
|
"theme.notification.labelicon" = "${accent}";
|
||||||
|
"theme.notification.close_button.background" = "${background-alt}";
|
||||||
|
"theme.notification.close_button.label" = "#f38ba8";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Hyprpaper is used to set the wallpaper on the system
|
# Hyprpaper is used to set the wallpaper on the system
|
||||||
{
|
{ lib, ... }: {
|
||||||
# The wallpaper is set by stylix
|
# The wallpaper is set by stylix
|
||||||
services.hyprpaper = {
|
services.hyprpaper = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -9,4 +9,6 @@
|
|||||||
splash_offset = 2.0;
|
splash_offset = 2.0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
systemd.user.services.hyprpaper.Unit.After =
|
||||||
|
lib.mkForce "graphical-session.target";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,40 +1,93 @@
|
|||||||
# Mime allows us to configure the default applications for each file type
|
{ pkgs, lib, ... }:
|
||||||
{
|
with lib;
|
||||||
xdg.mimeApps = {
|
let
|
||||||
enable = true;
|
defaultApps = {
|
||||||
defaultApplications = {
|
browser = [ "zen-beta.desktop" ];
|
||||||
"text/markdown" = "nvim.desktop";
|
text = [ "org.gnome.TextEditor.desktop" ];
|
||||||
"text/plain" = "nvim.desktop";
|
image = [ "imv-dir.desktop" ];
|
||||||
"text/x-shellscript" = "nvim.desktop";
|
audio = [ "mpv.desktop" ];
|
||||||
"text/x-python" = "nvim.desktop";
|
video = [ "mpv.desktop" ];
|
||||||
"text/x-go" = "nvim.desktop";
|
directory = [ "thunar.desktop" ];
|
||||||
"text/css" = "nvim.desktop";
|
office = [ "libreoffice.desktop" ];
|
||||||
"text/javascript" = "nvim.desktop";
|
pdf = [ "zathura.desktop" ];
|
||||||
"text/x-c" = "nvim.desktop";
|
terminal = [ "kitty.desktop" ];
|
||||||
"text/x-c++" = "nvim.desktop";
|
discord = [ "discord.desktop" ];
|
||||||
"text/x-java" = "nvim.desktop";
|
};
|
||||||
"text/x-rust" = "nvim.desktop";
|
|
||||||
"text/x-yaml" = "nvim.desktop";
|
mimeMap = {
|
||||||
"text/x-toml" = "nvim.desktop";
|
text = [ "text/plain" ];
|
||||||
"text/x-dockerfile" = "nvim.desktop";
|
image = [
|
||||||
"text/x-xml" = "nvim.desktop";
|
"image/bmp"
|
||||||
"text/x-php" = "nvim.desktop";
|
"image/gif"
|
||||||
"image/jpeg" = "imv.desktop";
|
"image/jpeg"
|
||||||
"image/jpg" = "imv.desktop";
|
"image/jpg"
|
||||||
"image/webp" = "imv.desktop";
|
"image/png"
|
||||||
"image/gif" = "zen.desktop";
|
"image/svg+xml"
|
||||||
"x-scheme-handler/http" = "zen.desktop";
|
"image/tiff"
|
||||||
"x-scheme-handler/https" = "zen.desktop";
|
"image/vnd.microsoft.icon"
|
||||||
"text/html" = "zen.desktop";
|
"image/webp"
|
||||||
"application/pdf" = "zathura.desktop";
|
];
|
||||||
"image/png" = "imv-dir.desktop";
|
audio = [
|
||||||
"x-scheme-handler/chrome" = "zen.desktop";
|
"audio/aac"
|
||||||
"application/x-extension-htm" = "zen.desktop";
|
"audio/mpeg"
|
||||||
"application/x-extension-html" = "zen.desktop";
|
"audio/ogg"
|
||||||
"application/x-extension-shtml" = "zen.desktop";
|
"audio/opus"
|
||||||
"application/xhtml+xml" = "zen.desktop";
|
"audio/wav"
|
||||||
"application/x-extension-xhtml" = "zen.desktop";
|
"audio/webm"
|
||||||
"application/x-extension-xht" = "zen.desktop";
|
"audio/x-matroska"
|
||||||
|
];
|
||||||
|
video = [
|
||||||
|
"video/mp2t"
|
||||||
|
"video/mp4"
|
||||||
|
"video/mpeg"
|
||||||
|
"video/ogg"
|
||||||
|
"video/webm"
|
||||||
|
"video/x-flv"
|
||||||
|
"video/x-matroska"
|
||||||
|
"video/x-msvideo"
|
||||||
|
];
|
||||||
|
directory = [ "inode/directory" ];
|
||||||
|
browser = [
|
||||||
|
"text/html"
|
||||||
|
"x-scheme-handler/about"
|
||||||
|
"x-scheme-handler/http"
|
||||||
|
"x-scheme-handler/https"
|
||||||
|
"x-scheme-handler/unknown"
|
||||||
|
];
|
||||||
|
office = [
|
||||||
|
"application/vnd.oasis.opendocument.text"
|
||||||
|
"application/vnd.oasis.opendocument.spreadsheet"
|
||||||
|
"application/vnd.oasis.opendocument.presentation"
|
||||||
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
||||||
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||||
|
"application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
||||||
|
"application/msword"
|
||||||
|
"application/vnd.ms-excel"
|
||||||
|
"application/vnd.ms-powerpoint"
|
||||||
|
"application/rtf"
|
||||||
|
];
|
||||||
|
pdf = [ "application/pdf" ];
|
||||||
|
terminal = [ "terminal" ];
|
||||||
|
# archive = [
|
||||||
|
# "application/zip"
|
||||||
|
# "application/rar"
|
||||||
|
# "application/7z"
|
||||||
|
# "application/*tar"
|
||||||
|
# ];
|
||||||
|
discord = [ "x-scheme-handler/discord" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
associations = with lists;
|
||||||
|
listToAttrs (flatten (mapAttrsToList
|
||||||
|
(key: map (type: attrsets.nameValuePair type defaultApps."${key}"))
|
||||||
|
mimeMap));
|
||||||
|
in {
|
||||||
|
xdg = {
|
||||||
|
configFile."mimeapps.list".force = true;
|
||||||
|
mimeApps = {
|
||||||
|
enable = true;
|
||||||
|
associations.added = associations;
|
||||||
|
defaultApplications = associations;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
# Tofi is a dmeny-like application launcher
|
|
||||||
{ config, lib, ... }:
|
|
||||||
let
|
|
||||||
background = "#${config.lib.stylix.colors.base00}70";
|
|
||||||
accent = "#${config.lib.stylix.colors.base0D}";
|
|
||||||
in {
|
|
||||||
programs.tofi = lib.mkForce {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
border-width = 0;
|
|
||||||
background-color = background;
|
|
||||||
prompt-color = accent;
|
|
||||||
selection-color = accent;
|
|
||||||
height = "100%";
|
|
||||||
num-results = 5;
|
|
||||||
outline-width = 0;
|
|
||||||
padding-left = "35%";
|
|
||||||
padding-top = "35%";
|
|
||||||
result-spacing = 25;
|
|
||||||
width = "100%";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -6,7 +6,7 @@ let
|
|||||||
background-alt = "#${config.lib.stylix.colors.base01}";
|
background-alt = "#${config.lib.stylix.colors.base01}";
|
||||||
foreground = "#${config.lib.stylix.colors.base05}";
|
foreground = "#${config.lib.stylix.colors.base05}";
|
||||||
font = config.stylix.fonts.serif.name;
|
font = config.stylix.fonts.serif.name;
|
||||||
rounding = config.var.theme.rounding;
|
rounding = config.theme.rounding;
|
||||||
font-size = config.stylix.fonts.sizes.popups;
|
font-size = config.stylix.fonts.sizes.popups;
|
||||||
in {
|
in {
|
||||||
|
|
||||||
@@ -17,13 +17,12 @@ in {
|
|||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
allow_markup = true;
|
allow_markup = true;
|
||||||
width = 450;
|
width = 650;
|
||||||
show = "drun";
|
show = "drun";
|
||||||
prompt = "Apps";
|
prompt = "Apps";
|
||||||
normal_window = true;
|
normal_window = true;
|
||||||
layer = "top";
|
layer = "top";
|
||||||
term = "foot";
|
height = "325px";
|
||||||
height = "305px";
|
|
||||||
orientation = "vertical";
|
orientation = "vertical";
|
||||||
halign = "fill";
|
halign = "fill";
|
||||||
line_wrap = "off";
|
line_wrap = "off";
|
||||||
@@ -48,7 +47,7 @@ in {
|
|||||||
''
|
''
|
||||||
* {
|
* {
|
||||||
font-family: "${font}";
|
font-family: "${font}";
|
||||||
font-weight: 500;
|
font-weight: 600;
|
||||||
font-size: ${toString font-size}px;
|
font-size: ${toString font-size}px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,22 @@
|
|||||||
{ config, ... }: {
|
{ config, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
|
# Mostly system related configuration
|
||||||
../../nixos/nvidia.nix # CHANGEME: Remove this line if you don't have an Nvidia GPU
|
../../nixos/nvidia.nix # CHANGEME: Remove this line if you don't have an Nvidia GPU
|
||||||
../../nixos/prime.nix # CHANGEME: Remove this line if you don't have an Nvidia GPU
|
|
||||||
|
|
||||||
../../nixos/audio.nix
|
../../nixos/audio.nix
|
||||||
../../nixos/auto-upgrade.nix
|
|
||||||
../../nixos/bluetooth.nix
|
../../nixos/bluetooth.nix
|
||||||
../../nixos/fonts.nix
|
../../nixos/fonts.nix
|
||||||
../../nixos/home-manager.nix
|
../../nixos/home-manager.nix
|
||||||
../../nixos/network-manager.nix
|
|
||||||
../../nixos/nix.nix
|
../../nixos/nix.nix
|
||||||
../../nixos/systemd-boot.nix
|
../../nixos/systemd-boot.nix
|
||||||
../../nixos/timezone.nix
|
../../nixos/sddm.nix
|
||||||
../../nixos/tuigreet.nix
|
|
||||||
../../nixos/users.nix
|
../../nixos/users.nix
|
||||||
../../nixos/utils.nix
|
../../nixos/utils.nix
|
||||||
../../nixos/xdg-portal.nix
|
../../nixos/tailscale.nix
|
||||||
../../nixos/variables-config.nix
|
../../nixos/hyprland.nix
|
||||||
../../nixos/docker.nix
|
|
||||||
|
|
||||||
# Choose your theme here
|
../../nixos/omen.nix # For my laptop only
|
||||||
../../themes/stylix/2025.nix
|
|
||||||
|
|
||||||
|
# You should let those lines as is
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./variables.nix
|
./variables.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,26 +1,28 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }: {
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
|
||||||
|
|
||||||
boot = {
|
{
|
||||||
initrd.availableKernelModules =
|
imports =
|
||||||
[ "nvme" "xhci_pci" "usb_storage" "sd_mod" ];
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
initrd.kernelModules = [ ];
|
];
|
||||||
kernelModules = [ "kvm-amd" ];
|
|
||||||
extraModulePackages = [ ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "uas" "usbhid" "sd_mod" ];
|
||||||
device = "/dev/disk/by-uuid/6c2487ec-20ff-4ce3-9396-281c2094aba1";
|
boot.initrd.kernelModules = [ ];
|
||||||
fsType = "ext4";
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
};
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
fileSystems."/" =
|
||||||
device = "/dev/disk/by-uuid/B4EA-C54F";
|
{ device = "/dev/disk/by-uuid/6320d3c6-0231-45ec-817a-c6f0e39aab73";
|
||||||
fsType = "vfat";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/5251-9B85";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
@@ -30,9 +32,9 @@
|
|||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp7s0f4u1u4.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.amd.updateMicrocode =
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{ pkgs, config, ... }: {
|
{ pkgs, config, ... }: {
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
# Mostly user-specific configuration
|
||||||
./variables.nix
|
./variables.nix
|
||||||
|
|
||||||
# Programs
|
# Programs
|
||||||
../../home/programs/kitty
|
../../home/programs/kitty
|
||||||
../../home/programs/nvim
|
../../home/programs/nvim
|
||||||
# ../../home/programs/qutebrowser
|
|
||||||
../../home/programs/shell
|
../../home/programs/shell
|
||||||
../../home/programs/fetch
|
../../home/programs/fetch
|
||||||
../../home/programs/git
|
../../home/programs/git
|
||||||
@@ -16,6 +16,9 @@
|
|||||||
../../home/programs/lazygit
|
../../home/programs/lazygit
|
||||||
../../home/programs/zen
|
../../home/programs/zen
|
||||||
../../home/programs/duckduckgo-colorscheme
|
../../home/programs/duckduckgo-colorscheme
|
||||||
|
../../home/programs/discord
|
||||||
|
../../home/programs/tailscale
|
||||||
|
../../home/programs/anyrun
|
||||||
|
|
||||||
# Scripts
|
# Scripts
|
||||||
../../home/scripts # All scripts
|
../../home/scripts # All scripts
|
||||||
@@ -27,7 +30,6 @@
|
|||||||
../../home/system/hyprpanel
|
../../home/system/hyprpanel
|
||||||
../../home/system/hyprpaper
|
../../home/system/hyprpaper
|
||||||
../../home/system/wofi
|
../../home/system/wofi
|
||||||
../../home/system/batsignal
|
|
||||||
../../home/system/zathura
|
../../home/system/zathura
|
||||||
../../home/system/mime
|
../../home/system/mime
|
||||||
../../home/system/udiskie
|
../../home/system/udiskie
|
||||||
@@ -42,31 +44,37 @@
|
|||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
# Apps
|
# Apps
|
||||||
discord # Chat
|
|
||||||
bitwarden # Password manager
|
bitwarden # Password manager
|
||||||
vlc # Video player
|
vlc # Video player
|
||||||
blanket # White-noise app
|
blanket # White-noise app
|
||||||
obsidian # Note taking app
|
obsidian # Note taking app
|
||||||
planify # Todolists
|
planify # Todolists
|
||||||
gnome-calendar
|
gnome-calendar # Calendar
|
||||||
|
textpieces # Manipulate texts
|
||||||
|
curtail # Compress images
|
||||||
|
resources
|
||||||
|
gnome-clocks
|
||||||
|
gnome-text-editor
|
||||||
|
mpv # Video player
|
||||||
|
figma-linux
|
||||||
|
|
||||||
# Dev
|
# Dev
|
||||||
go
|
go
|
||||||
nodejs
|
nodejs
|
||||||
python3
|
python3
|
||||||
jq
|
jq
|
||||||
figlet
|
|
||||||
just
|
just
|
||||||
|
pnpm
|
||||||
|
air
|
||||||
|
|
||||||
# Utils
|
# Utils
|
||||||
zip
|
zip
|
||||||
unzip
|
unzip
|
||||||
optipng
|
optipng
|
||||||
|
jpegoptim
|
||||||
pfetch
|
pfetch
|
||||||
pandoc
|
|
||||||
btop
|
btop
|
||||||
textpieces # Manipulate texts
|
fastfetch
|
||||||
curtail # Compress images
|
|
||||||
|
|
||||||
# Just cool
|
# Just cool
|
||||||
peaclock
|
peaclock
|
||||||
@@ -75,7 +83,7 @@
|
|||||||
cmatrix
|
cmatrix
|
||||||
|
|
||||||
# Backup
|
# Backup
|
||||||
firefox
|
brave
|
||||||
vscode
|
vscode
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -23,10 +23,6 @@
|
|||||||
key_groups:
|
key_groups:
|
||||||
- age:
|
- age:
|
||||||
- *primary
|
- *primary
|
||||||
- path_regex: hosts/desktop/secrets/secrets.yaml$
|
|
||||||
key_groups:
|
|
||||||
- age:
|
|
||||||
- *primary
|
|
||||||
- path_regex: hosts/server/secrets/secrets.yaml$
|
- path_regex: hosts/server/secrets/secrets.yaml$
|
||||||
key_groups:
|
key_groups:
|
||||||
- age:
|
- age:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
pia: ENC[AES256_GCM,data:0bnhHeVqKSLHVimd78a94ShHlO3+LUoZ4oiKD3cnBYkaZsw=,iv:S+/IChlFlqdI+PyFF+Ti4AJUkch2MS0qKiqHL1Q3RMk=,tag:+v2kV70ou84eIc01dKnAhA==,type:str]
|
pia: ENC[AES256_GCM,data:0bnhHeVqKSLHVimd78a94ShHlO3+LUoZ4oiKD3cnBYkaZsw=,iv:S+/IChlFlqdI+PyFF+Ti4AJUkch2MS0qKiqHL1Q3RMk=,tag:+v2kV70ou84eIc01dKnAhA==,type:str]
|
||||||
sshconfig: ENC[AES256_GCM,data:/sDTGVeYRjxF5Epp5kmVS0ScSYOqOs2grX0+Ap8HJc8CQftpNOYXNYdEyqLDMc5g5ualaO4iKg4sQ76J4j9ZPugt4iprIvOo2Uxmu7KRU47Z8SNwrrMNpv6x/XA2P6r261e/e/pOHyrmiFfV/I5Km9IwGqY5TWbEhvjx8qyRO2bQDIdffI1L1ZWJGC9ZOZ4o5RJCr2xB+qxLLI2pl8qHZhvfZlGHnyHw5ne0RfAFubIrW4nQJTamoaGHZqWro4tVSfXAEb+9IsYCc1aj3MehVdV8PUQ38/LxL2MAQTt9bs7sHLf9DmxZ6rGPWmpJ+IRoQbP1PA65tobFOd+Kf13XvWymNUcQpQFHDj0vpvDONxIikO+vj2T7SteRRPy+38UPdB8jrHfQ1JrGbxUQIrWOWeD3S44lINmquIMclJQ26zf6nvklXR7xCuzNAvmjublsnYK+CGDkt/ap/kDD7nCuQYYY,iv:VX55dyt2N80LJPDYoUES7ZWJjlqVyQrUQWvOQ/yItBc=,tag:6NlHwy0SqJ40+ltQHzmX7g==,type:str]
|
sshconfig: ENC[AES256_GCM,data:wktwwpHsd6u/A5ti0RmWZB5qGO5Ok0ly0SucjBIUxIfMEF2b8Cbmyg6nBqqELEDo7GQ8Hlvpxa1Pu7ajgXy35HNupb33KSXMLofvxCoyfC9UbzT85nHgGpE5kGv9iTpiuBsaDTAL9UCBcEaJED8xbUIUG3RME1m1Qqi07081mtqY7xR53QgaUc2w8ATCQ1ymiW7xZ0IbZw8G7RWzV7AXMpC1VOgr1NFgvUfLs4L/1PdG40fYwFaF1BcGtzUnkeZCdeAnMWj55GI5+6OX80HYuIgPApHfjlgRVaQ2c6Utsdc2wqekkPut996nm6bGCpld3JlKL/VXnsnhJoKgfdulL2o8uDYypcacYwTXonKsHqXX4tkhniDsyB6PA0Ty/eXrzwbsjD/yTcDHDJX2Xy594nRgLDM+VvyVosH7WhIDcMrk/RpSbBB2T7mNORI0VlLQFdMX2Rc6b6X/kBbd78ZoIthiaiZdgRpX++OGbwr9Fky8ml88,iv:x8aekarsRkyMmU1GjZt9El8dS1B51M6Htv+68yfVB/o=,tag:y3TkpEVf9TSIi3iK5JqilQ==,type:str]
|
||||||
github-key: ENC[AES256_GCM,data:xUgFMlBo8e+3eXqNscxbby1dWug3SgUagDiNUe/IGVbU6cczkaJ3uOaB0OuRBQ8AYhOLkzXj0pIKjUrElHwmYrhURtS1aF4SFEGJsjhhobNA//j3E2/5/nLVjfco+lRzyHdwmsNhEUCqEhsXrrodJMb39H4b5oip3z0rjc729YveiWUKQxXVZVPurp3nq9yNnix9R4CA6XYFRW6T6MNqgPD5qhbcDlhxLb/SN+uI5h+5eZIS24VDWlKaTaCLL5KLhZmfuA37SquOQ+edi9Yg8MnfrZkMrp/3qmAjP2rSQLMOc4QdQCLQBQSf0/snpydgLwY+FoJmMSztwtkqUdIZWOfDUJbJxegEOrAR68jLTNbp+GYiDn3thtOZDiK5p/M1amjCT+A9qeFMed5WS+aZHNTRbR9UcfiP6+48MGZFt1mr7q+/CoL04/DTp0w6tUf6/SZD31NvTJDqngkhpc0ZH9Dh5+2JcnBWpq25AM36kZTn1hIQCLNTr/oGWZXSLA2tksAhQCaUcFj4IIh6Bl96,iv:GEJsAs5NriwENYTV/VShgJF6iMmrtTwNiXOvfXyEP8E=,tag:nfZgsFqaet075GjQAoVZxQ==,type:str]
|
github-key: ENC[AES256_GCM,data:xUgFMlBo8e+3eXqNscxbby1dWug3SgUagDiNUe/IGVbU6cczkaJ3uOaB0OuRBQ8AYhOLkzXj0pIKjUrElHwmYrhURtS1aF4SFEGJsjhhobNA//j3E2/5/nLVjfco+lRzyHdwmsNhEUCqEhsXrrodJMb39H4b5oip3z0rjc729YveiWUKQxXVZVPurp3nq9yNnix9R4CA6XYFRW6T6MNqgPD5qhbcDlhxLb/SN+uI5h+5eZIS24VDWlKaTaCLL5KLhZmfuA37SquOQ+edi9Yg8MnfrZkMrp/3qmAjP2rSQLMOc4QdQCLQBQSf0/snpydgLwY+FoJmMSztwtkqUdIZWOfDUJbJxegEOrAR68jLTNbp+GYiDn3thtOZDiK5p/M1amjCT+A9qeFMed5WS+aZHNTRbR9UcfiP6+48MGZFt1mr7q+/CoL04/DTp0w6tUf6/SZD31NvTJDqngkhpc0ZH9Dh5+2JcnBWpq25AM36kZTn1hIQCLNTr/oGWZXSLA2tksAhQCaUcFj4IIh6Bl96,iv:GEJsAs5NriwENYTV/VShgJF6iMmrtTwNiXOvfXyEP8E=,tag:nfZgsFqaet075GjQAoVZxQ==,type:str]
|
||||||
gitlab-key: ENC[AES256_GCM,data:6271Tg7LIJsXAw7Co32vva+iUWv+eRAfVfXaGkoirHxiPTAgZfq8yDpGJwti2D/aFnLvbURcUgp3B5zy1aURu9puXi6QMu3orJOE2Zx0dX3lyeHyIhOZ1hAWsQxwBDkJYODuMZbIKHNrF26Mkk6smFF9SrGoADZGxY7XSou/iopw6yrLvQAXP6lN55PQvoP5/ek/QzKNwjJAbAjp7FjjtPqPUbUdj7bfIfr9avs6gpRYnRzb2H3auyhb5qvyuRWnKu4+FeZUofC7HnfRU1eSI8UzG49Rg4f2b1Xqr0JtsjvEmuRx7lbptINXEAjW7zaSZ2B9NgotWPIzkNZRNZkuTEaOulBf5iH3wJ9GM1FcbUu2gpCt6y+CMIk5QkVvETYtKuALLbcPx9/sc90doiH1411LeKQCs5l88BBILG9KPkKmXiGGUVNxzFtjbRYQIUEmmyl95kPPEdCkkzGzHXNfE3F9HRu4MCGKPK2yZPZtCXd3Jp1b21wKSIRNYqLqxru+J8eLSljd3czO0SuTG/Vx,iv:E+y3aVLaiStlPLTQBqyfJuEXtAQyOvDUYS+XfuOHuA0=,tag:6d1IAsGcmcpgL1pE9dDcbw==,type:str]
|
gitlab-key: ENC[AES256_GCM,data:6271Tg7LIJsXAw7Co32vva+iUWv+eRAfVfXaGkoirHxiPTAgZfq8yDpGJwti2D/aFnLvbURcUgp3B5zy1aURu9puXi6QMu3orJOE2Zx0dX3lyeHyIhOZ1hAWsQxwBDkJYODuMZbIKHNrF26Mkk6smFF9SrGoADZGxY7XSou/iopw6yrLvQAXP6lN55PQvoP5/ek/QzKNwjJAbAjp7FjjtPqPUbUdj7bfIfr9avs6gpRYnRzb2H3auyhb5qvyuRWnKu4+FeZUofC7HnfRU1eSI8UzG49Rg4f2b1Xqr0JtsjvEmuRx7lbptINXEAjW7zaSZ2B9NgotWPIzkNZRNZkuTEaOulBf5iH3wJ9GM1FcbUu2gpCt6y+CMIk5QkVvETYtKuALLbcPx9/sc90doiH1411LeKQCs5l88BBILG9KPkKmXiGGUVNxzFtjbRYQIUEmmyl95kPPEdCkkzGzHXNfE3F9HRu4MCGKPK2yZPZtCXd3Jp1b21wKSIRNYqLqxru+J8eLSljd3czO0SuTG/Vx,iv:E+y3aVLaiStlPLTQBqyfJuEXtAQyOvDUYS+XfuOHuA0=,tag:6d1IAsGcmcpgL1pE9dDcbw==,type:str]
|
||||||
jack-key: ENC[AES256_GCM,data:VfCl3wH0MMBc8QDyjLDFeSvzSEsf7uGpfJvRjFrmjW+bPRUXBpZhJV8a9VQIAz7z7zZXvzARMfCeI0ydyC57CW81GH5/H5pneJ4b+xreINjVfdLbL1nC1thelo/O64jda/L+xVKhgE+QQi8/zt4JmXGghkP+74nYcTTaMpmcbgWw354J1ybXqyCEY+88nsJ1d2s+M7M2bplx4fGb7sLUs6sqdsad3sENzhH/0HQCFXreHTtgsLbIs8ccmdRgFNKM8/wD0OoW76rOQsJoA9JY4yOTQNVoX5M8+Olj6+wVlt6QBrWrYRuEztGnHrHvzxiHXtmEkMwVNfoPpEflQyRYRa0rVp/66REOkMckGx6/LbxKFgrxnifRlsK3kWd28v2bRGVQOghUluYUtVkaJ+eh6o6ik0NQKx8/H6BznBSDE6MjDwbLv434LHBfDtAqhWN1eMbOlunFivsl5Hb/6rl9kydHlcCS6FY8cUHoKQ90gDaUuDrvUifwmdO5hU0GH5tgvGi1ReK9ndcpQsrHptG6,iv:oC1xU5Tu3The105VYRmxIw4kEwDoqe8T/EH6mmqpqwQ=,tag:Pu8c536u6W7ALrqjRsvXDw==,type:str]
|
jack-key: ENC[AES256_GCM,data:VfCl3wH0MMBc8QDyjLDFeSvzSEsf7uGpfJvRjFrmjW+bPRUXBpZhJV8a9VQIAz7z7zZXvzARMfCeI0ydyC57CW81GH5/H5pneJ4b+xreINjVfdLbL1nC1thelo/O64jda/L+xVKhgE+QQi8/zt4JmXGghkP+74nYcTTaMpmcbgWw354J1ybXqyCEY+88nsJ1d2s+M7M2bplx4fGb7sLUs6sqdsad3sENzhH/0HQCFXreHTtgsLbIs8ccmdRgFNKM8/wD0OoW76rOQsJoA9JY4yOTQNVoX5M8+Olj6+wVlt6QBrWrYRuEztGnHrHvzxiHXtmEkMwVNfoPpEflQyRYRa0rVp/66REOkMckGx6/LbxKFgrxnifRlsK3kWd28v2bRGVQOghUluYUtVkaJ+eh6o6ik0NQKx8/H6BznBSDE6MjDwbLv434LHBfDtAqhWN1eMbOlunFivsl5Hb/6rl9kydHlcCS6FY8cUHoKQ90gDaUuDrvUifwmdO5hU0GH5tgvGi1ReK9ndcpQsrHptG6,iv:oC1xU5Tu3The105VYRmxIw4kEwDoqe8T/EH6mmqpqwQ=,tag:Pu8c536u6W7ALrqjRsvXDw==,type:str]
|
||||||
@@ -18,8 +18,8 @@ sops:
|
|||||||
cmVxVC8rVDlWMUdZaGw3bmdOaWZGS1EKYahBlc8XpB5UdKZQkvxbLcKQ/xkFJjWo
|
cmVxVC8rVDlWMUdZaGw3bmdOaWZGS1EKYahBlc8XpB5UdKZQkvxbLcKQ/xkFJjWo
|
||||||
FSfQWnjhe/a7BJtJEcKZkjOQU0mYqlSu+uT2RA9diCQeRUJPRF+nAw==
|
FSfQWnjhe/a7BJtJEcKZkjOQU0mYqlSu+uT2RA9diCQeRUJPRF+nAw==
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
lastmodified: "2024-11-05T12:05:15Z"
|
lastmodified: "2025-03-19T08:38:27Z"
|
||||||
mac: ENC[AES256_GCM,data:ggTUKhmfUp4CCE6w3uiuwV0ys6xUhaMBeXi4WiaxkED/lB9iUdP9UssE9iF5lToyNxt/6O2C60CXc4OvpqBxe5dsxPkVNeB6PNhQrD5Ga8+Cu0i6hKz6Fmm0Rq461OuX0Nu2Nl3MUBCWxjM0+1ywfLRKDcjoVC7RzP5eo1NtrV8=,iv:G+Ntog1claKwAY4PEpUK1hjNzspDZiO3bdWNxugUXDQ=,tag:Yg2ZJEV2VrnTmpw8TykmZg==,type:str]
|
mac: ENC[AES256_GCM,data:ZLljLyyibu9KMdJIwf9DsdKr4aVNWIKOneU05iPEOM9paLw/cSXVYqbfmj0i7xwvpZEin6QtUrUmIPepDIRMtIK8chmk7U5Lqxzp7XA0/IbXw0fkGg3+NmauHUGdeb1BJBLTT4AD+W0aqSayT9AvE40JOXMDzOW50WdUPzI5Ou0=,iv:6KdKZK0RoCkfTeO4oAUS1jRxcGZFrlTIXwXothQwsYE=,tag:VFL+TEjLZEue/hT1nl9f0g==,type:str]
|
||||||
pgp: []
|
pgp: []
|
||||||
unencrypted_suffix: _unencrypted
|
unencrypted_suffix: _unencrypted
|
||||||
version: 3.9.1
|
version: 3.9.4
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
{ config, ... }: {
|
{ config, lib, ... }: {
|
||||||
imports = [ ../../nixos/variables-config.nix ];
|
imports = [
|
||||||
|
# Choose your theme here:
|
||||||
|
../../themes/nixy.nix
|
||||||
|
];
|
||||||
|
|
||||||
config.var = {
|
config.var = {
|
||||||
hostname = "nixy";
|
hostname = "nixy";
|
||||||
@@ -21,8 +24,13 @@
|
|||||||
|
|
||||||
autoUpgrade = false;
|
autoUpgrade = false;
|
||||||
autoGarbageCollector = true;
|
autoGarbageCollector = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Choose your theme variables here
|
# Let this here
|
||||||
theme = import ../../themes/var/2025.nix;
|
options = {
|
||||||
|
var = lib.mkOption {
|
||||||
|
type = lib.types.attrs;
|
||||||
|
default = { };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
35
hosts/server/configuration.nix
Normal file
35
hosts/server/configuration.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{ config, ... }: {
|
||||||
|
imports = [
|
||||||
|
../../nixos/home-manager.nix
|
||||||
|
../../nixos/nix.nix
|
||||||
|
../../nixos/systemd-boot.nix
|
||||||
|
../../nixos/users.nix
|
||||||
|
../../nixos/utils.nix
|
||||||
|
../../nixos/docker.nix
|
||||||
|
../../nixos/tailscale.nix
|
||||||
|
|
||||||
|
../../server-modules/ssh.nix
|
||||||
|
../../server-modules/bitwarden.nix
|
||||||
|
../../server-modules/firewall.nix
|
||||||
|
../../server-modules/nginx.nix
|
||||||
|
../../server-modules/nextcloud.nix
|
||||||
|
../../server-modules/glance.nix
|
||||||
|
../../server-modules/adguardhome.nix
|
||||||
|
../../server-modules/hoarder.nix
|
||||||
|
../../server-modules/arr.nix
|
||||||
|
../../server-modules/mealie.nix
|
||||||
|
../../server-modules/meilisearch.nix
|
||||||
|
../../server-modules/search-nixos-api.nix
|
||||||
|
|
||||||
|
# You should let those lines as is
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./variables.nix
|
||||||
|
|
||||||
|
./secrets
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.users."${config.var.username}" = import ./home.nix;
|
||||||
|
|
||||||
|
# Don't touch this
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
}
|
||||||
30
hosts/server/hardware-configuration.nix
Normal file
30
hosts/server/hardware-configuration.nix
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }: {
|
||||||
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
boot.initrd.availableKernelModules =
|
||||||
|
[ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/350cf109-5380-4982-8a9e-279a9275ee18";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/DD15-1125";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
|
};
|
||||||
|
swapDevices = [ ];
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp3s0.useDHCP = lib.mkDefault true;
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode =
|
||||||
|
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
47
hosts/server/home.nix
Normal file
47
hosts/server/home.nix
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
{ pkgs, config, ... }: {
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
# Mostly user-specific configuration
|
||||||
|
./variables.nix
|
||||||
|
|
||||||
|
# Programs
|
||||||
|
../../home/programs/nvim
|
||||||
|
../../home/programs/shell
|
||||||
|
../../home/programs/fetch
|
||||||
|
../../home/programs/git
|
||||||
|
../../home/programs/lazygit
|
||||||
|
|
||||||
|
# Scripts
|
||||||
|
../../home/scripts # All scripts
|
||||||
|
];
|
||||||
|
|
||||||
|
home = {
|
||||||
|
inherit (config.var) username;
|
||||||
|
homeDirectory = "/home/" + config.var.username;
|
||||||
|
|
||||||
|
packages = with pkgs; [
|
||||||
|
# Dev
|
||||||
|
go
|
||||||
|
nodejs
|
||||||
|
python3
|
||||||
|
jq
|
||||||
|
just
|
||||||
|
pnpm
|
||||||
|
wireguard-tools
|
||||||
|
|
||||||
|
# Utils
|
||||||
|
zip
|
||||||
|
unzip
|
||||||
|
optipng
|
||||||
|
pfetch
|
||||||
|
btop
|
||||||
|
fastfetch
|
||||||
|
tailscale
|
||||||
|
];
|
||||||
|
|
||||||
|
# Don't touch this
|
||||||
|
stateVersion = "24.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
}
|
||||||
29
hosts/server/secrets/default.nix
Normal file
29
hosts/server/secrets/default.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
sops = {
|
||||||
|
age.keyFile = "/home/hadi/.config/sops/age/keys.txt";
|
||||||
|
defaultSopsFile = ./secrets.yaml;
|
||||||
|
secrets = {
|
||||||
|
sshconfig = {
|
||||||
|
owner = "hadi";
|
||||||
|
path = "/home/hadi/.ssh/config";
|
||||||
|
mode = "0600";
|
||||||
|
};
|
||||||
|
github-key = {
|
||||||
|
owner = "hadi";
|
||||||
|
path = "/home/hadi/.ssh/github";
|
||||||
|
mode = "0600";
|
||||||
|
};
|
||||||
|
cloudflare-dns-token = { path = "/etc/cloudflare/dnskey.txt"; };
|
||||||
|
nextcloud-pwd = { path = "/etc/nextcloud/pwd.txt"; };
|
||||||
|
adguard-pwd = { };
|
||||||
|
hoarder = { };
|
||||||
|
recyclarr = {
|
||||||
|
owner = "recyclarr";
|
||||||
|
mode = "0777";
|
||||||
|
};
|
||||||
|
wireguard-pia = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [ sops age ];
|
||||||
|
}
|
||||||
28
hosts/server/secrets/secrets.yaml
Normal file
28
hosts/server/secrets/secrets.yaml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
sshconfig: ENC[AES256_GCM,data:R54HVxqAyj9yGO/AYL8p6cnXgYxkQKW9XveHlBMTnDXBJ7r/4HgnefdymprnXmdlbNWcWrRqmaLEuzJs/0BfixXfMvmGTUrmJ0ASVuDrz9k6rOLADAKFikQh0dib7NU4JmPgmUzMncXc2WuCd3BCG3kwBQ==,iv:Ro9FA+MzTAp+ERQMT88z8ioCox/dTj2vWcqCDOSLag4=,tag:5XiXIyz5/pjGFOB5ZjdOVg==,type:str]
|
||||||
|
github-key: ENC[AES256_GCM,data:NRYhcBIwGJEV13+YECLR+2IErsn/7clbnkx0Mltr7dQajSb5WHZ3QDH0KQPylEHhplE5IVS0h4I0z+Pb1B0UteCxFmJ5wZq+2BKZkvE7G3dojqBpgHcVqJV2GLEJkRjlHfRgsbq/OBe8xcsPh20P1KUyP0WIwVbpt+9dFWGxEGYkp2uSyuBIJ98kElt0zuVgl7WcYoDO7v5WmGzZfla+yZwURvMk8zcM3gopo+4KL6YnYUs+UA3VlBBn6VK4Nvbqy6X0R0+ZA5HHAXg+OFgGmfWnENZmsyQJHXEchGGgEldzThkQ4r8yMkgN/ax+AGouLyzbITapGE4sE11FFgL6Hmp4pSXxl3UAGF+cvV5pIujbb28CXmSPRMyYpoNxI93PSYz/txAzE6Cr2dgwxR4zpMelv4i6IaGnY8NgpY8jp2Y6C0uuJxJCN0RtnjQw1rM2uRnm7vMGyU7XXz9DEVfGnYpTWnykXsEjHE5DVGy80ejYQlc6dtmf3vdTWpt+YYdCPw8/cd0PIx2D6geh1c28,iv:wl+RG24mXYMklD8CBGXVD36DMhlWT/7zh8ZMvr7vgOk=,tag:OJhqF8PoXotr7IsyFW6q1g==,type:str]
|
||||||
|
cloudflare-dns-token: ENC[AES256_GCM,data:JIXUtVDpYS9B74W0ooj50kd4v2+PX+FdF218gvgaS04rYATu4N6w9KEFPfdQqLjUmVihzV6s/IR1fg==,iv:AlbQ86kvFQbetvmFwt/hEyUcqKTI+XzL/NvSMXW9wm4=,tag:1JQeK4KrTDa6Kz+JhWxkxQ==,type:str]
|
||||||
|
nextcloud-pwd: ENC[AES256_GCM,data:2oqsNceKuwGscBN2VxAK,iv:FoSfHItgeB91fG38zqtuQzayvNjNPFQyZjZlpUq/eic=,tag:MoEpAmTj+zqVu6OLasD4kQ==,type:str]
|
||||||
|
adguard-pwd: ENC[AES256_GCM,data:QavwLWENAURnRrFwiLntkiM=,iv:bxdQfBxNL5rwUr7CEKbwXtv5mUUXZHhvyqQL2KoPwEY=,tag:T+cSyzbGeo7E5smSsuFlHw==,type:str]
|
||||||
|
hoarder: ENC[AES256_GCM,data:8A3eGqIlHJ2XpC2OdMNBXPm+5BdfMlOfTSgiibPtM+SFyiPtGhjWQNmVCD9REf0P2C4pikZ3R7vtwyKpjrraaoSAY7ztAk9eqqikorIzD8hn8wbHz/y+Eko=,iv:ngoVgF348IxokWGQVpbpTGhdIwjOOA6T8qLb1wX6GEU=,tag:+v9HLUksQJ1e2vRR/5fzEg==,type:str]
|
||||||
|
recyclarr: ENC[AES256_GCM,data:XgQ5ZQHY/OKucvJGb6NQND9/zzi2E+W3y9gtQJEUL9uIUWbiZdEt9XHB7dMXl9MIjOjAlCNKIzUMXkgccKA3PbVgbaKUMh3oXmTVHVqmRHrFwCwZMAUTQeOvwgeYYHkw,iv:Fyb16m+E6ToRzC5JGKTxhPzFwhdqaZ9liWUtMGpQ9O8=,tag:fdlpq40dAU2UzOJTVNuHSg==,type:str]
|
||||||
|
wireguard-pia: ENC[AES256_GCM,data:TBbhTqKvnjSQu8Tc2QieLrIeP36JEcKMeJ2xMzsTrGSgKnyrnm4CUjSsluYpD5TXpt5z2BSQVG0K5XqT0c5q7N16jk6KyDAjZEHm9gMCWlywh2oQWxpjw8G3jFiiHkH055Me8jVtTUF4d+gpMu/LMA4TZlaCMjVEkcYoHsdhWRpKZWDs98D35oSVX7BEUgc8WIWtyDc1QjJ0Chi6Mw1+C9h3njLoLe/esdS/KV9nJSBB9OsSt11V5Dl5NQDnr+cV0CytC9vHDoYX9+s6ZASom13MBjs8SHQBsteQcboSB/WglO93NIA1VQ/hwDZnCQ25u89Z7oMVMR+NNQ==,iv:1AGrXUDY55wc60t489Vf+YUreiFeo77aAtj29EBnPi4=,tag:djY1xJqSCoIth7++ZokwhA==,type:str]
|
||||||
|
sops:
|
||||||
|
kms: []
|
||||||
|
gcp_kms: []
|
||||||
|
azure_kv: []
|
||||||
|
hc_vault: []
|
||||||
|
age:
|
||||||
|
- recipient: age12yvtj49pfh3fqzqflscm0ek4yzrjhr6cqhn7x89gdxnlykq0xudq5c7334
|
||||||
|
enc: |
|
||||||
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB5Z3MzZmoyVDRtRmd3amFJ
|
||||||
|
MWVvWlA1c3RFeVMrbHJQQmNTcG9ZN2tXSWxjClJ0L1psd1RFM1EreG1yNHdOYzZF
|
||||||
|
aXphL0lvcGNFTFFMbkNocGNXY00xdW8KLS0tIFh2YjN0aTlRazBXSktnQWx0L3BY
|
||||||
|
TEc5d01RaVFGNXc3dlljM0FTTHpENjQKOqwI+pl8UxVIVl43glnOYvW660/PsDGY
|
||||||
|
yefODJGVtHrOm3yeXC2xlTi3sFW+c5wUl2yPqddbvcBt5Ud/yd4iXQ==
|
||||||
|
-----END AGE ENCRYPTED FILE-----
|
||||||
|
lastmodified: "2025-03-24T12:14:53Z"
|
||||||
|
mac: ENC[AES256_GCM,data:iIQADIb6T/D7Zmq+3egSQKqsEuCP66E9EO98IMgxLBc7trR8VFjHX6vZWkcOVQYUXaOq/LyYMtgwdQ+zfxmiu1/sfflRFDeYpvSjC2pxXARSTfsYq18BwJo8rnQmMm7A8NyQjzmpAjo8bCTgFlNXhQd54vJCIeJGmsZKeXDGHg0=,iv:XBtl+1ssfkuR3P1pQ6Q7k+neuzam9UdTAS+UJcvQqB4=,tag:5YITncXhThWIOMK7NLsv0Q==,type:str]
|
||||||
|
pgp: []
|
||||||
|
unencrypted_suffix: _unencrypted
|
||||||
|
version: 3.9.4
|
||||||
36
hosts/server/variables.nix
Normal file
36
hosts/server/variables.nix
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{ config, lib, ... }: {
|
||||||
|
imports = [
|
||||||
|
# Choose your theme here:
|
||||||
|
../../themes/nixy.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
config.var = {
|
||||||
|
hostname = "jack";
|
||||||
|
username = "hadi";
|
||||||
|
configDirectory = "/home/" + config.var.username
|
||||||
|
+ "/.config/nixos"; # The path of the nixos configuration directory
|
||||||
|
|
||||||
|
keyboardLayout = "fr";
|
||||||
|
|
||||||
|
location = "Paris";
|
||||||
|
timeZone = "Europe/Paris";
|
||||||
|
defaultLocale = "en_US.UTF-8";
|
||||||
|
extraLocale = "fr_FR.UTF-8";
|
||||||
|
|
||||||
|
git = {
|
||||||
|
username = "Hadi";
|
||||||
|
email = "112569860+anotherhadi@users.noreply.github.com";
|
||||||
|
};
|
||||||
|
|
||||||
|
autoUpgrade = false;
|
||||||
|
autoGarbageCollector = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Let this here
|
||||||
|
options = {
|
||||||
|
var = lib.mkOption {
|
||||||
|
type = lib.types.attrs;
|
||||||
|
default = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
{ config, ... }:
|
|
||||||
let configDir = config.var.configDirectory;
|
|
||||||
in {
|
|
||||||
system.autoUpgrade = {
|
|
||||||
enable = config.var.autoUpgrade;
|
|
||||||
dates = "04:00";
|
|
||||||
flake = "${configDir}";
|
|
||||||
flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
|
|
||||||
allowReboot = false;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -4,6 +4,5 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
powerOnBoot = true;
|
powerOnBoot = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, inputs, ... }: {
|
{ pkgs, ... }: {
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
@@ -19,18 +19,8 @@
|
|||||||
nerd-fonts.meslo-lg
|
nerd-fonts.meslo-lg
|
||||||
openmoji-color
|
openmoji-color
|
||||||
twemoji-color-font
|
twemoji-color-font
|
||||||
inputs.apple-fonts.packages.${pkgs.system}.sf-pro-nerd
|
|
||||||
];
|
];
|
||||||
|
|
||||||
enableDefaultPackages = false;
|
enableDefaultPackages = false;
|
||||||
|
|
||||||
fontconfig = {
|
|
||||||
defaultFonts = {
|
|
||||||
monospace = [ "FiraCode Nerd Font Mono" "Noto Color Emoji" ];
|
|
||||||
sansSerif = [ "SFProDisplay Nerd Font" "Noto Color Emoji" ];
|
|
||||||
serif = [ "SFProDisplay Nerd Font" "Noto Color Emoji" ];
|
|
||||||
emoji = [ "Noto Color Emoji" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
9
nixos/hyprland.nix
Normal file
9
nixos/hyprland.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{ inputs, pkgs, ... }: {
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
withUWSM = true;
|
||||||
|
package = inputs.hyprland.packages."${pkgs.system}".hyprland;
|
||||||
|
portalPackage =
|
||||||
|
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
systemd.services.NetworkManager-wait-online.enable = false;
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,13 @@
|
|||||||
{ config, inputs, ... }:
|
{ config, inputs, ... }:
|
||||||
let autoGarbageCollector = config.var.autoGarbageCollector;
|
let autoGarbageCollector = config.var.autoGarbageCollector;
|
||||||
in {
|
in {
|
||||||
|
security.sudo.extraRules = [{
|
||||||
|
users = [ config.var.username ];
|
||||||
|
commands = [{
|
||||||
|
command = "/run/current-system/sw/bin/nixos-rebuild";
|
||||||
|
options = [ "NOPASSWD" ];
|
||||||
|
}];
|
||||||
|
}];
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
allowBroken = true;
|
allowBroken = true;
|
||||||
@@ -14,9 +21,20 @@ in {
|
|||||||
settings = {
|
settings = {
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
substituters = [ "https://hyprland.cachix.org" ];
|
substituters = [
|
||||||
|
# high priority since it's almost always used
|
||||||
|
"https://cache.nixos.org?priority=10"
|
||||||
|
|
||||||
|
"https://hyprland.cachix.org"
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"https://cache.garnix.io"
|
||||||
|
"https://numtide.cachix.org"
|
||||||
|
];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
||||||
|
"numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE="
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
gc = {
|
gc = {
|
||||||
|
|||||||
102
nixos/nvidia.nix
102
nixos/nvidia.nix
@@ -1,42 +1,74 @@
|
|||||||
{ lib, pkgs, config, ... }:
|
{ lib, pkgs, config, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
nvidiaDriverChannel =
|
# Using beta driver for recent GPUs like RTX 4070
|
||||||
config.boot.kernelPackages.nvidiaPackages.beta; # stable, latest, beta, etc.
|
nvidiaDriverChannel = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
in {
|
in {
|
||||||
# Load nvidia driver for Xorg and Wayland
|
# Video drivers configuration for Xorg and Wayland
|
||||||
services.xserver.videoDrivers =
|
services.xserver.videoDrivers =
|
||||||
[ "nvidia" "displayLink" ]; # or "nvidiaLegacy470 etc.
|
[ "nvidia" ]; # Simplified - other modules are loaded automatically
|
||||||
boot.kernelParams =
|
|
||||||
lib.optionals (lib.elem "nvidia" config.services.xserver.videoDrivers) [
|
# Kernel parameters for better Wayland and Hyprland integration
|
||||||
"nvidia-drm.modeset=1"
|
boot.kernelParams = [
|
||||||
"nvidia_drm.fbdev=1"
|
"nvidia-drm.modeset=1" # Enable mode setting for Wayland
|
||||||
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
|
"nvidia.NVreg_PreserveVideoMemoryAllocations=1" # Improves resume after sleep
|
||||||
];
|
"nvidia.NVreg_RegistryDwords=PowerMizerEnable=0x1;PerfLevelSrc=0x2222;PowerMizerLevel=0x3;PowerMizerDefault=0x3;PowerMizerDefaultAC=0x3" # Performance/power optimizations
|
||||||
|
];
|
||||||
|
|
||||||
|
# Blacklist nouveau to avoid conflicts
|
||||||
|
boot.blacklistedKernelModules = [ "nouveau" ];
|
||||||
|
|
||||||
|
# Environment variables for better compatibility
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
# GBM_BACKEND = "nvidia-drm"; # If crash in firefox, remove this line
|
LIBVA_DRIVER_NAME = "nvidia"; # Hardware video acceleration
|
||||||
LIBVA_DRIVER_NAME = "nvidia"; # hardware acceleration
|
XDG_SESSION_TYPE = "wayland"; # Force Wayland
|
||||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
GBM_BACKEND = "nvidia-drm"; # Graphics backend for Wayland
|
||||||
NVD_BACKEND = "direct";
|
__GLX_VENDOR_LIBRARY_NAME = "nvidia"; # Use Nvidia driver for GLX
|
||||||
|
WLR_NO_HARDWARE_CURSORS = "1"; # Fix for cursors on Wayland
|
||||||
|
NIXOS_OZONE_WL = "1"; # Wayland support for Electron apps
|
||||||
|
__GL_GSYNC_ALLOWED = "1"; # Enable G-Sync if available
|
||||||
|
__GL_VRR_ALLOWED = "1"; # Enable VRR (Variable Refresh Rate)
|
||||||
|
WLR_DRM_NO_ATOMIC = "1"; # Fix for some issues with Hyprland
|
||||||
|
NVD_BACKEND = "direct"; # Configuration for new driver
|
||||||
|
MOZ_ENABLE_WAYLAND = "1"; # Wayland support for Firefox
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Configuration for proprietary packages
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
nvidia.acceptLicense = true;
|
nvidia.acceptLicense = true;
|
||||||
allowUnfreePredicate = pkg:
|
allowUnfree = true; # Simplified from specific allowUnfreePredicate
|
||||||
builtins.elem (lib.getName pkg) [
|
|
||||||
"cudatoolkit"
|
|
||||||
"nvidia-persistenced"
|
|
||||||
"nvidia-settings"
|
|
||||||
"nvidia-x11"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Nvidia configuration
|
||||||
hardware = {
|
hardware = {
|
||||||
nvidia = {
|
nvidia = {
|
||||||
open = false;
|
open = false; # Proprietary driver for better performance
|
||||||
nvidiaSettings = true;
|
nvidiaSettings = true; # Nvidia settings utility
|
||||||
powerManagement.enable =
|
powerManagement = {
|
||||||
true; # This can cause sleep/suspend to fail and saves entire VRAM to /tmp/
|
enable = true; # Power management
|
||||||
modesetting.enable = true;
|
finegrained = true; # More precise power consumption control
|
||||||
|
};
|
||||||
|
modesetting.enable = true; # Required for Wayland
|
||||||
package = nvidiaDriverChannel;
|
package = nvidiaDriverChannel;
|
||||||
|
forceFullCompositionPipeline = true; # Prevents screen tearing
|
||||||
|
|
||||||
|
# Configuration for hybrid AMD+Nvidia laptop
|
||||||
|
prime = {
|
||||||
|
# Optimized configuration for switchable graphics laptops
|
||||||
|
offload = {
|
||||||
|
enable = true; # Mode optimized for power saving
|
||||||
|
enableOffloadCmd =
|
||||||
|
true; # Allows running applications with dedicated GPU
|
||||||
|
};
|
||||||
|
# sync.enable disabled as offload is generally better for laptops
|
||||||
|
sync.enable = false;
|
||||||
|
# PCI IDs verified for your hardware
|
||||||
|
amdgpuBusId = "PCI:5:0:0"; # Integrated AMD GPU
|
||||||
|
nvidiaBusId = "PCI:1:0:0"; # Dedicated Nvidia GPU
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Enhanced graphics support
|
||||||
graphics = {
|
graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = nvidiaDriverChannel;
|
package = nvidiaDriverChannel;
|
||||||
@@ -47,7 +79,25 @@ in {
|
|||||||
libvdpau-va-gl
|
libvdpau-va-gl
|
||||||
mesa
|
mesa
|
||||||
egl-wayland
|
egl-wayland
|
||||||
|
vulkan-loader
|
||||||
|
vulkan-validation-layers
|
||||||
|
libva
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Nix cache for CUDA
|
||||||
|
nix.settings = {
|
||||||
|
substituters = [ "https://cuda-maintainers.cachix.org" ];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Additional useful packages
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
vulkan-tools
|
||||||
|
glxinfo
|
||||||
|
libva-utils # VA-API debugging tools
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
72
nixos/omen.nix
Normal file
72
nixos/omen.nix
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
hp-omen-linux-module = pkgs.callPackage
|
||||||
|
({ kernel ? config.boot.kernelPackages.kernel, stdenv, fetchFromGitHub }:
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "hp-omen-linux-module";
|
||||||
|
version = "rebase-6.14";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "ranisalt";
|
||||||
|
repo = "hp-omen-linux-module";
|
||||||
|
rev = finalAttrs.version;
|
||||||
|
sha256 = "sha256-2zCm29bdboSjRm/caMjBPGNc0tZXPUnIIYlHxxfhAok=";
|
||||||
|
};
|
||||||
|
setSourceRoot = ''
|
||||||
|
export sourceRoot=$(pwd)/${finalAttrs.src.name}/src
|
||||||
|
'';
|
||||||
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||||
|
makeFlags = [
|
||||||
|
"KERNELDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||||
|
];
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
install hp-wmi.ko -Dm444 -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/platform/x86/hp/
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
})) { kernel = config.boot.kernelPackages.kernel; };
|
||||||
|
in {
|
||||||
|
boot.extraModulePackages = [ hp-omen-linux-module ];
|
||||||
|
boot.kernelModules = [ "hp-wmi" ];
|
||||||
|
|
||||||
|
users.groups.omen-rgb = { };
|
||||||
|
users.users.${config.var.username}.extraGroups = [ "omen-rgb" ];
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"w /sys/devices/platform/hp-wmi/rgb_zones/zone00 0660 root omen-rgb -"
|
||||||
|
"w /sys/devices/platform/hp-wmi/rgb_zones/zone01 0660 root omen-rgb -"
|
||||||
|
"w /sys/devices/platform/hp-wmi/rgb_zones/zone02 0660 root omen-rgb -"
|
||||||
|
"w /sys/devices/platform/hp-wmi/rgb_zones/zone03 0660 root omen-rgb -"
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
SUBSYSTEM=="platform", KERNEL=="hp-wmi", ACTION=="add", \
|
||||||
|
RUN+="${pkgs.coreutils}/bin/chgrp omen-rgb /sys/devices/platform/hp-wmi/rgb_zones/zone00", \
|
||||||
|
RUN+="${pkgs.coreutils}/bin/chmod 0660 /sys/devices/platform/hp-wmi/rgb_zones/zone00", \
|
||||||
|
RUN+="${pkgs.coreutils}/bin/chgrp omen-rgb /sys/devices/platform/hp-wmi/rgb_zones/zone01", \
|
||||||
|
RUN+="${pkgs.coreutils}/bin/chmod 0660 /sys/devices/platform/hp-wmi/rgb_zones/zone01", \
|
||||||
|
RUN+="${pkgs.coreutils}/bin/chgrp omen-rgb /sys/devices/platform/hp-wmi/rgb_zones/zone02", \
|
||||||
|
RUN+="${pkgs.coreutils}/bin/chmod 0660 /sys/devices/platform/hp-wmi/rgb_zones/zone02", \
|
||||||
|
RUN+="${pkgs.coreutils}/bin/chgrp omen-rgb /sys/devices/platform/hp-wmi/rgb_zones/zone03", \
|
||||||
|
RUN+="${pkgs.coreutils}/bin/chmod 0660 /sys/devices/platform/hp-wmi/rgb_zones/zone03"
|
||||||
|
'';
|
||||||
|
# systemd.services.fix-hp-omen-perms = {
|
||||||
|
# description = "Fix HP Omen keyboard RGB zone permissions";
|
||||||
|
# after = [ "systemd-modules-load.service" ];
|
||||||
|
# wantedBy = [ "multi-user.target" ];
|
||||||
|
# serviceConfig = {
|
||||||
|
# Type = "oneshot";
|
||||||
|
# ExecStart = ''
|
||||||
|
# ${pkgs.coreutils}/bin/chgrp omen-rgb /sys/devices/platform/hp-wmi/rgb_zones/zone00
|
||||||
|
# ${pkgs.coreutils}/bin/chmod 0660 /sys/devices/platform/hp-wmi/rgb_zones/zone00
|
||||||
|
# ${pkgs.coreutils}/bin/chgrp omen-rgb /sys/devices/platform/hp-wmi/rgb_zones/zone01
|
||||||
|
# ${pkgs.coreutils}/bin/chmod 0660 /sys/devices/platform/hp-wmi/rgb_zones/zone01
|
||||||
|
# ${pkgs.coreutils}/bin/chgrp omen-rgb /sys/devices/platform/hp-wmi/rgb_zones/zone02
|
||||||
|
# ${pkgs.coreutils}/bin/chmod 0660 /sys/devices/platform/hp-wmi/rgb_zones/zone02
|
||||||
|
# ${pkgs.coreutils}/bin/chgrp omen-rgb /sys/devices/platform/hp-wmi/rgb_zones/zone03
|
||||||
|
# ${pkgs.coreutils}/bin/chmod 0660 /sys/devices/platform/hp-wmi/rgb_zones/zone03
|
||||||
|
# '';
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
}
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{ config, ... }: {
|
|
||||||
services.pia.enable = true;
|
|
||||||
|
|
||||||
# Alternatively, you can use the `authUserPassFile` attribute if you are using
|
|
||||||
# a Nix secrets manager. Here's an example using sops-nix.
|
|
||||||
#
|
|
||||||
# The secret you provide to `authUserPassFile` should be a multiline string with
|
|
||||||
# a single username on the first line a single password on the second line.
|
|
||||||
services.pia.authUserPassFile = "/home/hadi/.config/pia/pia.ovpn";
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
hardware.nvidia.prime = {
|
|
||||||
offload = {
|
|
||||||
enable = true;
|
|
||||||
enableOffloadCmd = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# sync.enable = true;
|
|
||||||
|
|
||||||
# CHANGEME: Change those values to match your hardware (if prime is imported)
|
|
||||||
amdgpuBusId =
|
|
||||||
"PCI:5:0:0"; # Set this to the bus ID of your AMD GPU if you have one
|
|
||||||
# intelBusId = "PCI:0:2:0"; # Set this to the bus ID of your Intel GPU if you have one
|
|
||||||
nvidiaBusId =
|
|
||||||
"PCI:1:0:0"; # Set this to the bus ID of your Nvidia GPU if you have one
|
|
||||||
};
|
|
||||||
}
|
|
||||||
68
nixos/sddm.nix
Normal file
68
nixos/sddm.nix
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
# SDDM is a display manager for X11 and Wayland
|
||||||
|
{ pkgs, inputs, config, lib, ... }:
|
||||||
|
let
|
||||||
|
foreground = config.theme.textColorOnWallpaper;
|
||||||
|
sddm-astronaut = pkgs.sddm-astronaut.override {
|
||||||
|
embeddedTheme = "pixel_sakura";
|
||||||
|
# TODO: Cleaner version for static vs .gif, just a string.replace
|
||||||
|
themeConfig = if lib.hasSuffix "sakura_static.png" config.stylix.image then
|
||||||
|
{ }
|
||||||
|
else if lib.hasSuffix "studio.png" config.stylix.image then {
|
||||||
|
Background = pkgs.fetchurl {
|
||||||
|
url =
|
||||||
|
"https://raw.githubusercontent.com/anotherhadi/nixy-wallpapers/refs/heads/main/wallpapers/studio.gif";
|
||||||
|
sha256 = "sha256-qySDskjmFYt+ncslpbz0BfXiWm4hmFf5GPWF2NlTVB8=";
|
||||||
|
};
|
||||||
|
HeaderTextColor = "#${foreground}";
|
||||||
|
DateTextColor = "#${foreground}";
|
||||||
|
TimeTextColor = "#${foreground}";
|
||||||
|
LoginFieldTextColor = "#${foreground}";
|
||||||
|
PasswordFieldTextColor = "#${foreground}";
|
||||||
|
UserIconColor = "#${foreground}";
|
||||||
|
PasswordIconColor = "#${foreground}";
|
||||||
|
WarningColor = "#${foreground}";
|
||||||
|
LoginButtonBackgroundColor = "#${foreground}";
|
||||||
|
SystemButtonsIconsColor = "#${foreground}";
|
||||||
|
SessionButtonTextColor = "#${foreground}";
|
||||||
|
VirtualKeyboardButtonTextColor = "#${foreground}";
|
||||||
|
DropdownBackgroundColor = "#${foreground}";
|
||||||
|
HighlightBackgroundColor = "#${foreground}";
|
||||||
|
} else {
|
||||||
|
Background = "${toString config.stylix.image}";
|
||||||
|
HeaderTextColor = "#${foreground}";
|
||||||
|
DateTextColor = "#${foreground}";
|
||||||
|
TimeTextColor = "#${foreground}";
|
||||||
|
LoginFieldTextColor = "#${foreground}";
|
||||||
|
PasswordFieldTextColor = "#${foreground}";
|
||||||
|
UserIconColor = "#${foreground}";
|
||||||
|
PasswordIconColor = "#${foreground}";
|
||||||
|
WarningColor = "#${foreground}";
|
||||||
|
LoginButtonBackgroundColor = "#${foreground}";
|
||||||
|
SystemButtonsIconsColor = "#${foreground}";
|
||||||
|
SessionButtonTextColor = "#${foreground}";
|
||||||
|
VirtualKeyboardButtonTextColor = "#${foreground}";
|
||||||
|
DropdownBackgroundColor = "#${foreground}";
|
||||||
|
HighlightBackgroundColor = "#${foreground}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
services.displayManager = {
|
||||||
|
sddm = {
|
||||||
|
package = pkgs.kdePackages.sddm;
|
||||||
|
extraPackages = [ sddm-astronaut ];
|
||||||
|
enable = true;
|
||||||
|
wayland.enable = true;
|
||||||
|
theme = "sddm-astronaut-theme";
|
||||||
|
settings = {
|
||||||
|
Wayland.SessionDir = "${
|
||||||
|
inputs.hyprland.packages."${pkgs.system}".hyprland
|
||||||
|
}/share/wayland-sessions";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [ sddm-astronaut ];
|
||||||
|
|
||||||
|
# To prevent getting stuck at shutdown
|
||||||
|
systemd.extraConfig = "DefaultTimeoutStopSec=10s";
|
||||||
|
}
|
||||||
26
nixos/tailscale.nix
Normal file
26
nixos/tailscale.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# Tailscale is a VPN service that makes it easy to connect your devices between each other.
|
||||||
|
{ config, ... }: {
|
||||||
|
security.sudo.extraRules = [{
|
||||||
|
users = [ config.var.username ];
|
||||||
|
commands = [
|
||||||
|
{
|
||||||
|
command = "/etc/profiles/per-user/${config.var.username}/bin/tailscale";
|
||||||
|
options = [ "NOPASSWD" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "/run/current-system/sw/bin/tailscale";
|
||||||
|
options = [ "NOPASSWD" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}];
|
||||||
|
services.tailscale = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall = {
|
||||||
|
trustedInterfaces = [ "tailscale0" ];
|
||||||
|
# required to connect to Tailscale exit nodes
|
||||||
|
checkReversePath = "loose";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
{ config, ... }: {
|
|
||||||
time.timeZone = config.var.timeZone;
|
|
||||||
i18n.defaultLocale = config.var.defaultLocale;
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = config.var.extraLocale;
|
|
||||||
LC_IDENTIFICATION = config.var.extraLocale;
|
|
||||||
LC_MEASUREMENT = config.var.extraLocale;
|
|
||||||
LC_MONETARY = config.var.extraLocale;
|
|
||||||
LC_NAME = config.var.extraLocale;
|
|
||||||
LC_NUMERIC = config.var.extraLocale;
|
|
||||||
LC_PAPER = config.var.extraLocale;
|
|
||||||
LC_TELEPHONE = config.var.extraLocale;
|
|
||||||
LC_TIME = config.var.extraLocale;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# TUIGreet is a display manager.
|
||||||
|
# Legacy, I'm now using SDDM
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,11 +1,40 @@
|
|||||||
{ pkgs, config, ... }:
|
{ pkgs, config, inputs, ... }:
|
||||||
let
|
let
|
||||||
hostname = config.var.hostname;
|
hostname = config.var.hostname;
|
||||||
keyboardLayout = config.var.keyboardLayout;
|
keyboardLayout = config.var.keyboardLayout;
|
||||||
|
configDir = config.var.configDirectory;
|
||||||
|
timeZone = config.var.timeZone;
|
||||||
|
defaultLocale = config.var.defaultLocale;
|
||||||
|
extraLocale = config.var.extraLocale;
|
||||||
|
autoUpgrade = config.var.autoUpgrade;
|
||||||
in {
|
in {
|
||||||
|
|
||||||
networking.hostName = hostname;
|
networking.hostName = hostname;
|
||||||
|
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
systemd.services.NetworkManager-wait-online.enable = false;
|
||||||
|
|
||||||
|
system.autoUpgrade = {
|
||||||
|
enable = autoUpgrade;
|
||||||
|
dates = "04:00";
|
||||||
|
flake = "${configDir}";
|
||||||
|
flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
|
||||||
|
allowReboot = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
time = { timeZone = timeZone; };
|
||||||
|
i18n.defaultLocale = defaultLocale;
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = extraLocale;
|
||||||
|
LC_IDENTIFICATION = extraLocale;
|
||||||
|
LC_MEASUREMENT = extraLocale;
|
||||||
|
LC_MONETARY = extraLocale;
|
||||||
|
LC_NAME = extraLocale;
|
||||||
|
LC_NUMERIC = extraLocale;
|
||||||
|
LC_PAPER = extraLocale;
|
||||||
|
LC_TELEPHONE = extraLocale;
|
||||||
|
LC_TIME = extraLocale;
|
||||||
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
xserver = {
|
xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -13,6 +42,10 @@ in {
|
|||||||
xkb.variant = "";
|
xkb.variant = "";
|
||||||
};
|
};
|
||||||
gnome.gnome-keyring.enable = true;
|
gnome.gnome-keyring.enable = true;
|
||||||
|
psd = {
|
||||||
|
enable = true;
|
||||||
|
resyncTimer = "10m";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
console.keyMap = keyboardLayout;
|
console.keyMap = keyboardLayout;
|
||||||
|
|
||||||
@@ -20,18 +53,28 @@ in {
|
|||||||
XDG_DATA_HOME = "$HOME/.local/share";
|
XDG_DATA_HOME = "$HOME/.local/share";
|
||||||
PASSWORD_STORE_DIR = "$HOME/.local/share/password-store";
|
PASSWORD_STORE_DIR = "$HOME/.local/share/password-store";
|
||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
|
TERMINAL = "kitty";
|
||||||
|
TERM = "kitty";
|
||||||
|
BROWSER = "zen-beta";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.libinput.enable = true;
|
services.libinput.enable = true;
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
services = {
|
services = {
|
||||||
dbus.enable = true;
|
dbus = {
|
||||||
|
enable = true;
|
||||||
|
implementation = "broker";
|
||||||
|
packages = with pkgs; [ gcr gnome-settings-daemon ];
|
||||||
|
};
|
||||||
gvfs.enable = true;
|
gvfs.enable = true;
|
||||||
upower.enable = true;
|
upower.enable = true;
|
||||||
power-profiles-daemon.enable = true;
|
power-profiles-daemon.enable = true;
|
||||||
udisks2.enable = true;
|
udisks2.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# enable zsh autocompletion for system packages (systemd, etc)
|
||||||
|
environment.pathsToLink = [ "/share/zsh" ];
|
||||||
|
|
||||||
# Faster rebuilding
|
# Faster rebuilding
|
||||||
documentation = {
|
documentation = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -43,6 +86,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
hyprland-qtutils
|
||||||
fd
|
fd
|
||||||
bc
|
bc
|
||||||
gcc
|
gcc
|
||||||
@@ -50,8 +94,31 @@ in {
|
|||||||
xdg-utils
|
xdg-utils
|
||||||
wget
|
wget
|
||||||
curl
|
curl
|
||||||
|
vim
|
||||||
];
|
];
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
xdgOpenUsePortal = true;
|
||||||
|
config = {
|
||||||
|
common.default = [ "gtk" ];
|
||||||
|
hyprland.default = [ "gtk" "hyprland" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||||
|
};
|
||||||
|
|
||||||
|
security = {
|
||||||
|
# allow wayland lockers to unlock the screen
|
||||||
|
pam.services.hyprlock.text = "auth include login";
|
||||||
|
|
||||||
|
# userland niceness
|
||||||
|
rtkit.enable = true;
|
||||||
|
|
||||||
|
# don't ask for password for wheel group
|
||||||
|
sudo.wheelNeedsPassword = false;
|
||||||
|
};
|
||||||
|
|
||||||
services.logind.extraConfig = ''
|
services.logind.extraConfig = ''
|
||||||
# don’t shutdown when power button is short-pressed
|
# don’t shutdown when power button is short-pressed
|
||||||
HandlePowerKey=ignore
|
HandlePowerKey=ignore
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
{ lib, ... }: {
|
|
||||||
options = {
|
|
||||||
var = lib.mkOption {
|
|
||||||
type = lib.types.attrs;
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{ pkgs, ... }: {
|
|
||||||
xdg.portal = {
|
|
||||||
enable = true;
|
|
||||||
config.common.default = "*";
|
|
||||||
wlr.enable = true;
|
|
||||||
xdgOpenUsePortal = true;
|
|
||||||
extraPortals =
|
|
||||||
[ pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-gtk ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
19
server-modules/adguardhome.nix
Normal file
19
server-modules/adguardhome.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
let domain = "adguard.hadi.diy";
|
||||||
|
in {
|
||||||
|
services = {
|
||||||
|
adguardhome = {
|
||||||
|
enable = true;
|
||||||
|
port = 3000;
|
||||||
|
};
|
||||||
|
|
||||||
|
nginx.virtualHosts."${domain}" = {
|
||||||
|
useACMEHost = "hadi.diy";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass =
|
||||||
|
"http://127.0.0.1:${toString config.services.adguardhome.port}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user