mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-06 15:30:14 +00:00
Compare commits
414 Commits
fea0396dce
...
language-c
Author | SHA1 | Date | |
---|---|---|---|
f85a008741 | |||
6c2fc0289b | |||
5034ada458 | |||
e635cf6225 | |||
b901eef822 | |||
e7cdfc1453 | |||
7503335701 | |||
0b571e4565 | |||
f91c9bcfc2 | |||
b27b9136f9 | |||
865dad0f4f | |||
3178a1dea9 | |||
af1b6c8b35 | |||
89e8463b98 | |||
01eccb6655 | |||
e7f8a75df3 | |||
fa03e51d37 | |||
fe1a4c2c29 | |||
26afa49879 | |||
94bc6662ed | |||
06c1f5c372 | |||
4dd94ee59d | |||
69dd348c92 | |||
d823b2a49e | |||
756177826c | |||
c60632a37f | |||
324956c091 | |||
68c5816d4d | |||
643b722eb4 | |||
db0b2b147c | |||
b382bc9fbb | |||
454accd742 | |||
088de57cab | |||
5a992d6d5a | |||
f44cf65c43 | |||
46f3a459b6 | |||
161c1f46b0 | |||
fc2484227a | |||
e7bbf68dde | |||
10f7b97b64 | |||
c8a8b7a897 | |||
6560d2f9a2 | |||
3be397429a | |||
8b17fd035b | |||
8da8fe7efb | |||
59111f5da6 | |||
95e8d5c268 | |||
56d2c95c64 | |||
602d411bad | |||
4cd9572993 | |||
84d7fc9892 | |||
dab40e081a | |||
984a47d3b1 | |||
48cd96858a | |||
2cce4c572f | |||
2f783f2ba3 | |||
1ee22e3a9a | |||
450b211e7e | |||
19f3147f25 | |||
5d6d6fc68e | |||
ec55658fd1 | |||
d25b189952 | |||
a8b07cc365 | |||
70a30ac056 | |||
cfe1f1d1e2 | |||
3396918793 | |||
3ef842f359 | |||
e87cb5981c | |||
6e9419ed92 | |||
ab4e516ba8 | |||
5d2d26b3d9 | |||
50e16f9413 | |||
4653037f1e | |||
f192e53e7a | |||
b5a9da8011 | |||
cbbfb8724b | |||
0bbfe0b6b5 | |||
cc714dd898 | |||
4964e56298 | |||
fafd56612e | |||
3042a0ac19 | |||
9d2a423011 | |||
276c2024b4 | |||
81cffd471d | |||
61a808bad4 | |||
48045c0fee | |||
ef6964f3b4 | |||
7b7f426624 | |||
d1c0472b77 | |||
e6fd6128f4 | |||
e72be000b0 | |||
f50ddd48c8 | |||
3a2d5e2da6 | |||
c929bc6440 | |||
09563de935 | |||
a5615da7dc | |||
6babfae211 | |||
b471d0fa7a | |||
cf7d1b50f8 | |||
ddb5dc39aa | |||
3fd95643b0 | |||
d128511a21 | |||
5709afd835 | |||
f828c1c200 | |||
77708aebd9 | |||
f9ac9b1063 | |||
bdd6c603c4 | |||
31e607d0ad | |||
b2337d3c39 | |||
6428d4fa62 | |||
db315b31b4 | |||
340a64b87a | |||
89b5183f22 | |||
b4c08adea4 | |||
13972b1d66 | |||
352f515798 | |||
d84be966fc | |||
c9aa20c703 | |||
771d41254f | |||
90092c48ec | |||
159a6efe09 | |||
0008de7434 | |||
9826178c0e | |||
d2b1d95281 | |||
4c71797818 | |||
dba975fe86 | |||
1a9ab975d1 | |||
67251a6d8d | |||
967175df70 | |||
5561c85b43 | |||
05a8f4a49b | |||
a1f651010b | |||
3cecb8810c | |||
af753153f1 | |||
d2afdd56ae | |||
18fec1d058 | |||
6a0e70568a | |||
9b44d8f171 | |||
1cf3405103 | |||
7439d4bf39 | |||
316c33e66c | |||
c845ae2fd4 | |||
5bc10bef87 | |||
f0e1fc740f | |||
5826877ad2 | |||
d3b0f21313 | |||
b7d1921c4d | |||
de1337bf58 | |||
3cff7e090c | |||
21794891e7 | |||
20e5d7fef5 | |||
b6a6c761e9 | |||
fc4bd9e4a8 | |||
25e3de5058 | |||
9694467ba0 | |||
71e6780439 | |||
e6d0852be0 | |||
00564c0c40 | |||
57b38a417e | |||
7f9ce5925e | |||
5ce9a26441 | |||
73680961a0 | |||
c59e914430 | |||
e194003f8d | |||
3d6f57c324 | |||
ef2ee7b871 | |||
fc867d60cd | |||
d395347a29 | |||
080f7395e0 | |||
1475172bdb | |||
5d6dab3cab | |||
3e6232cbee | |||
8d72216f13 | |||
dd36a3bd82 | |||
0ed3633404 | |||
95e04de763 | |||
b1ebca57d2 | |||
939d17ada1 | |||
dfd52e2cd5 | |||
b589ba5d8a | |||
200f790ea1 | |||
9f561c822c | |||
1f0b04b89b | |||
38892b1135 | |||
9c2e004c8b | |||
bbb210ec4f | |||
984fca2021 | |||
b284b333c5 | |||
3aef23b746 | |||
5f36508d2b | |||
3387bea109 | |||
6f59ea9f22 | |||
8d09544663 | |||
cb15cc209b | |||
b390fff749 | |||
20456b444b | |||
cce6f6573f | |||
52b86efbb1 | |||
f41774f641 | |||
22cba9acac | |||
9e8bac6834 | |||
b07a8f5e20 | |||
8eb7ef0be7 | |||
22ab2acf66 | |||
d85e4b1593 | |||
6ea99eca5d | |||
60e779085e | |||
6abcdfa3bd | |||
0f0a64b5c4 | |||
edb4ec77ca | |||
3cc264a857 | |||
76a7480a1d | |||
9d4bf082c7 | |||
e86b2f184f | |||
d14054ab17 | |||
9b3d2e39c9 | |||
5a1a843ecd | |||
2ddd980436 | |||
febf1071af | |||
05adc8a221 | |||
a463212023 | |||
2457ade6eb | |||
88d52614a9 | |||
2c663347ee | |||
02fc29c482 | |||
21cbe29bd8 | |||
c0da8391ef | |||
d4e203a04c | |||
38480e0c0c | |||
ee58f7a4ee | |||
4c4e250fa1 | |||
ffe867e6a8 | |||
b599162090 | |||
4b0d68089a | |||
b304e529b4 | |||
2b0f03ba1f | |||
2c4f215b6e | |||
066ea8e440 | |||
cd0c93c6d9 | |||
78e9c817d0 | |||
53a8cc83ea | |||
1cf5f46adf | |||
5348cbdf61 | |||
140b410ea0 | |||
b282e76be4 | |||
a26f5dc2b5 | |||
b0fcee6707 | |||
46e633c8b9 | |||
7a74f0a504 | |||
bacf1ab1fa | |||
ddf48998db | |||
23f72c3c2e | |||
77d81742a9 | |||
13c7859a78 | |||
0f4914db95 | |||
25e56b7421 | |||
a6ec04db7e | |||
2a56c04e17 | |||
894a22cb2d | |||
eefed57929 | |||
494cf355e9 | |||
c88718b649 | |||
790cb4a9d0 | |||
e3d4b36613 | |||
18154b6579 | |||
fb44473d22 | |||
c1e89fb20e | |||
04e8b8834e | |||
472a2b965c | |||
79eba7f333 | |||
28418c4e37 | |||
fa797c81f8 | |||
d243d68c72 | |||
f4f5f19183 | |||
3a40bb7485 | |||
e8456e131b | |||
8d8dd8ad62 | |||
bad49cb2c3 | |||
c052813f6d | |||
ed19eaafd1 | |||
09de243bd3 | |||
82a1954c26 | |||
6815af21dc | |||
3269d5e247 | |||
d337ffff51 | |||
df5fba19f8 | |||
8cc158221d | |||
f391433584 | |||
241b2deb49 | |||
605824c1a4 | |||
e8f4ee52c3 | |||
6518db291f | |||
a6551ce043 | |||
b089ec4668 | |||
5970555572 | |||
1083ee4ff8 | |||
a2bbcf7f55 | |||
f388aee56c | |||
958ab8a96b | |||
3059241c1c | |||
fe938ec713 | |||
05f705d794 | |||
f67a44fa87 | |||
713b835f70 | |||
480d515302 | |||
2337db0bda | |||
1510c8c31f | |||
8f8012e435 | |||
8d389013ad | |||
d013f980a7 | |||
3c51dd0db6 | |||
7f0600580f | |||
05d5fcb8f9 | |||
ca7a4ed408 | |||
cf73ce8136 | |||
82344372dd | |||
34cf2a4483 | |||
efb3933f5a | |||
cd067cce69 | |||
0d9df06bce | |||
b4e5852f48 | |||
1a60c5e9db | |||
2d8a84c286 | |||
319106364a | |||
fd5d6ab141 | |||
4df1132eb7 | |||
f4d9897f21 | |||
634baf0a7e | |||
600fd06974 | |||
c9ab46696d | |||
b5790a2795 | |||
61f26315d5 | |||
4fefe54435 | |||
0833a0009c | |||
e349ac35b8 | |||
49c2c013a2 | |||
985b8bf13b | |||
8283480fd1 | |||
d6611ca7a2 | |||
a13083a264 | |||
ff4db1463e | |||
afedfcf187 | |||
2e3c376d73 | |||
59824adb3a | |||
8e32c16fd3 | |||
76c80dd31d | |||
57de089baf | |||
f9c09deb2a | |||
b06b6490f4 | |||
514244476d | |||
47590abc3a | |||
f69d233c39 | |||
9b97c9ac84 | |||
bda59eeb4a | |||
e7468ecc46 | |||
1b798f5af0 | |||
4406116203 | |||
c53f1470ee | |||
da89732001 | |||
2176a53c4a | |||
28576c1b8f | |||
64590c539b | |||
78b364afd7 | |||
f219ce45c8 | |||
5002c881f7 | |||
5859377802 | |||
e6dbed2e17 | |||
86076f0844 | |||
2aea76c0e3 | |||
42a5ad40de | |||
d4fa322fb1 | |||
3d73f8cab4 | |||
0df8af607d | |||
61d9b103b0 | |||
71d0d3ca14 | |||
d5b0405b99 | |||
3cad3d2fb0 | |||
2acd9b3478 | |||
bf4be11718 | |||
4d38d1094f | |||
183babd2f0 | |||
12682a57e1 | |||
31170a616f | |||
4502c5ff62 | |||
59bd3590a4 | |||
ebacff7250 | |||
763f0bbdda | |||
18505d4cbb | |||
a7c04b59ed | |||
d46e6dad6b | |||
5e4642b92e | |||
7ab78767d4 | |||
366a7f6157 | |||
fb47302f3b | |||
cda3ee0a4c | |||
0ed11de174 | |||
ab6f80fc18 | |||
d1f21ec874 | |||
cdcc90f85d | |||
f5674134fc | |||
d37cabfd9a | |||
6e117769c6 | |||
f648e92c28 | |||
43343b2824 | |||
ab9136af2c | |||
a7fe90b236 | |||
5557065c8b | |||
de1fae2baf | |||
2c310fd2f2 | |||
aa4dc4a0c2 | |||
44821ea344 | |||
cb60542980 | |||
3fe6911e2d | |||
afa62c5510 |
20
.github/workflows/check.yml
vendored
Normal file
20
.github/workflows/check.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
name: Check Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch: # allows manual triggering
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
name: Check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Install Nix
|
||||||
|
uses: DeterminateSystems/nix-installer-action@v4
|
||||||
|
- name: Check Nixpkgs Inputs
|
||||||
|
uses: DeterminateSystems/flake-checker-action@v5
|
||||||
|
- name: Add Nix Cache
|
||||||
|
uses: DeterminateSystems/magic-nix-cache-action@v2
|
||||||
|
- name: Check the Flake
|
||||||
|
run: nix flake check
|
69
.github/workflows/update.yml
vendored
Normal file
69
.github/workflows/update.yml
vendored
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
name: Update Flake
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch: # allows manual triggering
|
||||||
|
schedule:
|
||||||
|
- cron: '33 3 * * 0' # runs weekly on Sunday at 03:33
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
checks: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lockfile:
|
||||||
|
name: Lockfile
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Install Nix
|
||||||
|
uses: DeterminateSystems/nix-installer-action@v4
|
||||||
|
- name: Check Nixpkgs Inputs
|
||||||
|
uses: DeterminateSystems/flake-checker-action@v5
|
||||||
|
- name: Add Nix Cache
|
||||||
|
uses: DeterminateSystems/magic-nix-cache-action@v2
|
||||||
|
- name: Update flake.lock
|
||||||
|
uses: DeterminateSystems/update-flake-lock@v19
|
||||||
|
id: update
|
||||||
|
with:
|
||||||
|
pr-title: "Update flake.lock" # Title of PR to be created
|
||||||
|
pr-labels: | # Labels to be set on the PR
|
||||||
|
dependencies
|
||||||
|
automated
|
||||||
|
pr-body: |
|
||||||
|
Automated changes by the [update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) GitHub Action.
|
||||||
|
|
||||||
|
```
|
||||||
|
{{ env.GIT_COMMIT_MESSAGE }}
|
||||||
|
```
|
||||||
|
- name: Check the Flake
|
||||||
|
id: check
|
||||||
|
run: nix flake check
|
||||||
|
- name: Update Check Status
|
||||||
|
uses: LouisBrunner/checks-action@v1.6.1
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
name: Update Flake
|
||||||
|
conclusion: ${{ job.status }}
|
||||||
|
output: |
|
||||||
|
{"summary":"${{ steps.check.outputs.stdout }}"}
|
||||||
|
- name: Enable Pull Request Automerge
|
||||||
|
if: success()
|
||||||
|
run: |
|
||||||
|
gh pr merge \
|
||||||
|
--rebase \
|
||||||
|
--auto \
|
||||||
|
${{ steps.update.outputs.pull-request-number }}
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
- name: Close Pull Request If Failed
|
||||||
|
if: failure()
|
||||||
|
run: |
|
||||||
|
gh pr close \
|
||||||
|
--comment "Auto-closing pull request" \
|
||||||
|
--delete-branch \
|
||||||
|
${{ steps.update.outputs.pull-request-number }}
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,7 +3,6 @@
|
|||||||
*.db
|
*.db
|
||||||
**/.direnv/**
|
**/.direnv/**
|
||||||
result
|
result
|
||||||
.luarc.json
|
|
||||||
private/**
|
private/**
|
||||||
|
templates/**/flake.lock
|
||||||
!private/**.age
|
!private/**.age
|
||||||
!private/**.sha512
|
|
||||||
|
142
README.md
142
README.md
@ -6,21 +6,80 @@ hosts.
|
|||||||
They are organized and managed by [Nix](https://nixos.org), so some of the
|
They are organized and managed by [Nix](https://nixos.org), so some of the
|
||||||
configuration may be difficult to translate to a non-Nix system.
|
configuration may be difficult to translate to a non-Nix system.
|
||||||
|
|
||||||
However, some of the configurations are easier to lift directly:
|
## System Features
|
||||||
|
|
||||||
- [Neovim](https://github.com/nmasur/dotfiles/tree/master/modules/common/neovim/config)
|
| Feature | Program | Configuration |
|
||||||
- [Fish functions](https://github.com/nmasur/dotfiles/tree/master/modules/common/shell/fish/functions)
|
| --- | --- | --- |
|
||||||
- [More fish aliases](https://github.com/nmasur/dotfiles/blob/master/modules/common/shell/fish/default.nix)
|
| OS | [NixOS](https://nixos.org) | [Link](./modules/nixos) |
|
||||||
- [Git aliases](https://github.com/nmasur/dotfiles/blob/master/modules/common/shell/git.nix)
|
| Display Server | [X11](https://www.x.org/wiki/) | [Link](./modules/nixos/graphical/xorg.nix) |
|
||||||
- [Hammerspoon](https://github.com/nmasur/dotfiles/tree/master/modules/darwin/hammerspoon)
|
| Compositor | [Picom](https://github.com/yshui/picom) | [Link](./modules/nixos/graphical/picom.nix) |
|
||||||
|
| Window Manager | [i3](https://i3wm.org/) | [Link](./modules/nixos/graphical/i3.nix) |
|
||||||
|
| Panel | [Polybar](https://polybar.github.io/) | [Link](./modules/nixos/graphical/polybar.nix) |
|
||||||
|
| Font | [Victor Mono](https://rubjo.github.io/victor-mono/) | [Link](./modules/nixos/graphical/fonts.nix) |
|
||||||
|
| Launcher | [Rofi](https://github.com/davatorium/rofi) | [Link](./modules/nixos/graphical/rofi.nix) |
|
||||||
|
|
||||||
Try out my Neovim config (requires [nix](https://nixos.org/download.html)):
|
## User Features
|
||||||
|
|
||||||
|
| Feature | Program | Configuration |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Dotfiles | [Home-Manager](https://github.com/nix-community/home-manager) | [Link](./modules/common) |
|
||||||
|
| Terminal | [Kitty](https://sw.kovidgoyal.net/kitty/) | [Link](./modules/common/applications/kitty.nix) |
|
||||||
|
| Shell | [Fish](https://fishshell.com/) | [Link](./modules/common/shell/fish) |
|
||||||
|
| Shell Prompt | [Starship](https://starship.rs/) | [Link](./modules/common/shell/starhip.nix) |
|
||||||
|
| Colorscheme | [Gruvbox](https://github.com/morhetz/gruvbox) | [Link](./colorscheme/gruvbox/default.nix) |
|
||||||
|
| Wallpaper | [Road](https://gitlab.com/exorcist365/wallpapers/-/blob/master/gruvbox/road.jpg) | [Link](./hosts/tempest/default.nix) |
|
||||||
|
| Text Editor | [Neovim](https://neovim.io/) | [Link](./modules/common/neovim/config) |
|
||||||
|
| Browser | [Firefox](https://www.mozilla.org/en-US/firefox/new/) | [Link](./modules/common/applications/firefox.nix) |
|
||||||
|
| E-Mail | [Aerc](https://aerc-mail.org/) | [Link](./modules/common/mail/aerc.nix) |
|
||||||
|
| File Manager | [Nautilus](https://wiki.gnome.org/action/show/Apps/Files) | [Link](./modules/common/applications/nautilus.nix) |
|
||||||
|
| PDF Reader | [Zathura](https://pwmt.org/projects/zathura/) | [Link](./modules/common/applications/media.nix) |
|
||||||
|
| Video Player | [mpv](https://mpv.io/) | [Link](./modules/common/applications/media.nix) |
|
||||||
|
|
||||||
|
## macOS Features
|
||||||
|
|
||||||
|
| Feature | Program | Configuration |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Keybinds | [Hammerspoon](https://www.hammerspoon.org/) | [Link](./modules/darwin/hammerspoon) |
|
||||||
|
|
||||||
|
# Diagram
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
- [flake.nix](./flake.nix)
|
||||||
|
- [hosts](./hosts/)
|
||||||
|
- [modules](./modules/)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Unique Configurations
|
||||||
|
|
||||||
|
This repo contains a few more elaborate elements of configuration.
|
||||||
|
|
||||||
|
- [Neovim config](./modules/common/neovim/default.nix) generated with Nix2Vim
|
||||||
|
and source-controlled plugins, differing based on installed LSPs, for example.
|
||||||
|
- [Caddy JSON](./modules/nixos/services/caddy.nix) file (routes, etc.) based
|
||||||
|
dynamically on enabled services rendered with Nix.
|
||||||
|
- [Grafana config](./modules/nixos/services/grafana.nix) rendered with Nix.
|
||||||
|
- Custom [secrets deployment](./modules/nixos/services/secrets.nix) similar to
|
||||||
|
agenix.
|
||||||
|
- Base16 [colorschemes](./colorscheme/) applied to multiple applications,
|
||||||
|
including Firefox userChrome.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Installation
|
||||||
|
|
||||||
|
Click [here](./docs/installation.md) for detailed installation instructions.
|
||||||
|
|
||||||
|
# Neovim
|
||||||
|
|
||||||
|
Try out my Neovim config with nix:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
nix run github:nmasur/dotfiles#neovim
|
nix run github:nmasur/dotfiles#neovim
|
||||||
```
|
```
|
||||||
|
|
||||||
Or build it as a package (requires [nix](https://nixos.org/download.html)):
|
Or build it as a package:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
nix build github:nmasur/dotfiles#neovim
|
nix build github:nmasur/dotfiles#neovim
|
||||||
@ -30,73 +89,6 @@ If you already have a Neovim configuration, you may need to move it out of
|
|||||||
`~/.config/nvim` or set `XDG_CONFIG_HOME` to another value; otherwise both
|
`~/.config/nvim` or set `XDG_CONFIG_HOME` to another value; otherwise both
|
||||||
configs might conflict with each other.
|
configs might conflict with each other.
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Full Installation
|
|
||||||
|
|
||||||
## NixOS - From Live Disk
|
|
||||||
|
|
||||||
Format drives and build system from any NixOS host, including the live
|
|
||||||
installer disk:
|
|
||||||
|
|
||||||
**This will erase your drives; use at your own risk!**
|
|
||||||
|
|
||||||
```bash
|
|
||||||
lsblk # Choose the disk you want to wipe
|
|
||||||
nix-shell -p nixVersions.stable
|
|
||||||
nix run github:nmasur/dotfiles#installer -- nvme0n1 tempest
|
|
||||||
```
|
|
||||||
|
|
||||||
## NixOS - From Existing System
|
|
||||||
|
|
||||||
If you're already running NixOS, you can switch to this configuration with the
|
|
||||||
following command:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nix-shell -p nixVersions.stable
|
|
||||||
sudo nixos-rebuild switch --flake github:nmasur/dotfiles#tempest
|
|
||||||
```
|
|
||||||
|
|
||||||
## Windows - From NixOS WSL
|
|
||||||
|
|
||||||
After [installing NixOS on
|
|
||||||
WSL](https://xeiaso.net/blog/nix-flakes-4-wsl-2022-05-01), you can switch to
|
|
||||||
the WSL configuration:
|
|
||||||
|
|
||||||
```
|
|
||||||
nix-shell -p nixVersions.stable
|
|
||||||
sudo nixos-rebuild switch --flake github:nmasur/dotfiles#hydra
|
|
||||||
```
|
|
||||||
|
|
||||||
You should also download the
|
|
||||||
[FiraCode](https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/FiraCode.zip)
|
|
||||||
font and install it on Windows. Install [Alacritty](https://alacritty.org/) and
|
|
||||||
move the `windows/alacritty.yml` file to
|
|
||||||
`C:\Users\<user>\AppData\Roaming\alacritty`.
|
|
||||||
|
|
||||||
## macOS
|
|
||||||
|
|
||||||
To get started on a bare macOS installation, first install Nix:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sh -c "$(curl -L https://nixos.org/nix/install)"
|
|
||||||
```
|
|
||||||
|
|
||||||
Then use Nix to build nix-darwin:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
|
|
||||||
./result/bin/darwin-installer
|
|
||||||
```
|
|
||||||
|
|
||||||
Then switch to the macOS configuration:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
darwin-rebuild switch --flake github:nmasur/dotfiles#lookingglass
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Flake Templates
|
# Flake Templates
|
||||||
|
|
||||||
You can also use the [templates](./templates/) as flakes for starting new
|
You can also use the [templates](./templates/) as flakes for starting new
|
||||||
|
9
apps/README.md
Normal file
9
apps/README.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Apps
|
||||||
|
|
||||||
|
These are all my miscellaneous utilies and scripts to accompany this project.
|
||||||
|
|
||||||
|
They can be run with:
|
||||||
|
|
||||||
|
```
|
||||||
|
nix run github:nmasur/dotfiles#appname
|
||||||
|
```
|
@ -1,45 +1,19 @@
|
|||||||
{ pkgs, ... }: rec {
|
{ pkgs, ... }: rec {
|
||||||
|
|
||||||
default = {
|
# Show quick helper
|
||||||
type = "app";
|
default = import ./help.nix { inherit pkgs; };
|
||||||
program = builtins.toString (pkgs.writeShellScript "default" ''
|
|
||||||
${pkgs.gum}/bin/gum style --margin "1 2" --padding "0 2" --foreground "15" --background "55" "Options"
|
|
||||||
${pkgs.gum}/bin/gum format --type=template -- ' {{ Italic "Run with" }} {{ Color "15" "69" " nix run github:nmasur/dotfiles#" }}{{ Color "15" "62" "someoption" }}{{ Color "15" "69" " " }}.'
|
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
${pkgs.gum}/bin/gum format --type=template -- \
|
|
||||||
' • {{ Color "15" "57" " readme " }} {{ Italic "Documentation for this repository." }}' \
|
|
||||||
' • {{ Color "15" "57" " rebuild " }} {{ Italic "Switch to this configuration." }}' \
|
|
||||||
' • {{ Color "15" "57" " installer " }} {{ Italic "Format and install from nothing." }}' \
|
|
||||||
' • {{ Color "15" "57" " neovim " }} {{ Italic "Test out the Neovim package." }}' \
|
|
||||||
' • {{ Color "15" "57" " loadkey " }} {{ Italic "Load an ssh key for this machine using melt." }}' \
|
|
||||||
' • {{ Color "15" "57" " encrypt-secret " }} {{ Italic "Encrypt a secret for all machines." }}' \
|
|
||||||
' • {{ Color "15" "57" " reencrypt-secrets " }} {{ Italic "Reencrypt all secrets when new machine is added." }}' \
|
|
||||||
' • {{ Color "15" "57" " netdata " }} {{ Italic "Connect a machine to Netdata cloud." }}'
|
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
'');
|
|
||||||
};
|
|
||||||
|
|
||||||
# Format and install from nothing
|
# Format primary disk
|
||||||
|
format-root = import ./format-root.nix { inherit pkgs; };
|
||||||
|
|
||||||
|
# Format and install from nothing (deprecated)
|
||||||
installer = import ./installer.nix { inherit pkgs; };
|
installer = import ./installer.nix { inherit pkgs; };
|
||||||
|
|
||||||
# Display the readme for this repository
|
# Display the readme for this repository
|
||||||
readme = import ./readme.nix { inherit pkgs; };
|
readme = import ./readme.nix { inherit pkgs; };
|
||||||
|
|
||||||
# Rebuild
|
# Rebuild
|
||||||
rebuild = {
|
rebuild = import ./rebuild.nix { inherit pkgs; };
|
||||||
type = "app";
|
|
||||||
program = builtins.toString (pkgs.writeShellScript "rebuild" ''
|
|
||||||
echo ${pkgs.system}
|
|
||||||
SYSTEM=${if pkgs.stdenv.isDarwin then "darwin" else "linux"}
|
|
||||||
if [ "$SYSTEM" == "darwin" ]; then
|
|
||||||
darwin-rebuild switch --flake github:nmasur/dotfiles#lookingglass
|
|
||||||
else
|
|
||||||
nixos-rebuild switch --flake github:nmasur/dotfiles
|
|
||||||
fi
|
|
||||||
'');
|
|
||||||
};
|
|
||||||
|
|
||||||
# Load the SSH key for this machine
|
# Load the SSH key for this machine
|
||||||
loadkey = import ./loadkey.nix { inherit pkgs; };
|
loadkey = import ./loadkey.nix { inherit pkgs; };
|
||||||
@ -54,17 +28,7 @@
|
|||||||
netdata = import ./netdata-cloud.nix { inherit pkgs; };
|
netdata = import ./netdata-cloud.nix { inherit pkgs; };
|
||||||
|
|
||||||
# Run neovim as an app
|
# Run neovim as an app
|
||||||
neovim = {
|
neovim = import ./neovim.nix { inherit pkgs; };
|
||||||
type = "app";
|
|
||||||
program = "${
|
|
||||||
(import ../modules/common/neovim/package {
|
|
||||||
inherit pkgs;
|
|
||||||
colors =
|
|
||||||
import ../colorscheme/gruvbox/neovim-gruvbox.nix { inherit pkgs; };
|
|
||||||
})
|
|
||||||
}/bin/nvim";
|
|
||||||
};
|
|
||||||
|
|
||||||
nvim = neovim;
|
nvim = neovim;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
tmpfile=$(mktemp)
|
tmpfile=$(mktemp)
|
||||||
echo "''${secret}" > ''${tmpfile}
|
echo "''${secret}" > ''${tmpfile}
|
||||||
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
||||||
builtins.toString ../public-keys
|
builtins.toString ../misc/public-keys
|
||||||
} $tmpfile
|
} $tmpfile
|
||||||
rm $tmpfile
|
rm $tmpfile
|
||||||
'');
|
'');
|
||||||
|
39
apps/format-root.nix
Normal file
39
apps/format-root.nix
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
|
||||||
|
# This script will partition and format drives; use at your own risk!
|
||||||
|
|
||||||
|
type = "app";
|
||||||
|
|
||||||
|
program = builtins.toString (pkgs.writeShellScript "format-root" ''
|
||||||
|
set -e
|
||||||
|
|
||||||
|
DISK=$1
|
||||||
|
|
||||||
|
if [ -z "''${DISK}" ]; then
|
||||||
|
${pkgs.gum}/bin/gum style --width 50 --margin "1 2" --padding "2 4" \
|
||||||
|
--foreground "#fb4934" \
|
||||||
|
"Missing required parameter." \
|
||||||
|
"Usage: format-root -- <disk>" \
|
||||||
|
"Flake example: nix run github:nmasur/dotfiles#format-root -- nvme0n1"
|
||||||
|
echo "(exiting)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
${pkgs.disko-packaged}/bin/disko \
|
||||||
|
--mode create \
|
||||||
|
--dry-run \
|
||||||
|
--flake "path:$(pwd)#root" \
|
||||||
|
--arg disk \""/dev/''${DISK}"\"
|
||||||
|
|
||||||
|
${pkgs.gum}/bin/gum confirm \
|
||||||
|
"This will ERASE ALL DATA on the disk /dev/''${DISK}. Are you sure you want to continue?" \
|
||||||
|
--default=false
|
||||||
|
|
||||||
|
${pkgs.disko-packaged}/bin/disko \
|
||||||
|
--mode create \
|
||||||
|
--flake "path:$(pwd)#root" \
|
||||||
|
--arg disk "/dev/''${DISK}"
|
||||||
|
|
||||||
|
'');
|
||||||
|
|
||||||
|
}
|
23
apps/help.nix
Normal file
23
apps/help.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
|
||||||
|
type = "app";
|
||||||
|
|
||||||
|
program = builtins.toString (pkgs.writeShellScript "default" ''
|
||||||
|
${pkgs.gum}/bin/gum style --margin "1 2" --padding "0 2" --foreground "15" --background "55" "Options"
|
||||||
|
${pkgs.gum}/bin/gum format --type=template -- ' {{ Italic "Run with" }} {{ Color "15" "69" " nix run github:nmasur/dotfiles#" }}{{ Color "15" "62" "someoption" }}{{ Color "15" "69" " " }}.'
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
${pkgs.gum}/bin/gum format --type=template -- \
|
||||||
|
' • {{ Color "15" "57" " readme " }} {{ Italic "Documentation for this repository." }}' \
|
||||||
|
' • {{ Color "15" "57" " rebuild " }} {{ Italic "Switch to this configuration." }}' \
|
||||||
|
' • {{ Color "15" "57" " installer " }} {{ Italic "Format and install from nothing." }}' \
|
||||||
|
' • {{ Color "15" "57" " neovim " }} {{ Italic "Test out the Neovim package." }}' \
|
||||||
|
' • {{ Color "15" "57" " loadkey " }} {{ Italic "Load an ssh key for this machine using melt." }}' \
|
||||||
|
' • {{ Color "15" "57" " encrypt-secret " }} {{ Italic "Encrypt a secret for all machines." }}' \
|
||||||
|
' • {{ Color "15" "57" " reencrypt-secrets " }} {{ Italic "Reencrypt all secrets when new machine is added." }}' \
|
||||||
|
' • {{ Color "15" "57" " netdata " }} {{ Italic "Connect a machine to Netdata cloud." }}'
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
'');
|
||||||
|
|
||||||
|
}
|
@ -17,8 +17,8 @@
|
|||||||
--foreground "#fb4934" \
|
--foreground "#fb4934" \
|
||||||
"Missing required parameter." \
|
"Missing required parameter." \
|
||||||
"Usage: installer -- <disk> <host>" \
|
"Usage: installer -- <disk> <host>" \
|
||||||
"Example: installer -- nvme0n1 desktop" \
|
"Example: installer -- nvme0n1 tempest" \
|
||||||
"Flake example: nix run github:nmasur/dotfiles#installer -- nvme0n1 desktop"
|
"Flake example: nix run github:nmasur/dotfiles#installer -- nvme0n1 tempest"
|
||||||
echo "(exiting)"
|
echo "(exiting)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
program = builtins.toString (pkgs.writeShellScript "loadkey" ''
|
program = builtins.toString (pkgs.writeShellScript "loadkey" ''
|
||||||
printf "\nEnter the seed phrase for your SSH key...\n"
|
printf "\nEnter the seed phrase for your SSH key...\n"
|
||||||
printf "\nThen press ^D when complete.\n\n"
|
printf "\nThen press ^D when complete.\n\n"
|
||||||
|
mkdir -p ~/.ssh/
|
||||||
${pkgs.melt}/bin/melt restore ~/.ssh/id_ed25519
|
${pkgs.melt}/bin/melt restore ~/.ssh/id_ed25519
|
||||||
printf "\n\nContinuing activation.\n\n"
|
printf "\n\nContinuing activation.\n\n"
|
||||||
'');
|
'');
|
||||||
|
12
apps/neovim.nix
Normal file
12
apps/neovim.nix
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
|
||||||
|
type = "app";
|
||||||
|
|
||||||
|
program = "${
|
||||||
|
(import ../modules/common/neovim/package {
|
||||||
|
inherit pkgs;
|
||||||
|
colors = (import ../colorscheme/nord).dark;
|
||||||
|
})
|
||||||
|
}/bin/nvim";
|
||||||
|
|
||||||
|
}
|
15
apps/rebuild.nix
Normal file
15
apps/rebuild.nix
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
|
||||||
|
type = "app";
|
||||||
|
|
||||||
|
program = builtins.toString (pkgs.writeShellScript "rebuild" ''
|
||||||
|
echo ${pkgs.system}
|
||||||
|
SYSTEM=${if pkgs.stdenv.isDarwin then "darwin" else "linux"}
|
||||||
|
if [ "$SYSTEM" == "darwin" ]; then
|
||||||
|
sudo darwin-rebuild switch --flake ${builtins.toString ../.}
|
||||||
|
else
|
||||||
|
doas nixos-rebuild switch --flake ${builtins.toString ../.}
|
||||||
|
fi
|
||||||
|
'');
|
||||||
|
|
||||||
|
}
|
@ -17,7 +17,7 @@
|
|||||||
--identity ~/.ssh/id_ed25519 $encryptedfile > $tmpfile
|
--identity ~/.ssh/id_ed25519 $encryptedfile > $tmpfile
|
||||||
echo "Encrypting ''${encryptedfile}..."
|
echo "Encrypting ''${encryptedfile}..."
|
||||||
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
||||||
builtins.toString ../public-keys
|
builtins.toString ../misc/public-keys
|
||||||
} $tmpfile > $encryptedfile
|
} $tmpfile > $encryptedfile
|
||||||
rm $tmpfile
|
rm $tmpfile
|
||||||
done
|
done
|
||||||
|
5
colorscheme/README.md
Normal file
5
colorscheme/README.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Colorschemes
|
||||||
|
|
||||||
|
Color information for different themes is found here. The colors are sourced
|
||||||
|
and used with [base16](https://github.com/chriskempson/base16) format
|
||||||
|
consistently across the system.
|
@ -1,20 +1,24 @@
|
|||||||
{
|
{
|
||||||
name = "everforest"; # dark, hard
|
name = "everforest"; # dark, hard
|
||||||
author = "Sainnhe Park";
|
author = "Sainnhe Park";
|
||||||
base00 = "#2b3339"; # Default Background
|
dark = {
|
||||||
base01 = "#323c41"; # Lighter Background
|
base00 = "#2b3339"; # Default Background
|
||||||
base02 = "#503946"; # Selection Background
|
base01 = "#323c41"; # Lighter Background
|
||||||
base03 = "#868d80"; # Comments, Invisibles, Line Highlighting
|
base02 = "#503946"; # Selection Background
|
||||||
base04 = "#d3c6aa"; # Dark Foreground (Used for status bars)
|
base03 = "#868d80"; # Comments, Invisibles, Line Highlighting
|
||||||
base05 = "#d3c6aa"; # Default Foreground, Caret, Delimiters, Operators
|
base04 = "#d3c6aa"; # Dark Foreground (Used for status bars)
|
||||||
base06 = "#e9e8d2"; # Light Foreground (Not often used)
|
base05 = "#d3c6aa"; # Default Foreground, Caret, Delimiters, Operators
|
||||||
base07 = "#fff9e8"; # Light Background (Not often used)
|
base06 = "#e9e8d2"; # Light Foreground (Not often used)
|
||||||
base08 = "#7fbbb3"; # Variables, XML Tags, Markup Link Text, ...
|
base07 = "#fff9e8"; # Light Background (Not often used)
|
||||||
base09 = "#d699b6"; # Integers, Boolean, Constants, ...
|
base08 = "#7fbbb3"; # Variables, XML Tags, Markup Link Text, ...
|
||||||
base0A = "#83c092"; # Classes, Markup Bold, Search Text Background
|
base09 = "#d699b6"; # Integers, Boolean, Constants, ...
|
||||||
base0B = "#dbbc7f"; # Strings, Inherited Class, Markup Code, Diff Inserted
|
base0A = "#83c092"; # Classes, Markup Bold, Search Text Background
|
||||||
base0C = "#e69875"; # Support, Regular Expressions, Escape Characters, ...
|
base0B = "#dbbc7f"; # Strings, Inherited Class, Markup Code, Diff Inserted
|
||||||
base0D = "#a7c080"; # Functions, Methods, Attribute IDs, Headings
|
base0C = "#e69875"; # Support, Regular Expressions, Escape Characters, ...
|
||||||
base0E = "#e67e80"; # Keywords, Storage, Selector, Markup Italic, Diff Changed
|
base0D = "#a7c080"; # Functions, Methods, Attribute IDs, Headings
|
||||||
base0F = "#d699b6"; # Deprecated, Opening/Closing Embedded Language Tags, ...
|
base0E =
|
||||||
|
"#e67e80"; # Keywords, Storage, Selector, Markup Italic, Diff Changed
|
||||||
|
base0F =
|
||||||
|
"#d699b6"; # Deprecated, Opening/Closing Embedded Language Tags, ...
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
45
colorscheme/gruvbox-dark/default.nix
Normal file
45
colorscheme/gruvbox-dark/default.nix
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Gruvbox with a darker background for greater contrast
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "gruvbox-dark"; # Dark, Medium
|
||||||
|
author =
|
||||||
|
"Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox), ElRastaOk (https://www.reddit.com/user/ElRastaOk)";
|
||||||
|
dark = {
|
||||||
|
base00 = "#1D2122"; # ---- This is the change from normal gruvbox
|
||||||
|
base01 = "#3c3836"; # ---
|
||||||
|
base02 = "#504945"; # --
|
||||||
|
base03 = "#665c54"; # -
|
||||||
|
base04 = "#bdae93"; # +
|
||||||
|
base05 = "#d5c4a1"; # ++
|
||||||
|
base06 = "#ebdbb2"; # +++
|
||||||
|
base07 = "#fbf1c7"; # ++++
|
||||||
|
base08 = "#fb4934"; # red
|
||||||
|
base09 = "#fe8019"; # orange
|
||||||
|
base0A = "#fabd2f"; # yellow
|
||||||
|
base0B = "#b8bb26"; # green
|
||||||
|
base0C = "#8ec07c"; # aqua/cyan
|
||||||
|
base0D = "#83a598"; # blue
|
||||||
|
base0E = "#d3869b"; # purple
|
||||||
|
base0F = "#d65d0e"; # brown
|
||||||
|
batTheme = "gruvbox-dark";
|
||||||
|
};
|
||||||
|
light = {
|
||||||
|
base00 = "#fbf1c7"; # ----
|
||||||
|
base01 = "#ebdbb2"; # ---
|
||||||
|
base02 = "#d5c4a1"; # --
|
||||||
|
base03 = "#bdae93"; # -
|
||||||
|
base04 = "#665c54"; # +
|
||||||
|
base05 = "#504945"; # ++
|
||||||
|
base06 = "#3c3836"; # +++
|
||||||
|
base07 = "#1D2122"; # ++++ Adjusted darker here
|
||||||
|
base08 = "#9d0006"; # red
|
||||||
|
base09 = "#af3a03"; # orange
|
||||||
|
base0A = "#b57614"; # yellow
|
||||||
|
base0B = "#79740e"; # green
|
||||||
|
base0C = "#427b58"; # aqua/cyan
|
||||||
|
base0D = "#076678"; # blue
|
||||||
|
base0E = "#8f3f71"; # purple
|
||||||
|
base0F = "#d65d0e"; # brown
|
||||||
|
batTheme = "gruvbox-light";
|
||||||
|
};
|
||||||
|
}
|
@ -19,7 +19,6 @@
|
|||||||
base0D = "#83a598"; # blue
|
base0D = "#83a598"; # blue
|
||||||
base0E = "#d3869b"; # purple
|
base0E = "#d3869b"; # purple
|
||||||
base0F = "#d65d0e"; # brown
|
base0F = "#d65d0e"; # brown
|
||||||
neovimConfig = ./neovim-gruvbox.nix;
|
|
||||||
batTheme = "gruvbox-dark";
|
batTheme = "gruvbox-dark";
|
||||||
};
|
};
|
||||||
light = {
|
light = {
|
||||||
@ -39,7 +38,6 @@
|
|||||||
base0D = "#076678"; # blue
|
base0D = "#076678"; # blue
|
||||||
base0E = "#8f3f71"; # purple
|
base0E = "#8f3f71"; # purple
|
||||||
base0F = "#d65d0e"; # brown
|
base0F = "#d65d0e"; # brown
|
||||||
neovimConfig = ./neovim-gruvbox.nix;
|
|
||||||
batTheme = "gruvbox-light";
|
batTheme = "gruvbox-light";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
{ pkgs, ... }: {
|
|
||||||
|
|
||||||
plugins = [ pkgs.vimPlugins.vim-gruvbox8 ];
|
|
||||||
|
|
||||||
vim.g.gruvbox_italicize_strings = 0;
|
|
||||||
vim.o.background = "dark";
|
|
||||||
vimscript = ''
|
|
||||||
let g:gruvbox_italicize_strings = 0
|
|
||||||
colorscheme gruvbox8
|
|
||||||
'';
|
|
||||||
|
|
||||||
}
|
|
@ -1,21 +1,23 @@
|
|||||||
{
|
{
|
||||||
name = "nord";
|
name = "nord";
|
||||||
author = "arcticicestudio";
|
author = "arcticicestudio";
|
||||||
base00 = "#2E3440";
|
dark = {
|
||||||
base01 = "#3B4252";
|
base00 = "#2E3440";
|
||||||
base02 = "#434C5E";
|
base01 = "#3B4252";
|
||||||
base03 = "#4C566A";
|
base02 = "#434C5E";
|
||||||
base04 = "#D8DEE9";
|
base03 = "#4C566A";
|
||||||
base05 = "#E5E9F0";
|
base04 = "#D8DEE9";
|
||||||
base06 = "#ECEFF4";
|
base05 = "#E5E9F0";
|
||||||
base07 = "#8FBCBB";
|
base06 = "#ECEFF4";
|
||||||
base08 = "#88C0D0";
|
base07 = "#8FBCBB";
|
||||||
base09 = "#81A1C1";
|
base08 = "#88C0D0";
|
||||||
base0A = "#5E81AC";
|
base09 = "#81A1C1";
|
||||||
base0B = "#BF616A";
|
base0A = "#5E81AC";
|
||||||
base0C = "#D08770";
|
base0B = "#BF616A";
|
||||||
base0D = "#EBCB8B";
|
base0C = "#D08770";
|
||||||
base0E = "#A3BE8C";
|
base0D = "#EBCB8B";
|
||||||
base0F = "#B48EAD";
|
base0E = "#A3BE8C";
|
||||||
neovimConfig = ./neovim.lua;
|
base0F = "#B48EAD";
|
||||||
|
batTheme = "nord";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
use({
|
|
||||||
"shaunsingh/nord.nvim",
|
|
||||||
config = function()
|
|
||||||
vim.g.nord_italic = true
|
|
||||||
vim.cmd("colorscheme nord")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
5
disks/README.md
Normal file
5
disks/README.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Disks
|
||||||
|
|
||||||
|
These are my [disko](https://github.com/nix-community/disko) configurations,
|
||||||
|
which allow me to save desired disk formatting layouts as a declarative file so
|
||||||
|
I don't have to remember how to format my disks later on.
|
42
disks/root.nix
Normal file
42
disks/root.nix
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{ disk, ... }: {
|
||||||
|
disk = {
|
||||||
|
boot = {
|
||||||
|
type = "disk";
|
||||||
|
device = disk;
|
||||||
|
content = {
|
||||||
|
type = "table";
|
||||||
|
format = "gpt";
|
||||||
|
partitions = [
|
||||||
|
# Boot partition
|
||||||
|
{
|
||||||
|
name = "ESP";
|
||||||
|
start = "0";
|
||||||
|
end = "512MiB";
|
||||||
|
fs-type = "fat32";
|
||||||
|
bootable = true;
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
extraArgs = [ "-n boot" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
# Root partition ext4
|
||||||
|
{
|
||||||
|
name = "root";
|
||||||
|
start = "512MiB";
|
||||||
|
end = "100%";
|
||||||
|
part-type = "primary";
|
||||||
|
bootable = true;
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/";
|
||||||
|
extraArgs = [ "-L nixos" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
95
disks/zfs.nix
Normal file
95
disks/zfs.nix
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
{ pool, disks, ... }: {
|
||||||
|
disk = lib.genAttrs disks (disk: {
|
||||||
|
"${disk}" = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/${disk}";
|
||||||
|
content = {
|
||||||
|
type = "table";
|
||||||
|
format = "gpt";
|
||||||
|
partitions = [{
|
||||||
|
type = "partition";
|
||||||
|
name = "zfs";
|
||||||
|
start = "128MiB";
|
||||||
|
end = "100%";
|
||||||
|
content = {
|
||||||
|
type = "zfs";
|
||||||
|
pool = pool;
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
|
zpool = {
|
||||||
|
"${pool}" = {
|
||||||
|
type = "zpool";
|
||||||
|
mode = "raidz1";
|
||||||
|
rootFsOptions = {
|
||||||
|
compression = "on"; # lz4 by default
|
||||||
|
"com.sun:auto-snapshot" = "false";
|
||||||
|
ashift = "12";
|
||||||
|
};
|
||||||
|
# mountpoint = "/";
|
||||||
|
|
||||||
|
datasets = {
|
||||||
|
root = {
|
||||||
|
zfs_type = "filesystem";
|
||||||
|
mountpoint = null;
|
||||||
|
options."com.sun:auto-snapshot" = "false";
|
||||||
|
};
|
||||||
|
# "media/movies" = {
|
||||||
|
# zfs_type = "filesystem";
|
||||||
|
# mountpoint = "/media/movies";
|
||||||
|
# options.recordsize = "1M";
|
||||||
|
# };
|
||||||
|
# "media/tv" = {
|
||||||
|
# zfs_type = "filesystem";
|
||||||
|
# mountpoint = "/media/tv";
|
||||||
|
# options.recordsize = "1M";
|
||||||
|
# };
|
||||||
|
# "media/books" = {
|
||||||
|
# zfs_type = "filesystem";
|
||||||
|
# mountpoint = "/media/books";
|
||||||
|
# };
|
||||||
|
# archive = {
|
||||||
|
# zfs_type = "filesystem";
|
||||||
|
# mountpoint = "/archive";
|
||||||
|
# options.compression = "zstd";
|
||||||
|
# options."com.sun:auto-snapshot" = "true";
|
||||||
|
# };
|
||||||
|
# zfs_unmounted_fs = {
|
||||||
|
# zfs_type = "filesystem";
|
||||||
|
# options.mountpoint = "none";
|
||||||
|
# };
|
||||||
|
# zfs_legacy_fs = {
|
||||||
|
# zfs_type = "filesystem";
|
||||||
|
# options.mountpoint = "legacy";
|
||||||
|
# mountpoint = "/zfs_legacy_fs";
|
||||||
|
# };
|
||||||
|
# zfs_testvolume = {
|
||||||
|
# zfs_type = "volume";
|
||||||
|
# size = "10M";
|
||||||
|
# content = {
|
||||||
|
# type = "filesystem";
|
||||||
|
# format = "ext4";
|
||||||
|
# mountpoint = "/ext4onzfs";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# encrypted = {
|
||||||
|
# zfs_type = "filesystem";
|
||||||
|
# size = "20M";
|
||||||
|
# options = {
|
||||||
|
# mountpoint = "none";
|
||||||
|
# encryption = "aes-256-gcm";
|
||||||
|
# keyformat = "passphrase";
|
||||||
|
# keylocation = "file:///tmp/secret.key";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# "encrypted/test" = {
|
||||||
|
# zfs_type = "filesystem";
|
||||||
|
# size = "2M";
|
||||||
|
# mountpoint = "/zfs_crypted";
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
4
docs/README.md
Normal file
4
docs/README.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Documentation
|
||||||
|
|
||||||
|
Reference documents for some of the more complicated services and maintenance
|
||||||
|
tasks.
|
72
docs/installation.md
Normal file
72
docs/installation.md
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
[Back to README](../README.md)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Installation
|
||||||
|
|
||||||
|
## NixOS - From Live Disk
|
||||||
|
|
||||||
|
Format drives and build system from any NixOS host, including the live
|
||||||
|
installer disk:
|
||||||
|
|
||||||
|
**This will erase your drives; use at your own risk!**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
lsblk # Choose the disk you want to wipe
|
||||||
|
nix-shell -p nixVersions.stable
|
||||||
|
nix run github:nmasur/dotfiles#installer -- nvme0n1 tempest
|
||||||
|
```
|
||||||
|
|
||||||
|
## NixOS - From Existing System
|
||||||
|
|
||||||
|
If you're already running NixOS, you can switch to this configuration with the
|
||||||
|
following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix-shell -p nixVersions.stable
|
||||||
|
sudo nixos-rebuild switch --flake github:nmasur/dotfiles#tempest
|
||||||
|
```
|
||||||
|
|
||||||
|
## Windows - From NixOS WSL
|
||||||
|
|
||||||
|
After [installing NixOS on
|
||||||
|
WSL](https://xeiaso.net/blog/nix-flakes-4-wsl-2022-05-01), you can switch to
|
||||||
|
the WSL configuration:
|
||||||
|
|
||||||
|
```
|
||||||
|
nix-shell -p nixVersions.stable
|
||||||
|
sudo nixos-rebuild switch --flake github:nmasur/dotfiles#hydra
|
||||||
|
```
|
||||||
|
|
||||||
|
You should also download the
|
||||||
|
[FiraCode](https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/FiraCode.zip)
|
||||||
|
font and install it on Windows. Install [Alacritty](https://alacritty.org/) and
|
||||||
|
move the `windows/alacritty.yml` file to
|
||||||
|
`C:\Users\<user>\AppData\Roaming\alacritty`.
|
||||||
|
|
||||||
|
## macOS
|
||||||
|
|
||||||
|
To get started on a bare macOS installation, first install Nix:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
|
||||||
|
```
|
||||||
|
|
||||||
|
Launch a new shell. Then use Nix to switch to the macOS configuration:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo rm /etc/bashrc
|
||||||
|
sudo rm /etc/nix/nix.conf
|
||||||
|
nix \
|
||||||
|
--extra-experimental-features flakes \
|
||||||
|
--extra-experimental-features nix-command \
|
||||||
|
run nix-darwin -- switch \
|
||||||
|
--flake github:nmasur/dotfiles#lookingglass
|
||||||
|
```
|
||||||
|
|
||||||
|
Once installed, you can continue to update the macOS configuration:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
darwin-rebuild switch --flake ~/dev/personal/dotfiles
|
||||||
|
```
|
||||||
|
|
65
docs/repair-nextcloud.md
Normal file
65
docs/repair-nextcloud.md
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
# Repairing Nextcloud
|
||||||
|
|
||||||
|
You can run the maintenance commands like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo -u nextcloud nextcloud-occ maintenance:mode --on
|
||||||
|
sudo -u nextcloud nextcloud-occ maintenance:repair
|
||||||
|
sudo -u nextcloud nextcloud-occ maintenance:mode --off
|
||||||
|
```
|
||||||
|
|
||||||
|
## Rescan Files
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo -u nextcloud nextcloud-occ files:scan --all
|
||||||
|
```
|
||||||
|
|
||||||
|
## Converting from SQLite to MySQL (mariadb)
|
||||||
|
|
||||||
|
First: keep Nextcloud set to SQLite as its dbtype, and separately launch MySQL
|
||||||
|
as a service by copying the configuration found
|
||||||
|
[here](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/services/web-apps/nextcloud.nix).
|
||||||
|
|
||||||
|
No password is necessary, since the user-based auth works with UNIX sockets.
|
||||||
|
|
||||||
|
You can connect to the MySQL instance like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo -u nextcloud mysql -S /run/mysqld/mysqld.sock
|
||||||
|
```
|
||||||
|
|
||||||
|
Create a blank database for Nextcloud:
|
||||||
|
|
||||||
|
```sql
|
||||||
|
create database nextcloud;
|
||||||
|
```
|
||||||
|
|
||||||
|
Now setup the [conversion](https://docs.nextcloud.com/server/17/admin_manual/configuration_database/db_conversion.html):
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo -u nextcloud nextcloud-occ db:convert-type mysql nextcloud localhost nextcloud
|
||||||
|
```
|
||||||
|
|
||||||
|
Ignore the password prompt. Proceed with the conversion.
|
||||||
|
|
||||||
|
Now `config.php` will be updated but the override config from NixOS will not
|
||||||
|
be. Now update your NixOS configuration:
|
||||||
|
|
||||||
|
- Remove the `mysql` service you created.
|
||||||
|
- Set `dbtype` to `mysql`.
|
||||||
|
- Set `database.createLocally` to `true`.
|
||||||
|
|
||||||
|
Rebuild your configuration.
|
||||||
|
|
||||||
|
Now, make sure to enable [4-byte
|
||||||
|
support](https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/mysql_4byte_support.html)
|
||||||
|
in the database.
|
||||||
|
|
||||||
|
## Backing Up MySQL Database
|
||||||
|
|
||||||
|
Use this mysqldump command:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo -u nextcloud mysqldump -S /run/mysqld/mysqld.sock --default-character-set=utf8mb4 nextcloud > backup.sql
|
||||||
|
```
|
||||||
|
|
23
docs/restore-calibre.md
Normal file
23
docs/restore-calibre.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Restoring Calibre From Backup
|
||||||
|
|
||||||
|
The `metadata.db` holds the library and `app.db` and `gdrive.db` contain the
|
||||||
|
web/account information.
|
||||||
|
|
||||||
|
Place books directories in `/data/books/`.
|
||||||
|
|
||||||
|
Place `metadata.db` in `/var/lib/calibre-web-db/`.
|
||||||
|
|
||||||
|
Symlink `metadata.db` to the library:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo ln -s /var/lib/calibre-web-db/metadata.db /data/books/metadata.db
|
||||||
|
```
|
||||||
|
|
||||||
|
Place `app.db` and `gdrive.db` in `/var/lib/calibre-web/`.
|
||||||
|
|
||||||
|
Restart Calibre:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo systemctl restart calibre-web.service
|
||||||
|
```
|
||||||
|
|
45
docs/zfs.md
Normal file
45
docs/zfs.md
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# ZFS
|
||||||
|
|
||||||
|
Swan runs its root on ext4. The ZFS drives are managed imperatively (this
|
||||||
|
[disko configuration](../disks/zfs.nix) is an unused work-in-progress).
|
||||||
|
|
||||||
|
The basic ZFS settings are managed [here](../modules/nixos/hardware/zfs.nix).
|
||||||
|
|
||||||
|
## Creating a New Dataset
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo zfs create tank/mydataset
|
||||||
|
sudo zfs set compression=zstd tank/myzstddataset
|
||||||
|
sudo zfs set mountpoint=/data/mydataset tank/mydataset
|
||||||
|
```
|
||||||
|
|
||||||
|
## Maintenance
|
||||||
|
|
||||||
|
### Get Status
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo zpool status
|
||||||
|
```
|
||||||
|
|
||||||
|
### Replace Disk
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo zdb
|
||||||
|
sudo zpool status -g # Show by GUID
|
||||||
|
sudo zpool offline tank <GUID>
|
||||||
|
sudo zpool status
|
||||||
|
# Remove old disk, insert new disk
|
||||||
|
sudo zdb
|
||||||
|
sudo zpool replace tank <OLD GUID> /dev/disk/by-id/<NEW PATH>
|
||||||
|
sudo zpool status
|
||||||
|
```
|
||||||
|
|
||||||
|
## Initial Setup
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo zpool create tank raidz1 sda sdb sdc
|
||||||
|
sudo zpool set ashift=12 tank
|
||||||
|
sudo zpool set autoexpand=on tank
|
||||||
|
sudo zpool set compression=on tank
|
||||||
|
```
|
||||||
|
|
596
flake.lock
generated
596
flake.lock
generated
@ -3,43 +3,77 @@
|
|||||||
"Comment-nvim-src": {
|
"Comment-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1674040818,
|
"lastModified": 1681214440,
|
||||||
"narHash": "sha256-7UtZAE9tPlnpeHS2LLol/LGVOxptDXNKWXHNHvFBNk4=",
|
"narHash": "sha256-48hy+hiaDJLlgWqC7IeZI3dT+VwWkRo4atQbyPxu/ys=",
|
||||||
"owner": "numToStr",
|
"owner": "numToStr",
|
||||||
"repo": "Comment.nvim",
|
"repo": "Comment.nvim",
|
||||||
"rev": "eab2c83a0207369900e92783f56990808082eac2",
|
"rev": "e51f2b142d88bb666dcaa77d93a07f4b419aca70",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "numToStr",
|
"owner": "numToStr",
|
||||||
|
"ref": "v0.8.0",
|
||||||
"repo": "Comment.nvim",
|
"repo": "Comment.nvim",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"baleia-nvim-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1704551058,
|
||||||
|
"narHash": "sha256-0NmiGzMFvL1awYOVtiaSd+O4sAR524x68xwWLgArlqs=",
|
||||||
|
"owner": "m00qek",
|
||||||
|
"repo": "baleia.nvim",
|
||||||
|
"rev": "6d9cbdaca3a428bc7296f838fdfce3ad01ee7495",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "m00qek",
|
||||||
|
"repo": "baleia.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"bufferline-nvim-src": {
|
"bufferline-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676130961,
|
"lastModified": 1706180994,
|
||||||
"narHash": "sha256-3LT45i0eSMfUV9EBrtdtzHxFKRATIhRy/faDd3lI3mA=",
|
"narHash": "sha256-/iGzUDJaodkUyWpwim8UtwaRuarfu/Nk6wxVApk+QxY=",
|
||||||
"owner": "akinsho",
|
"owner": "akinsho",
|
||||||
"repo": "bufferline.nvim",
|
"repo": "bufferline.nvim",
|
||||||
"rev": "84b0822b2af478d0b4f7b0f9249ca218855331db",
|
"rev": "d6cb9b7cac52887bcac65f8698e67479553c0748",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "akinsho",
|
"owner": "akinsho",
|
||||||
|
"ref": "v4.5.0",
|
||||||
"repo": "bufferline.nvim",
|
"repo": "bufferline.nvim",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"bypass-paywalls-clean": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1706880406,
|
||||||
|
"narHash": "sha256-8z2Gc3ITluXXbDij4Ltahpkxs7zdnMITvIAjotab/QU=",
|
||||||
|
"owner": "magnolia1234",
|
||||||
|
"repo": "bpc-uploads",
|
||||||
|
"rev": "c91cfd510390ab5a138f412ad2890b2cb2a2eafd",
|
||||||
|
"type": "gitlab"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "magnolia1234",
|
||||||
|
"repo": "bpc-uploads",
|
||||||
|
"type": "gitlab"
|
||||||
|
}
|
||||||
|
},
|
||||||
"cmp-nvim-lsp-src": {
|
"cmp-nvim-lsp-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1675708067,
|
"lastModified": 1702205473,
|
||||||
"narHash": "sha256-DxpcPTBlvVP88PDoTheLV2fC76EXDqS2UpM5mAfj/D4=",
|
"narHash": "sha256-/0sh9vJBD9pUuD7q3tNSQ1YLvxFMNykdg5eG+LjZAA8=",
|
||||||
"owner": "hrsh7th",
|
"owner": "hrsh7th",
|
||||||
"repo": "cmp-nvim-lsp",
|
"repo": "cmp-nvim-lsp",
|
||||||
"rev": "0e6b2ed705ddcff9738ec4ea838141654f12eeef",
|
"rev": "5af77f54de1b16c34b23cba810150689a3a90312",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -55,11 +89,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673295039,
|
"lastModified": 1706833576,
|
||||||
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
|
"narHash": "sha256-w7BL0EWRts+nD1lbLECIuz6fRzmmV+z8oWwoY7womR0=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
|
"rev": "bdbae6ecff8fcc322bf6b9053c0b984912378af7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -76,11 +110,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677116397,
|
"lastModified": 1706491084,
|
||||||
"narHash": "sha256-2OHwhv4k1SDEuNxhq+zluvrd5pbW8d4TP9NKW4B8iO8=",
|
"narHash": "sha256-eaEv+orTmr2arXpoE4aFZQMVPOYXCBEbLgK22kOtkhs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "8fddb2fd721365fa77ff68b709539639d4dc65d7",
|
"rev": "f67ba6552845ea5d7f596a24d57c33a8a9dc8de9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -89,16 +123,35 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"fidget-nvim-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1704696337,
|
||||||
|
"narHash": "sha256-uAX/RGfOmsUIUaDepNwUpK8MBaTMBJ4rLZ69y0MwpNE=",
|
||||||
|
"owner": "j-hui",
|
||||||
|
"repo": "fidget.nvim",
|
||||||
|
"rev": "3a93300c076109d86c7ce35ec67a8034ae6ba9db",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "j-hui",
|
||||||
|
"ref": "v1.2.0",
|
||||||
|
"repo": "fidget.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"firefox-darwin": {
|
"firefox-darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1675471726,
|
"lastModified": 1707007453,
|
||||||
"narHash": "sha256-526iHwidfdtZZ7aAU9od1/zbyfSFBEailBTet+Gvfqg=",
|
"narHash": "sha256-vs7uACn2/8GOApZJv52gAVsLfpjQWFgkHN2QJ7aVkl8=",
|
||||||
"owner": "bandithedoge",
|
"owner": "bandithedoge",
|
||||||
"repo": "nixpkgs-firefox-darwin",
|
"repo": "nixpkgs-firefox-darwin",
|
||||||
"rev": "813d55a3e3b3c0423eb5d1fcb4bf82197c9f7796",
|
"rev": "d839feb516758ad28bc1cef43008d55e749c1d6a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -110,11 +163,11 @@
|
|||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673956053,
|
"lastModified": 1696426674,
|
||||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -124,12 +177,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1667395993,
|
"lastModified": 1705309234,
|
||||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -139,12 +195,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_2": {
|
"flake-utils_2": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659877975,
|
"lastModified": 1705309234,
|
||||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -153,18 +212,19 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_3": {
|
"hmts-nvim-src": {
|
||||||
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1667395993,
|
"lastModified": 1706900289,
|
||||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
"narHash": "sha256-kw3YJ21nhs/x9Jp7kvnL+9FuiSgLB1hO/ON3QeeZx9g=",
|
||||||
"owner": "numtide",
|
"owner": "calops",
|
||||||
"repo": "flake-utils",
|
"repo": "hmts.nvim",
|
||||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
"rev": "ba1239972a1f56b94252d4f85a43e777ac419662",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "numtide",
|
"owner": "calops",
|
||||||
"repo": "flake-utils",
|
"repo": "hmts.nvim",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -172,15 +232,14 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
]
|
||||||
"utils": "utils"
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1675935446,
|
"lastModified": 1706985585,
|
||||||
"narHash": "sha256-WajulTn7QdwC7QuXRBavrANuIXE5z+08EdxdRw1qsNs=",
|
"narHash": "sha256-ptshv4qXiC6V0GCfpABz88UGGPNwqs5tAxaRUKbk1Qo=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "2dce7f1a55e785a22d61668516df62899278c9e4",
|
"rev": "1ca210648a6ca9b957efde5da957f3de6b1f0c45",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -190,39 +249,87 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nil": {
|
"kitty-scrollback-nvim-src": {
|
||||||
"inputs": {
|
"flake": false,
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": "nixpkgs_2",
|
|
||||||
"rust-overlay": "rust-overlay"
|
|
||||||
},
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676110678,
|
"lastModified": 1706891759,
|
||||||
"narHash": "sha256-hemg8rMKS2me2Wua9ZG/0aQ8fEOfytjyKB+WYcXfEKE=",
|
"narHash": "sha256-p7RPqLHO6D5CCTDQzUrEqTu9+jg+V7wtYfGbY4qjE9A=",
|
||||||
"owner": "oxalica",
|
"owner": "mikesmithgh",
|
||||||
"repo": "nil",
|
"repo": "kitty-scrollback.nvim",
|
||||||
"rev": "ce2e0b5d60fe497134050796f7d12ffb6b50eb28",
|
"rev": "12f7687ac049d46a987c39b2b4f657fdf540fa4e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "oxalica",
|
"owner": "mikesmithgh",
|
||||||
"repo": "nil",
|
"repo": "kitty-scrollback.nvim",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nextcloud-cookbook": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1702545935,
|
||||||
|
"narHash": "sha256-19LN1nYJJ0RMWj6DrYPvHzocTyhMfYdpdhBFch3fpHE=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.0/cookbook-0.11.0.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.0/cookbook-0.11.0.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nextcloud-external": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1699624334,
|
||||||
|
"narHash": "sha256-RCL2RP5twRDLxI/KfAX6QLYQOzqZmSWsfrC5ZQIwTD4=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/nextcloud-releases/external/releases/download/v5.3.1/external-v5.3.1.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/nextcloud-releases/external/releases/download/v5.3.1/external-v5.3.1.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nextcloud-news": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1703426420,
|
||||||
|
"narHash": "sha256-AENBJH/bEob5JQvw4WEi864mdLYJ5Mqe78HJH6ceCpI=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/nextcloud/news/releases/download/25.0.0-alpha3/news.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/nextcloud/news/releases/download/25.0.0-alpha3/news.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nextcloud-snappymail": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1707018069,
|
||||||
|
"narHash": "sha256-UeZXoZFEPJj7zEVNTXJ3IYNt/wI7VFq3Pjh1ubMHCBo=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix2vim": {
|
"nix2vim": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673891598,
|
"lastModified": 1706886721,
|
||||||
"narHash": "sha256-EevceKxQtA+I0XVA8tBGKmYV1V1KbWc3gsswysMzeDk=",
|
"narHash": "sha256-iDYxsE5xYoK8Ww2TYZDmgRQNIZl+QHJfChOxWh45g0k=",
|
||||||
"owner": "gytis-ivaskevicius",
|
"owner": "gytis-ivaskevicius",
|
||||||
"repo": "nix2vim",
|
"repo": "nix2vim",
|
||||||
"rev": "5b31eb81e2c6c74f9e8a4911660f3bf585d55158",
|
"rev": "29253dcf0f645a44847006d436b096369ef42fd8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -233,11 +340,11 @@
|
|||||||
},
|
},
|
||||||
"nixlib": {
|
"nixlib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1636849918,
|
"lastModified": 1693701915,
|
||||||
"narHash": "sha256-nzUK6dPcTmNVrgTAC1EOybSMsrcx+QrVPyqRdyKLkjA=",
|
"narHash": "sha256-waHPLdDYUOHSEtMKKabcKIMhlUOHPOOPQ9UyFeEoovs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "28a5b0557f14124608db68d3ee1f77e9329e9dd5",
|
"rev": "f5af57d3ef9947a70ac86e42695231ac1ad00c25",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -254,11 +361,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1674666581,
|
"lastModified": 1706085261,
|
||||||
"narHash": "sha256-KNI2s/xrL7WOYaPJAWKBtb7cCH3335rLfsL+B+ssuGY=",
|
"narHash": "sha256-7PgpHRHyShINcqgevPP1fJ6N8kM5ZSOJnk3QZBrOCQ0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixos-generators",
|
"repo": "nixos-generators",
|
||||||
"rev": "6a5dc1d3d557ea7b5c19b15ff91955124d0400fa",
|
"rev": "896f6589db5b25023b812bbb6c1f5d3a499b1132",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -269,43 +376,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1639237670,
|
"lastModified": 1706732774,
|
||||||
"narHash": "sha256-RTdL4rEQcgaZGpvtDgkp3oK/V+1LM3I53n0ACPSroAQ=",
|
"narHash": "sha256-hqJlyJk4MRpcItGYMF+3uHe8HvxNETWvlGtLuVpqLU0=",
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "edfb969386ebe6c3cf8f878775a7975cd88f926d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "master",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1675309347,
|
|
||||||
"narHash": "sha256-D3CQ6HRDT2m3XJlrzb5jKq4vNFR5xFTEFKC7iSjlFpM=",
|
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "006c3bd4dd2f5d1d2094047f307cbf9e2b73d9c5",
|
"rev": "b8b232ae7b8b144397fdb12d20f592e5e7c1a64d",
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_3": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1676973346,
|
|
||||||
"narHash": "sha256-rft8oGMocTAhUVqG3LW6I8K/Fo9ICGmNjRqaWTJwav0=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "d0d55259081f0b97c828f38559cad899d351cad1",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -315,30 +390,14 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1674868155,
|
|
||||||
"narHash": "sha256-eFNm2h6fNbgD7ZpO4MHikCB5pSnCJ7DTmwPisjetmwc=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "ce20e9ebe1903ea2ba1ab006ec63093020c761cb",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-22.11",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"null-ls-nvim-src": {
|
"null-ls-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676246878,
|
"lastModified": 1691810493,
|
||||||
"narHash": "sha256-hAUEa2zNsYXQ+TsHYHBzcW67lCxhiD7x+uPbdOZwY8o=",
|
"narHash": "sha256-cWA0rzkOp/ekVKaFee7iea1lhnqKtWUIU+fW5M950wI=",
|
||||||
"owner": "jose-elias-alvarez",
|
"owner": "jose-elias-alvarez",
|
||||||
"repo": "null-ls.nvim",
|
"repo": "null-ls.nvim",
|
||||||
"rev": "d4594231a06cecce73a78a256b0d7c7ab51f7dd5",
|
"rev": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -349,11 +408,11 @@
|
|||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676251563,
|
"lastModified": 1707013032,
|
||||||
"narHash": "sha256-itLKR2Haeh5wQ6dxkuZ8L5gwp3+CAggpN+w2e7cLQPg=",
|
"narHash": "sha256-9kEY/D0Q6sF+p6vJRefVXDK4QQdwK4Q0lSQdsYICad0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "9a8b28a9d6611f6af9f7abb3e690fc755d6906fe",
|
"rev": "ab432acea15134873882610c0e936a882319bc8a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -365,15 +424,16 @@
|
|||||||
"nvim-lspconfig-src": {
|
"nvim-lspconfig-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676175675,
|
"lastModified": 1701687137,
|
||||||
"narHash": "sha256-Wg3NatT4DRBMF6hCxK4C2DC+geFMpfFUFogPbqeMt6E=",
|
"narHash": "sha256-qFjFofA2LoD4yRfx4KGfSCpR3mDkpFaagcm+TVNPqco=",
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
"repo": "nvim-lspconfig",
|
"repo": "nvim-lspconfig",
|
||||||
"rev": "1712672e4da3003a0dd9f771d30389600b360f42",
|
"rev": "cf3dd4a290084a868fac0e2e876039321d57111c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
|
"ref": "v0.1.7",
|
||||||
"repo": "nvim-lspconfig",
|
"repo": "nvim-lspconfig",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -381,11 +441,11 @@
|
|||||||
"nvim-tree-lua-src": {
|
"nvim-tree-lua-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676244722,
|
"lastModified": 1706571452,
|
||||||
"narHash": "sha256-xoSekdZhWr59qTOM0/ihYiuKiwHiKYb42Ep5JHn65UM=",
|
"narHash": "sha256-b0LIqLC8cCRX1NyJx4eH5c4v5Fqqw5mMleAnQ2VRctM=",
|
||||||
"owner": "kyazdani42",
|
"owner": "kyazdani42",
|
||||||
"repo": "nvim-tree.lua",
|
"repo": "nvim-tree.lua",
|
||||||
"rev": "ba1778e061f25814bc5940be886a7f41d7d7736e",
|
"rev": "f39f7b6fcd3865ac2146de4cb4045286308f2935",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -397,81 +457,152 @@
|
|||||||
"nvim-treesitter-src": {
|
"nvim-treesitter-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676240774,
|
"lastModified": 1706952848,
|
||||||
"narHash": "sha256-eRSU/9ysSvTyYxBrp9Whg0eXgAOsCdmIHMlYZK7bjRg=",
|
"narHash": "sha256-pNjEODR+QJPDL58O4NM7SjzZEN8D3bXDHbKLNOS3fL8=",
|
||||||
"owner": "nvim-treesitter",
|
"owner": "nvim-treesitter",
|
||||||
"repo": "nvim-treesitter",
|
"repo": "nvim-treesitter",
|
||||||
"rev": "7eb5f1a2e3949496f26c4084b521b30f2d08137a",
|
"rev": "4fbf150a1621d52f17b099506e1a32f107079210",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nvim-treesitter",
|
"owner": "nvim-treesitter",
|
||||||
|
"ref": "master",
|
||||||
"repo": "nvim-treesitter",
|
"repo": "nvim-treesitter",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"proton-ge": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1700610476,
|
||||||
|
"narHash": "sha256-IoClZ6hl2lsz9OGfFgnz7vEAGlSY2+1K2lDEEsJQOfU=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-25/GE-Proton8-25.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-25/GE-Proton8-25.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ren": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1704996573,
|
||||||
|
"narHash": "sha256-zVIt6Xp+Mvym6gySvHIZJt1QgzKVP/wbTGTubWk6kzI=",
|
||||||
|
"owner": "robenkleene",
|
||||||
|
"repo": "ren-find",
|
||||||
|
"rev": "50c40172e354caffee48932266edd7c7a76a20fd",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "robenkleene",
|
||||||
|
"repo": "ren-find",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rep": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1705833236,
|
||||||
|
"narHash": "sha256-hm+v+b97z1HnY/7QHZxc0GygCq9W0mJauyjnz48ddaM=",
|
||||||
|
"owner": "robenkleene",
|
||||||
|
"repo": "rep-grep",
|
||||||
|
"rev": "365acc5d599934e94dc066eb85b7ddd684ba508b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "robenkleene",
|
||||||
|
"repo": "rep-grep",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"Comment-nvim-src": "Comment-nvim-src",
|
"Comment-nvim-src": "Comment-nvim-src",
|
||||||
|
"baleia-nvim-src": "baleia-nvim-src",
|
||||||
"bufferline-nvim-src": "bufferline-nvim-src",
|
"bufferline-nvim-src": "bufferline-nvim-src",
|
||||||
|
"bypass-paywalls-clean": "bypass-paywalls-clean",
|
||||||
"cmp-nvim-lsp-src": "cmp-nvim-lsp-src",
|
"cmp-nvim-lsp-src": "cmp-nvim-lsp-src",
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
|
"fidget-nvim-src": "fidget-nvim-src",
|
||||||
"firefox-darwin": "firefox-darwin",
|
"firefox-darwin": "firefox-darwin",
|
||||||
|
"hmts-nvim-src": "hmts-nvim-src",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nil": "nil",
|
"kitty-scrollback-nvim-src": "kitty-scrollback-nvim-src",
|
||||||
|
"nextcloud-cookbook": "nextcloud-cookbook",
|
||||||
|
"nextcloud-external": "nextcloud-external",
|
||||||
|
"nextcloud-news": "nextcloud-news",
|
||||||
|
"nextcloud-snappymail": "nextcloud-snappymail",
|
||||||
"nix2vim": "nix2vim",
|
"nix2vim": "nix2vim",
|
||||||
"nixos-generators": "nixos-generators",
|
"nixos-generators": "nixos-generators",
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": "nixpkgs",
|
||||||
"null-ls-nvim-src": "null-ls-nvim-src",
|
"null-ls-nvim-src": "null-ls-nvim-src",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"nvim-lspconfig-src": "nvim-lspconfig-src",
|
"nvim-lspconfig-src": "nvim-lspconfig-src",
|
||||||
"nvim-tree-lua-src": "nvim-tree-lua-src",
|
"nvim-tree-lua-src": "nvim-tree-lua-src",
|
||||||
"nvim-treesitter-src": "nvim-treesitter-src",
|
"nvim-treesitter-src": "nvim-treesitter-src",
|
||||||
|
"proton-ge": "proton-ge",
|
||||||
|
"ren": "ren",
|
||||||
|
"rep": "rep",
|
||||||
"telescope-nvim-src": "telescope-nvim-src",
|
"telescope-nvim-src": "telescope-nvim-src",
|
||||||
"telescope-project-nvim-src": "telescope-project-nvim-src",
|
"telescope-project-nvim-src": "telescope-project-nvim-src",
|
||||||
"toggleterm-nvim-src": "toggleterm-nvim-src",
|
"toggleterm-nvim-src": "toggleterm-nvim-src",
|
||||||
|
"tree-sitter-bash": "tree-sitter-bash",
|
||||||
|
"tree-sitter-ini": "tree-sitter-ini",
|
||||||
|
"tree-sitter-lua": "tree-sitter-lua",
|
||||||
|
"tree-sitter-puppet": "tree-sitter-puppet",
|
||||||
|
"tree-sitter-python": "tree-sitter-python",
|
||||||
|
"tree-sitter-rasi": "tree-sitter-rasi",
|
||||||
|
"tree-sitter-vimdoc": "tree-sitter-vimdoc",
|
||||||
"wallpapers": "wallpapers",
|
"wallpapers": "wallpapers",
|
||||||
"wsl": "wsl"
|
"wsl": "wsl",
|
||||||
|
"zenyd-mpv-scripts": "zenyd-mpv-scripts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"systems": {
|
||||||
"inputs": {
|
|
||||||
"flake-utils": [
|
|
||||||
"nil",
|
|
||||||
"flake-utils"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"nil",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1675391458,
|
"lastModified": 1681028828,
|
||||||
"narHash": "sha256-ukDKZw922BnK5ohL9LhwtaDAdCsJL7L6ScNEyF1lO9w=",
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
"owner": "oxalica",
|
"owner": "nix-systems",
|
||||||
"repo": "rust-overlay",
|
"repo": "default",
|
||||||
"rev": "383a4acfd11d778d5c2efcf28376cbd845eeaedf",
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "oxalica",
|
"owner": "nix-systems",
|
||||||
"repo": "rust-overlay",
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"telescope-nvim-src": {
|
"telescope-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1675149856,
|
"lastModified": 1701167040,
|
||||||
"narHash": "sha256-L4Kw94CUy6N7zcyy9INuR/O0fxQ7sp0IvGd/u7fHxMA=",
|
"narHash": "sha256-H5RpyWMluE+Yxg7xFX43AZTVW+Yg70DF3FmEGXBUSNg=",
|
||||||
"owner": "nvim-telescope",
|
"owner": "nvim-telescope",
|
||||||
"repo": "telescope.nvim",
|
"repo": "telescope.nvim",
|
||||||
"rev": "203bf5609137600d73e8ed82703d6b0e320a5f36",
|
"rev": "d90956833d7c27e73c621a61f20b29fdb7122709",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nvim-telescope",
|
"owner": "nvim-telescope",
|
||||||
|
"ref": "0.1.5",
|
||||||
"repo": "telescope.nvim",
|
"repo": "telescope.nvim",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -479,11 +610,11 @@
|
|||||||
"telescope-project-nvim-src": {
|
"telescope-project-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1671805267,
|
"lastModified": 1701464478,
|
||||||
"narHash": "sha256-S4SOHzQ17ux5pcwwYFpVVLzjLeC4/EJ0IFPbrfzUJC8=",
|
"narHash": "sha256-touMCltcnqkrQYV1NtNeWLQeFVGt+WM3aIWIdKilA7w=",
|
||||||
"owner": "nvim-telescope",
|
"owner": "nvim-telescope",
|
||||||
"repo": "telescope-project.nvim",
|
"repo": "telescope-project.nvim",
|
||||||
"rev": "8e8ee37b7210761502cdf2c3a82b5ba8fb5b2972",
|
"rev": "1aaf16580a614601a7f7077d9639aeb457dc5559",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -495,31 +626,132 @@
|
|||||||
"toggleterm-nvim-src": {
|
"toggleterm-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1675358836,
|
"lastModified": 1701858874,
|
||||||
"narHash": "sha256-9O7p/7tRStg51OFhMc88M5ewYquiYC9x9CV4s5veVP8=",
|
"narHash": "sha256-vJApw7XY2wOX9InfWcah+hkNxBfS1+kQUWr4ITxRmgA=",
|
||||||
"owner": "akinsho",
|
"owner": "akinsho",
|
||||||
"repo": "toggleterm.nvim",
|
"repo": "toggleterm.nvim",
|
||||||
"rev": "19aad0f41f47affbba1274f05e3c067e6d718e1e",
|
"rev": "cbd041d91b90cd3c02df03fe6133208888f8e008",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "akinsho",
|
"owner": "akinsho",
|
||||||
|
"ref": "v2.9.0",
|
||||||
"repo": "toggleterm.nvim",
|
"repo": "toggleterm.nvim",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"utils": {
|
"tree-sitter-bash": {
|
||||||
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1667395993,
|
"lastModified": 1705686017,
|
||||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
"narHash": "sha256-+Mpks0FyQLl26TX63J6WhaAl/QDUR1k9wSUY5SFwL+w=",
|
||||||
"owner": "numtide",
|
"owner": "tree-sitter",
|
||||||
"repo": "flake-utils",
|
"repo": "tree-sitter-bash",
|
||||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
"rev": "f7239f638d3dc16762563a9027faeee518ce1bd9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "numtide",
|
"owner": "tree-sitter",
|
||||||
"repo": "flake-utils",
|
"ref": "master",
|
||||||
|
"repo": "tree-sitter-bash",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tree-sitter-ini": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1699877527,
|
||||||
|
"narHash": "sha256-dYPeVTNWO4apY5dsjsKViavU7YtLeGTp6BzEemXhsEU=",
|
||||||
|
"owner": "justinmk",
|
||||||
|
"repo": "tree-sitter-ini",
|
||||||
|
"rev": "bcb84a2d4bcd6f55b911c42deade75c8f90cb0c5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "justinmk",
|
||||||
|
"repo": "tree-sitter-ini",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tree-sitter-lua": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1694072484,
|
||||||
|
"narHash": "sha256-5t5w8KqbefInNbA12/jpNzmky/uOUhsLjKdEqpl1GEc=",
|
||||||
|
"owner": "MunifTanjim",
|
||||||
|
"repo": "tree-sitter-lua",
|
||||||
|
"rev": "9668709211b2e683f27f414454a8b51bf0a6bda1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "MunifTanjim",
|
||||||
|
"ref": "main",
|
||||||
|
"repo": "tree-sitter-lua",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tree-sitter-puppet": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690231696,
|
||||||
|
"narHash": "sha256-YEjjy9WLwITERYqoeSVrRYnwVBIAwdc4o0lvAK9wizw=",
|
||||||
|
"owner": "amaanq",
|
||||||
|
"repo": "tree-sitter-puppet",
|
||||||
|
"rev": "9ce9a5f7d64528572aaa8d59459ba869e634086b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "amaanq",
|
||||||
|
"repo": "tree-sitter-puppet",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tree-sitter-python": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1700218345,
|
||||||
|
"narHash": "sha256-hXNxa895SyNOG7PH2vAIkWbcMjZDjWYDsCafBZuvnT0=",
|
||||||
|
"owner": "tree-sitter",
|
||||||
|
"repo": "tree-sitter-python",
|
||||||
|
"rev": "4bfdd9033a2225cc95032ce77066b7aeca9e2efc",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "tree-sitter",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "tree-sitter-python",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tree-sitter-rasi": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1678701563,
|
||||||
|
"narHash": "sha256-2nYZoLcrxxxiOJEySwHUm93lzMg8mU+V7LIP63ntFdA=",
|
||||||
|
"owner": "Fymyte",
|
||||||
|
"repo": "tree-sitter-rasi",
|
||||||
|
"rev": "371dac6bcce0df5566c1cfebde69d90ecbeefd2d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Fymyte",
|
||||||
|
"repo": "tree-sitter-rasi",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tree-sitter-vimdoc": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1705491128,
|
||||||
|
"narHash": "sha256-q5Ln8WPFrtKBfZnaAAlMh3Q/eczEt6wCMZAtx+ISCKg=",
|
||||||
|
"owner": "neovim",
|
||||||
|
"repo": "tree-sitter-vimdoc",
|
||||||
|
"rev": "ed8695ad8de39c3f073da130156f00b1148e2891",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "neovim",
|
||||||
|
"repo": "tree-sitter-vimdoc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -542,15 +774,17 @@
|
|||||||
"wsl": {
|
"wsl": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-utils": "flake-utils_3",
|
"flake-utils": "flake-utils_2",
|
||||||
"nixpkgs": "nixpkgs_4"
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676126384,
|
"lastModified": 1706867893,
|
||||||
"narHash": "sha256-3aAnN891Cb1pizewAgaHIo3W1WbAjXtoWuX8n3j8YoI=",
|
"narHash": "sha256-c5bADvtL35S3vsJaXR5YWTXe08W0gSwOrTOXfpJB4Ac=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"rev": "a1c7e8bebac32cfac7aa8498bdfc60cbff13eb50",
|
"rev": "bcae8dc73b931b7f0fc65f1f1ef93dc379dfd66b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -558,6 +792,22 @@
|
|||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"zenyd-mpv-scripts": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1706283438,
|
||||||
|
"narHash": "sha256-hpLZDtt5q18aZ8d9LHfT852wtBosKUTJ7Bx+cbjBLcg=",
|
||||||
|
"owner": "zenyd",
|
||||||
|
"repo": "mpv-scripts",
|
||||||
|
"rev": "7100d19d18d111ce77fc9e6e8947c0d542a86397",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "zenyd",
|
||||||
|
"repo": "mpv-scripts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
255
flake.nix
255
flake.nix
@ -9,25 +9,31 @@
|
|||||||
|
|
||||||
# Used for MacOS system config
|
# Used for MacOS system config
|
||||||
darwin = {
|
darwin = {
|
||||||
url = "github:/lnl7/nix-darwin/master";
|
url = "github:lnl7/nix-darwin/master";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Used for Windows Subsystem for Linux compatibility
|
# Used for Windows Subsystem for Linux compatibility
|
||||||
wsl.url = "github:nix-community/NixOS-WSL";
|
wsl = {
|
||||||
|
url = "github:nix-community/NixOS-WSL";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
# Used for user packages
|
# Used for user packages and dotfiles
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/master";
|
url = "github:nix-community/home-manager/master";
|
||||||
inputs.nixpkgs.follows =
|
inputs.nixpkgs.follows =
|
||||||
"nixpkgs"; # Use system packages list where available
|
"nixpkgs"; # Use system packages list for their inputs
|
||||||
};
|
};
|
||||||
|
|
||||||
# Community packages; used for Firefox extensions
|
# Community packages; used for Firefox extensions
|
||||||
nur.url = "github:nix-community/nur";
|
nur.url = "github:nix-community/nur";
|
||||||
|
|
||||||
# Use official Firefox binary for macOS
|
# Use official Firefox binary for macOS
|
||||||
firefox-darwin.url = "github:bandithedoge/nixpkgs-firefox-darwin";
|
firefox-darwin = {
|
||||||
|
url = "github:bandithedoge/nixpkgs-firefox-darwin";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
# Manage disk format and partitioning
|
# Manage disk format and partitioning
|
||||||
disko = {
|
disko = {
|
||||||
@ -53,12 +59,10 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Nix language server
|
|
||||||
nil.url = "github:oxalica/nil";
|
|
||||||
|
|
||||||
# Neovim plugins
|
# Neovim plugins
|
||||||
nvim-lspconfig-src = {
|
nvim-lspconfig-src = {
|
||||||
url = "github:neovim/nvim-lspconfig";
|
# https://github.com/neovim/nvim-lspconfig/tags
|
||||||
|
url = "github:neovim/nvim-lspconfig/v0.1.7";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
cmp-nvim-lsp-src = {
|
cmp-nvim-lsp-src = {
|
||||||
@ -69,16 +73,24 @@
|
|||||||
url = "github:jose-elias-alvarez/null-ls.nvim";
|
url = "github:jose-elias-alvarez/null-ls.nvim";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
baleia-nvim-src = {
|
||||||
|
# https://github.com/m00qek/baleia.nvim/tags
|
||||||
|
url = "github:m00qek/baleia.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
Comment-nvim-src = {
|
Comment-nvim-src = {
|
||||||
url = "github:numToStr/Comment.nvim";
|
# https://github.com/numToStr/Comment.nvim/releases
|
||||||
|
url = "github:numToStr/Comment.nvim/v0.8.0";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
nvim-treesitter-src = {
|
nvim-treesitter-src = {
|
||||||
url = "github:nvim-treesitter/nvim-treesitter";
|
# https://github.com/nvim-treesitter/nvim-treesitter/tags
|
||||||
|
url = "github:nvim-treesitter/nvim-treesitter/master";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
telescope-nvim-src = {
|
telescope-nvim-src = {
|
||||||
url = "github:nvim-telescope/telescope.nvim";
|
# https://github.com/nvim-telescope/telescope.nvim/releases
|
||||||
|
url = "github:nvim-telescope/telescope.nvim/0.1.5";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
telescope-project-nvim-src = {
|
telescope-project-nvim-src = {
|
||||||
@ -86,17 +98,120 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
toggleterm-nvim-src = {
|
toggleterm-nvim-src = {
|
||||||
url = "github:akinsho/toggleterm.nvim";
|
# https://github.com/akinsho/toggleterm.nvim/tags
|
||||||
|
url = "github:akinsho/toggleterm.nvim/v2.9.0";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
bufferline-nvim-src = {
|
bufferline-nvim-src = {
|
||||||
url = "github:akinsho/bufferline.nvim";
|
# https://github.com/akinsho/bufferline.nvim/releases
|
||||||
|
url = "github:akinsho/bufferline.nvim/v4.5.0";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
nvim-tree-lua-src = {
|
nvim-tree-lua-src = {
|
||||||
url = "github:kyazdani42/nvim-tree.lua";
|
url = "github:kyazdani42/nvim-tree.lua";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
hmts-nvim-src = {
|
||||||
|
url = "github:calops/hmts.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
fidget-nvim-src = {
|
||||||
|
# https://github.com/j-hui/fidget.nvim/tags
|
||||||
|
url = "github:j-hui/fidget.nvim/v1.2.0";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
kitty-scrollback-nvim-src = {
|
||||||
|
url = "github:mikesmithgh/kitty-scrollback.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Tree-Sitter Grammars
|
||||||
|
tree-sitter-bash = {
|
||||||
|
url = "github:tree-sitter/tree-sitter-bash/master";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
tree-sitter-python = {
|
||||||
|
url = "github:tree-sitter/tree-sitter-python/master";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
tree-sitter-lua = {
|
||||||
|
url = "github:MunifTanjim/tree-sitter-lua/main";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
tree-sitter-ini = {
|
||||||
|
url = "github:justinmk/tree-sitter-ini";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
tree-sitter-puppet = {
|
||||||
|
url = "github:amaanq/tree-sitter-puppet";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
tree-sitter-rasi = {
|
||||||
|
url = "github:Fymyte/tree-sitter-rasi";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
tree-sitter-vimdoc = {
|
||||||
|
url = "github:neovim/tree-sitter-vimdoc";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# MPV Scripts
|
||||||
|
zenyd-mpv-scripts = {
|
||||||
|
url = "github:zenyd/mpv-scripts";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Ren and rep - CLI find and replace
|
||||||
|
rep = {
|
||||||
|
url = "github:robenkleene/rep-grep";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
ren = {
|
||||||
|
url = "github:robenkleene/ren-find";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# GE version of Proton for game compatibility
|
||||||
|
# Alternatively, could consider using https://github.com/fufexan/nix-gaming
|
||||||
|
proton-ge = {
|
||||||
|
# https://github.com/GloriousEggroll/proton-ge-custom/releases
|
||||||
|
url =
|
||||||
|
"https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-25/GE-Proton8-25.tar.gz";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Firefox addon from outside the extension store
|
||||||
|
bypass-paywalls-clean = {
|
||||||
|
# https://gitlab.com/magnolia1234/bpc-uploads/-/commits/master/?ref_type=HEADS
|
||||||
|
url = "gitlab:magnolia1234/bpc-uploads";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Nextcloud Apps
|
||||||
|
nextcloud-news = {
|
||||||
|
# https://github.com/nextcloud/news/releases
|
||||||
|
url =
|
||||||
|
"https://github.com/nextcloud/news/releases/download/25.0.0-alpha3/news.tar.gz";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
nextcloud-external = {
|
||||||
|
# https://github.com/nextcloud-releases/external/releases
|
||||||
|
url =
|
||||||
|
"https://github.com/nextcloud-releases/external/releases/download/v5.3.1/external-v5.3.1.tar.gz";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
nextcloud-cookbook = {
|
||||||
|
# https://github.com/christianlupus-nextcloud/cookbook-releases/releases/
|
||||||
|
url =
|
||||||
|
"https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.0/cookbook-0.11.0.tar.gz";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
nextcloud-snappymail = {
|
||||||
|
# https://github.com/the-djmaze/snappymail/releases
|
||||||
|
url =
|
||||||
|
"https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -105,13 +220,28 @@
|
|||||||
let
|
let
|
||||||
|
|
||||||
# Global configuration for my systems
|
# Global configuration for my systems
|
||||||
globals = rec {
|
globals = let baseName = "masu.rs";
|
||||||
|
in rec {
|
||||||
user = "noah";
|
user = "noah";
|
||||||
fullName = "Noah Masur";
|
fullName = "Noah Masur";
|
||||||
gitName = fullName;
|
gitName = fullName;
|
||||||
gitEmail = "7386960+nmasur@users.noreply.github.com";
|
gitEmail = "7386960+nmasur@users.noreply.github.com";
|
||||||
mail.server = "noahmasur.com";
|
mail.server = "noahmasur.com";
|
||||||
dotfilesRepo = "git@github.com:nmasur/dotfiles";
|
mail.imapHost = "imap.purelymail.com";
|
||||||
|
mail.smtpHost = "smtp.purelymail.com";
|
||||||
|
dotfilesRepo = "https://github.com/nmasur/dotfiles";
|
||||||
|
hostnames = {
|
||||||
|
git = "git.${baseName}";
|
||||||
|
influxdb = "influxdb.${baseName}";
|
||||||
|
metrics = "metrics.${baseName}";
|
||||||
|
prometheus = "prom.${baseName}";
|
||||||
|
paperless = "paper.${baseName}";
|
||||||
|
secrets = "vault.${baseName}";
|
||||||
|
stream = "stream.${baseName}";
|
||||||
|
content = "cloud.${baseName}";
|
||||||
|
books = "books.${baseName}";
|
||||||
|
download = "download.${baseName}";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Common overlays to always use
|
# Common overlays to always use
|
||||||
@ -120,6 +250,16 @@
|
|||||||
inputs.nix2vim.overlay
|
inputs.nix2vim.overlay
|
||||||
(import ./overlays/neovim-plugins.nix inputs)
|
(import ./overlays/neovim-plugins.nix inputs)
|
||||||
(import ./overlays/calibre-web.nix)
|
(import ./overlays/calibre-web.nix)
|
||||||
|
(import ./overlays/disko.nix inputs)
|
||||||
|
(import ./overlays/tree-sitter.nix inputs)
|
||||||
|
(import ./overlays/caddy.nix inputs)
|
||||||
|
(import ./overlays/mpv-scripts.nix inputs)
|
||||||
|
(import ./overlays/nextcloud-apps.nix inputs)
|
||||||
|
(import ./overlays/betterlockscreen.nix)
|
||||||
|
(import ./overlays/proton-ge.nix inputs)
|
||||||
|
(import ./overlays/gh-collaborators.nix)
|
||||||
|
(import ./overlays/bypass-paywalls-clean.nix inputs)
|
||||||
|
(import ./overlays/ren-rep.nix inputs)
|
||||||
];
|
];
|
||||||
|
|
||||||
# System types to support.
|
# System types to support.
|
||||||
@ -131,6 +271,8 @@
|
|||||||
|
|
||||||
in rec {
|
in rec {
|
||||||
|
|
||||||
|
# Contains my full system builds, including home-manager
|
||||||
|
# nixos-rebuild switch --flake .#tempest
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
tempest = import ./hosts/tempest { inherit inputs globals overlays; };
|
tempest = import ./hosts/tempest { inherit inputs globals overlays; };
|
||||||
hydra = import ./hosts/hydra { inherit inputs globals overlays; };
|
hydra = import ./hosts/hydra { inherit inputs globals overlays; };
|
||||||
@ -138,12 +280,14 @@
|
|||||||
swan = import ./hosts/swan { inherit inputs globals overlays; };
|
swan = import ./hosts/swan { inherit inputs globals overlays; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Contains my full Mac system builds, including home-manager
|
||||||
|
# darwin-rebuild switch --flake .#lookingglass
|
||||||
darwinConfigurations = {
|
darwinConfigurations = {
|
||||||
lookingglass =
|
lookingglass =
|
||||||
import ./hosts/lookingglass { inherit inputs globals overlays; };
|
import ./hosts/lookingglass { inherit inputs globals overlays; };
|
||||||
};
|
};
|
||||||
|
|
||||||
# For quickly applying local settings with:
|
# For quickly applying home-manager settings with:
|
||||||
# home-manager switch --flake .#tempest
|
# home-manager switch --flake .#tempest
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
tempest =
|
tempest =
|
||||||
@ -152,35 +296,37 @@
|
|||||||
darwinConfigurations.lookingglass.config.home-manager.users."Noah.Masur".home;
|
darwinConfigurations.lookingglass.config.home-manager.users."Noah.Masur".home;
|
||||||
};
|
};
|
||||||
|
|
||||||
diskoConfigurations = { swan = import ./hosts/swan/disks.nix; };
|
# Disk formatting, only used once
|
||||||
|
diskoConfigurations = { root = import ./disks/root.nix; };
|
||||||
|
|
||||||
# Package servers into images with a generator
|
packages = let
|
||||||
packages = forAllSystems (system: {
|
aws = system:
|
||||||
|
import ./hosts/aws { inherit inputs globals overlays system; };
|
||||||
aws = {
|
staff = system:
|
||||||
"${system}" =
|
import ./hosts/staff { inherit inputs globals overlays system; };
|
||||||
import ./generators/aws { inherit inputs globals system overlays; };
|
neovim = system:
|
||||||
};
|
let pkgs = import nixpkgs { inherit system overlays; };
|
||||||
|
in import ./modules/common/neovim/package {
|
||||||
staff = {
|
inherit pkgs;
|
||||||
"${system}" = import ./generators/staff {
|
colors = (import ./colorscheme/gruvbox-dark).dark;
|
||||||
inherit inputs globals system overlays;
|
|
||||||
};
|
};
|
||||||
};
|
in {
|
||||||
|
x86_64-linux.aws = aws "x86_64-linux";
|
||||||
|
x86_64-linux.staff = staff "x86_64-linux";
|
||||||
|
|
||||||
neovim = let pkgs = import nixpkgs { inherit system overlays; };
|
# Package Neovim config into standalone package
|
||||||
in import ./modules/common/neovim/package {
|
x86_64-linux.neovim = neovim "x86_64-linux";
|
||||||
inherit pkgs;
|
x86_64-darwin.neovim = neovim "x86_64-darwin";
|
||||||
colors =
|
aarch64-linux.neovim = neovim "aarch64-linux";
|
||||||
import ./colorscheme/gruvbox/neovim-gruvbox.nix { inherit pkgs; };
|
aarch64-darwin.neovim = neovim "aarch64-darwin";
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
# Programs that can be run by calling this flake
|
||||||
apps = forAllSystems (system:
|
apps = forAllSystems (system:
|
||||||
let pkgs = import nixpkgs { inherit system overlays; };
|
let pkgs = import nixpkgs { inherit system overlays; };
|
||||||
in import ./apps { inherit pkgs; });
|
in import ./apps { inherit pkgs; });
|
||||||
|
|
||||||
|
# Development environments
|
||||||
devShells = forAllSystems (system:
|
devShells = forAllSystems (system:
|
||||||
let pkgs = import nixpkgs { inherit system overlays; };
|
let pkgs = import nixpkgs { inherit system overlays; };
|
||||||
in {
|
in {
|
||||||
@ -190,23 +336,24 @@
|
|||||||
buildInputs = with pkgs; [ git stylua nixfmt shfmt shellcheck ];
|
buildInputs = with pkgs; [ git stylua nixfmt shfmt shellcheck ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Used for cloud and systems development and administration
|
});
|
||||||
devops = pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs; [
|
|
||||||
git
|
|
||||||
terraform
|
|
||||||
consul
|
|
||||||
vault
|
|
||||||
awscli2
|
|
||||||
google-cloud-sdk
|
|
||||||
ansible
|
|
||||||
kubectl
|
|
||||||
kubernetes-helm
|
|
||||||
kustomize
|
|
||||||
fluxcd
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
checks = forAllSystems (system:
|
||||||
|
let pkgs = import nixpkgs { inherit system overlays; };
|
||||||
|
in {
|
||||||
|
neovim = pkgs.runCommand "neovim-check-health" {
|
||||||
|
buildInputs = [ inputs.self.packages.${system}.neovim ];
|
||||||
|
} ''
|
||||||
|
mkdir -p $out
|
||||||
|
export HOME=$TMPDIR
|
||||||
|
nvim -c "checkhealth" -c "write $out/health.log" -c "quitall"
|
||||||
|
|
||||||
|
# Check for errors inside the health log
|
||||||
|
if $(grep "ERROR" $out/health.log); then
|
||||||
|
cat $out/health.log
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
# Templates for starting other projects quickly
|
# Templates for starting other projects quickly
|
||||||
|
26
hosts/README.md
Normal file
26
hosts/README.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Hosts
|
||||||
|
|
||||||
|
These are the individual machines managed by this flake.
|
||||||
|
|
||||||
|
| Host | Purpose |
|
||||||
|
| --- | --- |
|
||||||
|
| [aws](./aws/default.nix) | AWS AMI |
|
||||||
|
| [staff](./staff/default.nix) | Live USB stick |
|
||||||
|
| [flame](./flame/default.nix) | Oracle cloud server |
|
||||||
|
| [hydra](./hydra/default.nix) | WSL config |
|
||||||
|
| [lookingglass](./lookingglass/default.nix) | Work MacBook |
|
||||||
|
| [swan](./swan/default.nix) | Home server |
|
||||||
|
| [tempest](./tempest/default.nix) | Linux desktop |
|
||||||
|
|
||||||
|
## NixOS Workflow
|
||||||
|
|
||||||
|
Each hosts file is imported into [nixosConfigurations](../flake.nix) and passed
|
||||||
|
the arguments from the flake (inputs, globals, overlays). The `nixosSystem`
|
||||||
|
function in that hosts file will be called by the NixOS module system during a
|
||||||
|
nixos-rebuild.
|
||||||
|
|
||||||
|
Each module in the each host's `modules` list is either a function or an
|
||||||
|
attrset. The attrsets will simply apply values to options that have been
|
||||||
|
declared in the config by other modules. Meanwhile, the functions will be
|
||||||
|
passed various arguments, several of which you will see listed at the top of
|
||||||
|
each of their files.
|
@ -1,21 +1,16 @@
|
|||||||
{ inputs, globals, ... }:
|
{ inputs, system, globals, overlays, ... }:
|
||||||
|
|
||||||
with inputs;
|
inputs.nixos-generators.nixosGenerate {
|
||||||
|
|
||||||
nixos-generators.nixosGenerate {
|
|
||||||
inherit system;
|
inherit system;
|
||||||
format = "amazon";
|
format = "amazon";
|
||||||
modules = [
|
modules = [
|
||||||
home-manager.nixosModules.home-manager
|
globals
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
user = globals.user;
|
nixpkgs.overlays = overlays;
|
||||||
fullName = globals.fullName;
|
|
||||||
dotfilesRepo = globals.dotfilesRepo;
|
|
||||||
gitName = globals.gitName;
|
|
||||||
gitEmail = globals.gitEmail;
|
|
||||||
networking.hostName = "sheep";
|
networking.hostName = "sheep";
|
||||||
gui.enable = false;
|
gui.enable = false;
|
||||||
colorscheme = (import ../colorscheme/gruvbox);
|
theme.colors = (import ../../colorscheme/gruvbox).dark;
|
||||||
passwordHash = null;
|
passwordHash = null;
|
||||||
publicKey =
|
publicKey =
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
||||||
@ -24,7 +19,7 @@ nixos-generators.nixosGenerate {
|
|||||||
}
|
}
|
||||||
../../modules/common
|
../../modules/common
|
||||||
../../modules/nixos
|
../../modules/nixos
|
||||||
../../modules/common/services/sshd.nix
|
../../modules/nixos/services/sshd.nix
|
||||||
] ++ [
|
] ++ [
|
||||||
# Required to fix diskSize errors during build
|
# Required to fix diskSize errors during build
|
||||||
({ ... }: { amazonImage.sizeMB = 16 * 1024; })
|
({ ... }: { amazonImage.sizeMB = 16 * 1024; })
|
@ -26,7 +26,7 @@ data "aws_iam_policy_document" "vmimport" {
|
|||||||
actions = [
|
actions = [
|
||||||
"s3:GetBucketLocation",
|
"s3:GetBucketLocation",
|
||||||
"s3:GetObject",
|
"s3:GetObject",
|
||||||
"s3:ListBucket",
|
"s3:ListBucket",
|
||||||
]
|
]
|
||||||
resources = [
|
resources = [
|
||||||
"arn:aws:s3:::${aws_s3_object.image.bucket}",
|
"arn:aws:s3:::${aws_s3_object.image.bucket}",
|
@ -1,7 +1,6 @@
|
|||||||
name: 'Terraform'
|
name: 'Terraform'
|
||||||
env:
|
env:
|
||||||
|
|
||||||
|
|
||||||
AWS_ACCOUNT_NUMBER: ''
|
AWS_ACCOUNT_NUMBER: ''
|
||||||
AWS_PLAN_ROLE_NAME: github_actions_plan
|
AWS_PLAN_ROLE_NAME: github_actions_plan
|
||||||
AWS_APPLY_ROLE_NAME: github_actions_admin
|
AWS_APPLY_ROLE_NAME: github_actions_admin
|
||||||
@ -82,15 +81,14 @@ jobs:
|
|||||||
|
|
||||||
# Downloads the current repo code to the runner.
|
# Downloads the current repo code to the runner.
|
||||||
- name: Checkout Repo Code
|
- name: Checkout Repo Code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
# Install Nix
|
# Enable access to KVM, required to build an image
|
||||||
- name: Install Nix
|
- name: Enable KVM group perms
|
||||||
uses: cachix/install-nix-action@v17
|
run: |
|
||||||
|
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
||||||
# Build the image
|
sudo udevadm control --reload-rules
|
||||||
- name: Build Image
|
sudo udevadm trigger --name-match=kvm
|
||||||
run: nix build .#aws
|
|
||||||
|
|
||||||
# Login to AWS
|
# Login to AWS
|
||||||
- name: AWS Assume Role
|
- name: AWS Assume Role
|
||||||
@ -99,6 +97,28 @@ jobs:
|
|||||||
role-to-assume: ${{ env.AWS_ROLE_ARN }}
|
role-to-assume: ${{ env.AWS_ROLE_ARN }}
|
||||||
aws-region: ${{ env.AWS_REGION }}
|
aws-region: ${{ env.AWS_REGION }}
|
||||||
|
|
||||||
|
# Install Nix
|
||||||
|
- name: Install Nix
|
||||||
|
uses: cachix/install-nix-action@v17
|
||||||
|
with:
|
||||||
|
extra_nix_config: |
|
||||||
|
substituters = s3://insert-cache-bucket https://cache.nixos.org/
|
||||||
|
trusted-public-keys = insert-cache-bucket:M6PsZjHXcLvbQyPUBLICKEYGVoNwI84g1FBQzouRU= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
|
||||||
|
|
||||||
|
# Build the image
|
||||||
|
- name: Build Image
|
||||||
|
run: nix build .#aws
|
||||||
|
|
||||||
|
# Copy the image to S3
|
||||||
|
- name: Upload Image to Cache
|
||||||
|
env:
|
||||||
|
NIX_CACHE_PRIVATE_KEY: ${{ secrets.NIX_CACHE_PRIVATE_KEY }}
|
||||||
|
run: |
|
||||||
|
echo "$NIX_CACHE_PRIVATE_KEY" > cache.key
|
||||||
|
nix store sign --key-file cache.key $(readlink result)
|
||||||
|
nix copy --to s3://t2-aws-nixos-test $(readlink result)
|
||||||
|
rm cache.key
|
||||||
|
|
||||||
# Exports all GitHub Secrets as environment variables prefixed by
|
# Exports all GitHub Secrets as environment variables prefixed by
|
||||||
# "TF_VAR_", which exposes them to Terraform. The name of each GitHub
|
# "TF_VAR_", which exposes them to Terraform. The name of each GitHub
|
||||||
# Secret must match its Terraform variable name exactly.
|
# Secret must match its Terraform variable name exactly.
|
@ -1,44 +1,79 @@
|
|||||||
# The Flame
|
# The Flame
|
||||||
# System configuration for an Oracle free server
|
# System configuration for an Oracle free server
|
||||||
|
|
||||||
|
# See [readme](../README.md) to explain how this file works.
|
||||||
|
|
||||||
# How to install:
|
# How to install:
|
||||||
# https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/
|
# https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/
|
||||||
|
# These days, probably use nixos-anywhere instead.
|
||||||
|
|
||||||
{ inputs, globals, overlays, ... }:
|
{ inputs, globals, overlays, ... }:
|
||||||
|
|
||||||
with inputs;
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
|
||||||
nixpkgs.lib.nixosSystem {
|
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
specialArgs = { };
|
specialArgs = { };
|
||||||
modules = [
|
modules = [
|
||||||
./hardware-configuration.nix
|
globals
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
../../modules/common
|
../../modules/common
|
||||||
../../modules/nixos
|
../../modules/nixos
|
||||||
(removeAttrs globals [ "mail.server" ])
|
|
||||||
wsl.nixosModules.wsl
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
{
|
||||||
server = true;
|
|
||||||
gui.enable = false;
|
|
||||||
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
|
||||||
nixpkgs.overlays = overlays;
|
nixpkgs.overlays = overlays;
|
||||||
wsl.enable = false;
|
|
||||||
caddy.enable = true;
|
|
||||||
|
|
||||||
# FQDNs for various services
|
# Hardware
|
||||||
|
server = true;
|
||||||
networking.hostName = "flame";
|
networking.hostName = "flame";
|
||||||
bookServer = "books.masu.rs";
|
|
||||||
streamServer = "stream.masu.rs";
|
|
||||||
nextcloudServer = "cloud.masu.rs";
|
|
||||||
transmissionServer = "download.masu.rs";
|
|
||||||
metricsServer = "metrics.masu.rs";
|
|
||||||
vaultwardenServer = "vault.masu.rs";
|
|
||||||
giteaServer = "git.masu.rs";
|
|
||||||
|
|
||||||
# Disable passwords, only use SSH key
|
# Not sure what's necessary but too afraid to remove anything
|
||||||
publicKey =
|
imports = [ (inputs.nixpkgs + "/nixos/modules/profiles/qemu-guest.nix") ];
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" ];
|
||||||
|
|
||||||
|
# File systems must be declared in order to boot
|
||||||
|
|
||||||
|
# This is the root filesystem containing NixOS
|
||||||
|
# I forgot to set a clean label for it
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/e1b6bd50-306d-429a-9f45-78f57bc597c3";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
# This is the boot filesystem for systemd-boot
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/D5CA-237A";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Theming
|
||||||
|
|
||||||
|
# Server doesn't require GUI
|
||||||
|
gui.enable = false;
|
||||||
|
|
||||||
|
# Still require colors for programs like Neovim, K9S
|
||||||
|
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
||||||
|
|
||||||
|
# Programs and services
|
||||||
|
atuin.enable = true;
|
||||||
|
cloudflare.enable = true; # Proxy traffic with Cloudflare
|
||||||
|
dotfiles.enable = true; # Clone dotfiles
|
||||||
|
neovim.enable = true;
|
||||||
|
giteaRunner.enable = true;
|
||||||
|
services.caddy.enable = true;
|
||||||
|
services.grafana.enable = true;
|
||||||
|
services.openssh.enable = true;
|
||||||
|
services.victoriametrics.enable = true;
|
||||||
|
services.influxdb2.enable = true;
|
||||||
|
services.gitea.enable = true;
|
||||||
|
services.vaultwarden.enable = true;
|
||||||
|
services.minecraft-server.enable = true; # Setup Minecraft server
|
||||||
|
|
||||||
|
# Allows private remote access over the internet
|
||||||
|
cloudflareTunnel = {
|
||||||
|
enable = true;
|
||||||
|
id = "bd250ee1-ed2e-42d2-b627-039f1eb5a4d2";
|
||||||
|
credentialsFile = ../../private/cloudflared-flame.age;
|
||||||
|
ca =
|
||||||
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK/6oyVqjFGX3Uvrc3VS8J9sphxzAnRzKC85xgkHfYgR3TK6qBGXzHrknEj21xeZrr3G2y1UsGzphWJd9ZfIcdA= open-ssh-ca@cloudflareaccess.org";
|
||||||
|
};
|
||||||
|
|
||||||
# Nextcloud backup config
|
# Nextcloud backup config
|
||||||
backup.s3 = {
|
backup.s3 = {
|
||||||
@ -47,51 +82,38 @@ nixpkgs.lib.nixosSystem {
|
|||||||
accessKeyId = "0026b0e73b2e2c80000000005";
|
accessKeyId = "0026b0e73b2e2c80000000005";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Grant access to Jellyfin directories from Nextcloud
|
# Disable passwords, only use SSH key
|
||||||
users.users.nextcloud.extraGroups = [ "jellyfin" ];
|
publicKey =
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
||||||
|
|
||||||
# Wireguard config for Transmission
|
# # Wireguard config for Transmission
|
||||||
wireguard.enable = true;
|
# wireguard.enable = true;
|
||||||
networking.wireguard.interfaces.wg0 = {
|
# networking.wireguard.interfaces.wg0 = {
|
||||||
|
#
|
||||||
|
# # The local IPs for this machine within the Wireguard network
|
||||||
|
# # Any inbound traffic bound for these IPs should be kept on localhost
|
||||||
|
# ips = [ "10.66.13.200/32" "fc00:bbbb:bbbb:bb01::3:dc7/128" ];
|
||||||
|
#
|
||||||
|
# peers = [{
|
||||||
|
#
|
||||||
|
# # Identity of Wireguard target peer (VPN)
|
||||||
|
# publicKey = "bOOP5lIjqCdDx5t+mP/kEcSbHS4cZqE0rMlBI178lyY=";
|
||||||
|
#
|
||||||
|
# # The public internet address of the target peer
|
||||||
|
# endpoint = "86.106.143.132:51820";
|
||||||
|
#
|
||||||
|
# # Which outgoing IP ranges should be sent through Wireguard
|
||||||
|
# allowedIPs = [ "0.0.0.0/0" "::0/0" ];
|
||||||
|
#
|
||||||
|
# # Send heartbeat signal within the network
|
||||||
|
# persistentKeepalive = 25;
|
||||||
|
#
|
||||||
|
# }];
|
||||||
|
#
|
||||||
|
# };
|
||||||
|
|
||||||
# The local IPs for this machine within the Wireguard network
|
# # VPN port forwarding
|
||||||
# Any inbound traffic bound for these IPs should be kept on localhost
|
# services.transmission.settings.peer-port = 57599;
|
||||||
ips = [ "10.66.13.200/32" "fc00:bbbb:bbbb:bb01::3:dc7/128" ];
|
|
||||||
|
|
||||||
peers = [{
|
|
||||||
|
|
||||||
# Identity of Wireguard target peer (VPN)
|
|
||||||
publicKey = "bOOP5lIjqCdDx5t+mP/kEcSbHS4cZqE0rMlBI178lyY=";
|
|
||||||
|
|
||||||
# The public internet address of the target peer
|
|
||||||
endpoint = "86.106.143.132:51820";
|
|
||||||
|
|
||||||
# Which outgoing IP ranges should be sent through Wireguard
|
|
||||||
allowedIPs = [ "0.0.0.0/0" "::0/0" ];
|
|
||||||
|
|
||||||
# Send heartbeat signal within the network
|
|
||||||
persistentKeepalive = 25;
|
|
||||||
|
|
||||||
}];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
# VPN port forwarding
|
|
||||||
services.transmission.settings.peer-port = 57599;
|
|
||||||
|
|
||||||
# Grant access to Transmission directories from Jellyfin
|
|
||||||
users.users.jellyfin.extraGroups = [ "transmission" ];
|
|
||||||
|
|
||||||
# Proxy traffic with Cloudflare
|
|
||||||
cloudflare.enable = true;
|
|
||||||
|
|
||||||
# Setup Minecraft server
|
|
||||||
gaming.minecraft-server.enable = true;
|
|
||||||
|
|
||||||
# Clone dotfiles
|
|
||||||
dotfiles.enable = true;
|
|
||||||
|
|
||||||
neovim.enable = true;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
# 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.
|
|
||||||
{ lib, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-uuid/e1b6bd50-306d-429a-9f45-78f57bc597c3";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
|
||||||
device = "/dev/disk/by-uuid/D5CA-237A";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
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.eth0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
|
||||||
}
|
|
@ -1,31 +1,30 @@
|
|||||||
# The Hydra
|
# The Hydra
|
||||||
# System configuration for WSL
|
# System configuration for WSL
|
||||||
|
|
||||||
|
# See [readme](../README.md) to explain how this file works.
|
||||||
|
|
||||||
{ inputs, globals, overlays, ... }:
|
{ inputs, globals, overlays, ... }:
|
||||||
|
|
||||||
with inputs;
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
|
||||||
nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { };
|
specialArgs = { };
|
||||||
modules = [
|
modules = [
|
||||||
../../modules/common
|
../../modules/common
|
||||||
../../modules/nixos
|
../../modules/nixos
|
||||||
|
../../modules/wsl
|
||||||
globals
|
globals
|
||||||
wsl.nixosModules.wsl
|
inputs.wsl.nixosModules.wsl
|
||||||
home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
networking.hostName = "hydra";
|
networking.hostName = "hydra";
|
||||||
nixpkgs.overlays = overlays;
|
nixpkgs.overlays = overlays;
|
||||||
# Set registry to flake packages, used for nix X commands
|
|
||||||
nix.registry.nixpkgs.flake = nixpkgs;
|
|
||||||
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
|
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
|
||||||
gui.enable = false;
|
gui.enable = false;
|
||||||
theme = {
|
theme = {
|
||||||
colors = (import ../../colorscheme/gruvbox).dark;
|
colors = (import ../../colorscheme/gruvbox).dark;
|
||||||
dark = true;
|
dark = true;
|
||||||
};
|
};
|
||||||
passwordHash = nixpkgs.lib.fileContents ../../private/password.sha512;
|
passwordHash = inputs.nixpkgs.lib.fileContents ../../misc/password.sha512;
|
||||||
wsl = {
|
wsl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wslConf.automount.root = "/mnt";
|
wslConf.automount.root = "/mnt";
|
||||||
|
@ -3,37 +3,34 @@
|
|||||||
|
|
||||||
{ inputs, globals, overlays, ... }:
|
{ inputs, globals, overlays, ... }:
|
||||||
|
|
||||||
with inputs;
|
inputs.darwin.lib.darwinSystem {
|
||||||
|
system = "aarch64-darwin";
|
||||||
darwin.lib.darwinSystem {
|
|
||||||
system = "x86_64-darwin";
|
|
||||||
specialArgs = { };
|
specialArgs = { };
|
||||||
modules = [
|
modules = [
|
||||||
../../modules/common
|
../../modules/common
|
||||||
../../modules/darwin
|
../../modules/darwin
|
||||||
(globals // {
|
(globals // rec {
|
||||||
user = "Noah.Masur";
|
user = "Noah.Masur";
|
||||||
gitName = "Noah-Masur_1701";
|
gitName = "Noah-Masur_1701";
|
||||||
gitEmail = "Noah.Masur@take2games.com";
|
gitEmail = "${user}@take2games.com";
|
||||||
})
|
})
|
||||||
home-manager.darwinModules.home-manager
|
inputs.home-manager.darwinModules.home-manager
|
||||||
{
|
{
|
||||||
networking.hostName = "noah-masur-mac";
|
nixpkgs.overlays = [ inputs.firefox-darwin.overlay ] ++ overlays;
|
||||||
|
networking.hostName = "lookingglass";
|
||||||
identityFile = "/Users/Noah.Masur/.ssh/id_ed25519";
|
identityFile = "/Users/Noah.Masur/.ssh/id_ed25519";
|
||||||
gui.enable = true;
|
gui.enable = true;
|
||||||
theme = {
|
theme = {
|
||||||
colors = (import ../../colorscheme/gruvbox).dark;
|
colors = (import ../../colorscheme/gruvbox-dark).dark;
|
||||||
dark = true;
|
dark = true;
|
||||||
};
|
};
|
||||||
mail.user = globals.user;
|
mail.user = globals.user;
|
||||||
nixpkgs.overlays = [ firefox-darwin.overlay ] ++ overlays;
|
atuin.enable = true;
|
||||||
# Set registry to flake packages, used for nix X commands
|
|
||||||
nix.registry.nixpkgs.flake = nixpkgs;
|
|
||||||
charm.enable = true;
|
charm.enable = true;
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
mail.enable = true;
|
mail.enable = true;
|
||||||
mail.aerc.enable = true;
|
mail.aerc.enable = true;
|
||||||
mail.himalaya.enable = true;
|
mail.himalaya.enable = false;
|
||||||
kitty.enable = true;
|
kitty.enable = true;
|
||||||
discord.enable = true;
|
discord.enable = true;
|
||||||
firefox.enable = true;
|
firefox.enable = true;
|
||||||
@ -41,9 +38,12 @@ darwin.lib.darwinSystem {
|
|||||||
nixlang.enable = true;
|
nixlang.enable = true;
|
||||||
terraform.enable = true;
|
terraform.enable = true;
|
||||||
python.enable = true;
|
python.enable = true;
|
||||||
|
rust.enable = true;
|
||||||
lua.enable = true;
|
lua.enable = true;
|
||||||
|
obsidian.enable = true;
|
||||||
kubernetes.enable = true;
|
kubernetes.enable = true;
|
||||||
_1password.enable = true;
|
_1password.enable = true;
|
||||||
|
slack.enable = true;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,7 @@
|
|||||||
|
|
||||||
{ inputs, system, overlays, ... }:
|
{ inputs, system, overlays, ... }:
|
||||||
|
|
||||||
with inputs;
|
inputs.nixos-generators.nixosGenerate {
|
||||||
|
|
||||||
nixos-generators.nixosGenerate {
|
|
||||||
inherit system;
|
inherit system;
|
||||||
format = "install-iso";
|
format = "install-iso";
|
||||||
modules = [{
|
modules = [{
|
||||||
@ -34,9 +32,7 @@ nixos-generators.nixosGenerate {
|
|||||||
curl
|
curl
|
||||||
(import ../../modules/common/neovim/package {
|
(import ../../modules/common/neovim/package {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
# colors = import ../../colorscheme/gruvbox.dark.neovimConfig {
|
colors = (import ../../colorscheme/gruvbox).dark;
|
||||||
# inherit pkgs;
|
|
||||||
# };
|
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
nix.extraOptions = ''
|
nix.extraOptions = ''
|
@ -1,55 +1,109 @@
|
|||||||
# The Swan
|
# The Swan
|
||||||
# System configuration for my home NAS server
|
# System configuration for my home NAS server
|
||||||
|
|
||||||
|
# See [readme](../README.md) to explain how this file works.
|
||||||
|
|
||||||
{ inputs, globals, overlays, ... }:
|
{ inputs, globals, overlays, ... }:
|
||||||
|
|
||||||
with inputs;
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
|
||||||
nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { };
|
specialArgs = { };
|
||||||
modules = [
|
modules = [
|
||||||
./hardware-configuration.nix
|
globals
|
||||||
./disks.nix
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
inputs.disko.nixosModules.disko
|
||||||
../../modules/common
|
../../modules/common
|
||||||
../../modules/nixos
|
../../modules/nixos
|
||||||
(removeAttrs globals [ "mail.server" ])
|
|
||||||
wsl.nixosModules.wsl
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
disko.nixosModules.disko
|
|
||||||
{
|
{
|
||||||
server = true;
|
nixpkgs.overlays = overlays;
|
||||||
zfs.enable = true;
|
|
||||||
|
|
||||||
# head -c 8 /etc/machine-id
|
# Hardware
|
||||||
|
server = true;
|
||||||
|
physical = true;
|
||||||
|
networking.hostName = "swan";
|
||||||
|
|
||||||
|
# Not sure what's necessary but too afraid to remove anything
|
||||||
|
boot.initrd.availableKernelModules =
|
||||||
|
[ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
||||||
|
|
||||||
|
# Required for transcoding
|
||||||
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
|
boot.kernelParams = [
|
||||||
|
"radeon.si_support=0"
|
||||||
|
"amdgpu.si_support=1"
|
||||||
|
"radeon.cik_support=0"
|
||||||
|
"amdgpu.cik_support=1"
|
||||||
|
"amdgpu.dc=1"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Required binary blobs to boot on this machine
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
|
# Prioritize efficiency over performance
|
||||||
|
powerManagement.cpuFreqGovernor = "powersave";
|
||||||
|
|
||||||
|
# Allow firmware updates
|
||||||
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
|
|
||||||
|
# ZFS
|
||||||
|
zfs.enable = true;
|
||||||
|
# Generated with: head -c 8 /etc/machine-id
|
||||||
networking.hostId = "600279f4"; # Random ID required for ZFS
|
networking.hostId = "600279f4"; # Random ID required for ZFS
|
||||||
|
|
||||||
gui.enable = false;
|
# Sets root ext4 filesystem instead of declaring it manually
|
||||||
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
disko = {
|
||||||
nixpkgs.overlays = overlays;
|
enableConfig = true;
|
||||||
wsl.enable = false;
|
devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; });
|
||||||
caddy.enable = true;
|
};
|
||||||
|
|
||||||
networking.hostName = "swan";
|
# Automatically load the ZFS pool on boot
|
||||||
|
boot.zfs.extraPools = [ "tank" ];
|
||||||
|
|
||||||
|
# Theming
|
||||||
|
|
||||||
|
# Server doesn't require GUI
|
||||||
|
gui.enable = false;
|
||||||
|
|
||||||
|
# Still require colors for programs like Neovim, K9S
|
||||||
|
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
||||||
|
|
||||||
|
# Programs and services
|
||||||
|
atuin.enable = true;
|
||||||
|
neovim.enable = true;
|
||||||
|
cloudflare.enable = true;
|
||||||
|
dotfiles.enable = true;
|
||||||
|
arrs.enable = true;
|
||||||
|
services.bind.enable = true;
|
||||||
|
services.caddy.enable = true;
|
||||||
|
services.jellyfin.enable = true;
|
||||||
|
services.nextcloud.enable = true;
|
||||||
|
services.calibre-web.enable = true;
|
||||||
|
services.openssh.enable = true;
|
||||||
|
services.prometheus.enable = false;
|
||||||
|
services.vmagent.enable = true;
|
||||||
|
services.samba.enable = true;
|
||||||
|
services.paperless.enable = true;
|
||||||
|
services.postgresql.enable = true;
|
||||||
|
|
||||||
|
# Allows private remote access over the internet
|
||||||
|
cloudflareTunnel = {
|
||||||
|
enable = true;
|
||||||
|
id = "646754ac-2149-4a58-b51a-e1d0a1f3ade2";
|
||||||
|
credentialsFile = ../../private/cloudflared-swan.age;
|
||||||
|
ca =
|
||||||
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCHF/UMtJqPFrf6f6GRY0ZFnkCW7b6sYgUTjTtNfRj1RdmNic1NoJZql7y6BrqQinZvy7nsr1UFDNWoHn6ah3tg= open-ssh-ca@cloudflareaccess.org";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Send regular backups and litestream for DBs to an S3-like bucket
|
||||||
|
backup.s3 = {
|
||||||
|
endpoint = "s3.us-west-002.backblazeb2.com";
|
||||||
|
bucket = "noahmasur-backup";
|
||||||
|
accessKeyId = "0026b0e73b2e2c80000000005";
|
||||||
|
};
|
||||||
|
|
||||||
# Disable passwords, only use SSH key
|
# Disable passwords, only use SSH key
|
||||||
publicKey =
|
publicKey =
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
||||||
|
|
||||||
# Clone dotfiles
|
|
||||||
dotfiles.enable = true;
|
|
||||||
|
|
||||||
neovim.enable = true;
|
|
||||||
|
|
||||||
# boot.zfs.enabled = true;
|
|
||||||
# boot.kernelPackages =
|
|
||||||
# config.boot.zfs.package.latestCompatibleLinuxPackages;
|
|
||||||
# boot.zfs.extraPools = [ "mypool" ];
|
|
||||||
# services.zfs.autoScrub.enable = true;
|
|
||||||
# services.zfs.autoScrub.interval = "daily";
|
|
||||||
|
|
||||||
# services.nfs.server.enable = true;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -1,172 +0,0 @@
|
|||||||
{ ... }: {
|
|
||||||
disko.enableConfig = false;
|
|
||||||
disko.devices = {
|
|
||||||
disk = {
|
|
||||||
boot = {
|
|
||||||
type = "disk";
|
|
||||||
device = "/dev/nvme0n1";
|
|
||||||
content = {
|
|
||||||
type = "table";
|
|
||||||
format = "gpt";
|
|
||||||
partitions = [
|
|
||||||
{
|
|
||||||
type = "partition";
|
|
||||||
name = "ESP";
|
|
||||||
start = "0";
|
|
||||||
end = "512MiB";
|
|
||||||
fs-type = "fat32";
|
|
||||||
bootable = true;
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "vfat";
|
|
||||||
mountpoint = "/boot";
|
|
||||||
extraArgs = [ "-n boot" ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
type = "partition";
|
|
||||||
name = "root";
|
|
||||||
start = "512MiB";
|
|
||||||
end = "100%";
|
|
||||||
part-type = "primary";
|
|
||||||
bootable = true;
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "ext4";
|
|
||||||
mountpoint = "/";
|
|
||||||
extraArgs = [ "-L nixos" ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
sda = {
|
|
||||||
type = "disk";
|
|
||||||
device = "/dev/sda";
|
|
||||||
content = {
|
|
||||||
type = "table";
|
|
||||||
format = "gpt";
|
|
||||||
partitions = [{
|
|
||||||
type = "partition";
|
|
||||||
name = "zfs";
|
|
||||||
start = "128MiB";
|
|
||||||
end = "100%";
|
|
||||||
content = {
|
|
||||||
type = "zfs";
|
|
||||||
pool = "tank";
|
|
||||||
};
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
sdb = {
|
|
||||||
type = "disk";
|
|
||||||
device = "/dev/sdb";
|
|
||||||
content = {
|
|
||||||
type = "table";
|
|
||||||
format = "gpt";
|
|
||||||
partitions = [{
|
|
||||||
type = "partition";
|
|
||||||
name = "zfs";
|
|
||||||
start = "128MiB";
|
|
||||||
end = "100%";
|
|
||||||
content = {
|
|
||||||
type = "zfs";
|
|
||||||
pool = "tank";
|
|
||||||
};
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
sdc = {
|
|
||||||
type = "disk";
|
|
||||||
device = "/dev/sdc";
|
|
||||||
content = {
|
|
||||||
type = "table";
|
|
||||||
format = "gpt";
|
|
||||||
partitions = [{
|
|
||||||
type = "partition";
|
|
||||||
name = "zfs";
|
|
||||||
start = "128MiB";
|
|
||||||
end = "100%";
|
|
||||||
content = {
|
|
||||||
type = "zfs";
|
|
||||||
pool = "tank";
|
|
||||||
};
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
zpool = {
|
|
||||||
tank = {
|
|
||||||
type = "zpool";
|
|
||||||
mode = "raidz1";
|
|
||||||
rootFsOptions = {
|
|
||||||
compression = "on"; # lz4 by default
|
|
||||||
"com.sun:auto-snapshot" = "false";
|
|
||||||
ashift = "12";
|
|
||||||
};
|
|
||||||
# mountpoint = "/";
|
|
||||||
|
|
||||||
datasets = {
|
|
||||||
media = {
|
|
||||||
zfs_type = "filesystem";
|
|
||||||
mountpoint = "/media";
|
|
||||||
options."com.sun:auto-snapshot" = "false";
|
|
||||||
};
|
|
||||||
# "media/movies" = {
|
|
||||||
# zfs_type = "filesystem";
|
|
||||||
# mountpoint = "/media/movies";
|
|
||||||
# options.recordsize = "1M";
|
|
||||||
# };
|
|
||||||
# "media/tv" = {
|
|
||||||
# zfs_type = "filesystem";
|
|
||||||
# mountpoint = "/media/tv";
|
|
||||||
# options.recordsize = "1M";
|
|
||||||
# };
|
|
||||||
# "media/books" = {
|
|
||||||
# zfs_type = "filesystem";
|
|
||||||
# mountpoint = "/media/books";
|
|
||||||
# };
|
|
||||||
# archive = {
|
|
||||||
# zfs_type = "filesystem";
|
|
||||||
# mountpoint = "/archive";
|
|
||||||
# options.compression = "zstd";
|
|
||||||
# options."com.sun:auto-snapshot" = "true";
|
|
||||||
# };
|
|
||||||
# zfs_unmounted_fs = {
|
|
||||||
# zfs_type = "filesystem";
|
|
||||||
# options.mountpoint = "none";
|
|
||||||
# };
|
|
||||||
# zfs_legacy_fs = {
|
|
||||||
# zfs_type = "filesystem";
|
|
||||||
# options.mountpoint = "legacy";
|
|
||||||
# mountpoint = "/zfs_legacy_fs";
|
|
||||||
# };
|
|
||||||
# zfs_testvolume = {
|
|
||||||
# zfs_type = "volume";
|
|
||||||
# size = "10M";
|
|
||||||
# content = {
|
|
||||||
# type = "filesystem";
|
|
||||||
# format = "ext4";
|
|
||||||
# mountpoint = "/ext4onzfs";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# encrypted = {
|
|
||||||
# zfs_type = "filesystem";
|
|
||||||
# size = "20M";
|
|
||||||
# options = {
|
|
||||||
# mountpoint = "none";
|
|
||||||
# encryption = "aes-256-gcm";
|
|
||||||
# keyformat = "passphrase";
|
|
||||||
# keylocation = "file:///tmp/secret.key";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# "encrypted/test" = {
|
|
||||||
# zfs_type = "filesystem";
|
|
||||||
# size = "2M";
|
|
||||||
# mountpoint = "/zfs_crypted";
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,39 +0,0 @@
|
|||||||
# 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" "usb_storage" "sd_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-label/nixos";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
|
||||||
device = "/dev/disk/by-label/boot";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
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.enp0s31f6.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
|
||||||
hardware.cpu.intel.updateMicrocode =
|
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
@ -1,41 +1,95 @@
|
|||||||
# The Tempest
|
# The Tempest
|
||||||
# System configuration for my desktop
|
# System configuration for my desktop
|
||||||
|
|
||||||
|
# See [readme](../README.md) to explain how this file works.
|
||||||
|
|
||||||
{ inputs, globals, overlays, ... }:
|
{ inputs, globals, overlays, ... }:
|
||||||
|
|
||||||
with inputs;
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
|
||||||
nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { };
|
|
||||||
modules = [
|
modules = [
|
||||||
./hardware-configuration.nix
|
globals
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
../../modules/common
|
../../modules/common
|
||||||
../../modules/nixos
|
../../modules/nixos
|
||||||
globals
|
|
||||||
wsl.nixosModules.wsl
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
{
|
||||||
|
nixpkgs.overlays = overlays;
|
||||||
|
|
||||||
|
# Hardware
|
||||||
physical = true;
|
physical = true;
|
||||||
networking.hostName = "tempest";
|
networking.hostName = "tempest";
|
||||||
nixpkgs.overlays = [ nur.overlay ] ++ overlays;
|
|
||||||
# Set registry to flake packages, used for nix X commands
|
# Not sure what's necessary but too afraid to remove anything
|
||||||
nix.registry.nixpkgs.flake = nixpkgs;
|
boot.initrd.availableKernelModules =
|
||||||
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
|
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||||
|
|
||||||
|
# Graphics and VMs
|
||||||
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||||
|
|
||||||
|
# Required binary blobs to boot on this machine
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
|
# Prioritize performance over efficiency
|
||||||
|
powerManagement.cpuFreqGovernor = "performance";
|
||||||
|
|
||||||
|
# Allow firmware updates
|
||||||
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
|
|
||||||
|
# Helps reduce GPU fan noise under idle loads
|
||||||
|
hardware.fancontrol.enable = true;
|
||||||
|
hardware.fancontrol.config = ''
|
||||||
|
# Configuration file generated by pwmconfig, changes will be lost
|
||||||
|
INTERVAL=10
|
||||||
|
DEVPATH=hwmon0=devices/pci0000:00/0000:00:03.1/0000:06:00.0/0000:07:00.0/0000:08:00.0
|
||||||
|
DEVNAME=hwmon0=amdgpu
|
||||||
|
FCTEMPS=hwmon0/pwm1=hwmon0/temp1_input
|
||||||
|
FCFANS= hwmon0/pwm1=hwmon0/fan1_input
|
||||||
|
MINTEMP=hwmon0/pwm1=50
|
||||||
|
MAXTEMP=hwmon0/pwm1=70
|
||||||
|
MINSTART=hwmon0/pwm1=100
|
||||||
|
MINSTOP=hwmon0/pwm1=10
|
||||||
|
MINPWM=hwmon0/pwm1=10
|
||||||
|
MAXPWM=hwmon0/pwm1=240
|
||||||
|
'';
|
||||||
|
|
||||||
|
# File systems must be declared in order to boot
|
||||||
|
|
||||||
|
# This is the root filesystem containing NixOS
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-label/nixos";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
# This is the boot filesystem for Grub
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-label/boot";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Secrets must be prepared ahead before deploying
|
||||||
|
passwordHash = inputs.nixpkgs.lib.fileContents ../../misc/password.sha512;
|
||||||
|
|
||||||
|
# Theming
|
||||||
|
|
||||||
|
# Turn on all features related to desktop and graphical applications
|
||||||
gui.enable = true;
|
gui.enable = true;
|
||||||
|
|
||||||
|
# Set the system-wide theme, also used for non-graphical programs
|
||||||
theme = {
|
theme = {
|
||||||
colors = (import ../../colorscheme/gruvbox).dark;
|
colors = (import ../../colorscheme/gruvbox-dark).dark;
|
||||||
dark = true;
|
dark = true;
|
||||||
};
|
};
|
||||||
wallpaper = "${wallpapers}/gruvbox/road.jpg";
|
wallpaper = "${inputs.wallpapers}/gruvbox/road.jpg";
|
||||||
gtk.theme.name = nixpkgs.lib.mkDefault "Adwaita-dark";
|
gtk.theme.name = inputs.nixpkgs.lib.mkDefault "Adwaita-dark";
|
||||||
passwordHash = nixpkgs.lib.fileContents ../../private/password.sha512;
|
|
||||||
wsl.enable = false;
|
|
||||||
publicKey = null;
|
|
||||||
|
|
||||||
|
# Programs and services
|
||||||
|
atuin.enable = true;
|
||||||
charm.enable = true;
|
charm.enable = true;
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
media.enable = true;
|
media.enable = true;
|
||||||
|
dotfiles.enable = true;
|
||||||
firefox.enable = true;
|
firefox.enable = true;
|
||||||
kitty.enable = true;
|
kitty.enable = true;
|
||||||
_1password.enable = true;
|
_1password.enable = true;
|
||||||
@ -46,17 +100,36 @@ nixpkgs.lib.nixosSystem {
|
|||||||
mail.aerc.enable = true;
|
mail.aerc.enable = true;
|
||||||
mail.himalaya.enable = true;
|
mail.himalaya.enable = true;
|
||||||
keybase.enable = true;
|
keybase.enable = true;
|
||||||
# mullvad.enable = true;
|
mullvad.enable = false;
|
||||||
nixlang.enable = true;
|
nixlang.enable = true;
|
||||||
dotfiles.enable = true;
|
rust.enable = true;
|
||||||
|
yt-dlp.enable = true;
|
||||||
gaming = {
|
gaming = {
|
||||||
|
dwarf-fortress.enable = true;
|
||||||
enable = true;
|
enable = true;
|
||||||
steam.enable = true;
|
steam.enable = true;
|
||||||
legendary.enable = true;
|
legendary.enable = true;
|
||||||
lutris.enable = true;
|
lutris.enable = true;
|
||||||
leagueoflegends.enable = true;
|
leagueoflegends.enable = true;
|
||||||
|
ryujinx.enable = true;
|
||||||
};
|
};
|
||||||
|
services.vmagent.enable = true; # Enables Prometheus metrics
|
||||||
|
services.openssh.enable =
|
||||||
|
true; # Required for Cloudflare tunnel and identity file
|
||||||
|
|
||||||
|
# Allows private remote access over the internet
|
||||||
|
cloudflareTunnel = {
|
||||||
|
enable = true;
|
||||||
|
id = "ac133a82-31fb-480c-942a-cdbcd4c58173";
|
||||||
|
credentialsFile = ../../private/cloudflared-tempest.age;
|
||||||
|
ca =
|
||||||
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPY6C0HmdFCaxYtJxFr3qV4/1X4Q8KrYQ1hlme3u1hJXK+xW+lc9Y9glWHrhiTKilB7carYTB80US0O47gI5yU4= open-ssh-ca@cloudflareaccess.org";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Allows requests to force machine to wake up
|
||||||
|
# This network interface might change, needs to be set specifically for each machine.
|
||||||
|
# Or set usePredictableInterfaceNames = false
|
||||||
|
networking.interfaces.enp5s0.wakeOnLan.enable = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
# 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, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
|
||||||
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-label/nixos";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
|
||||||
device = "/dev/disk/by-label/boot";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
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.enp5s0.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
|
||||||
hardware.cpu.amd.updateMicrocode =
|
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
21
misc/README.md
Normal file
21
misc/README.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Miscellaneous
|
||||||
|
|
||||||
|
These files contain important data sourced by the configuration, or simply
|
||||||
|
information to store for safekeeping later.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Creating hashed password for [password.sha512](./password.sha512):
|
||||||
|
|
||||||
|
```
|
||||||
|
mkpasswd -m sha-512
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Getting key for [public-keys](./public-keys):
|
||||||
|
|
||||||
|
```
|
||||||
|
ssh-keyscan -t ed25519 <hostname>
|
||||||
|
```
|
||||||
|
|
23
misc/libratbag-profile
Normal file
23
misc/libratbag-profile
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
Profile 1: (active)
|
||||||
|
Name: n/a
|
||||||
|
Report Rate: 1000Hz
|
||||||
|
Resolutions:
|
||||||
|
0: 400dpi (active) (default)
|
||||||
|
1: 800dpi
|
||||||
|
2: 1600dpi
|
||||||
|
3: 2400dpi
|
||||||
|
4: 0dpi
|
||||||
|
Button: 0 is mapped to 'button 1'
|
||||||
|
Button: 1 is mapped to 'button 2'
|
||||||
|
Button: 2 is mapped to 'button 3'
|
||||||
|
Button: 3 is mapped to 'button 4'
|
||||||
|
Button: 4 is mapped to 'button 5'
|
||||||
|
Button: 5 is mapped to macro '↕F11'
|
||||||
|
Button: 6 is mapped to macro '↕VOLUMEDOWN'
|
||||||
|
Button: 7 is mapped to macro '↕VOLUMEUP'
|
||||||
|
Button: 8 is mapped to 'unknown'
|
||||||
|
Button: 9 is mapped to 'wheel-right'
|
||||||
|
Button: 10 is mapped to 'wheel-left'
|
||||||
|
LED: 0, depth: monochrome, mode: on, color: 000000
|
||||||
|
LED: 1, depth: monochrome, mode: on, color: 000000
|
||||||
|
LED: 2, depth: monochrome, mode: on, color: 000000
|
6
misc/public-keys
Normal file
6
misc/public-keys
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Scan hosts: ssh-keyscan -t ed25519 <hostnames>
|
||||||
|
|
||||||
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s personal
|
||||||
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHVknmPi7sG6ES0G0jcsvebzKGWWaMfJTYgvOue6EULI flame
|
||||||
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ9mwXlZnIALt9SnH3FOZvdgHLM5ZqwYUERXBbM7Rwh6 swan
|
||||||
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3yHivgEXr2ecwe58h9bkhwTYivf3GwL8xenQKMeiUb tempest
|
9
modules/README.md
Normal file
9
modules/README.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Modules
|
||||||
|
|
||||||
|
| Module | Purpose |
|
||||||
|
| --- | --- |
|
||||||
|
| [common](./common/default.nix) | User programs and OS-agnostic configuration |
|
||||||
|
| [darwin](./darwin/default.nix) | macOS-specific configuration |
|
||||||
|
| [nixos](./nixos/default.nix) | NixOS-specific configuration |
|
||||||
|
| [wsl](./wsl/default.nix) | WSL-specific configuration |
|
||||||
|
|
@ -9,12 +9,22 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf
|
config = lib.mkIf (config.gui.enable && config._1password.enable) {
|
||||||
(config.gui.enable && config._1password.enable && pkgs.stdenv.isLinux) {
|
unfreePackages = [ "1password" "_1password-gui" "1password-cli" ];
|
||||||
unfreePackages = [ "1password" "_1password-gui" ];
|
home-manager.users.${config.user} = {
|
||||||
home-manager.users.${config.user} = {
|
home.packages = with pkgs; [ _1password-gui _1password ];
|
||||||
home.packages = with pkgs; [ _1password-gui ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# https://1password.community/discussion/135462/firefox-extension-does-not-connect-to-linux-app
|
||||||
|
# On Mac, does not apply: https://1password.community/discussion/142794/app-and-browser-integration
|
||||||
|
# However, the button doesn't work either:
|
||||||
|
# https://1password.community/discussion/140735/extending-support-for-trusted-web-browsers
|
||||||
|
environment.etc."1password/custom_allowed_browsers".text = ''
|
||||||
|
${
|
||||||
|
config.home-manager.users.${config.user}.programs.firefox.package
|
||||||
|
}/Applications/Firefox.app/Contents/MacOS/firefox
|
||||||
|
firefox
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
./media.nix
|
./media.nix
|
||||||
./obsidian.nix
|
./obsidian.nix
|
||||||
./qbittorrent.nix
|
./qbittorrent.nix
|
||||||
./nautilus.nix
|
./slack.nix
|
||||||
|
./yt-dlp.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
config = lib.mkIf (config.gui.enable && config.discord.enable) {
|
config = lib.mkIf (config.gui.enable && config.discord.enable) {
|
||||||
unfreePackages = [ "discord" ];
|
unfreePackages = [ "discord" ];
|
||||||
|
environment.systemPackages = [ pkgs.discord ];
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
home.packages = with pkgs; [ discord ];
|
|
||||||
xdg.configFile."discord/settings.json".text = ''
|
xdg.configFile."discord/settings.json".text = ''
|
||||||
{
|
{
|
||||||
"BACKGROUND_COLOR": "#202225",
|
"BACKGROUND_COLOR": "#202225",
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
unfreePackages = [
|
unfreePackages = [
|
||||||
(lib.mkIf config._1password.enable "onepassword-password-manager")
|
(lib.mkIf config._1password.enable "onepassword-password-manager")
|
||||||
"okta-browser-plugin"
|
"okta-browser-plugin"
|
||||||
|
"wappalyzer"
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
@ -28,22 +29,23 @@
|
|||||||
id = 0;
|
id = 0;
|
||||||
name = "default";
|
name = "default";
|
||||||
isDefault = true;
|
isDefault = true;
|
||||||
|
# https://nur.nix-community.org/repos/rycee/
|
||||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||||
ublock-origin
|
|
||||||
vimium
|
|
||||||
multi-account-containers
|
|
||||||
facebook-container
|
|
||||||
temporary-containers
|
|
||||||
(lib.mkIf config._1password.enable onepassword-password-manager)
|
(lib.mkIf config._1password.enable onepassword-password-manager)
|
||||||
|
pkgs.bypass-paywalls-clean
|
||||||
|
darkreader
|
||||||
|
don-t-fuck-with-paste
|
||||||
|
facebook-container
|
||||||
|
markdownload
|
||||||
|
multi-account-containers
|
||||||
okta-browser-plugin
|
okta-browser-plugin
|
||||||
sponsorblock
|
|
||||||
reddit-enhancement-suite
|
reddit-enhancement-suite
|
||||||
return-youtube-dislikes
|
return-youtube-dislikes
|
||||||
markdownload
|
|
||||||
darkreader
|
|
||||||
snowflake
|
snowflake
|
||||||
don-t-fuck-with-paste
|
sponsorblock
|
||||||
i-dont-care-about-cookies
|
ublock-origin
|
||||||
|
ublacklist
|
||||||
|
vimium
|
||||||
wappalyzer
|
wappalyzer
|
||||||
];
|
];
|
||||||
settings = {
|
settings = {
|
||||||
@ -71,6 +73,12 @@
|
|||||||
"layout.css.color-mix.enabled" = true;
|
"layout.css.color-mix.enabled" = true;
|
||||||
"ui.systemUsesDarkTheme" =
|
"ui.systemUsesDarkTheme" =
|
||||||
if config.theme.dark == true then 1 else 0;
|
if config.theme.dark == true then 1 else 0;
|
||||||
|
"media.ffmpeg.vaapi.enabled" =
|
||||||
|
true; # Enable hardware video acceleration
|
||||||
|
"cookiebanners.ui.desktop.enabled" = true; # Reject cookie popups
|
||||||
|
"devtools.command-button-screenshot.enabled" =
|
||||||
|
true; # Scrolling screenshot of entire page
|
||||||
|
"svg.context-properties.content.enabled" = true; # Sidebery styling
|
||||||
};
|
};
|
||||||
userChrome = ''
|
userChrome = ''
|
||||||
:root {
|
:root {
|
||||||
@ -111,7 +119,7 @@
|
|||||||
background-color: ${config.theme.colors.base00};
|
background-color: ${config.theme.colors.base00};
|
||||||
color: ${config.theme.colors.base06} !important;
|
color: ${config.theme.colors.base06} !important;
|
||||||
}
|
}
|
||||||
.tab-content[selected=true] {
|
.tab-content[selected] {
|
||||||
border-bottom: 2px solid color-mix(in srgb, var(--identity-tab-color) 25%, transparent);
|
border-bottom: 2px solid color-mix(in srgb, var(--identity-tab-color) 25%, transparent);
|
||||||
background-color: ${config.theme.colors.base01} !important;
|
background-color: ${config.theme.colors.base01} !important;
|
||||||
color: ${config.theme.colors.base07} !important;
|
color: ${config.theme.colors.base07} !important;
|
||||||
@ -157,6 +165,24 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xsession.windowManager.i3.config.keybindings =
|
||||||
|
lib.mkIf pkgs.stdenv.isLinux {
|
||||||
|
"${
|
||||||
|
config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier
|
||||||
|
}+Shift+b" = "exec ${
|
||||||
|
# Don't name the script `firefox` or it will affect grep
|
||||||
|
builtins.toString (pkgs.writeShellScript "focus-ff.sh" ''
|
||||||
|
count=$(ps aux | grep -c firefox)
|
||||||
|
if [ "$count" -eq 1 ]; then
|
||||||
|
i3-msg "exec --no-startup-id firefox"
|
||||||
|
sleep 0.5
|
||||||
|
fi
|
||||||
|
i3-msg "[class=firefox] focus"
|
||||||
|
'')
|
||||||
|
}";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -10,20 +10,55 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf (config.gui.enable && config.kitty.enable) {
|
config = lib.mkIf (config.gui.enable && config.kitty.enable) {
|
||||||
|
|
||||||
|
# Set the Rofi-Systemd terminal for viewing logs
|
||||||
|
# Using optionalAttrs because only available in NixOS
|
||||||
|
environment = { } // lib.attrsets.optionalAttrs
|
||||||
|
(builtins.hasAttr "sessionVariables" config.environment) {
|
||||||
|
sessionVariables.ROFI_SYSTEMD_TERM = "${pkgs.kitty}/bin/kitty";
|
||||||
|
};
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
# xsession.windowManager.i3.config.terminal = "kitty";
|
|
||||||
# programs.rofi.terminal = "${pkgs.kitty}/bin/kitty";
|
# Set the i3 terminal
|
||||||
|
xsession.windowManager.i3.config.terminal =
|
||||||
|
lib.mkIf pkgs.stdenv.isLinux "kitty";
|
||||||
|
|
||||||
|
# Set the Rofi terminal for running programs
|
||||||
|
programs.rofi.terminal =
|
||||||
|
lib.mkIf pkgs.stdenv.isLinux "${pkgs.kitty}/bin/kitty";
|
||||||
|
|
||||||
|
# Display images in the terminal
|
||||||
|
programs.fish.shellAliases = {
|
||||||
|
icat = "kitty +kitten icat";
|
||||||
|
ssh = "kitty +kitten ssh";
|
||||||
|
};
|
||||||
|
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
environment = { };
|
environment = { };
|
||||||
extraConfig = "";
|
extraConfig = "";
|
||||||
font.size = 14;
|
font.size = 14;
|
||||||
keybindings = {
|
keybindings = {
|
||||||
|
# Use shift+enter to complete text suggestions in fish
|
||||||
"shift+enter" = "send_text all \\x1F";
|
"shift+enter" = "send_text all \\x1F";
|
||||||
|
|
||||||
|
# Easy fullscreen toggle (for macOS)
|
||||||
"super+f" = "toggle_fullscreen";
|
"super+f" = "toggle_fullscreen";
|
||||||
|
|
||||||
|
# Kitty scrollback nvim
|
||||||
|
"kitty_mod+h" = "kitty_scrollback_nvim";
|
||||||
|
"kitty_mod+g" =
|
||||||
|
"kitty_scrollback_nvim --config ksb_builtin_last_cmd_output";
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
|
|
||||||
|
# Required for kitty-scrollback.nvim
|
||||||
|
allow_remote_control = "socket-only";
|
||||||
|
listen_on = "unix:/tmp/kitty";
|
||||||
|
action_alias =
|
||||||
|
"kitty_scrollback_nvim kitten ${pkgs.kitty-scrollback-nvim}/python/kitty_scrollback_nvim.py";
|
||||||
|
|
||||||
# Colors (adapted from: https://github.com/kdrag0n/base16-kitty/blob/master/templates/default-256.mustache)
|
# Colors (adapted from: https://github.com/kdrag0n/base16-kitty/blob/master/templates/default-256.mustache)
|
||||||
background = config.theme.colors.base00;
|
background = config.theme.colors.base00;
|
||||||
foreground = config.theme.colors.base05;
|
foreground = config.theme.colors.base05;
|
||||||
@ -70,8 +105,6 @@
|
|||||||
# Scrollback
|
# Scrollback
|
||||||
scrolling_lines = 10000;
|
scrolling_lines = 10000;
|
||||||
scrollback_pager_history_size = 10; # MB
|
scrollback_pager_history_size = 10; # MB
|
||||||
scrollback_pager = ''
|
|
||||||
${pkgs.neovim}/bin/nvim -c 'setlocal nonumber nolist showtabline=0 foldcolumn=0|Man!' -c "autocmd VimEnter * normal G" -'';
|
|
||||||
|
|
||||||
# Window
|
# Window
|
||||||
window_padding_width = 6;
|
window_padding_width = 6;
|
||||||
@ -79,7 +112,7 @@
|
|||||||
tab_bar_edge = "top";
|
tab_bar_edge = "top";
|
||||||
tab_bar_style = "slant";
|
tab_bar_style = "slant";
|
||||||
|
|
||||||
# Audio
|
# Disable audio
|
||||||
enable_audio_bell = false;
|
enable_audio_bell = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -12,16 +12,47 @@
|
|||||||
config = lib.mkIf (config.gui.enable && config.media.enable) {
|
config = lib.mkIf (config.gui.enable && config.media.enable) {
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
mpv # Video viewer
|
nsxiv # Image viewer
|
||||||
sxiv # Image viewer
|
|
||||||
mupdf # PDF viewer
|
mupdf # PDF viewer
|
||||||
zathura # PDF viewer
|
zathura # PDF viewer
|
||||||
];
|
];
|
||||||
|
|
||||||
# Set default for opening PDFs
|
# Video player
|
||||||
xdg.mimeApps.defaultApplications."application/pdf" =
|
programs.mpv = {
|
||||||
[ "zathura.desktop" ];
|
enable = true;
|
||||||
xdg.mimeApps.defaultApplications."image/*" = [ "sxiv.desktop" ];
|
bindings = { };
|
||||||
|
config = {
|
||||||
|
image-display-duration = 2; # For cycling through images
|
||||||
|
hwdec = "auto-safe"; # Attempt to use GPU decoding for video
|
||||||
|
};
|
||||||
|
scripts = [
|
||||||
|
|
||||||
|
# Automatically load playlist entries before and after current file
|
||||||
|
pkgs.mpvScripts.autoload
|
||||||
|
|
||||||
|
# Delete current file after quitting
|
||||||
|
pkgs.mpvScripts.mpv-delete-file
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Set default programs for opening PDFs and other media
|
||||||
|
xdg.mimeApps = {
|
||||||
|
associations.added = {
|
||||||
|
"application/pdf" = [ "pwmt.zathura-cb.desktop" ];
|
||||||
|
"image/jpeg" = [ "nsxiv.desktop" ];
|
||||||
|
"image/png" = [ "nsxiv.desktop" ];
|
||||||
|
"image/*" = [ "nsxiv.desktop" ];
|
||||||
|
};
|
||||||
|
associations.removed = {
|
||||||
|
"application/pdf" = [ "mupdf.desktop" "wine-extension-pdf.desktop" ];
|
||||||
|
};
|
||||||
|
defaultApplications = {
|
||||||
|
"application/pdf" = [ "pwmt.zathura-cb.desktop" ];
|
||||||
|
"image/jpeg" = [ "nsxiv.desktop" ];
|
||||||
|
"image/png" = [ "nsxiv.desktop" ];
|
||||||
|
"image/*" = [ "nsxiv.desktop" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
options = {
|
|
||||||
nautilus = {
|
|
||||||
enable = lib.mkEnableOption {
|
|
||||||
description = "Enable Nautilus file manager.";
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Install Nautilus file manager
|
|
||||||
config = lib.mkIf (config.gui.enable && config.nautilus.enable) {
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
gnome.nautilus
|
|
||||||
gnome.sushi # Quick preview with spacebar
|
|
||||||
];
|
|
||||||
|
|
||||||
# Set default for opening directories
|
|
||||||
xdg.mimeApps.defaultApplications."inode/directory" =
|
|
||||||
[ "nautilus.desktop" ];
|
|
||||||
|
|
||||||
programs.fish.functions = {
|
|
||||||
qr = {
|
|
||||||
body =
|
|
||||||
"${pkgs.qrencode}/bin/qrencode $argv[1] -o /tmp/qr.png | ${pkgs.gnome.sushi}/bin/sushi /tmp/qr.png";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -14,6 +14,11 @@
|
|||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
home.packages = with pkgs; [ obsidian ];
|
home.packages = with pkgs; [ obsidian ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Broken on 2023-12-11
|
||||||
|
# https://forum.obsidian.md/t/electron-25-is-now-eol-please-upgrade-to-a-newer-version/72878/8
|
||||||
|
nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" ];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
19
modules/common/applications/slack.nix
Normal file
19
modules/common/applications/slack.nix
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options = {
|
||||||
|
slack = {
|
||||||
|
enable = lib.mkEnableOption {
|
||||||
|
description = "Enable Slack.";
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf (config.gui.enable && config.slack.enable) {
|
||||||
|
unfreePackages = [ "slack" ];
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
home.packages = with pkgs; [ slack ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
35
modules/common/applications/yt-dlp.nix
Normal file
35
modules/common/applications/yt-dlp.nix
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options = {
|
||||||
|
yt-dlp = {
|
||||||
|
enable = lib.mkEnableOption {
|
||||||
|
description = "Enable YouTube downloader.";
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf (config.yt-dlp.enable) {
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
programs.yt-dlp = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = "";
|
||||||
|
settings = {
|
||||||
|
no-continue = true; # Always re-download each fragment
|
||||||
|
no-overwrites = true; # Don't overwrite existing files
|
||||||
|
download-archive = "archive.log"; # Log of archives
|
||||||
|
embed-metadata = true;
|
||||||
|
embed-thumbnail = true;
|
||||||
|
embed-subs = true;
|
||||||
|
sub-langs = "en.*";
|
||||||
|
concurrent-fragments = 4; # Parallel download chunks
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.fish.shellAbbrs.yt = "yt-dlp";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -44,11 +44,6 @@
|
|||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# colorscheme = lib.mkOption {
|
|
||||||
# type = types.attrs;
|
|
||||||
# description = "Base16 color scheme";
|
|
||||||
# };
|
|
||||||
homePath = lib.mkOption {
|
homePath = lib.mkOption {
|
||||||
type = lib.types.path;
|
type = lib.types.path;
|
||||||
description = "Path of user's home directory.";
|
description = "Path of user's home directory.";
|
||||||
@ -57,7 +52,6 @@
|
|||||||
else
|
else
|
||||||
"/home/${config.user}");
|
"/home/${config.user}");
|
||||||
};
|
};
|
||||||
|
|
||||||
dotfilesPath = lib.mkOption {
|
dotfilesPath = lib.mkOption {
|
||||||
type = lib.types.path;
|
type = lib.types.path;
|
||||||
description = "Path of dotfiles repository.";
|
description = "Path of dotfiles repository.";
|
||||||
@ -65,23 +59,91 @@
|
|||||||
};
|
};
|
||||||
dotfilesRepo = lib.mkOption {
|
dotfilesRepo = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Link to dotfiles repository.";
|
description = "Link to dotfiles repository HTTPS URL.";
|
||||||
};
|
};
|
||||||
unfreePackages = lib.mkOption {
|
unfreePackages = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
description = "List of unfree packages to allow.";
|
description = "List of unfree packages to allow.";
|
||||||
default = [ ];
|
default = [ ];
|
||||||
};
|
};
|
||||||
|
hostnames = {
|
||||||
|
git = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for git server (Gitea).";
|
||||||
|
};
|
||||||
|
metrics = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for metrics server.";
|
||||||
|
};
|
||||||
|
paperless = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for document server (paperless-ngx).";
|
||||||
|
};
|
||||||
|
prometheus = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for Prometheus server.";
|
||||||
|
};
|
||||||
|
influxdb = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for InfluxDB2 server.";
|
||||||
|
};
|
||||||
|
secrets = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for passwords and secrets (Vaultwarden).";
|
||||||
|
};
|
||||||
|
stream = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for video/media library (Jellyfin).";
|
||||||
|
};
|
||||||
|
content = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for personal content system (Nextcloud).";
|
||||||
|
};
|
||||||
|
books = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for books library (Calibre-Web).";
|
||||||
|
};
|
||||||
|
download = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for download services.";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = let stateVersion = "23.05";
|
config = let stateVersion = "23.05";
|
||||||
in {
|
in {
|
||||||
|
|
||||||
# Enable features in Nix commands
|
nix = {
|
||||||
nix.extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
# Enable features in Nix commands
|
||||||
warn-dirty = false
|
extraOptions = ''
|
||||||
'';
|
experimental-features = nix-command flakes
|
||||||
|
warn-dirty = false
|
||||||
|
'';
|
||||||
|
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
|
||||||
|
# Add community Cachix to binary cache
|
||||||
|
# Don't use with macOS because blocked by corporate firewall
|
||||||
|
builders-use-substitutes = true;
|
||||||
|
substituters = lib.mkIf (!pkgs.stdenv.isDarwin)
|
||||||
|
[ "https://nix-community.cachix.org" ];
|
||||||
|
trusted-public-keys = lib.mkIf (!pkgs.stdenv.isDarwin) [
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
];
|
||||||
|
|
||||||
|
# Scans and hard links identical files in the store
|
||||||
|
# Not working with macOS: https://github.com/NixOS/nix/issues/7273
|
||||||
|
auto-optimise-store = lib.mkIf (!pkgs.stdenv.isDarwin) true;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
# Basic common system packages for all devices
|
# Basic common system packages for all devices
|
||||||
environment.systemPackages = with pkgs; [ git vim wget curl ];
|
environment.systemPackages = with pkgs; [ git vim wget curl ];
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
"!" = ":term<space>";
|
"!" = ":term<space>";
|
||||||
"|" = ":pipe<space>";
|
"|" = ":pipe<space>";
|
||||||
|
|
||||||
"/" = ":search<space>";
|
"/" = ":search<space>-a<space>";
|
||||||
"\\" = ":filter <space>";
|
"\\" = ":filter <space>";
|
||||||
n = ":next-result<Enter>";
|
n = ":next-result<Enter>";
|
||||||
N = ":prev-result<Enter>";
|
N = ":prev-result<Enter>";
|
||||||
@ -154,22 +154,20 @@
|
|||||||
general.unsafe-accounts-conf = true;
|
general.unsafe-accounts-conf = true;
|
||||||
viewer = { pager = "${pkgs.less}/bin/less -R"; };
|
viewer = { pager = "${pkgs.less}/bin/less -R"; };
|
||||||
filters = {
|
filters = {
|
||||||
"text/plain" =
|
"text/plain" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
|
||||||
"${pkgs.gawk}/bin/awk -f ${pkgs.aerc}/share/aerc/filters/colorize";
|
|
||||||
"text/calendar" =
|
"text/calendar" =
|
||||||
"${pkgs.gawk}/bin/awk -f ${pkgs.aerc}/share/aerc/filters/calendar";
|
"${pkgs.gawk}/bin/awk -f ${pkgs.aerc}/libexec/aerc/filters/calendar";
|
||||||
"text/html" =
|
"text/html" =
|
||||||
"${pkgs.aerc}/share/aerc/filters/html"; # Requires w3m, dante
|
"${pkgs.aerc}/libexec/aerc/filters/html | ${pkgs.aerc}/libexec/aerc/filters/colorize"; # Requires w3m, dante
|
||||||
# "text/html" =
|
|
||||||
# "${pkgs.aerc}/share/aerc/filters/html | ${pkgs.aerc}/share/aerc/filters/colorize";
|
|
||||||
# "text/*" =
|
# "text/*" =
|
||||||
# ''${pkgs.bat}/bin/bat -fP --file-name="$AERC_FILENAME "'';
|
# ''${pkgs.bat}/bin/bat -fP --file-name="$AERC_FILENAME "'';
|
||||||
"message/delivery-status" =
|
"message/delivery-status" =
|
||||||
"${pkgs.gawk}/bin/awk -f ${pkgs.aerc}/share/aerc/filters/colorize";
|
"${pkgs.aerc}/libexec/aerc/filters/colorize";
|
||||||
"message/rfc822" =
|
"message/rfc822" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
|
||||||
"${pkgs.gawk}/bin/awk -f ${pkgs.aerc}/share/aerc/filters/colorize";
|
|
||||||
"application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh";
|
"application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh";
|
||||||
"application/pdf" = "${pkgs.zathura}/bin/zathura -";
|
"application/pdf" = "${pkgs.zathura}/bin/zathura -";
|
||||||
|
"audio/*" = "${pkgs.mpv}/bin/mpv -";
|
||||||
|
"image/*" = "${pkgs.feh}/bin/feh -";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -181,6 +179,27 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg.desktopEntries.aerc = lib.mkIf pkgs.stdenv.isLinux {
|
||||||
|
name = "aerc";
|
||||||
|
exec = "kitty aerc %u";
|
||||||
|
};
|
||||||
|
xsession.windowManager.i3.config.keybindings =
|
||||||
|
lib.mkIf pkgs.stdenv.isLinux {
|
||||||
|
"${
|
||||||
|
config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier
|
||||||
|
}+Shift+e" = "exec ${
|
||||||
|
# Don't name the script `aerc` or it will affect grep
|
||||||
|
builtins.toString (pkgs.writeShellScript "focus-mail.sh" ''
|
||||||
|
count=$(ps aux | grep -c aerc)
|
||||||
|
if [ "$count" -eq 1 ]; then
|
||||||
|
i3-msg "exec --no-startup-id kitty --class aerc aerc"
|
||||||
|
sleep 0.25
|
||||||
|
fi
|
||||||
|
i3-msg "[class=aerc] focus"
|
||||||
|
'')
|
||||||
|
}";
|
||||||
|
};
|
||||||
|
|
||||||
programs.fish.shellAbbrs = { ae = "aerc"; };
|
programs.fish.shellAbbrs = { ae = "aerc"; };
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
imports = [ ./himalaya.nix ./aerc.nix ];
|
imports = [ ./himalaya.nix ./aerc.nix ./system.nix ];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
mail.enable = lib.mkEnableOption "Mail service.";
|
mail.enable = lib.mkEnableOption "Mail service.";
|
||||||
@ -10,21 +10,49 @@
|
|||||||
default = config.user;
|
default = config.user;
|
||||||
};
|
};
|
||||||
mail.server = lib.mkOption {
|
mail.server = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.nullOr lib.types.str;
|
||||||
description = "Server name for the email address.";
|
description = "Server name for the email address.";
|
||||||
};
|
};
|
||||||
|
mail.imapHost = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.str;
|
||||||
|
description = "Server host for IMAP (reading mail).";
|
||||||
|
};
|
||||||
|
mail.smtpHost = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.str;
|
||||||
|
description = "Server host for SMTP (sending mail).";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.mail.enable {
|
config = lib.mkIf config.mail.enable {
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
programs.mbsync = { enable = true; };
|
programs.mbsync = { enable = true; };
|
||||||
|
|
||||||
|
# Automatically check for mail and keep files synced locally
|
||||||
services.mbsync = lib.mkIf pkgs.stdenv.isLinux {
|
services.mbsync = lib.mkIf pkgs.stdenv.isLinux {
|
||||||
enable = true;
|
enable = true;
|
||||||
frequency = "*:0/5";
|
frequency = "*:0/5";
|
||||||
|
postExec = "${pkgs.notmuch}/bin/notmuch new";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Used to watch for new mail and trigger sync
|
||||||
|
services.imapnotify.enable = pkgs.stdenv.isLinux;
|
||||||
|
|
||||||
|
# Allows sending email from CLI/sendmail
|
||||||
|
programs.msmtp.enable = true;
|
||||||
|
|
||||||
|
# Better local mail search
|
||||||
|
programs.notmuch = {
|
||||||
|
enable = true;
|
||||||
|
new.ignore =
|
||||||
|
[ ".mbsyncstate.lock" ".mbsyncstate.journal" ".mbsyncstate.new" ];
|
||||||
|
};
|
||||||
|
|
||||||
accounts.email = {
|
accounts.email = {
|
||||||
|
|
||||||
|
# Where email files are stored
|
||||||
maildirBasePath = "${config.homePath}/mail";
|
maildirBasePath = "${config.homePath}/mail";
|
||||||
|
|
||||||
accounts = {
|
accounts = {
|
||||||
home = let address = "${config.mail.user}@${config.mail.server}";
|
home = let address = "${config.mail.user}@${config.mail.server}";
|
||||||
in {
|
in {
|
||||||
@ -37,40 +65,53 @@
|
|||||||
"hey"
|
"hey"
|
||||||
"admin"
|
"admin"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Options for contact completion
|
||||||
alot = { };
|
alot = { };
|
||||||
flavor = "plain";
|
|
||||||
folders = { };
|
|
||||||
getmail = { };
|
|
||||||
imap = {
|
imap = {
|
||||||
host = "imap.purelymail.com";
|
host = config.mail.imapHost;
|
||||||
port = 993;
|
port = 993;
|
||||||
tls.enable = true;
|
tls.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Watch for mail and run notifications or sync
|
||||||
imapnotify = {
|
imapnotify = {
|
||||||
enable = false;
|
enable = true;
|
||||||
boxes = [ ];
|
boxes = [ "Inbox" ];
|
||||||
onNotify = "";
|
onNotify = "${pkgs.isync}/bin/mbsync -a";
|
||||||
onNotifyPost = "";
|
onNotifyPost = lib.mkIf
|
||||||
|
config.home-manager.users.${config.user}.services.dunst.enable
|
||||||
|
"${pkgs.libnotify}/bin/notify-send 'New mail arrived'";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Name of the directory in maildir for this account
|
||||||
maildir = { path = "main"; };
|
maildir = { path = "main"; };
|
||||||
|
|
||||||
|
# Bi-directional syncing options for local files
|
||||||
mbsync = {
|
mbsync = {
|
||||||
enable = true;
|
enable = true;
|
||||||
create = "maildir";
|
create = "both";
|
||||||
expunge = "none";
|
expunge = "both";
|
||||||
remove = "none";
|
remove = "both";
|
||||||
patterns = [ "*" ];
|
patterns = [ "*" ];
|
||||||
extraConfig.channel = {
|
extraConfig.channel = {
|
||||||
CopyArrivalDate = "yes"; # Sync time of original message
|
CopyArrivalDate = "yes"; # Sync time of original message
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
mu.enable = false;
|
|
||||||
notmuch.enable = false;
|
# Enable indexing
|
||||||
|
notmuch.enable = true;
|
||||||
|
|
||||||
|
# Used to login and send and receive emails
|
||||||
passwordCommand =
|
passwordCommand =
|
||||||
"${pkgs.age}/bin/age --decrypt --identity ${config.identityFile} ${
|
"${pkgs.age}/bin/age --decrypt --identity ~/.ssh/id_ed25519 ${
|
||||||
builtins.toString ../../private/mailpass.age
|
pkgs.writeText "mailpass.age"
|
||||||
|
(builtins.readFile ../../../private/mailpass.age)
|
||||||
}";
|
}";
|
||||||
|
|
||||||
smtp = {
|
smtp = {
|
||||||
host = "smtp.purelymail.com";
|
host = config.mail.smtpHost;
|
||||||
port = 465;
|
port = 465;
|
||||||
tls.enable = true;
|
tls.enable = true;
|
||||||
};
|
};
|
||||||
|
34
modules/common/mail/system.nix
Normal file
34
modules/common/mail/system.nix
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
config = lib.mkIf (config.mail.enable || config.server) {
|
||||||
|
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
|
programs.msmtp.enable = true;
|
||||||
|
|
||||||
|
# The system user for sending automatic notifications
|
||||||
|
accounts.email.accounts.system =
|
||||||
|
let address = "system@${config.mail.server}";
|
||||||
|
in {
|
||||||
|
userName = address;
|
||||||
|
realName = "NixOS System";
|
||||||
|
primary = !config.mail.enable; # Only primary if mail not enabled
|
||||||
|
inherit address;
|
||||||
|
passwordCommand =
|
||||||
|
"${pkgs.age}/bin/age --decrypt --identity ${config.identityFile} ${
|
||||||
|
pkgs.writeText "mailpass-system.age"
|
||||||
|
(builtins.readFile ../../../private/mailpass-system.age)
|
||||||
|
}";
|
||||||
|
msmtp.enable = true;
|
||||||
|
smtp = {
|
||||||
|
host = config.mail.smtpHost;
|
||||||
|
port = 465;
|
||||||
|
tls.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
12
modules/common/neovim/config/align.nix
Normal file
12
modules/common/neovim/config/align.nix
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
|
||||||
|
# Plugin for aligning text programmatically
|
||||||
|
|
||||||
|
plugins = [ pkgs.vimPlugins.tabular ];
|
||||||
|
lua = ''
|
||||||
|
-- Align
|
||||||
|
vim.keymap.set("", "<Leader>ta", ":Tabularize /")
|
||||||
|
vim.keymap.set("", "<Leader>t#", ":Tabularize /#<CR>")
|
||||||
|
vim.keymap.set("", "<Leader>tl", ":Tabularize /---<CR>")
|
||||||
|
'';
|
||||||
|
}
|
@ -1,4 +1,7 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
|
|
||||||
|
# Shows buffers in a VSCode-style tab layout
|
||||||
|
|
||||||
plugins = [
|
plugins = [
|
||||||
pkgs.vimPlugins.bufferline-nvim
|
pkgs.vimPlugins.bufferline-nvim
|
||||||
pkgs.vimPlugins.vim-bbye # Better closing of buffers
|
pkgs.vimPlugins.vim-bbye # Better closing of buffers
|
||||||
|
22
modules/common/neovim/config/colors.nix
Normal file
22
modules/common/neovim/config/colors.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{ pkgs, lib, config, ... }: {
|
||||||
|
|
||||||
|
# Sets Neovim colors based on Nix colorscheme
|
||||||
|
|
||||||
|
options.colors = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf lib.types.str;
|
||||||
|
description = "Attrset of base16 colorscheme key value pairs.";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
plugins = [ pkgs.vimPlugins.nvim-base16 ];
|
||||||
|
setup.base16-colorscheme = config.colors;
|
||||||
|
|
||||||
|
# Telescope isn't working, shut off for now
|
||||||
|
lua = ''
|
||||||
|
require('base16-colorscheme').with_config {
|
||||||
|
telescope = false,
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -9,7 +9,6 @@
|
|||||||
pkgs.vimPlugins.luasnip
|
pkgs.vimPlugins.luasnip
|
||||||
pkgs.vimPlugins.cmp_luasnip
|
pkgs.vimPlugins.cmp_luasnip
|
||||||
pkgs.vimPlugins.cmp-rg
|
pkgs.vimPlugins.cmp-rg
|
||||||
pkgs.vimPlugins.friendly-snippets
|
|
||||||
];
|
];
|
||||||
|
|
||||||
use.cmp.setup = dsl.callWith {
|
use.cmp.setup = dsl.callWith {
|
||||||
@ -24,12 +23,7 @@
|
|||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
snippet.expand = dsl.rawLua ''
|
# Basic completion keybinds
|
||||||
function(args)
|
|
||||||
require("luasnip").lsp_expand(args.body)
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
|
|
||||||
mapping = {
|
mapping = {
|
||||||
"['<C-n>']" = dsl.rawLua
|
"['<C-n>']" = dsl.rawLua
|
||||||
"require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Insert })";
|
"require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Insert })";
|
||||||
@ -64,24 +58,25 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# These are where the completion engine gets its suggestions
|
||||||
sources = [
|
sources = [
|
||||||
{ name = "nvim_lua"; }
|
{ name = "nvim_lua"; } # Fills in common Neovim lua functions
|
||||||
{ name = "nvim_lsp"; }
|
{ name = "nvim_lsp"; } # LSP results
|
||||||
{ name = "luasnip"; }
|
{ name = "path"; } # Shell completion from current PATH
|
||||||
{ name = "path"; }
|
|
||||||
{
|
{
|
||||||
name = "buffer";
|
name = "buffer"; # Grep for text from the current text buffer
|
||||||
keyword_length = 3;
|
keyword_length = 3;
|
||||||
max_item_count = 10;
|
max_item_count = 10;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "rg";
|
name = "rg"; # Grep for text from the current directory
|
||||||
keyword_length = 6;
|
keyword_length = 6;
|
||||||
max_item_count = 10;
|
max_item_count = 10;
|
||||||
option = { additional_arguments = "--ignore-case"; };
|
option = { additional_arguments = "--ignore-case"; };
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Styling of the completion menu
|
||||||
formatting = {
|
formatting = {
|
||||||
fields = [ "kind" "abbr" "menu" ];
|
fields = [ "kind" "abbr" "menu" ];
|
||||||
format = dsl.rawLua ''
|
format = dsl.rawLua ''
|
||||||
@ -115,7 +110,6 @@
|
|||||||
}
|
}
|
||||||
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
|
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
|
||||||
vim_item.menu = ({
|
vim_item.menu = ({
|
||||||
luasnip = "[Snippet]",
|
|
||||||
buffer = "[Buffer]",
|
buffer = "[Buffer]",
|
||||||
path = "[Path]",
|
path = "[Path]",
|
||||||
rg = "[Grep]",
|
rg = "[Grep]",
|
||||||
|
14
modules/common/neovim/config/github.lua
Normal file
14
modules/common/neovim/config/github.lua
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
-- Keymap to open file in GitHub web
|
||||||
|
vim.keymap.set("n", "<Leader>gr", ":!gh browse %<CR><CR>", { silent = true })
|
||||||
|
|
||||||
|
-- Pop a terminal to watch the current run
|
||||||
|
local gitwatch =
|
||||||
|
require("toggleterm.terminal").Terminal:new({ cmd = "fish --interactive --init-command 'gh run watch'" })
|
||||||
|
|
||||||
|
-- Set a toggle for this terminal
|
||||||
|
function GITWATCH_TOGGLE()
|
||||||
|
gitwatch:toggle()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Keymap to toggle the run
|
||||||
|
vim.keymap.set("n", "<Leader>gw", GITWATCH_TOGGLE)
|
6
modules/common/neovim/config/kubernetes.lua
Normal file
6
modules/common/neovim/config/kubernetes.lua
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
local k9s = require("toggleterm.terminal").Terminal:new({ cmd = "k9s" })
|
||||||
|
function K9S_TOGGLE()
|
||||||
|
k9s:toggle()
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<Leader>9", K9S_TOGGLE)
|
@ -1,66 +1,120 @@
|
|||||||
{ pkgs, dsl, ... }: {
|
{ pkgs, lib, config, dsl, ... }: {
|
||||||
|
|
||||||
plugins = [
|
# Terraform optional because non-free
|
||||||
pkgs.vimPlugins.nvim-lspconfig
|
options.github = lib.mkEnableOption "Whether to enable GitHub features";
|
||||||
pkgs.vimPlugins.lsp-colors-nvim
|
options.kubernetes =
|
||||||
pkgs.vimPlugins.null-ls-nvim
|
lib.mkEnableOption "Whether to enable Kubernetes features";
|
||||||
];
|
options.python = lib.mkEnableOption "Whether to enable Python LSP";
|
||||||
|
options.terraform = lib.mkEnableOption "Whether to enable Terraform LSP";
|
||||||
|
|
||||||
use.lspconfig.lua_ls.setup = dsl.callWith {
|
config =
|
||||||
settings = { Lua = { diagnostics = { globals = [ "vim" "hs" ]; }; }; };
|
|
||||||
capabilities = dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
|
||||||
cmd = [ "${pkgs.lua-language-server}/bin/lua-language-server" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
use.lspconfig.nil_ls.setup = dsl.callWith {
|
let
|
||||||
cmd = [ "${pkgs.nil}/bin/nil" ];
|
|
||||||
capabilities = dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
|
||||||
};
|
|
||||||
|
|
||||||
use.lspconfig.pyright.setup = dsl.callWith {
|
terraformFormat = if config.terraform then ''
|
||||||
cmd = [ "${pkgs.pyright}/bin/pyright-langserver" "--stdio" ];
|
require("null-ls").builtins.formatting.terraform_fmt.with({
|
||||||
};
|
command = "${pkgs.terraform}/bin/terraform",
|
||||||
|
extra_filetypes = { "hcl" },
|
||||||
|
}),
|
||||||
|
'' else
|
||||||
|
"";
|
||||||
|
|
||||||
use.lspconfig.terraformls.setup =
|
pythonFormat = if config.python then ''
|
||||||
dsl.callWith { cmd = [ "${pkgs.terraform-ls}/bin/terraform-ls" "serve" ]; };
|
require("null-ls").builtins.formatting.black.with({ command = "${pkgs.black}/bin/black" }),
|
||||||
|
require("null-ls").builtins.diagnostics.ruff.with({ command = "${pkgs.ruff}/bin/ruff" }),
|
||||||
|
'' else
|
||||||
|
"";
|
||||||
|
|
||||||
vim.api.nvim_create_augroup = dsl.callWith [ "LspFormatting" { } ];
|
in {
|
||||||
|
plugins = [
|
||||||
|
pkgs.vimPlugins.nvim-lspconfig
|
||||||
|
pkgs.vimPlugins.null-ls-nvim
|
||||||
|
pkgs.vimPlugins.fidget-nvim
|
||||||
|
];
|
||||||
|
|
||||||
lua = ''
|
setup.fidget = { };
|
||||||
${builtins.readFile ./lsp.lua}
|
|
||||||
|
|
||||||
require("null-ls").setup({
|
use.lspconfig.lua_ls.setup = dsl.callWith {
|
||||||
sources = {
|
settings = { Lua = { diagnostics = { globals = [ "vim" "hs" ]; }; }; };
|
||||||
require("null-ls").builtins.formatting.stylua.with({ command = "${pkgs.stylua}/bin/stylua" }),
|
capabilities =
|
||||||
require("null-ls").builtins.formatting.black.with({ command = "${pkgs.black}/bin/black" }),
|
dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
||||||
require("null-ls").builtins.diagnostics.flake8.with({ command = "${pkgs.python310Packages.flake8}/bin/flake8" }),
|
cmd = [ "${pkgs.lua-language-server}/bin/lua-language-server" ];
|
||||||
require("null-ls").builtins.formatting.fish_indent.with({ command = "${pkgs.fish}/bin/fish_indent" }),
|
};
|
||||||
require("null-ls").builtins.formatting.nixfmt.with({ command = "${pkgs.nixfmt}/bin/nixfmt" }),
|
|
||||||
require("null-ls").builtins.formatting.rustfmt.with({ command = "${pkgs.rustfmt}/bin/rustfmt" }),
|
|
||||||
require("null-ls").builtins.diagnostics.shellcheck.with({ command = "${pkgs.shellcheck}/bin/shellcheck" }),
|
|
||||||
require("null-ls").builtins.formatting.shfmt.with({
|
|
||||||
command = "${pkgs.shfmt}/bin/shfmt",
|
|
||||||
extra_args = { "-i", "4", "-ci" },
|
|
||||||
}),
|
|
||||||
require("null-ls").builtins.formatting.terraform_fmt.with({
|
|
||||||
command = "${pkgs.terraform}/bin/terraform",
|
|
||||||
extra_filetypes = { "hcl" },
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
|
|
||||||
on_attach = function(client, bufnr)
|
use.lspconfig.nil_ls.setup = dsl.callWith {
|
||||||
if client.supports_method("textDocument/formatting") then
|
cmd = [ "${pkgs.nil}/bin/nil" ];
|
||||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
capabilities =
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
||||||
group = augroup,
|
};
|
||||||
buffer = bufnr,
|
|
||||||
callback = function()
|
use.lspconfig.pyright.setup = dsl.callWith {
|
||||||
vim.lsp.buf.format({ bufnr = bufnr })
|
cmd = if config.python then [
|
||||||
end,
|
"${pkgs.pyright}/bin/pyright-langserver"
|
||||||
})
|
"--stdio"
|
||||||
end
|
] else
|
||||||
end,
|
[ "echo" ];
|
||||||
})
|
};
|
||||||
'';
|
|
||||||
|
use.lspconfig.terraformls.setup = dsl.callWith {
|
||||||
|
cmd = if config.terraform then [
|
||||||
|
"${pkgs.terraform-ls}/bin/terraform-ls"
|
||||||
|
"serve"
|
||||||
|
] else
|
||||||
|
[ "echo" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
use.lspconfig.rust_analyzer.setup = dsl.callWith {
|
||||||
|
cmd = [ "${pkgs.rust-analyzer}/bin/rust-analyzer" ];
|
||||||
|
settings = {
|
||||||
|
"['rust-analyzer']" = { check = { command = "clippy"; }; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vim.api.nvim_create_augroup = dsl.callWith [ "LspFormatting" { } ];
|
||||||
|
|
||||||
|
lua = ''
|
||||||
|
${builtins.readFile ./lsp.lua}
|
||||||
|
|
||||||
|
-- Prevent infinite log size (change this when debugging)
|
||||||
|
vim.lsp.set_log_level("off")
|
||||||
|
|
||||||
|
require("null-ls").setup({
|
||||||
|
sources = {
|
||||||
|
require("null-ls").builtins.formatting.stylua.with({ command = "${pkgs.stylua}/bin/stylua" }),
|
||||||
|
require("null-ls").builtins.formatting.fish_indent.with({ command = "${pkgs.fish}/bin/fish_indent" }),
|
||||||
|
require("null-ls").builtins.formatting.nixfmt.with({ command = "${pkgs.nixfmt}/bin/nixfmt" }),
|
||||||
|
require("null-ls").builtins.formatting.rustfmt.with({ command = "${pkgs.rustfmt}/bin/rustfmt" }),
|
||||||
|
require("null-ls").builtins.diagnostics.shellcheck.with({ command = "${pkgs.shellcheck}/bin/shellcheck" }),
|
||||||
|
require("null-ls").builtins.formatting.shfmt.with({
|
||||||
|
command = "${pkgs.shfmt}/bin/shfmt",
|
||||||
|
extra_args = { "-i", "4", "-ci" },
|
||||||
|
}),
|
||||||
|
${pythonFormat}
|
||||||
|
${terraformFormat}
|
||||||
|
},
|
||||||
|
|
||||||
|
on_attach = function(client, bufnr)
|
||||||
|
if client.supports_method("textDocument/formatting") then
|
||||||
|
-- Auto-format on save
|
||||||
|
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
|
group = augroup,
|
||||||
|
buffer = bufnr,
|
||||||
|
callback = function()
|
||||||
|
vim.lsp.buf.format({ bufnr = bufnr })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
-- Use internal formatting for bindings like gq.
|
||||||
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
|
callback = function(args)
|
||||||
|
vim.bo[args.buf].formatexpr = nil
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,13 +5,18 @@
|
|||||||
pkgs.vimPlugins.vim-fugitive # Git commands
|
pkgs.vimPlugins.vim-fugitive # Git commands
|
||||||
pkgs.vimPlugins.vim-repeat # Better repeat using .
|
pkgs.vimPlugins.vim-repeat # Better repeat using .
|
||||||
pkgs.vimPlugins.comment-nvim # Smart comment commands
|
pkgs.vimPlugins.comment-nvim # Smart comment commands
|
||||||
pkgs.vimPlugins.impatient-nvim # Faster load times
|
|
||||||
pkgs.vimPlugins.glow-nvim # Markdown preview popup
|
pkgs.vimPlugins.glow-nvim # Markdown preview popup
|
||||||
pkgs.vimPlugins.nvim-colorizer-lua # Hex color previews
|
pkgs.vimPlugins.nvim-colorizer-lua # Hex color previews
|
||||||
|
pkgs.vimPlugins.which-key-nvim # Keybind helper
|
||||||
|
pkgs.kitty-scrollback-nvim # Scrollback pager for kitty
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Initialize some plugins
|
||||||
setup.Comment = { };
|
setup.Comment = { };
|
||||||
setup.colorizer = { };
|
setup.colorizer = { user_default_options = { names = false; }; };
|
||||||
|
setup.glow = { };
|
||||||
|
setup.which-key = { };
|
||||||
|
setup.kitty-scrollback = { };
|
||||||
|
|
||||||
vim.o = {
|
vim.o = {
|
||||||
termguicolors = true; # Set to truecolor
|
termguicolors = true; # Set to truecolor
|
||||||
@ -41,17 +46,23 @@
|
|||||||
relativenumber = true; # Relative numbers instead of absolute
|
relativenumber = true; # Relative numbers instead of absolute
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# For which-key-nvim
|
||||||
|
vim.o.timeout = true;
|
||||||
|
vim.o.timeoutlen = 300;
|
||||||
|
|
||||||
# Better backup, swap and undo storage
|
# Better backup, swap and undo storage
|
||||||
vim.o.backup = true; # Easier to recover and more secure
|
vim.o.backup = true; # Easier to recover and more secure
|
||||||
vim.bo.swapfile = false; # Instead of swaps, create backups
|
vim.bo.swapfile = false; # Instead of swaps, create backups
|
||||||
vim.bo.undofile = true; # Keeps undos after quit
|
vim.bo.undofile = true; # Keeps undos after quit
|
||||||
vim.o.backupdir = dsl.rawLua ''vim.fn.stdpath("cache") .. "/backup"'';
|
vim.o.backupdir =
|
||||||
|
dsl.rawLua ''vim.fn.expand("~/.local/state/nvim/backup//")'';
|
||||||
|
vim.o.undodir = dsl.rawLua ''vim.fn.expand("~/.local/state/nvim/undo//")'';
|
||||||
|
|
||||||
# Required for nvim-cmp completion
|
# Required for nvim-cmp completion
|
||||||
vim.opt.completeopt = [ "menu" "menuone" "noselect" ];
|
vim.opt.completeopt = [ "menu" "menuone" "noselect" ];
|
||||||
|
|
||||||
lua = lib.mkBefore ''
|
lua = lib.mkBefore ''
|
||||||
require("impatient")
|
vim.loader.enable()
|
||||||
${builtins.readFile ../lua/keybinds.lua};
|
${builtins.readFile ../lua/keybinds.lua};
|
||||||
${builtins.readFile ../lua/settings.lua};
|
${builtins.readFile ../lua/settings.lua};
|
||||||
'';
|
'';
|
||||||
@ -60,10 +71,6 @@
|
|||||||
" Remember last position when reopening file
|
" Remember last position when reopening file
|
||||||
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
|
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
|
||||||
|
|
||||||
" LaTeX options
|
|
||||||
au FileType tex inoremap ;bf \textbf{}<Esc>i
|
|
||||||
au BufWritePost *.tex silent! execute "!pdflatex -output-directory=%:p:h % >/dev/null 2>&1" | redraw!
|
|
||||||
|
|
||||||
" Flash highlight when yanking
|
" Flash highlight when yanking
|
||||||
au TextYankPost * silent! lua vim.highlight.on_yank { timeout = 250 }
|
au TextYankPost * silent! lua vim.highlight.on_yank { timeout = 250 }
|
||||||
'';
|
'';
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
plugins = [ pkgs.vimPlugins.lualine-nvim ];
|
plugins = [ pkgs.vimPlugins.lualine-nvim ];
|
||||||
setup.lualine = {
|
setup.lualine = {
|
||||||
options = {
|
options = {
|
||||||
theme = "gruvbox";
|
theme = "base16";
|
||||||
icons_enabled = true;
|
icons_enabled = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,26 +1,41 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, lib, config, ... }: {
|
||||||
|
|
||||||
plugins = [
|
plugins = [
|
||||||
(pkgs.vimPlugins.nvim-treesitter.withPlugins (_plugins:
|
(pkgs.vimPlugins.nvim-treesitter.withPlugins (_plugins:
|
||||||
with pkgs.tree-sitter-grammars; [
|
with pkgs.tree-sitter-grammars;
|
||||||
tree-sitter-hcl
|
[
|
||||||
tree-sitter-python
|
tree-sitter-bash
|
||||||
tree-sitter-lua
|
tree-sitter-c
|
||||||
tree-sitter-nix
|
|
||||||
tree-sitter-fish
|
tree-sitter-fish
|
||||||
tree-sitter-toml
|
tree-sitter-ini
|
||||||
tree-sitter-yaml
|
|
||||||
tree-sitter-json
|
tree-sitter-json
|
||||||
]))
|
tree-sitter-lua
|
||||||
|
tree-sitter-markdown
|
||||||
|
tree-sitter-markdown-inline
|
||||||
|
tree-sitter-nix
|
||||||
|
tree-sitter-puppet
|
||||||
|
tree-sitter-rasi
|
||||||
|
tree-sitter-toml
|
||||||
|
tree-sitter-vimdoc
|
||||||
|
tree-sitter-yaml
|
||||||
|
] ++ (if config.python.enable then [ tree-sitter-python ] else [ ])
|
||||||
|
++ (if config.terraform.enable then [ tree-sitter-hcl ] else [ ])))
|
||||||
pkgs.vimPlugins.vim-matchup # Better % jumping in languages
|
pkgs.vimPlugins.vim-matchup # Better % jumping in languages
|
||||||
|
pkgs.vimPlugins.playground # Tree-sitter experimenting
|
||||||
pkgs.vimPlugins.nginx-vim
|
pkgs.vimPlugins.nginx-vim
|
||||||
pkgs.vimPlugins.vim-helm
|
pkgs.baleia-nvim # Clean ANSI from kitty scrollback
|
||||||
pkgs.vimPlugins.vim-puppet
|
# pkgs.hmts-nvim # Tree-sitter injections for home-manager
|
||||||
];
|
(pkgs.vimUtils.buildVimPlugin {
|
||||||
|
pname = "nmasur";
|
||||||
|
version = "0.1";
|
||||||
|
src = ../plugin;
|
||||||
|
})
|
||||||
|
] ++ (if config.kubernetes.enable then [ pkgs.vimPlugins.vim-helm ] else [ ]);
|
||||||
|
|
||||||
setup."nvim-treesitter.configs" = {
|
setup."nvim-treesitter.configs" = {
|
||||||
highlight = { enable = true; };
|
highlight = { enable = true; };
|
||||||
indent = { enable = true; };
|
indent = { enable = true; };
|
||||||
|
matchup = { enable = true; }; # Uses vim-matchup
|
||||||
|
|
||||||
textobjects = {
|
textobjects = {
|
||||||
select = {
|
select = {
|
||||||
@ -49,4 +64,10 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Use mkAfter to ensure tree-sitter is already loaded
|
||||||
|
lua = lib.mkAfter ''
|
||||||
|
-- Use HCL parser with .tf files
|
||||||
|
vim.treesitter.language.register('hcl', 'terraform')
|
||||||
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ vim.keymap.set("n", "<Leader>gf", telescope.git_bcommits)
|
|||||||
vim.keymap.set("n", "<Leader>gb", telescope.git_branches)
|
vim.keymap.set("n", "<Leader>gb", telescope.git_branches)
|
||||||
vim.keymap.set("n", "<Leader>gs", telescope.git_status)
|
vim.keymap.set("n", "<Leader>gs", telescope.git_status)
|
||||||
vim.keymap.set("n", "<Leader>s", telescope.current_buffer_fuzzy_find)
|
vim.keymap.set("n", "<Leader>s", telescope.current_buffer_fuzzy_find)
|
||||||
|
vim.keymap.set("n", "<Leader>rr", telescope.resume)
|
||||||
|
|
||||||
vim.keymap.set("n", "<Leader>N", function()
|
vim.keymap.set("n", "<Leader>N", function()
|
||||||
local opts = {
|
local opts = {
|
||||||
@ -45,7 +46,7 @@ end)
|
|||||||
vim.keymap.set("n", "<Leader>fz", require("telescope").extensions.zoxide.list)
|
vim.keymap.set("n", "<Leader>fz", require("telescope").extensions.zoxide.list)
|
||||||
|
|
||||||
-- Project
|
-- Project
|
||||||
require("telescope").load_extension("project")
|
require("telescope").load_extension("projects")
|
||||||
vim.keymap.set("n", "<C-p>", function()
|
vim.keymap.set("n", "<C-p>", function()
|
||||||
local opts = require("telescope.themes").get_ivy({
|
local opts = require("telescope.themes").get_ivy({
|
||||||
layout_config = {
|
layout_config = {
|
||||||
@ -54,7 +55,7 @@ vim.keymap.set("n", "<C-p>", function()
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
require("telescope").extensions.project.project(opts)
|
require("telescope").extensions.projects.projects(opts)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- File browser
|
-- File browser
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
{ pkgs, dsl, ... }: {
|
{ pkgs, dsl, ... }: {
|
||||||
|
|
||||||
|
# Telescope is a fuzzy finder that can work with different sub-plugins
|
||||||
|
|
||||||
plugins = [
|
plugins = [
|
||||||
pkgs.vimPlugins.telescope-nvim
|
pkgs.vimPlugins.telescope-nvim
|
||||||
pkgs.vimPlugins.telescope-project-nvim
|
pkgs.vimPlugins.project-nvim
|
||||||
pkgs.vimPlugins.telescope-fzy-native-nvim
|
pkgs.vimPlugins.telescope-fzy-native-nvim
|
||||||
pkgs.vimPlugins.telescope-file-browser-nvim
|
pkgs.vimPlugins.telescope-file-browser-nvim
|
||||||
pkgs.vimPlugins.telescope-zoxide
|
pkgs.vimPlugins.telescope-zoxide
|
||||||
@ -25,10 +27,11 @@
|
|||||||
extensions = {
|
extensions = {
|
||||||
fzy_native = { };
|
fzy_native = { };
|
||||||
zoxide = { };
|
zoxide = { };
|
||||||
project = { base_dirs = [ "~/dev" ]; };
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
setup.project_nvim = { };
|
||||||
|
|
||||||
lua = builtins.readFile ./telescope.lua;
|
lua = builtins.readFile ./telescope.lua;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,8 @@ vim.api.nvim_create_autocmd("TermOpen", {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- These are all the different types of terminals we can trigger
|
||||||
|
|
||||||
local terminal = require("toggleterm.terminal").Terminal
|
local terminal = require("toggleterm.terminal").Terminal
|
||||||
|
|
||||||
local basicterminal = terminal:new()
|
local basicterminal = terminal:new()
|
||||||
@ -24,17 +26,5 @@ function NIXPKGS_TOGGLE()
|
|||||||
nixpkgs:toggle()
|
nixpkgs:toggle()
|
||||||
end
|
end
|
||||||
|
|
||||||
local gitwatch = terminal:new({ cmd = "fish --interactive --init-command 'gh run watch'" })
|
|
||||||
function GITWATCH_TOGGLE()
|
|
||||||
gitwatch:toggle()
|
|
||||||
end
|
|
||||||
|
|
||||||
local k9s = terminal:new({ cmd = "k9s" })
|
|
||||||
function K9S_TOGGLE()
|
|
||||||
k9s:toggle()
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<Leader>t", TERM_TOGGLE)
|
vim.keymap.set("n", "<Leader>t", TERM_TOGGLE)
|
||||||
vim.keymap.set("n", "<Leader>P", NIXPKGS_TOGGLE)
|
vim.keymap.set("n", "<Leader>P", NIXPKGS_TOGGLE)
|
||||||
vim.keymap.set("n", "<Leader>gw", GITWATCH_TOGGLE)
|
|
||||||
vim.keymap.set("n", "<Leader>9", K9S_TOGGLE)
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
{ pkgs, dsl, ... }: {
|
{ pkgs, dsl, config, ... }: {
|
||||||
|
|
||||||
|
# Toggleterm provides a floating terminal inside the editor for quick access
|
||||||
|
|
||||||
plugins = [ pkgs.vimPlugins.toggleterm-nvim ];
|
plugins = [ pkgs.vimPlugins.toggleterm-nvim ];
|
||||||
|
|
||||||
@ -8,6 +10,10 @@
|
|||||||
direction = "float";
|
direction = "float";
|
||||||
};
|
};
|
||||||
|
|
||||||
lua = builtins.readFile ./toggleterm.lua;
|
lua = ''
|
||||||
|
${builtins.readFile ./toggleterm.lua}
|
||||||
|
${if config.github then (builtins.readFile ./github.lua) else ""}
|
||||||
|
${if config.kubernetes then (builtins.readFile ./kubernetes.lua) else ""}
|
||||||
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{ pkgs, dsl, ... }: {
|
{ pkgs, dsl, ... }: {
|
||||||
|
|
||||||
|
# This plugin creates a side drawer for navigating the current project
|
||||||
|
|
||||||
plugins = [ pkgs.vimPlugins.nvim-tree-lua pkgs.vimPlugins.nvim-web-devicons ];
|
plugins = [ pkgs.vimPlugins.nvim-tree-lua pkgs.vimPlugins.nvim-web-devicons ];
|
||||||
|
|
||||||
# Disable netrw eagerly
|
# Disable netrw eagerly
|
||||||
@ -10,14 +12,16 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
setup.nvim-tree = {
|
setup.nvim-tree = {
|
||||||
disable_netrw = true;
|
disable_netrw = true; # Disable the built-in file manager
|
||||||
hijack_netrw = true;
|
hijack_netrw = true; # Works as the file manager
|
||||||
update_focused_file = {
|
sync_root_with_cwd = true; # Change project whenever currend dir changes
|
||||||
|
respect_buf_cwd = true; # Change to exact location of focused buffer
|
||||||
|
update_focused_file = { # Change project based on the focused buffer
|
||||||
enable = true;
|
enable = true;
|
||||||
update_cwd = true;
|
update_root = true;
|
||||||
ignore_list = { };
|
ignore_list = { };
|
||||||
};
|
};
|
||||||
diagnostics = {
|
diagnostics = { # Enable LSP and linter integration
|
||||||
enable = true;
|
enable = true;
|
||||||
icons = {
|
icons = {
|
||||||
hint = "";
|
hint = "";
|
||||||
@ -26,7 +30,7 @@
|
|||||||
error = "";
|
error = "";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
renderer = {
|
renderer = { # Show files with changes vs. current commit
|
||||||
icons = {
|
icons = {
|
||||||
glyphs = {
|
glyphs = {
|
||||||
git = {
|
git = {
|
||||||
@ -41,35 +45,31 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
view = {
|
# Set keybinds and initialize program
|
||||||
|
on_attach = dsl.rawLua ''
|
||||||
|
function (bufnr)
|
||||||
|
local api = require('nvim-tree.api')
|
||||||
|
local function opts(desc)
|
||||||
|
return { desc = 'nvim-tree: ' .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
|
||||||
|
end
|
||||||
|
api.config.mappings.default_on_attach(bufnr)
|
||||||
|
|
||||||
|
vim.keymap.set('n', 'l', api.node.open.edit, opts('Open'))
|
||||||
|
vim.keymap.set('n', '<CR>', api.node.open.edit, opts('Open'))
|
||||||
|
vim.keymap.set('n', 'o', api.node.open.edit, opts('Open'))
|
||||||
|
vim.keymap.set('n', 'h', api.node.navigate.parent_close, opts('Close Directory'))
|
||||||
|
vim.keymap.set('n', 'v', api.node.open.vertical, opts('Open: Vertical Split'))
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
view = { # Set look and feel
|
||||||
width = 30;
|
width = 30;
|
||||||
hide_root_folder = false;
|
|
||||||
side = "left";
|
side = "left";
|
||||||
mappings = {
|
|
||||||
custom_only = false;
|
|
||||||
list = [
|
|
||||||
{
|
|
||||||
key = [ "l" "<CR>" "o" ];
|
|
||||||
cb = dsl.rawLua
|
|
||||||
"require('nvim-tree.config').nvim_tree_callback('edit')";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "h";
|
|
||||||
cb = dsl.rawLua
|
|
||||||
"require('nvim-tree.config').nvim_tree_callback('close_node')";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "v";
|
|
||||||
cb = dsl.rawLua
|
|
||||||
"require('nvim-tree.config').nvim_tree_callback('vsplit')";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
number = false;
|
number = false;
|
||||||
relativenumber = false;
|
relativenumber = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Toggle the sidebar
|
||||||
lua = ''
|
lua = ''
|
||||||
vim.keymap.set("n", "<Leader>e", ":NvimTreeFindFileToggle<CR>", { silent = true })
|
vim.keymap.set("n", "<Leader>e", ":NvimTreeFindFileToggle<CR>", { silent = true })
|
||||||
'';
|
'';
|
||||||
|
@ -4,7 +4,12 @@ let
|
|||||||
|
|
||||||
neovim = import ./package {
|
neovim = import ./package {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
colors = import config.theme.colors.neovimConfig { inherit pkgs; };
|
colors = config.theme.colors;
|
||||||
|
c = config.c.enable;
|
||||||
|
github = true;
|
||||||
|
kubernetes = config.kubernetes.enable;
|
||||||
|
python = config.python.enable;
|
||||||
|
terraform = config.terraform.enable;
|
||||||
};
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
@ -18,11 +23,17 @@ in {
|
|||||||
|
|
||||||
home.packages = [ neovim ];
|
home.packages = [ neovim ];
|
||||||
|
|
||||||
|
# Use Neovim as the editor for git commit messages
|
||||||
programs.git.extraConfig.core.editor = "nvim";
|
programs.git.extraConfig.core.editor = "nvim";
|
||||||
|
programs.jujutsu.settings.ui.editor = "nvim";
|
||||||
|
|
||||||
|
# Set Neovim as the default app for text editing and manual pages
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
MANPAGER = "nvim +Man!";
|
MANPAGER = "nvim +Man!";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Create quick aliases for launching Neovim
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
shellAliases = { vim = "nvim"; };
|
shellAliases = { vim = "nvim"; };
|
||||||
shellAbbrs = {
|
shellAbbrs = {
|
||||||
@ -31,14 +42,28 @@ in {
|
|||||||
vll = "nvim -c 'Telescope oldfiles'";
|
vll = "nvim -c 'Telescope oldfiles'";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
programs.kitty.settings.scrollback_pager = lib.mkForce ''
|
|
||||||
${neovim}/bin/nvim -c 'setlocal nonumber nolist showtabline=0 foldcolumn=0|Man!' -c "autocmd VimEnter * normal G" -'';
|
# Set Neovim as the kitty terminal "scrollback" (vi mode) option.
|
||||||
|
# Requires removing some of the ANSI escape codes that are sent to the
|
||||||
|
# scrollback using sed and baleia, as well as removing several
|
||||||
|
# unnecessary features.
|
||||||
|
programs.kitty.settings.scrollback_pager =
|
||||||
|
"${neovim}/bin/nvim --headless +'KittyScrollbackGenerateKittens' +'set nonumber' +'set norelativenumber' +'%print' +'quit!' 2>&1";
|
||||||
|
|
||||||
|
# Create a desktop option for launching Neovim from a file manager
|
||||||
|
# (Requires launching the terminal and then executing Neovim)
|
||||||
|
xdg.desktopEntries.nvim = lib.mkIf pkgs.stdenv.isLinux {
|
||||||
|
name = "Neovim wrapper";
|
||||||
|
exec = "kitty nvim %F";
|
||||||
|
mimeType = [ "text/plain" "text/markdown" ];
|
||||||
|
};
|
||||||
|
xdg.mimeApps.defaultApplications = lib.mkIf pkgs.stdenv.isLinux {
|
||||||
|
"text/plain" = [ "nvim.desktop" ];
|
||||||
|
"text/markdown" = [ "nvim.desktop" ];
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# # Used for icons in Vim
|
|
||||||
# fonts.fonts = with pkgs; [ nerdfonts ];
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
require("packer_init")
|
|
||||||
require("settings")
|
|
||||||
require("keybinds")
|
|
||||||
require("background")
|
|
@ -39,7 +39,6 @@ key("n", "<Leader>fs", ":write<CR>")
|
|||||||
key("n", "<Leader>fd", ":lcd %:p:h<CR>", { silent = true })
|
key("n", "<Leader>fd", ":lcd %:p:h<CR>", { silent = true })
|
||||||
key("n", "<Leader>fu", ":lcd ..<CR>", { silent = true })
|
key("n", "<Leader>fu", ":lcd ..<CR>", { silent = true })
|
||||||
key("n", "<Leader><Tab>", ":b#<CR>", { silent = true })
|
key("n", "<Leader><Tab>", ":b#<CR>", { silent = true })
|
||||||
key("n", "<Leader>gr", ":!gh repo view -w<CR><CR>", { silent = true })
|
|
||||||
key("n", "<Leader>tt", [[<Cmd>exe 'edit $NOTES_PATH/journal/'.strftime("%Y-%m-%d_%a").'.md'<CR>]])
|
key("n", "<Leader>tt", [[<Cmd>exe 'edit $NOTES_PATH/journal/'.strftime("%Y-%m-%d_%a").'.md'<CR>]])
|
||||||
key("n", "<Leader>jj", ":!journal<CR>:e<CR>")
|
key("n", "<Leader>jj", ":!journal<CR>:e<CR>")
|
||||||
|
|
||||||
@ -48,11 +47,6 @@ key("n", "<Leader>wv", ":vsplit<CR>")
|
|||||||
key("n", "<Leader>wh", ":split<CR>")
|
key("n", "<Leader>wh", ":split<CR>")
|
||||||
key("n", "<Leader>wm", ":only<CR>")
|
key("n", "<Leader>wm", ":only<CR>")
|
||||||
|
|
||||||
-- Vimrc editing
|
|
||||||
key("n", "<Leader>rr", ":luafile $HOME/.config/nvim/init.lua<CR>")
|
|
||||||
key("n", "<Leader>rp", ":luafile $HOME/.config/nvim/init.lua<CR>:PackerInstall<CR>:")
|
|
||||||
key("n", "<Leader>rc", ":luafile $HOME/.config/nvim/init.lua<CR>:PackerCompile<CR>")
|
|
||||||
|
|
||||||
-- Keep cursor in place
|
-- Keep cursor in place
|
||||||
key("n", "n", "nzz")
|
key("n", "n", "nzz")
|
||||||
key("n", "N", "Nzz")
|
key("n", "N", "Nzz")
|
||||||
@ -70,9 +64,15 @@ key("n", "<C-Down>", ":resize -2<CR>", { silent = true })
|
|||||||
key("n", "<C-Left>", ":vertical resize -2<CR>", { silent = true })
|
key("n", "<C-Left>", ":vertical resize -2<CR>", { silent = true })
|
||||||
key("n", "<C-Right>", ":vertical resize +2<CR>", { silent = true })
|
key("n", "<C-Right>", ":vertical resize +2<CR>", { silent = true })
|
||||||
|
|
||||||
|
-- Quickfix
|
||||||
|
key("n", "]q", ":cnext<CR>")
|
||||||
|
key("n", "[q", ":cprevious<CR>")
|
||||||
|
key("n", "co", ":copen<CR>")
|
||||||
|
key("n", "cq", ":cclose<CR>")
|
||||||
|
|
||||||
-- Other
|
-- Other
|
||||||
key("n", "<A-CR>", ":noh<CR>", { silent = true }) --- Clear search in VimWiki
|
key("n", "<A-CR>", ":noh<CR>", { silent = true }) --- Clear search in VimWiki
|
||||||
key("n", "Y", "y$") --- Copy to end of line
|
key("n", "Y", "y$") --- Copy to end of line
|
||||||
key("v", "<C-r>", "y<Esc>:%s/<C-r>+//gc<left><left><left>") --- Substitute selected
|
key("v", "<C-r>", "y<Esc>:%s/<C-r>+//gc<left><left><left>") --- Substitute selected
|
||||||
key("v", "D", "y'>gp") --- Duplicate selected
|
key("v", "D", "y'>gp") --- Duplicate selected
|
||||||
key("x", "<Leader>p", '"_dP') --- Paste but keep register
|
key("x", "<Leader>p", '"_dP') --- Paste but keep register
|
||||||
|
@ -1,164 +0,0 @@
|
|||||||
-- =======================================================================
|
|
||||||
-- Completion System
|
|
||||||
-- =======================================================================
|
|
||||||
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
-- Completion sources
|
|
||||||
use("hrsh7th/cmp-nvim-lsp") --- Language server completion plugin
|
|
||||||
use("hrsh7th/cmp-buffer") --- Generic text completion
|
|
||||||
use("hrsh7th/cmp-path") --- Local file completion
|
|
||||||
use("hrsh7th/cmp-cmdline") --- Command line completion
|
|
||||||
use("hrsh7th/cmp-nvim-lua") --- Nvim lua api completion
|
|
||||||
use("saadparwaiz1/cmp_luasnip") --- Luasnip completion
|
|
||||||
use("lukas-reineke/cmp-rg") --- Ripgrep completion
|
|
||||||
use("rafamadriz/friendly-snippets") -- Lots of pre-generated snippets
|
|
||||||
|
|
||||||
-- Completion engine
|
|
||||||
use({
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
requires = { "L3MON4D3/LuaSnip" },
|
|
||||||
config = function()
|
|
||||||
local cmp = require("cmp")
|
|
||||||
|
|
||||||
local kind_icons = {
|
|
||||||
Text = "",
|
|
||||||
Method = "m",
|
|
||||||
Function = "",
|
|
||||||
Constructor = "",
|
|
||||||
Field = "",
|
|
||||||
Variable = "",
|
|
||||||
Class = "",
|
|
||||||
Interface = "",
|
|
||||||
Module = "",
|
|
||||||
Property = "",
|
|
||||||
Unit = "",
|
|
||||||
Value = "",
|
|
||||||
Enum = "",
|
|
||||||
Keyword = "",
|
|
||||||
Snippet = "",
|
|
||||||
Color = "",
|
|
||||||
File = "",
|
|
||||||
Reference = "",
|
|
||||||
Folder = "",
|
|
||||||
EnumMember = "",
|
|
||||||
Constant = "",
|
|
||||||
Struct = "",
|
|
||||||
Event = "",
|
|
||||||
Operator = "",
|
|
||||||
TypeParameter = "",
|
|
||||||
}
|
|
||||||
|
|
||||||
cmp.setup({
|
|
||||||
|
|
||||||
-- Only enable on non-prompt buffers
|
|
||||||
-- So don't use in telescope
|
|
||||||
enabled = function()
|
|
||||||
if vim.bo.buftype == "prompt" then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
return true
|
|
||||||
end,
|
|
||||||
|
|
||||||
-- Setup snippet completion
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
require("luasnip").lsp_expand(args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Setup completion keybinds
|
|
||||||
mapping = {
|
|
||||||
["<C-n>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }),
|
|
||||||
["<C-p>"] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "c" }),
|
|
||||||
["<C-d>"] = cmp.mapping(cmp.mapping.scroll_docs(-4), { "i", "c" }),
|
|
||||||
["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(4), { "i", "c" }),
|
|
||||||
["<C-e>"] = cmp.mapping(cmp.mapping.abort(), { "i", "c" }),
|
|
||||||
["<Esc>"] = function(_)
|
|
||||||
cmp.mapping({
|
|
||||||
i = cmp.mapping.abort(),
|
|
||||||
c = cmp.mapping.close(),
|
|
||||||
})
|
|
||||||
vim.cmd("stopinsert") --- Abort and leave insert mode
|
|
||||||
end,
|
|
||||||
["<CR>"] = cmp.mapping.confirm({
|
|
||||||
behavior = cmp.ConfirmBehavior.Insert,
|
|
||||||
select = true,
|
|
||||||
}),
|
|
||||||
["<C-r>"] = cmp.mapping.confirm({
|
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
|
||||||
select = true,
|
|
||||||
}),
|
|
||||||
["<C-l>"] = cmp.mapping(function(_)
|
|
||||||
if require("luasnip").expand_or_jumpable() then
|
|
||||||
require("luasnip").expand_or_jump()
|
|
||||||
end
|
|
||||||
end, { "i", "s" }),
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Setup completion engines
|
|
||||||
sources = {
|
|
||||||
{ name = "nvim_lua" },
|
|
||||||
{ name = "nvim_lsp" },
|
|
||||||
{ name = "luasnip" },
|
|
||||||
{ name = "path" },
|
|
||||||
{ name = "buffer", keyword_length = 3, max_item_count = 10 },
|
|
||||||
{
|
|
||||||
name = "rg",
|
|
||||||
keyword_length = 6,
|
|
||||||
max_item_count = 10,
|
|
||||||
option = { additional_arguments = "--ignore-case" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Visual presentation
|
|
||||||
formatting = {
|
|
||||||
fields = { "kind", "abbr", "menu" },
|
|
||||||
format = function(entry, vim_item)
|
|
||||||
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
|
|
||||||
vim_item.menu = ({
|
|
||||||
luasnip = "[Snippet]",
|
|
||||||
buffer = "[Buffer]",
|
|
||||||
path = "[Path]",
|
|
||||||
rg = "[Grep]",
|
|
||||||
nvim_lsp = "[LSP]",
|
|
||||||
nvim_lua = "[Lua]",
|
|
||||||
})[entry.source.name]
|
|
||||||
return vim_item
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Docs
|
|
||||||
-- window = {
|
|
||||||
-- completion = cmp.config.window.bordered(),
|
|
||||||
-- documentation = cmp.config.window.bordered(),
|
|
||||||
-- },
|
|
||||||
|
|
||||||
-- Extra features
|
|
||||||
experimental = {
|
|
||||||
native_menu = false, --- Use cmp menu instead of Vim menu
|
|
||||||
ghost_text = true, --- Show preview auto-completion
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Use buffer source for `/`
|
|
||||||
cmp.setup.cmdline("/", {
|
|
||||||
sources = {
|
|
||||||
{ name = "buffer", keyword_length = 5 },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Use cmdline & path source for ':'
|
|
||||||
cmp.setup.cmdline(":", {
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "path" },
|
|
||||||
}, {
|
|
||||||
{ name = "cmdline" },
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@ -1,153 +0,0 @@
|
|||||||
-- =======================================================================
|
|
||||||
-- Language Server
|
|
||||||
-- =======================================================================
|
|
||||||
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
-- Language server engine
|
|
||||||
use({
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
requires = { "hrsh7th/cmp-nvim-lsp" },
|
|
||||||
config = function()
|
|
||||||
local function on_path(program)
|
|
||||||
return vim.fn.executable(program) == 1
|
|
||||||
end
|
|
||||||
|
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
|
||||||
if on_path("lua-language-server") then
|
|
||||||
require("lspconfig").sumneko_lua.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
-- Turn off errors for vim global variable
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
diagnostics = {
|
|
||||||
globals = { "vim", "hs" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end
|
|
||||||
if on_path("rust-analyzer") then
|
|
||||||
require("lspconfig").rust_analyzer.setup({ capabilities = capabilities })
|
|
||||||
end
|
|
||||||
if on_path("tflint") then
|
|
||||||
require("lspconfig").tflint.setup({ capabilities = capabilities })
|
|
||||||
end
|
|
||||||
if on_path("terraform-ls") then
|
|
||||||
require("lspconfig").terraformls.setup({ capabilities = capabilities })
|
|
||||||
end
|
|
||||||
if on_path("pyright") then
|
|
||||||
require("lspconfig").pyright.setup({
|
|
||||||
on_attach = function()
|
|
||||||
-- set keymaps (requires 0.7.0)
|
|
||||||
-- vim.keymap.set("n", "", "", {buffer=0})
|
|
||||||
end,
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
if on_path("nil") then
|
|
||||||
require("lspconfig").nil_ls.setup({ capabilities = capabilities })
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition)
|
|
||||||
vim.keymap.set("n", "gT", vim.lsp.buf.type_definition)
|
|
||||||
vim.keymap.set("n", "gi", vim.lsp.buf.implementation)
|
|
||||||
vim.keymap.set("n", "gh", vim.lsp.buf.hover)
|
|
||||||
-- vim.keymap.set("n", "gr", telescope.lsp_references)
|
|
||||||
vim.keymap.set("n", "<Leader>R", vim.lsp.buf.rename)
|
|
||||||
vim.keymap.set("n", "]e", vim.diagnostic.goto_next)
|
|
||||||
vim.keymap.set("n", "[e", vim.diagnostic.goto_prev)
|
|
||||||
vim.keymap.set("n", "<Leader>de", vim.diagnostic.open_float)
|
|
||||||
vim.keymap.set("n", "<Leader>E", vim.lsp.buf.code_action)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Pretty highlights
|
|
||||||
use("folke/lsp-colors.nvim")
|
|
||||||
|
|
||||||
-- Linting
|
|
||||||
use({
|
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
|
||||||
branch = "main",
|
|
||||||
requires = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
local function on_path(program)
|
|
||||||
return vim.fn.executable(program) == 1
|
|
||||||
end
|
|
||||||
|
|
||||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
|
||||||
require("null-ls").setup({
|
|
||||||
sources = {
|
|
||||||
require("null-ls").builtins.formatting.stylua.with({
|
|
||||||
condition = function()
|
|
||||||
return on_path("stylua")
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
require("null-ls").builtins.formatting.black.with({
|
|
||||||
condition = function()
|
|
||||||
return on_path("black")
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
require("null-ls").builtins.diagnostics.flake8.with({
|
|
||||||
condition = function()
|
|
||||||
return on_path("flake8")
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
require("null-ls").builtins.formatting.fish_indent.with({
|
|
||||||
condition = function()
|
|
||||||
return on_path("fish_indent")
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
require("null-ls").builtins.formatting.nixfmt.with({
|
|
||||||
condition = function()
|
|
||||||
return on_path("nixfmt")
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
require("null-ls").builtins.formatting.rustfmt.with({
|
|
||||||
condition = function()
|
|
||||||
return on_path("rustfmt")
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
require("null-ls").builtins.diagnostics.shellcheck.with({
|
|
||||||
condition = function()
|
|
||||||
return on_path("shellcheck")
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
require("null-ls").builtins.formatting.shfmt.with({
|
|
||||||
extra_args = { "-i", "4", "-ci" },
|
|
||||||
condition = function()
|
|
||||||
return on_path("shfmt")
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
require("null-ls").builtins.formatting.terraform_fmt.with({
|
|
||||||
condition = function()
|
|
||||||
return on_path("terraform")
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
-- require("null-ls").builtins.diagnostics.luacheck,
|
|
||||||
-- require("null-ls").builtins.diagnostics.markdownlint,
|
|
||||||
-- require("null-ls").builtins.diagnostics.pylint,
|
|
||||||
},
|
|
||||||
-- Format on save
|
|
||||||
on_attach = function(client, bufnr)
|
|
||||||
if client.supports_method("textDocument/formatting") then
|
|
||||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
|
||||||
group = augroup,
|
|
||||||
buffer = bufnr,
|
|
||||||
callback = function()
|
|
||||||
vim.lsp.buf.format({ bufnr = bufnr })
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@ -1,67 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
-- Important tweaks
|
|
||||||
use("tpope/vim-surround") --- Manipulate parentheses
|
|
||||||
|
|
||||||
-- Convenience tweaks
|
|
||||||
use("tpope/vim-eunuch") --- File manipulation in Vim
|
|
||||||
use("tpope/vim-vinegar") --- Fixes netrw file explorer
|
|
||||||
use("tpope/vim-fugitive") --- Git commands and syntax
|
|
||||||
use("tpope/vim-repeat") --- Actually repeat using .
|
|
||||||
|
|
||||||
-- Use gc or gcc to add comments
|
|
||||||
use({
|
|
||||||
"numToStr/Comment.nvim",
|
|
||||||
config = function()
|
|
||||||
require("Comment").setup()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Alignment tool
|
|
||||||
use({
|
|
||||||
"godlygeek/tabular",
|
|
||||||
config = function()
|
|
||||||
vim.keymap.set("", "<Leader>ta", ":Tabularize /")
|
|
||||||
vim.keymap.set("", "<Leader>t#", ":Tabularize /#<CR>")
|
|
||||||
vim.keymap.set("", "<Leader>tl", ":Tabularize /---<CR>")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Markdown renderer / wiki notes
|
|
||||||
-- use("vimwiki/vimwiki")
|
|
||||||
use({
|
|
||||||
"jakewvincent/mkdnflow.nvim",
|
|
||||||
config = function()
|
|
||||||
require("mkdnflow").setup({
|
|
||||||
modules = {
|
|
||||||
bib = false,
|
|
||||||
conceal = true,
|
|
||||||
folds = false,
|
|
||||||
},
|
|
||||||
perspective = {
|
|
||||||
priority = "current",
|
|
||||||
fallback = "first",
|
|
||||||
nvim_wd_heel = false, -- Don't change working dir
|
|
||||||
},
|
|
||||||
links = {
|
|
||||||
style = "markdown",
|
|
||||||
conceal = true,
|
|
||||||
},
|
|
||||||
wrap = true,
|
|
||||||
to_do = {
|
|
||||||
symbols = { " ", "-", "x" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
pattern = "markdown",
|
|
||||||
callback = function()
|
|
||||||
vim.o.autowriteall = true -- Save in new buffer
|
|
||||||
vim.o.wrapmargin = 79 -- Wrap text automatically
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@ -1,13 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
-- Startup speed hacks
|
|
||||||
use({
|
|
||||||
"lewis6991/impatient.nvim",
|
|
||||||
config = function()
|
|
||||||
require("impatient")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@ -1,72 +0,0 @@
|
|||||||
-- =======================================================================
|
|
||||||
-- Syntax
|
|
||||||
-- =======================================================================
|
|
||||||
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
-- Syntax engine
|
|
||||||
use({
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
commit = "9ada5f70f98d51e9e3e76018e783b39fd1cd28f7",
|
|
||||||
run = ":TSUpdate",
|
|
||||||
config = function()
|
|
||||||
require("nvim-treesitter.configs").setup({
|
|
||||||
ensure_installed = {
|
|
||||||
"hcl",
|
|
||||||
"python",
|
|
||||||
"lua",
|
|
||||||
"nix",
|
|
||||||
"fish",
|
|
||||||
"toml",
|
|
||||||
"yaml",
|
|
||||||
"json",
|
|
||||||
},
|
|
||||||
auto_install = true,
|
|
||||||
highlight = { enable = true },
|
|
||||||
indent = { enable = true },
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Syntax-aware Textobjects
|
|
||||||
use({
|
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
|
||||||
requires = { "nvim-treesitter/nvim-treesitter" },
|
|
||||||
config = function()
|
|
||||||
require("nvim-treesitter.configs").setup({
|
|
||||||
textobjects = {
|
|
||||||
select = {
|
|
||||||
enable = true,
|
|
||||||
lookahead = true, -- Jump forward automatically
|
|
||||||
keymaps = {
|
|
||||||
["af"] = "@function.outer",
|
|
||||||
["if"] = "@function.inner",
|
|
||||||
["ac"] = "@class.outer",
|
|
||||||
["ic"] = "@class.inner",
|
|
||||||
["al"] = "@loop.outer",
|
|
||||||
["il"] = "@loop.inner",
|
|
||||||
["aa"] = "@call.outer",
|
|
||||||
["ia"] = "@call.inner",
|
|
||||||
["ar"] = "@parameter.outer",
|
|
||||||
["ir"] = "@parameter.inner",
|
|
||||||
["aC"] = "@comment.outer",
|
|
||||||
["iC"] = "@comment.outer",
|
|
||||||
["a/"] = "@comment.outer",
|
|
||||||
["i/"] = "@comment.outer",
|
|
||||||
["a;"] = "@statement.outer",
|
|
||||||
["i;"] = "@statement.outer",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Additional syntax sources
|
|
||||||
use("chr4/nginx.vim") --- Nginx syntax
|
|
||||||
use("towolf/vim-helm") --- Helm syntax
|
|
||||||
use("rodjek/vim-puppet") --- Puppet syntax
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@ -1,139 +0,0 @@
|
|||||||
-- =======================================================================
|
|
||||||
-- Fuzzy Launcher
|
|
||||||
-- =======================================================================
|
|
||||||
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
use({
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
branch = "master",
|
|
||||||
requires = { "nvim-lua/plenary.nvim" },
|
|
||||||
config = function()
|
|
||||||
-- Telescope: quit instantly with escape
|
|
||||||
local actions = require("telescope.actions")
|
|
||||||
require("telescope").setup({
|
|
||||||
defaults = {
|
|
||||||
mappings = {
|
|
||||||
i = {
|
|
||||||
["<esc>"] = actions.close,
|
|
||||||
["<C-h>"] = "which_key",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
pickers = {
|
|
||||||
find_files = { theme = "ivy" },
|
|
||||||
oldfiles = { theme = "ivy" },
|
|
||||||
buffers = { theme = "dropdown" },
|
|
||||||
},
|
|
||||||
extensions = {
|
|
||||||
fzy_native = {},
|
|
||||||
zoxide = {},
|
|
||||||
project = {
|
|
||||||
base_dirs = { "~/dev" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
local telescope = require("telescope.builtin")
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<Leader>k", telescope.keymaps)
|
|
||||||
vim.keymap.set("n", "<Leader>/", telescope.live_grep)
|
|
||||||
vim.keymap.set("n", "<Leader>ff", telescope.find_files)
|
|
||||||
vim.keymap.set("n", "<Leader>fp", telescope.git_files)
|
|
||||||
vim.keymap.set("n", "<Leader>fw", telescope.grep_string)
|
|
||||||
vim.keymap.set("n", "<Leader>b", telescope.buffers)
|
|
||||||
vim.keymap.set("n", "<Leader>hh", telescope.help_tags)
|
|
||||||
vim.keymap.set("n", "<Leader>fr", telescope.oldfiles)
|
|
||||||
vim.keymap.set("n", "<Leader>cc", telescope.commands)
|
|
||||||
vim.keymap.set("n", "<Leader>gc", telescope.git_commits)
|
|
||||||
vim.keymap.set("n", "<Leader>gf", telescope.git_bcommits)
|
|
||||||
vim.keymap.set("n", "<Leader>gb", telescope.git_branches)
|
|
||||||
vim.keymap.set("n", "<Leader>gs", telescope.git_status)
|
|
||||||
vim.keymap.set("n", "<Leader>s", telescope.current_buffer_fuzzy_find)
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<Leader>N", function()
|
|
||||||
local opts = {
|
|
||||||
prompt_title = "Search Notes",
|
|
||||||
cwd = "$NOTES_PATH",
|
|
||||||
}
|
|
||||||
telescope.live_grep(opts)
|
|
||||||
end)
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<Leader>fN", function()
|
|
||||||
local opts = {
|
|
||||||
prompt_title = "Find Notes",
|
|
||||||
cwd = "$NOTES_PATH",
|
|
||||||
}
|
|
||||||
telescope.find_files(opts)
|
|
||||||
end)
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<Leader>cr", function()
|
|
||||||
local opts = require("telescope.themes").get_ivy({
|
|
||||||
layout_config = {
|
|
||||||
bottom_pane = {
|
|
||||||
height = 15,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
telescope.command_history(opts)
|
|
||||||
end)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Faster sorting
|
|
||||||
use("nvim-telescope/telescope-fzy-native.nvim")
|
|
||||||
|
|
||||||
-- Jump around tmux sessions
|
|
||||||
-- use("camgraff/telescope-tmux.nvim")
|
|
||||||
|
|
||||||
-- Jump directories
|
|
||||||
use({
|
|
||||||
"jvgrootveld/telescope-zoxide",
|
|
||||||
requires = { "nvim-lua/popup.nvim", "nvim-telescope/telescope.nvim" },
|
|
||||||
config = function()
|
|
||||||
vim.keymap.set("n", "<Leader>fz", require("telescope").extensions.zoxide.list)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Jump projects
|
|
||||||
use({
|
|
||||||
"nvim-telescope/telescope-project.nvim",
|
|
||||||
requires = { "nvim-telescope/telescope.nvim" },
|
|
||||||
config = function()
|
|
||||||
require("telescope").load_extension("project")
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-p>", function()
|
|
||||||
local opts = require("telescope.themes").get_ivy({
|
|
||||||
layout_config = {
|
|
||||||
bottom_pane = {
|
|
||||||
height = 10,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
require("telescope").extensions.project.project(opts)
|
|
||||||
end)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- File browser
|
|
||||||
use({
|
|
||||||
"nvim-telescope/telescope-file-browser.nvim",
|
|
||||||
requires = { "nvim-telescope/telescope.nvim" },
|
|
||||||
config = function()
|
|
||||||
require("telescope").load_extension("file_browser")
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<Leader>fa", require("telescope").extensions.file_browser.file_browser)
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<Leader>fD", function()
|
|
||||||
local opts = {
|
|
||||||
prompt_title = "Find Downloads",
|
|
||||||
cwd = "~/downloads",
|
|
||||||
}
|
|
||||||
require("telescope").extensions.file_browser.file_browser(opts)
|
|
||||||
end)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@ -1,79 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
use({
|
|
||||||
"akinsho/toggleterm.nvim",
|
|
||||||
tag = "v2.1.0",
|
|
||||||
config = function()
|
|
||||||
require("toggleterm").setup({
|
|
||||||
open_mapping = [[<c-\>]],
|
|
||||||
hide_numbers = true,
|
|
||||||
direction = "float",
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.keymap.set("t", "<A-CR>", "<C-\\><C-n>") --- Exit terminal mode
|
|
||||||
|
|
||||||
-- Only set these keymaps for toggleterm
|
|
||||||
vim.api.nvim_create_autocmd("TermOpen", {
|
|
||||||
pattern = "term://*toggleterm#*",
|
|
||||||
callback = function()
|
|
||||||
-- vim.keymap.set("t", "<Esc>", "<C-\\><C-n>") --- Exit terminal mode
|
|
||||||
vim.keymap.set("t", "<C-h>", "<C-\\><C-n><C-w>h")
|
|
||||||
vim.keymap.set("t", "<C-j>", "<C-\\><C-n><C-w>j")
|
|
||||||
vim.keymap.set("t", "<C-k>", "<C-\\><C-n><C-w>k")
|
|
||||||
vim.keymap.set("t", "<C-l>", "<C-\\><C-n><C-w>l")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
local terminal = require("toggleterm.terminal").Terminal
|
|
||||||
|
|
||||||
local basicterminal = terminal:new()
|
|
||||||
function TERM_TOGGLE()
|
|
||||||
basicterminal:toggle()
|
|
||||||
end
|
|
||||||
|
|
||||||
local nixpkgs = terminal:new({ cmd = "nix repl '<nixpkgs>'" })
|
|
||||||
function NIXPKGS_TOGGLE()
|
|
||||||
nixpkgs:toggle()
|
|
||||||
end
|
|
||||||
|
|
||||||
local gitwatch = terminal:new({ cmd = "fish --interactive --init-command 'gh run watch'" })
|
|
||||||
function GITWATCH_TOGGLE()
|
|
||||||
gitwatch:toggle()
|
|
||||||
end
|
|
||||||
|
|
||||||
local k9s = terminal:new({ cmd = "k9s" })
|
|
||||||
function K9S_TOGGLE()
|
|
||||||
k9s:toggle()
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<Leader>t", TERM_TOGGLE)
|
|
||||||
vim.keymap.set("n", "<Leader>P", NIXPKGS_TOGGLE)
|
|
||||||
vim.keymap.set("n", "<Leader>gw", GITWATCH_TOGGLE)
|
|
||||||
vim.keymap.set("n", "<Leader>9", K9S_TOGGLE)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Connect to telescope
|
|
||||||
-- use({
|
|
||||||
-- "https://git.sr.ht/~havi/telescope-toggleterm.nvim",
|
|
||||||
-- event = "TermOpen",
|
|
||||||
-- requires = {
|
|
||||||
-- "akinsho/nvim-toggleterm.lua",
|
|
||||||
-- "nvim-telescope/telescope.nvim",
|
|
||||||
-- "nvim-lua/popup.nvim",
|
|
||||||
-- "nvim-lua/plenary.nvim",
|
|
||||||
-- },
|
|
||||||
-- config = function()
|
|
||||||
-- require("telescope").load_extension("toggleterm")
|
|
||||||
-- require("telescope-toggleterm").setup({
|
|
||||||
-- telescope_mappings = {
|
|
||||||
-- -- <ctrl-c> : kill the terminal buffer (default) .
|
|
||||||
-- ["<C-c>"] = require("telescope-toggleterm").actions.exit_terminal,
|
|
||||||
-- },
|
|
||||||
-- })
|
|
||||||
-- end,
|
|
||||||
-- })
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@ -1,164 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
-- Git next to line numbers
|
|
||||||
use({
|
|
||||||
"lewis6991/gitsigns.nvim",
|
|
||||||
branch = "main",
|
|
||||||
requires = { "nvim-lua/plenary.nvim" },
|
|
||||||
config = function()
|
|
||||||
local gitsigns = require("gitsigns")
|
|
||||||
gitsigns.setup()
|
|
||||||
vim.keymap.set("n", "<Leader>gB", gitsigns.blame_line)
|
|
||||||
vim.keymap.set("n", "<Leader>gp", gitsigns.preview_hunk)
|
|
||||||
vim.keymap.set("v", "<Leader>gp", gitsigns.preview_hunk)
|
|
||||||
vim.keymap.set("n", "<Leader>gd", gitsigns.diffthis)
|
|
||||||
vim.keymap.set("v", "<Leader>gd", gitsigns.diffthis)
|
|
||||||
vim.keymap.set("n", "<Leader>rgf", gitsigns.reset_buffer)
|
|
||||||
vim.keymap.set("v", "<Leader>hs", gitsigns.stage_hunk)
|
|
||||||
vim.keymap.set("v", "<Leader>hr", gitsigns.reset_hunk)
|
|
||||||
vim.keymap.set("v", "<Leader>hr", gitsigns.reset_hunk)
|
|
||||||
|
|
||||||
-- Navigation
|
|
||||||
vim.keymap.set("n", "]g", function()
|
|
||||||
if vim.wo.diff then
|
|
||||||
return "]g"
|
|
||||||
end
|
|
||||||
vim.schedule(function()
|
|
||||||
gitsigns.next_hunk()
|
|
||||||
end)
|
|
||||||
return "<Ignore>"
|
|
||||||
end, { expr = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "[g", function()
|
|
||||||
if vim.wo.diff then
|
|
||||||
return "[g"
|
|
||||||
end
|
|
||||||
vim.schedule(function()
|
|
||||||
gitsigns.prev_hunk()
|
|
||||||
end)
|
|
||||||
return "<Ignore>"
|
|
||||||
end, { expr = true })
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Status bar
|
|
||||||
use({
|
|
||||||
"hoob3rt/lualine.nvim",
|
|
||||||
requires = { "kyazdani42/nvim-web-devicons", opt = true },
|
|
||||||
config = function()
|
|
||||||
require("lualine").setup({
|
|
||||||
options = {
|
|
||||||
theme = "gruvbox",
|
|
||||||
icons_enabled = true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Buffer line ("tabs")
|
|
||||||
use({
|
|
||||||
"akinsho/bufferline.nvim",
|
|
||||||
tag = "v2.4.0",
|
|
||||||
requires = { "kyazdani42/nvim-web-devicons", "moll/vim-bbye" },
|
|
||||||
config = function()
|
|
||||||
require("bufferline").setup({
|
|
||||||
options = {
|
|
||||||
diagnostics = "nvim_lsp",
|
|
||||||
always_show_bufferline = false,
|
|
||||||
separator_style = "slant",
|
|
||||||
offsets = { { filetype = "NvimTree" } },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
-- Move buffers
|
|
||||||
vim.keymap.set("n", "L", ":BufferLineCycleNext<CR>", { silent = true })
|
|
||||||
vim.keymap.set("n", "H", ":BufferLineCyclePrev<CR>", { silent = true })
|
|
||||||
|
|
||||||
-- Kill buffer
|
|
||||||
vim.keymap.set("n", "<Leader>x", " :Bdelete<CR>", { silent = true })
|
|
||||||
|
|
||||||
-- Shift buffers
|
|
||||||
-- vim.keymap.set("n", "<C-L>", ":BufferLineMoveNext<CR>")
|
|
||||||
-- vim.keymap.set("i", "<C-L>", "<Esc>:BufferLineMoveNext<CR>i")
|
|
||||||
-- vim.keymap.set("n", "<C-H>", ":BufferLineMovePrev<CR>")
|
|
||||||
-- vim.keymap.set("i", "<C-H>", "<Esc>:BufferLineMovePrev<CR>i")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- File explorer
|
|
||||||
use({
|
|
||||||
"kyazdani42/nvim-tree.lua",
|
|
||||||
requires = { "kyazdani42/nvim-web-devicons" },
|
|
||||||
config = function()
|
|
||||||
require("nvim-tree").setup({
|
|
||||||
disable_netrw = true,
|
|
||||||
hijack_netrw = true,
|
|
||||||
update_focused_file = {
|
|
||||||
enable = true,
|
|
||||||
update_cwd = true,
|
|
||||||
ignore_list = {},
|
|
||||||
},
|
|
||||||
diagnostics = {
|
|
||||||
enable = true,
|
|
||||||
icons = {
|
|
||||||
hint = "",
|
|
||||||
info = "",
|
|
||||||
warning = "",
|
|
||||||
error = "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
renderer = {
|
|
||||||
icons = {
|
|
||||||
glyphs = {
|
|
||||||
git = {
|
|
||||||
unstaged = "~",
|
|
||||||
staged = "+",
|
|
||||||
unmerged = "",
|
|
||||||
renamed = "➜",
|
|
||||||
deleted = "",
|
|
||||||
untracked = "?",
|
|
||||||
ignored = "◌",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
view = {
|
|
||||||
width = 30,
|
|
||||||
hide_root_folder = false,
|
|
||||||
side = "left",
|
|
||||||
mappings = {
|
|
||||||
custom_only = false,
|
|
||||||
list = {
|
|
||||||
{
|
|
||||||
key = { "l", "<CR>", "o" },
|
|
||||||
cb = require("nvim-tree.config").nvim_tree_callback("edit"),
|
|
||||||
},
|
|
||||||
{ key = "h", cb = require("nvim-tree.config").nvim_tree_callback("close_node") },
|
|
||||||
{ key = "v", cb = require("nvim-tree.config").nvim_tree_callback("vsplit") },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
number = false,
|
|
||||||
relativenumber = false,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<Leader>e", ":NvimTreeFindFileToggle<CR>", { silent = true })
|
|
||||||
|
|
||||||
-- https://github.com/kyazdani42/nvim-tree.lua/commit/fb8735e96cecf004fbefb086ce85371d003c5129
|
|
||||||
vim.g.loaded = 1
|
|
||||||
vim.g.loaded_netrwPlugin = 1
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Markdown pretty view
|
|
||||||
use("ellisonleao/glow.nvim")
|
|
||||||
|
|
||||||
-- Hex color previews
|
|
||||||
use({
|
|
||||||
"norcalli/nvim-colorizer.lua",
|
|
||||||
config = function()
|
|
||||||
require("colorizer").setup()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@ -1,34 +0,0 @@
|
|||||||
-- Bootstrap the Packer plugin manager
|
|
||||||
local fn = vim.fn
|
|
||||||
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
|
||||||
if fn.empty(fn.glob(install_path)) > 0 then
|
|
||||||
PACKER_BOOTSTRAP = fn.system({
|
|
||||||
"git",
|
|
||||||
"clone",
|
|
||||||
"--depth",
|
|
||||||
"1",
|
|
||||||
"https://github.com/wbthomason/packer.nvim",
|
|
||||||
install_path,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
require("packer").startup(function(use)
|
|
||||||
-- Maintain plugin manager
|
|
||||||
use("wbthomason/packer.nvim")
|
|
||||||
|
|
||||||
-- Include other files initialized by packer
|
|
||||||
require("packer.speed").packer(use)
|
|
||||||
require("packer.misc").packer(use)
|
|
||||||
require("packer.colors").packer(use)
|
|
||||||
require("packer.visuals").packer(use)
|
|
||||||
require("packer.lsp").packer(use)
|
|
||||||
require("packer.completion").packer(use)
|
|
||||||
require("packer.syntax").packer(use)
|
|
||||||
require("packer.telescope").packer(use)
|
|
||||||
require("packer.toggleterm").packer(use)
|
|
||||||
|
|
||||||
-- Auto-install after bootstrapping
|
|
||||||
if PACKER_BOOTSTRAP then
|
|
||||||
require("packer").sync()
|
|
||||||
end
|
|
||||||
end)
|
|
@ -4,8 +4,9 @@
|
|||||||
|
|
||||||
vim.filetype.add({
|
vim.filetype.add({
|
||||||
pattern = {
|
pattern = {
|
||||||
[".*%.tfvars"] = "hcl",
|
[".*%.tfvars"] = "terraform",
|
||||||
[".*%.tf"] = "hcl",
|
[".*%.tf"] = "terraform",
|
||||||
|
[".*%.rasi"] = "rasi",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -26,12 +26,17 @@
|
|||||||
# ] ++ extraConfig;
|
# ] ++ extraConfig;
|
||||||
# }
|
# }
|
||||||
|
|
||||||
{ pkgs, colors ? { }, ... }:
|
{ pkgs, colors, terraform ? false, github ? false, kubernetes ? false, ... }:
|
||||||
|
|
||||||
|
# Comes from nix2vim overlay:
|
||||||
|
# https://github.com/gytis-ivaskevicius/nix2vim/blob/master/lib/neovim-builder.nix
|
||||||
pkgs.neovimBuilder {
|
pkgs.neovimBuilder {
|
||||||
package = pkgs.neovim-unwrapped;
|
package = pkgs.neovim-unwrapped;
|
||||||
|
inherit colors terraform github kubernetes;
|
||||||
imports = [
|
imports = [
|
||||||
|
../config/align.nix
|
||||||
../config/bufferline.nix
|
../config/bufferline.nix
|
||||||
|
../config/colors.nix
|
||||||
../config/completion.nix
|
../config/completion.nix
|
||||||
../config/gitsigns.nix
|
../config/gitsigns.nix
|
||||||
../config/lsp.nix
|
../config/lsp.nix
|
||||||
@ -41,6 +46,5 @@ pkgs.neovimBuilder {
|
|||||||
../config/telescope.nix
|
../config/telescope.nix
|
||||||
../config/toggleterm.nix
|
../config/toggleterm.nix
|
||||||
../config/tree.nix
|
../config/tree.nix
|
||||||
colors
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
expression: (apply_expression
|
||||||
|
function: (apply_expression
|
||||||
|
function: (select_expression
|
||||||
|
attrpath: (attrpath) @writeshell (#match? @writeshell "^writeShell.*$")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(indented_string_expression) @bash
|
||||||
|
)
|
1
modules/common/programming/c.nix
Normal file
1
modules/common/programming/c.nix
Normal file
@ -0,0 +1 @@
|
|||||||
|
{ lib, ... }: { options.c.enable = lib.mkEnableOption "C language tools."; }
|
@ -6,6 +6,7 @@
|
|||||||
./lua.nix
|
./lua.nix
|
||||||
./nix.nix
|
./nix.nix
|
||||||
./python.nix
|
./python.nix
|
||||||
|
./rust.nix
|
||||||
./terraform.nix
|
./terraform.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -24,113 +24,125 @@
|
|||||||
# Terminal Kubernetes UI
|
# Terminal Kubernetes UI
|
||||||
programs.k9s = {
|
programs.k9s = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# settings = { k9s = { headless = true; }; };
|
settings = {
|
||||||
skin = {
|
|
||||||
k9s = {
|
k9s = {
|
||||||
body = {
|
ui = {
|
||||||
fgColor = config.theme.colors.base06;
|
enableMouse = true;
|
||||||
bgColor = config.theme.colors.base00;
|
headless = true;
|
||||||
logoColor = config.theme.colors.base02; # *blue ?
|
logoless = true;
|
||||||
|
crumbsless = false;
|
||||||
|
skin = "main";
|
||||||
};
|
};
|
||||||
# Search bar
|
};
|
||||||
prompt = {
|
};
|
||||||
fgColor = config.theme.colors.base06;
|
skins = {
|
||||||
bgColor = config.theme.colors.base00;
|
main = {
|
||||||
suggestColor = config.theme.colors.base03;
|
k9s = {
|
||||||
};
|
body = {
|
||||||
# Header left side
|
|
||||||
info = {
|
|
||||||
fgColor = config.theme.colors.base04;
|
|
||||||
sectionColor = config.theme.colors.base05;
|
|
||||||
};
|
|
||||||
dialog = {
|
|
||||||
fgColor = config.theme.colors.base06;
|
|
||||||
bgColor = config.theme.colors.base00;
|
|
||||||
buttonFgColor = config.theme.colors.base06;
|
|
||||||
buttonBgColor = config.theme.colors.base0E;
|
|
||||||
buttonFocusFgColor = config.theme.colors.base07;
|
|
||||||
buttonFocusBgColor = config.theme.colors.base02; # *cyan
|
|
||||||
labelFgColor = config.theme.colors.base09;
|
|
||||||
fieldFgColor = config.theme.colors.base06;
|
|
||||||
};
|
|
||||||
frame = {
|
|
||||||
border = {
|
|
||||||
fgColor = config.theme.colors.base01;
|
|
||||||
focusColor = config.theme.colors.base06;
|
|
||||||
};
|
|
||||||
menu = {
|
|
||||||
fgColor = config.theme.colors.base06;
|
fgColor = config.theme.colors.base06;
|
||||||
keyColor = config.theme.colors.base0E; # *magenta
|
bgColor = "default";
|
||||||
numKeyColor = config.theme.colors.base0E; # *magenta
|
logoColor = config.theme.colors.base02; # *blue ?
|
||||||
};
|
};
|
||||||
crumbs = {
|
# Search bar
|
||||||
|
prompt = {
|
||||||
fgColor = config.theme.colors.base06;
|
fgColor = config.theme.colors.base06;
|
||||||
bgColor = config.theme.colors.base01;
|
bgColor = "default";
|
||||||
activeColor = config.theme.colors.base03;
|
suggestColor = config.theme.colors.base03;
|
||||||
};
|
};
|
||||||
status = {
|
# Header left side
|
||||||
newColor = config.theme.colors.base04; # *cyan
|
info = {
|
||||||
modifyColor = config.theme.colors.base0D; # *blue
|
fgColor = config.theme.colors.base04;
|
||||||
addColor = config.theme.colors.base0B; # *green
|
sectionColor = config.theme.colors.base05;
|
||||||
errorColor = config.theme.colors.base08; # *red
|
|
||||||
highlightColor = config.theme.colors.base09; # *orange
|
|
||||||
killColor = config.theme.colors.base03; # *comment
|
|
||||||
completedColor = config.theme.colors.base03; # *comment
|
|
||||||
};
|
};
|
||||||
title = {
|
dialog = {
|
||||||
fgColor = config.theme.colors.base06;
|
fgColor = config.theme.colors.base06;
|
||||||
bgColor = config.theme.colors.base00;
|
bgColor = "default";
|
||||||
highlightColor = config.theme.colors.base09; # *orange
|
buttonFgColor = config.theme.colors.base06;
|
||||||
counterColor = config.theme.colors.base0D; # *blue
|
buttonBgColor = config.theme.colors.base0E;
|
||||||
filterColor = config.theme.colors.base0E; # *magenta
|
buttonFocusFgColor = config.theme.colors.base07;
|
||||||
|
buttonFocusBgColor = config.theme.colors.base02; # *cyan
|
||||||
|
labelFgColor = config.theme.colors.base09;
|
||||||
|
fieldFgColor = config.theme.colors.base06;
|
||||||
};
|
};
|
||||||
};
|
frame = {
|
||||||
views = {
|
border = {
|
||||||
charts = {
|
fgColor = config.theme.colors.base01;
|
||||||
bgColor = config.theme.colors.base00;
|
focusColor = config.theme.colors.base06;
|
||||||
defaultDialColors =
|
};
|
||||||
[ config.theme.colors.base0D config.theme.colors.base08 ];
|
menu = {
|
||||||
# - *blue
|
fgColor = config.theme.colors.base06;
|
||||||
# - *red
|
keyColor = config.theme.colors.base0E; # *magenta
|
||||||
defaultChartColors =
|
numKeyColor = config.theme.colors.base0E; # *magenta
|
||||||
[ config.theme.colors.base0D config.theme.colors.base08 ];
|
};
|
||||||
# - *blue
|
crumbs = {
|
||||||
# - *red
|
fgColor = config.theme.colors.base06;
|
||||||
};
|
bgColor = config.theme.colors.base01;
|
||||||
table = {
|
activeColor = config.theme.colors.base03;
|
||||||
# List of resources
|
};
|
||||||
fgColor = config.theme.colors.base06;
|
status = {
|
||||||
bgColor = config.theme.colors.base00;
|
newColor = config.theme.colors.base04; # *cyan
|
||||||
|
modifyColor = config.theme.colors.base0D; # *blue
|
||||||
# Row selection
|
addColor = config.theme.colors.base0B; # *green
|
||||||
cursorFgColor = config.theme.colors.base07;
|
errorColor = config.theme.colors.base08; # *red
|
||||||
cursorBgColor = config.theme.colors.base01;
|
highlightColor = config.theme.colors.base09; # *orange
|
||||||
|
killColor = config.theme.colors.base03; # *comment
|
||||||
# Header row
|
completedColor = config.theme.colors.base03; # *comment
|
||||||
header = {
|
};
|
||||||
fgColor = config.theme.colors.base0D;
|
title = {
|
||||||
bgColor = config.theme.colors.base00;
|
fgColor = config.theme.colors.base06;
|
||||||
sorterColor = config.theme.colors.base0A; # *selection
|
bgColor = "default";
|
||||||
|
highlightColor = config.theme.colors.base09; # *orange
|
||||||
|
counterColor = config.theme.colors.base0D; # *blue
|
||||||
|
filterColor = config.theme.colors.base0E; # *magenta
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
xray = {
|
views = {
|
||||||
fgColor = config.theme.colors.base06;
|
charts = {
|
||||||
bgColor = config.theme.colors.base00;
|
bgColor = "default";
|
||||||
cursorColor = config.theme.colors.base06;
|
defaultDialColors =
|
||||||
graphicColor = config.theme.colors.base0D;
|
[ config.theme.colors.base0D config.theme.colors.base08 ];
|
||||||
showIcons = false;
|
# - *blue
|
||||||
};
|
# - *red
|
||||||
yaml = {
|
defaultChartColors =
|
||||||
keyColor = config.theme.colors.base0D;
|
[ config.theme.colors.base0D config.theme.colors.base08 ];
|
||||||
colonColor = config.theme.colors.base04;
|
# - *blue
|
||||||
fgColor = config.theme.colors.base03;
|
# - *red
|
||||||
};
|
};
|
||||||
logs = {
|
table = {
|
||||||
fgColor = config.theme.colors.base06;
|
# List of resources
|
||||||
bgColor = config.theme.colors.base00;
|
|
||||||
indicator = {
|
|
||||||
fgColor = config.theme.colors.base06;
|
fgColor = config.theme.colors.base06;
|
||||||
bgColor = config.theme.colors.base00;
|
bgColor = "default";
|
||||||
|
|
||||||
|
# Row selection
|
||||||
|
cursorFgColor = config.theme.colors.base07;
|
||||||
|
cursorBgColor = config.theme.colors.base01;
|
||||||
|
|
||||||
|
# Header row
|
||||||
|
header = {
|
||||||
|
fgColor = config.theme.colors.base0D;
|
||||||
|
bgColor = "default";
|
||||||
|
sorterColor = config.theme.colors.base0A; # *selection
|
||||||
|
};
|
||||||
|
};
|
||||||
|
xray = {
|
||||||
|
fgColor = config.theme.colors.base06;
|
||||||
|
bgColor = "default";
|
||||||
|
cursorColor = config.theme.colors.base06;
|
||||||
|
graphicColor = config.theme.colors.base0D;
|
||||||
|
showIcons = false;
|
||||||
|
};
|
||||||
|
yaml = {
|
||||||
|
keyColor = config.theme.colors.base0D;
|
||||||
|
colonColor = config.theme.colors.base04;
|
||||||
|
fgColor = config.theme.colors.base03;
|
||||||
|
};
|
||||||
|
logs = {
|
||||||
|
fgColor = config.theme.colors.base06;
|
||||||
|
bgColor = "default";
|
||||||
|
indicator = {
|
||||||
|
fgColor = config.theme.colors.base06;
|
||||||
|
bgColor = "default";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
17
modules/common/programming/rust.nix
Normal file
17
modules/common/programming/rust.nix
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options.rust.enable = lib.mkEnableOption "Rust programming language.";
|
||||||
|
|
||||||
|
config = lib.mkIf config.rust.enable {
|
||||||
|
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
|
programs.fish.shellAbbrs = { ca = "cargo"; };
|
||||||
|
|
||||||
|
home.packages = with pkgs; [ cargo rustc clippy gcc ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -3,6 +3,7 @@
|
|||||||
options.terraform.enable = lib.mkEnableOption "Terraform tools.";
|
options.terraform.enable = lib.mkEnableOption "Terraform tools.";
|
||||||
|
|
||||||
config = lib.mkIf config.terraform.enable {
|
config = lib.mkIf config.terraform.enable {
|
||||||
|
unfreePackages = [ "terraform" ];
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
programs.fish.shellAbbrs = {
|
programs.fish.shellAbbrs = {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
# Allows me to make sure I can work on my dotfiles locally
|
||||||
|
|
||||||
options.dotfiles.enable = lib.mkEnableOption "Clone dotfiles.";
|
options.dotfiles.enable = lib.mkEnableOption "Clone dotfiles.";
|
||||||
|
|
||||||
config = lib.mkIf config.dotfiles.enable {
|
config = lib.mkIf config.dotfiles.enable {
|
||||||
@ -14,13 +16,8 @@
|
|||||||
[ "writeBoundary" ] ''
|
[ "writeBoundary" ] ''
|
||||||
if [ ! -d "${config.dotfilesPath}" ]; then
|
if [ ! -d "${config.dotfilesPath}" ]; then
|
||||||
$DRY_RUN_CMD mkdir --parents $VERBOSE_ARG $(dirname "${config.dotfilesPath}")
|
$DRY_RUN_CMD mkdir --parents $VERBOSE_ARG $(dirname "${config.dotfilesPath}")
|
||||||
|
$DRY_RUN_CMD ${pkgs.git}/bin/git \
|
||||||
# Force HTTPS because anonymous SSH doesn't work
|
clone ${config.dotfilesRepo} "${config.dotfilesPath}"
|
||||||
GIT_CONFIG_COUNT=1 \
|
|
||||||
GIT_CONFIG_KEY_0="url.https://github.com/.insteadOf" \
|
|
||||||
GIT_CONFIG_VALUE_0="git@github.com:" \
|
|
||||||
$DRY_RUN_CMD \
|
|
||||||
${pkgs.git}/bin/git clone ${config.dotfilesRepo} "${config.dotfilesPath}"
|
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user