mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-06 20:10:14 +00:00
Compare commits
113 Commits
keyd-2.4.3
...
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 |
17
.github/workflows/update.yml
vendored
17
.github/workflows/update.yml
vendored
@ -8,6 +8,7 @@ on:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
checks: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lockfile:
|
lockfile:
|
||||||
@ -30,8 +31,24 @@ jobs:
|
|||||||
pr-labels: | # Labels to be set on the PR
|
pr-labels: | # Labels to be set on the PR
|
||||||
dependencies
|
dependencies
|
||||||
automated
|
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
|
- name: Check the Flake
|
||||||
|
id: check
|
||||||
run: nix flake 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
|
- name: Enable Pull Request Automerge
|
||||||
if: success()
|
if: success()
|
||||||
run: |
|
run: |
|
||||||
|
24
README.md
24
README.md
@ -41,6 +41,30 @@ configuration may be difficult to translate to a non-Nix system.
|
|||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| Keybinds | [Hammerspoon](https://www.hammerspoon.org/) | [Link](./modules/darwin/hammerspoon) |
|
| 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
|
# Installation
|
||||||
|
@ -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"
|
||||||
'');
|
'');
|
||||||
|
@ -49,19 +49,24 @@ move the `windows/alacritty.yml` file to
|
|||||||
To get started on a bare macOS installation, first install Nix:
|
To get started on a bare macOS installation, first install Nix:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sh -c "$(curl -L https://nixos.org/nix/install)"
|
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
|
||||||
```
|
```
|
||||||
|
|
||||||
Then use Nix to build nix-darwin:
|
Launch a new shell. Then use Nix to switch to the macOS configuration:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
|
sudo rm /etc/bashrc
|
||||||
./result/bin/darwin-installer
|
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
|
||||||
```
|
```
|
||||||
|
|
||||||
Then switch to the macOS configuration:
|
Once installed, you can continue to update the macOS configuration:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
darwin-rebuild switch --flake github:nmasur/dotfiles#lookingglass
|
darwin-rebuild switch --flake ~/dev/personal/dotfiles
|
||||||
```
|
```
|
||||||
|
|
||||||
|
441
flake.lock
generated
441
flake.lock
generated
@ -17,31 +17,14 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"age": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1672087018,
|
|
||||||
"narHash": "sha256-LRxxJQLQkzoCNYGS/XBixVmYXoZ1mPHKvFicPGXYLcw=",
|
|
||||||
"owner": "FiloSottile",
|
|
||||||
"repo": "age",
|
|
||||||
"rev": "c6dcfa1efcaa27879762a934d5bea0d1b83a894c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "FiloSottile",
|
|
||||||
"ref": "v1.1.1",
|
|
||||||
"repo": "age",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"baleia-nvim-src": {
|
"baleia-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681806450,
|
"lastModified": 1704551058,
|
||||||
"narHash": "sha256-jxRlIzWbnSj89032msc5w+2TVt7zVyzlxdXxiH1dQqY=",
|
"narHash": "sha256-0NmiGzMFvL1awYOVtiaSd+O4sAR524x68xwWLgArlqs=",
|
||||||
"owner": "m00qek",
|
"owner": "m00qek",
|
||||||
"repo": "baleia.nvim",
|
"repo": "baleia.nvim",
|
||||||
"rev": "00bb4af31c8c3865b735d40ebefa6c3f07b2dd16",
|
"rev": "6d9cbdaca3a428bc7296f838fdfce3ad01ee7495",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -53,28 +36,44 @@
|
|||||||
"bufferline-nvim-src": {
|
"bufferline-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687763763,
|
"lastModified": 1706180994,
|
||||||
"narHash": "sha256-wbOeylzjjScQXkrDbBU2HtrOZrp2YUK+wQ2aOkgxmRQ=",
|
"narHash": "sha256-/iGzUDJaodkUyWpwim8UtwaRuarfu/Nk6wxVApk+QxY=",
|
||||||
"owner": "akinsho",
|
"owner": "akinsho",
|
||||||
"repo": "bufferline.nvim",
|
"repo": "bufferline.nvim",
|
||||||
"rev": "bf2f6b7edd0abf6b0732f5e5c0a8f30e51611c75",
|
"rev": "d6cb9b7cac52887bcac65f8698e67479553c0748",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "akinsho",
|
"owner": "akinsho",
|
||||||
"ref": "v4.2.0",
|
"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": 1687494203,
|
"lastModified": 1702205473,
|
||||||
"narHash": "sha256-mU0soCz79erJXMMqD/FyrJZ0mu2n6fE0deymPzQlxts=",
|
"narHash": "sha256-/0sh9vJBD9pUuD7q3tNSQ1YLvxFMNykdg5eG+LjZAA8=",
|
||||||
"owner": "hrsh7th",
|
"owner": "hrsh7th",
|
||||||
"repo": "cmp-nvim-lsp",
|
"repo": "cmp-nvim-lsp",
|
||||||
"rev": "44b16d11215dce86f253ce0c30949813c0a90765",
|
"rev": "5af77f54de1b16c34b23cba810150689a3a90312",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -90,11 +89,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696043447,
|
"lastModified": 1706833576,
|
||||||
"narHash": "sha256-VbJ1dY5pVH2fX1bS+cT2+4+BYEk4lMHRP0+udu9G6tk=",
|
"narHash": "sha256-w7BL0EWRts+nD1lbLECIuz6fRzmmV+z8oWwoY7womR0=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "792c2e01347cb1b2e7ec84a1ef73453ca86537d8",
|
"rev": "bdbae6ecff8fcc322bf6b9053c0b984912378af7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -111,11 +110,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1695864092,
|
"lastModified": 1706491084,
|
||||||
"narHash": "sha256-Hu1SkFPqO7ND95AOzBkZE2jGXSYhfZ965C03O72Kbu8=",
|
"narHash": "sha256-eaEv+orTmr2arXpoE4aFZQMVPOYXCBEbLgK22kOtkhs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "19b62324663b6b9859caf7f335d232cf4f1f6a32",
|
"rev": "f67ba6552845ea5d7f596a24d57c33a8a9dc8de9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -124,6 +123,23 @@
|
|||||||
"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": [
|
||||||
@ -131,11 +147,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696034364,
|
"lastModified": 1707007453,
|
||||||
"narHash": "sha256-7giewUYqKhhfhKRxe2EPHCpSM0oMLuByW4RTRZl6Jfc=",
|
"narHash": "sha256-vs7uACn2/8GOApZJv52gAVsLfpjQWFgkHN2QJ7aVkl8=",
|
||||||
"owner": "bandithedoge",
|
"owner": "bandithedoge",
|
||||||
"repo": "nixpkgs-firefox-darwin",
|
"repo": "nixpkgs-firefox-darwin",
|
||||||
"rev": "b1e4d451a15c34d45bfefb05137a20469399a2df",
|
"rev": "d839feb516758ad28bc1cef43008d55e749c1d6a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -147,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": {
|
||||||
@ -165,11 +181,11 @@
|
|||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687709756,
|
"lastModified": 1705309234,
|
||||||
"narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
|
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
|
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -183,29 +199,11 @@
|
|||||||
"systems": "systems_2"
|
"systems": "systems_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685518550,
|
"lastModified": 1705309234,
|
||||||
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-utils_3": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems_3"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1694529238,
|
|
||||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -217,11 +215,11 @@
|
|||||||
"hmts-nvim-src": {
|
"hmts-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1693226725,
|
"lastModified": 1706900289,
|
||||||
"narHash": "sha256-jUuztOqNBltC3axa7s3CPJz9Cmukfwkf846+Z/gAxCU=",
|
"narHash": "sha256-kw3YJ21nhs/x9Jp7kvnL+9FuiSgLB1hO/ON3QeeZx9g=",
|
||||||
"owner": "calops",
|
"owner": "calops",
|
||||||
"repo": "hmts.nvim",
|
"repo": "hmts.nvim",
|
||||||
"rev": "14fd941d7ec2bb98314a1aacaa2573d97f1629ab",
|
"rev": "ba1239972a1f56b94252d4f85a43e777ac419662",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -237,11 +235,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696063111,
|
"lastModified": 1706985585,
|
||||||
"narHash": "sha256-F2IJEbyH3xG0eqyAYn9JoV+niqNz+xb4HICYNkkviNI=",
|
"narHash": "sha256-ptshv4qXiC6V0GCfpABz88UGGPNwqs5tAxaRUKbk1Qo=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "ae896c810f501bf0c3a2fd7fc2de094dd0addf01",
|
"rev": "1ca210648a6ca9b957efde5da957f3de6b1f0c45",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -251,78 +249,87 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"kitty-scrollback-nvim-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1706891759,
|
||||||
|
"narHash": "sha256-p7RPqLHO6D5CCTDQzUrEqTu9+jg+V7wtYfGbY4qjE9A=",
|
||||||
|
"owner": "mikesmithgh",
|
||||||
|
"repo": "kitty-scrollback.nvim",
|
||||||
|
"rev": "12f7687ac049d46a987c39b2b4f657fdf540fa4e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "mikesmithgh",
|
||||||
|
"repo": "kitty-scrollback.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nextcloud-cookbook": {
|
"nextcloud-cookbook": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"narHash": "sha256-XgBwUr26qW6wvqhrnhhhhcN4wkI+eXDHnNSm1HDbP6M=",
|
"lastModified": 1702545935,
|
||||||
|
"narHash": "sha256-19LN1nYJJ0RMWj6DrYPvHzocTyhMfYdpdhBFch3fpHE=",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/nextcloud/cookbook/releases/download/v0.10.2/Cookbook-0.10.2.tar.gz"
|
"url": "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.0/cookbook-0.11.0.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/nextcloud/cookbook/releases/download/v0.10.2/Cookbook-0.10.2.tar.gz"
|
"url": "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.0/cookbook-0.11.0.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nextcloud-external": {
|
"nextcloud-external": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"narHash": "sha256-X7eC8T8wSZGVwCQp6U/WxjMC7aIj39osgHotaUoRNSQ=",
|
"lastModified": 1699624334,
|
||||||
|
"narHash": "sha256-RCL2RP5twRDLxI/KfAX6QLYQOzqZmSWsfrC5ZQIwTD4=",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/nextcloud-releases/external/releases/download/v5.2.1/external-v5.2.1.tar.gz"
|
"url": "https://github.com/nextcloud-releases/external/releases/download/v5.3.1/external-v5.3.1.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/nextcloud-releases/external/releases/download/v5.2.1/external-v5.2.1.tar.gz"
|
"url": "https://github.com/nextcloud-releases/external/releases/download/v5.3.1/external-v5.3.1.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nextcloud-news": {
|
"nextcloud-news": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"narHash": "sha256-cfJkKRNSz15L4E3w1tnEb+t4MrVwVzb8lb6vCOA4cK4=",
|
"lastModified": 1703426420,
|
||||||
|
"narHash": "sha256-AENBJH/bEob5JQvw4WEi864mdLYJ5Mqe78HJH6ceCpI=",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/nextcloud/news/releases/download/24.0.0/news.tar.gz"
|
"url": "https://github.com/nextcloud/news/releases/download/25.0.0-alpha3/news.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/nextcloud/news/releases/download/24.0.0/news.tar.gz"
|
"url": "https://github.com/nextcloud/news/releases/download/25.0.0-alpha3/news.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nil": {
|
"nextcloud-snappymail": {
|
||||||
"inputs": {
|
"flake": false,
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"rust-overlay": "rust-overlay"
|
|
||||||
},
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1691372739,
|
"lastModified": 1707018069,
|
||||||
"narHash": "sha256-fZ8KfBMcIFO/R7xaWtB85SFeuUjb9SCH8fxYBnY8068=",
|
"narHash": "sha256-UeZXoZFEPJj7zEVNTXJ3IYNt/wI7VFq3Pjh1ubMHCBo=",
|
||||||
"owner": "oxalica",
|
"type": "tarball",
|
||||||
"repo": "nil",
|
"url": "https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz"
|
||||||
"rev": "97abe7d3d48721d4e0fcc1876eea83bb4247825b",
|
|
||||||
"type": "github"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "oxalica",
|
"type": "tarball",
|
||||||
"ref": "2023-08-09",
|
"url": "https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz"
|
||||||
"repo": "nil",
|
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix2vim": {
|
"nix2vim": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685980282,
|
"lastModified": 1706886721,
|
||||||
"narHash": "sha256-uQyVaoqkiocA8bXKMfrgizuKmz0hUzHye5owFoUd2AQ=",
|
"narHash": "sha256-iDYxsE5xYoK8Ww2TYZDmgRQNIZl+QHJfChOxWh45g0k=",
|
||||||
"owner": "gytis-ivaskevicius",
|
"owner": "gytis-ivaskevicius",
|
||||||
"repo": "nix2vim",
|
"repo": "nix2vim",
|
||||||
"rev": "3836a348503ae27340c7f83f0bc7bcb907f3781d",
|
"rev": "29253dcf0f645a44847006d436b096369ef42fd8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -354,11 +361,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696058303,
|
"lastModified": 1706085261,
|
||||||
"narHash": "sha256-eNqKWpF5zG0SrgbbtljFOrRgFgRzCc4++TMFADBMLnc=",
|
"narHash": "sha256-7PgpHRHyShINcqgevPP1fJ6N8kM5ZSOJnk3QZBrOCQ0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixos-generators",
|
"repo": "nixos-generators",
|
||||||
"rev": "150f38bd1e09e20987feacb1b0d5991357532fb5",
|
"rev": "896f6589db5b25023b812bbb6c1f5d3a499b1132",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -369,11 +376,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1695830400,
|
"lastModified": 1706732774,
|
||||||
"narHash": "sha256-gToZXQVr0G/1WriO83olnqrLSHF2Jb8BPcmCt497ro0=",
|
"narHash": "sha256-hqJlyJk4MRpcItGYMF+3uHe8HvxNETWvlGtLuVpqLU0=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "8a86b98f0ba1c405358f1b71ff8b5e1d317f5db2",
|
"rev": "b8b232ae7b8b144397fdb12d20f592e5e7c1a64d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -383,38 +390,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-keyd": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1690363189,
|
|
||||||
"narHash": "sha256-Zs0VkngOtQz7nIEO7Wi8AwGB4TBSex2KZAw784aOm2M=",
|
|
||||||
"owner": "JohnAZoidberg",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "6591d332f93422e388ef6337f6b362b4ff8d0724",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "JohnAZoidberg",
|
|
||||||
"ref": "keyd-2.4.3",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1695825837,
|
|
||||||
"narHash": "sha256-4Ne11kNRnQsmSJCRSSNkFRSnHC4Y5gPDBIQGjjPfJiU=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "5cfafa12d57374f48bcc36fda3274ada276cf69e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-23.05",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"null-ls-nvim-src": {
|
"null-ls-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@ -433,11 +408,11 @@
|
|||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696080597,
|
"lastModified": 1707013032,
|
||||||
"narHash": "sha256-fhf7+NT/xMwPZ/sRT30lnI04AHgf7tLPU4ClMux1nWA=",
|
"narHash": "sha256-9kEY/D0Q6sF+p6vJRefVXDK4QQdwK4Q0lSQdsYICad0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "8783c360abc69f58d46a2929534ddd91eb41f3c6",
|
"rev": "ab432acea15134873882610c0e936a882319bc8a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -449,16 +424,16 @@
|
|||||||
"nvim-lspconfig-src": {
|
"nvim-lspconfig-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1675639052,
|
"lastModified": 1701687137,
|
||||||
"narHash": "sha256-B8IgpypxzCACZ5VcqM6KiWyClaN+KrmemtkwMznmj5Y=",
|
"narHash": "sha256-qFjFofA2LoD4yRfx4KGfSCpR3mDkpFaagcm+TVNPqco=",
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
"repo": "nvim-lspconfig",
|
"repo": "nvim-lspconfig",
|
||||||
"rev": "255e07ce2a05627d482d2de77308bba51b90470c",
|
"rev": "cf3dd4a290084a868fac0e2e876039321d57111c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
"ref": "v0.1.6",
|
"ref": "v0.1.7",
|
||||||
"repo": "nvim-lspconfig",
|
"repo": "nvim-lspconfig",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -466,11 +441,11 @@
|
|||||||
"nvim-tree-lua-src": {
|
"nvim-tree-lua-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1695716495,
|
"lastModified": 1706571452,
|
||||||
"narHash": "sha256-Fkchn7UuIHPmVFFrx1kzsE2lviJrAFAe9tHu73HnS/w=",
|
"narHash": "sha256-b0LIqLC8cCRX1NyJx4eH5c4v5Fqqw5mMleAnQ2VRctM=",
|
||||||
"owner": "kyazdani42",
|
"owner": "kyazdani42",
|
||||||
"repo": "nvim-tree.lua",
|
"repo": "nvim-tree.lua",
|
||||||
"rev": "934469b9b6df369e198fb3016969e56393b0dc07",
|
"rev": "f39f7b6fcd3865ac2146de4cb4045286308f2935",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -482,11 +457,11 @@
|
|||||||
"nvim-treesitter-src": {
|
"nvim-treesitter-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696061053,
|
"lastModified": 1706952848,
|
||||||
"narHash": "sha256-KR+VMYTVM2qsLPx412gySAKiGObhs+awbDJhWX72/wY=",
|
"narHash": "sha256-pNjEODR+QJPDL58O4NM7SjzZEN8D3bXDHbKLNOS3fL8=",
|
||||||
"owner": "nvim-treesitter",
|
"owner": "nvim-treesitter",
|
||||||
"repo": "nvim-treesitter",
|
"repo": "nvim-treesitter",
|
||||||
"rev": "dd4e2dbc002dfce109d621e8bdcd9d89438b0a32",
|
"rev": "4fbf150a1621d52f17b099506e1a32f107079210",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -499,41 +474,77 @@
|
|||||||
"proton-ge": {
|
"proton-ge": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"narHash": "sha256-75A0VCVdYkiMQ1duE9r2+DLBJzV02vUozoVLeo/TIWQ=",
|
"lastModified": 1700610476,
|
||||||
|
"narHash": "sha256-IoClZ6hl2lsz9OGfFgnz7vEAGlSY2+1K2lDEEsJQOfU=",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-16/GE-Proton8-16.tar.gz"
|
"url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-25/GE-Proton8-25.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-16/GE-Proton8-16.tar.gz"
|
"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",
|
||||||
"age": "age",
|
|
||||||
"baleia-nvim-src": "baleia-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",
|
"hmts-nvim-src": "hmts-nvim-src",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"kitty-scrollback-nvim-src": "kitty-scrollback-nvim-src",
|
||||||
"nextcloud-cookbook": "nextcloud-cookbook",
|
"nextcloud-cookbook": "nextcloud-cookbook",
|
||||||
"nextcloud-external": "nextcloud-external",
|
"nextcloud-external": "nextcloud-external",
|
||||||
"nextcloud-news": "nextcloud-news",
|
"nextcloud-news": "nextcloud-news",
|
||||||
"nil": "nil",
|
"nextcloud-snappymail": "nextcloud-snappymail",
|
||||||
"nix2vim": "nix2vim",
|
"nix2vim": "nix2vim",
|
||||||
"nixos-generators": "nixos-generators",
|
"nixos-generators": "nixos-generators",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-keyd": "nixpkgs-keyd",
|
|
||||||
"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",
|
"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",
|
||||||
@ -543,37 +554,12 @@
|
|||||||
"tree-sitter-puppet": "tree-sitter-puppet",
|
"tree-sitter-puppet": "tree-sitter-puppet",
|
||||||
"tree-sitter-python": "tree-sitter-python",
|
"tree-sitter-python": "tree-sitter-python",
|
||||||
"tree-sitter-rasi": "tree-sitter-rasi",
|
"tree-sitter-rasi": "tree-sitter-rasi",
|
||||||
"vscode-terraform-snippets": "vscode-terraform-snippets",
|
"tree-sitter-vimdoc": "tree-sitter-vimdoc",
|
||||||
"wallpapers": "wallpapers",
|
"wallpapers": "wallpapers",
|
||||||
"wsl": "wsl",
|
"wsl": "wsl",
|
||||||
"zenyd-mpv-scripts": "zenyd-mpv-scripts"
|
"zenyd-mpv-scripts": "zenyd-mpv-scripts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": [
|
|
||||||
"nil",
|
|
||||||
"flake-utils"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"nil",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1688783586,
|
|
||||||
"narHash": "sha256-HHaM2hk2azslv1kH8zmQxXo2e7i5cKgzNIuK4yftzB0=",
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"rev": "7a29283cc242c2486fc67f60b431ef708046d176",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
@ -604,34 +590,19 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems_3": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"telescope-nvim-src": {
|
"telescope-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1686302912,
|
"lastModified": 1701167040,
|
||||||
"narHash": "sha256-fV3LLRwAPykVGc4ImOnUSP+WTrPp9Ad9OTfBJ6wqTMk=",
|
"narHash": "sha256-H5RpyWMluE+Yxg7xFX43AZTVW+Yg70DF3FmEGXBUSNg=",
|
||||||
"owner": "nvim-telescope",
|
"owner": "nvim-telescope",
|
||||||
"repo": "telescope.nvim",
|
"repo": "telescope.nvim",
|
||||||
"rev": "776b509f80dd49d8205b9b0d94485568236d1192",
|
"rev": "d90956833d7c27e73c621a61f20b29fdb7122709",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nvim-telescope",
|
"owner": "nvim-telescope",
|
||||||
"ref": "0.1.2",
|
"ref": "0.1.5",
|
||||||
"repo": "telescope.nvim",
|
"repo": "telescope.nvim",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -639,11 +610,11 @@
|
|||||||
"telescope-project-nvim-src": {
|
"telescope-project-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1682606566,
|
"lastModified": 1701464478,
|
||||||
"narHash": "sha256-H6lrPjpOUVleKHB0ziI+6dthg9ymitHhEWtcgYJTrKo=",
|
"narHash": "sha256-touMCltcnqkrQYV1NtNeWLQeFVGt+WM3aIWIdKilA7w=",
|
||||||
"owner": "nvim-telescope",
|
"owner": "nvim-telescope",
|
||||||
"repo": "telescope-project.nvim",
|
"repo": "telescope-project.nvim",
|
||||||
"rev": "7c64b181dd4e72deddcf6f319e3bf1e95b2a2f30",
|
"rev": "1aaf16580a614601a7f7077d9639aeb457dc5559",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -655,16 +626,16 @@
|
|||||||
"toggleterm-nvim-src": {
|
"toggleterm-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685434104,
|
"lastModified": 1701858874,
|
||||||
"narHash": "sha256-oiCnBrvft6XxiQtQH8E4F842xhh348SaTpHzaeb+iDY=",
|
"narHash": "sha256-vJApw7XY2wOX9InfWcah+hkNxBfS1+kQUWr4ITxRmgA=",
|
||||||
"owner": "akinsho",
|
"owner": "akinsho",
|
||||||
"repo": "toggleterm.nvim",
|
"repo": "toggleterm.nvim",
|
||||||
"rev": "95204ece0f2a54c89c4395295432f9aeedca7b5f",
|
"rev": "cbd041d91b90cd3c02df03fe6133208888f8e008",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "akinsho",
|
"owner": "akinsho",
|
||||||
"ref": "v2.7.0",
|
"ref": "v2.9.0",
|
||||||
"repo": "toggleterm.nvim",
|
"repo": "toggleterm.nvim",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -672,11 +643,11 @@
|
|||||||
"tree-sitter-bash": {
|
"tree-sitter-bash": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1695263734,
|
"lastModified": 1705686017,
|
||||||
"narHash": "sha256-dJUJGrpBWBLjcqiqxCnJ/MENwa2+uxAmQD71aYloxsw=",
|
"narHash": "sha256-+Mpks0FyQLl26TX63J6WhaAl/QDUR1k9wSUY5SFwL+w=",
|
||||||
"owner": "tree-sitter",
|
"owner": "tree-sitter",
|
||||||
"repo": "tree-sitter-bash",
|
"repo": "tree-sitter-bash",
|
||||||
"rev": "fd4e40dab883d6456da4d847de8321aee9c80805",
|
"rev": "f7239f638d3dc16762563a9027faeee518ce1bd9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -689,11 +660,11 @@
|
|||||||
"tree-sitter-ini": {
|
"tree-sitter-ini": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1690815608,
|
"lastModified": 1699877527,
|
||||||
"narHash": "sha256-IIpKzpA4q1jpYVZ75VZaxWHaqNt8TA427eMOui2s71M=",
|
"narHash": "sha256-dYPeVTNWO4apY5dsjsKViavU7YtLeGTp6BzEemXhsEU=",
|
||||||
"owner": "justinmk",
|
"owner": "justinmk",
|
||||||
"repo": "tree-sitter-ini",
|
"repo": "tree-sitter-ini",
|
||||||
"rev": "7f11a02fb8891482068e0fe419965d7bade81a68",
|
"rev": "bcb84a2d4bcd6f55b911c42deade75c8f90cb0c5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -738,11 +709,11 @@
|
|||||||
"tree-sitter-python": {
|
"tree-sitter-python": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1695282953,
|
"lastModified": 1700218345,
|
||||||
"narHash": "sha256-gRhD3M1DkmwYQDDnyRq6QMTWUJUY0vbetGnN+pBTd84=",
|
"narHash": "sha256-hXNxa895SyNOG7PH2vAIkWbcMjZDjWYDsCafBZuvnT0=",
|
||||||
"owner": "tree-sitter",
|
"owner": "tree-sitter",
|
||||||
"repo": "tree-sitter-python",
|
"repo": "tree-sitter-python",
|
||||||
"rev": "a901729099257aac932d79c60adb5e8a53fa7e6c",
|
"rev": "4bfdd9033a2225cc95032ce77066b7aeca9e2efc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -768,19 +739,19 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vscode-terraform-snippets": {
|
"tree-sitter-vimdoc": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1614849738,
|
"lastModified": 1705491128,
|
||||||
"narHash": "sha256-v392tyzXV+zyBNt5OCB2NBCK7JcByrTa5Ne/nFtSCJI=",
|
"narHash": "sha256-q5Ln8WPFrtKBfZnaAAlMh3Q/eczEt6wCMZAtx+ISCKg=",
|
||||||
"owner": "run-at-scale",
|
"owner": "neovim",
|
||||||
"repo": "vscode-terraform-doc-snippets",
|
"repo": "tree-sitter-vimdoc",
|
||||||
"rev": "6ab3e44b566e660f38922cf908e6e547eaa5d4b4",
|
"rev": "ed8695ad8de39c3f073da130156f00b1148e2891",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "run-at-scale",
|
"owner": "neovim",
|
||||||
"repo": "vscode-terraform-doc-snippets",
|
"repo": "tree-sitter-vimdoc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -803,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_2"
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696053802,
|
"lastModified": 1706867893,
|
||||||
"narHash": "sha256-8TTbJbtGDz1MstExrVQe56eXZpovvZv6G6L6q/4NOKg=",
|
"narHash": "sha256-c5bADvtL35S3vsJaXR5YWTXe08W0gSwOrTOXfpJB4Ac=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"rev": "cadde47d123d1a534c272b04a7582f1d11474c48",
|
"rev": "bcae8dc73b931b7f0fc65f1f1ef93dc379dfd66b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -823,11 +796,11 @@
|
|||||||
"zenyd-mpv-scripts": {
|
"zenyd-mpv-scripts": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1650625438,
|
"lastModified": 1706283438,
|
||||||
"narHash": "sha256-OBCuzCtgfSwj0i/rBNranuu4LRc47jObwQIJgQQoerg=",
|
"narHash": "sha256-hpLZDtt5q18aZ8d9LHfT852wtBosKUTJ7Bx+cbjBLcg=",
|
||||||
"owner": "zenyd",
|
"owner": "zenyd",
|
||||||
"repo": "mpv-scripts",
|
"repo": "mpv-scripts",
|
||||||
"rev": "19ea069abcb794d1bf8fac2f59b50d71ab992130",
|
"rev": "7100d19d18d111ce77fc9e6e8947c0d542a86397",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
87
flake.nix
87
flake.nix
@ -7,18 +7,17 @@
|
|||||||
# Used for system packages
|
# Used for system packages
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
# Update to keyd 2.4.3 not yet in nixpkgs-unstable
|
|
||||||
# https://github.com/NixOS/nixpkgs/pull/245327
|
|
||||||
nixpkgs-keyd.url = "github:JohnAZoidberg/nixpkgs/keyd-2.4.3";
|
|
||||||
|
|
||||||
# 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 and dotfiles
|
# Used for user packages and dotfiles
|
||||||
home-manager = {
|
home-manager = {
|
||||||
@ -60,16 +59,10 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Nix language server
|
|
||||||
nil = {
|
|
||||||
url = "github:oxalica/nil/2023-08-09";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Neovim plugins
|
# Neovim plugins
|
||||||
nvim-lspconfig-src = {
|
nvim-lspconfig-src = {
|
||||||
# https://github.com/neovim/nvim-lspconfig/tags
|
# https://github.com/neovim/nvim-lspconfig/tags
|
||||||
url = "github:neovim/nvim-lspconfig/v0.1.6";
|
url = "github:neovim/nvim-lspconfig/v0.1.7";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
cmp-nvim-lsp-src = {
|
cmp-nvim-lsp-src = {
|
||||||
@ -81,10 +74,12 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
baleia-nvim-src = {
|
baleia-nvim-src = {
|
||||||
|
# https://github.com/m00qek/baleia.nvim/tags
|
||||||
url = "github:m00qek/baleia.nvim";
|
url = "github:m00qek/baleia.nvim";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
Comment-nvim-src = {
|
Comment-nvim-src = {
|
||||||
|
# https://github.com/numToStr/Comment.nvim/releases
|
||||||
url = "github:numToStr/Comment.nvim/v0.8.0";
|
url = "github:numToStr/Comment.nvim/v0.8.0";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
@ -94,7 +89,8 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
telescope-nvim-src = {
|
telescope-nvim-src = {
|
||||||
url = "github:nvim-telescope/telescope.nvim/0.1.2";
|
# 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 = {
|
||||||
@ -102,25 +98,32 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
toggleterm-nvim-src = {
|
toggleterm-nvim-src = {
|
||||||
url = "github:akinsho/toggleterm.nvim/v2.7.0";
|
# 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/v4.2.0";
|
# 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;
|
||||||
};
|
};
|
||||||
vscode-terraform-snippets = {
|
|
||||||
url = "github:run-at-scale/vscode-terraform-doc-snippets";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
hmts-nvim-src = {
|
hmts-nvim-src = {
|
||||||
url = "github:calops/hmts.nvim";
|
url = "github:calops/hmts.nvim";
|
||||||
flake = false;
|
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 Grammars
|
||||||
tree-sitter-bash = {
|
tree-sitter-bash = {
|
||||||
@ -147,6 +150,10 @@
|
|||||||
url = "github:Fymyte/tree-sitter-rasi";
|
url = "github:Fymyte/tree-sitter-rasi";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
tree-sitter-vimdoc = {
|
||||||
|
url = "github:neovim/tree-sitter-vimdoc";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
# MPV Scripts
|
# MPV Scripts
|
||||||
zenyd-mpv-scripts = {
|
zenyd-mpv-scripts = {
|
||||||
@ -154,9 +161,13 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Age encryption (pin because of failed builds)
|
# Ren and rep - CLI find and replace
|
||||||
age = {
|
rep = {
|
||||||
url = "github:FiloSottile/age/v1.1.1";
|
url = "github:robenkleene/rep-grep";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
ren = {
|
||||||
|
url = "github:robenkleene/ren-find";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -165,7 +176,14 @@
|
|||||||
proton-ge = {
|
proton-ge = {
|
||||||
# https://github.com/GloriousEggroll/proton-ge-custom/releases
|
# https://github.com/GloriousEggroll/proton-ge-custom/releases
|
||||||
url =
|
url =
|
||||||
"https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-16/GE-Proton8-16.tar.gz";
|
"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;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -173,19 +191,25 @@
|
|||||||
nextcloud-news = {
|
nextcloud-news = {
|
||||||
# https://github.com/nextcloud/news/releases
|
# https://github.com/nextcloud/news/releases
|
||||||
url =
|
url =
|
||||||
"https://github.com/nextcloud/news/releases/download/24.0.0/news.tar.gz";
|
"https://github.com/nextcloud/news/releases/download/25.0.0-alpha3/news.tar.gz";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
nextcloud-external = {
|
nextcloud-external = {
|
||||||
# https://github.com/nextcloud-releases/external/releases
|
# https://github.com/nextcloud-releases/external/releases
|
||||||
url =
|
url =
|
||||||
"https://github.com/nextcloud-releases/external/releases/download/v5.2.1/external-v5.2.1.tar.gz";
|
"https://github.com/nextcloud-releases/external/releases/download/v5.3.1/external-v5.3.1.tar.gz";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
nextcloud-cookbook = {
|
nextcloud-cookbook = {
|
||||||
# https://github.com/nextcloud/cookbook/releases
|
# https://github.com/christianlupus-nextcloud/cookbook-releases/releases/
|
||||||
url =
|
url =
|
||||||
"https://github.com/nextcloud/cookbook/releases/download/v0.10.2/Cookbook-0.10.2.tar.gz";
|
"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;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -208,8 +232,10 @@
|
|||||||
dotfilesRepo = "https://github.com/nmasur/dotfiles";
|
dotfilesRepo = "https://github.com/nmasur/dotfiles";
|
||||||
hostnames = {
|
hostnames = {
|
||||||
git = "git.${baseName}";
|
git = "git.${baseName}";
|
||||||
|
influxdb = "influxdb.${baseName}";
|
||||||
metrics = "metrics.${baseName}";
|
metrics = "metrics.${baseName}";
|
||||||
prometheus = "prom.${baseName}";
|
prometheus = "prom.${baseName}";
|
||||||
|
paperless = "paper.${baseName}";
|
||||||
secrets = "vault.${baseName}";
|
secrets = "vault.${baseName}";
|
||||||
stream = "stream.${baseName}";
|
stream = "stream.${baseName}";
|
||||||
content = "cloud.${baseName}";
|
content = "cloud.${baseName}";
|
||||||
@ -230,9 +256,10 @@
|
|||||||
(import ./overlays/mpv-scripts.nix inputs)
|
(import ./overlays/mpv-scripts.nix inputs)
|
||||||
(import ./overlays/nextcloud-apps.nix inputs)
|
(import ./overlays/nextcloud-apps.nix inputs)
|
||||||
(import ./overlays/betterlockscreen.nix)
|
(import ./overlays/betterlockscreen.nix)
|
||||||
(import ./overlays/age.nix inputs)
|
|
||||||
(import ./overlays/proton-ge.nix inputs)
|
(import ./overlays/proton-ge.nix inputs)
|
||||||
(import ./overlays/keyd.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.
|
||||||
|
@ -12,3 +12,15 @@ These are the individual machines managed by this flake.
|
|||||||
| [swan](./swan/default.nix) | Home server |
|
| [swan](./swan/default.nix) | Home server |
|
||||||
| [tempest](./tempest/default.nix) | Linux desktop |
|
| [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.
|
||||||
|
@ -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,6 +1,8 @@
|
|||||||
# 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.
|
# These days, probably use nixos-anywhere instead.
|
||||||
@ -50,6 +52,7 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
||||||
|
|
||||||
# Programs and services
|
# Programs and services
|
||||||
|
atuin.enable = true;
|
||||||
cloudflare.enable = true; # Proxy traffic with Cloudflare
|
cloudflare.enable = true; # Proxy traffic with Cloudflare
|
||||||
dotfiles.enable = true; # Clone dotfiles
|
dotfiles.enable = true; # Clone dotfiles
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
@ -58,6 +61,7 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
services.grafana.enable = true;
|
services.grafana.enable = true;
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
services.victoriametrics.enable = true;
|
services.victoriametrics.enable = true;
|
||||||
|
services.influxdb2.enable = true;
|
||||||
services.gitea.enable = true;
|
services.gitea.enable = true;
|
||||||
services.vaultwarden.enable = true;
|
services.vaultwarden.enable = true;
|
||||||
services.minecraft-server.enable = true; # Setup Minecraft server
|
services.minecraft-server.enable = true; # Setup Minecraft server
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
# 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, ... }:
|
||||||
|
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
{ inputs, globals, overlays, ... }:
|
{ inputs, globals, overlays, ... }:
|
||||||
|
|
||||||
inputs.darwin.lib.darwinSystem {
|
inputs.darwin.lib.darwinSystem {
|
||||||
system = "x86_64-darwin";
|
system = "aarch64-darwin";
|
||||||
specialArgs = { };
|
specialArgs = { };
|
||||||
modules = [
|
modules = [
|
||||||
../../modules/common
|
../../modules/common
|
||||||
@ -25,6 +25,7 @@ inputs.darwin.lib.darwinSystem {
|
|||||||
dark = true;
|
dark = true;
|
||||||
};
|
};
|
||||||
mail.user = globals.user;
|
mail.user = globals.user;
|
||||||
|
atuin.enable = true;
|
||||||
charm.enable = true;
|
charm.enable = true;
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
mail.enable = true;
|
mail.enable = true;
|
||||||
@ -37,7 +38,9 @@ inputs.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;
|
slack.enable = true;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
# 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, ... }:
|
||||||
|
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
@ -66,6 +68,7 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
||||||
|
|
||||||
# Programs and services
|
# Programs and services
|
||||||
|
atuin.enable = true;
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
cloudflare.enable = true;
|
cloudflare.enable = true;
|
||||||
dotfiles.enable = true;
|
dotfiles.enable = true;
|
||||||
@ -79,6 +82,8 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
services.prometheus.enable = false;
|
services.prometheus.enable = false;
|
||||||
services.vmagent.enable = true;
|
services.vmagent.enable = true;
|
||||||
services.samba.enable = true;
|
services.samba.enable = true;
|
||||||
|
services.paperless.enable = true;
|
||||||
|
services.postgresql.enable = true;
|
||||||
|
|
||||||
# Allows private remote access over the internet
|
# Allows private remote access over the internet
|
||||||
cloudflareTunnel = {
|
cloudflareTunnel = {
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
# 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, ... }:
|
||||||
|
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
@ -83,6 +85,7 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
gtk.theme.name = inputs.nixpkgs.lib.mkDefault "Adwaita-dark";
|
gtk.theme.name = inputs.nixpkgs.lib.mkDefault "Adwaita-dark";
|
||||||
|
|
||||||
# Programs and services
|
# Programs and services
|
||||||
|
atuin.enable = true;
|
||||||
charm.enable = true;
|
charm.enable = true;
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
media.enable = true;
|
media.enable = true;
|
||||||
@ -99,6 +102,7 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
keybase.enable = true;
|
keybase.enable = true;
|
||||||
mullvad.enable = false;
|
mullvad.enable = false;
|
||||||
nixlang.enable = true;
|
nixlang.enable = true;
|
||||||
|
rust.enable = true;
|
||||||
yt-dlp.enable = true;
|
yt-dlp.enable = true;
|
||||||
gaming = {
|
gaming = {
|
||||||
dwarf-fortress.enable = true;
|
dwarf-fortress.enable = true;
|
||||||
|
@ -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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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",
|
||||||
|
@ -29,21 +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
|
|
||||||
(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 = {
|
||||||
@ -74,6 +76,8 @@
|
|||||||
"media.ffmpeg.vaapi.enabled" =
|
"media.ffmpeg.vaapi.enabled" =
|
||||||
true; # Enable hardware video acceleration
|
true; # Enable hardware video acceleration
|
||||||
"cookiebanners.ui.desktop.enabled" = true; # Reject cookie popups
|
"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
|
"svg.context-properties.content.enabled" = true; # Sidebery styling
|
||||||
};
|
};
|
||||||
userChrome = ''
|
userChrome = ''
|
||||||
@ -115,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;
|
||||||
|
@ -45,9 +45,20 @@
|
|||||||
|
|
||||||
# Easy fullscreen toggle (for macOS)
|
# 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;
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
associations.added = {
|
associations.added = {
|
||||||
"application/pdf" = [ "pwmt.zathura-cb.desktop" ];
|
"application/pdf" = [ "pwmt.zathura-cb.desktop" ];
|
||||||
"image/jpeg" = [ "nsxiv.desktop" ];
|
"image/jpeg" = [ "nsxiv.desktop" ];
|
||||||
|
"image/png" = [ "nsxiv.desktop" ];
|
||||||
"image/*" = [ "nsxiv.desktop" ];
|
"image/*" = [ "nsxiv.desktop" ];
|
||||||
};
|
};
|
||||||
associations.removed = {
|
associations.removed = {
|
||||||
@ -48,6 +49,7 @@
|
|||||||
defaultApplications = {
|
defaultApplications = {
|
||||||
"application/pdf" = [ "pwmt.zathura-cb.desktop" ];
|
"application/pdf" = [ "pwmt.zathura-cb.desktop" ];
|
||||||
"image/jpeg" = [ "nsxiv.desktop" ];
|
"image/jpeg" = [ "nsxiv.desktop" ];
|
||||||
|
"image/png" = [ "nsxiv.desktop" ];
|
||||||
"image/*" = [ "nsxiv.desktop" ];
|
"image/*" = [ "nsxiv.desktop" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -15,8 +15,9 @@
|
|||||||
home.packages = with pkgs; [ obsidian ];
|
home.packages = with pkgs; [ obsidian ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Broken on 2023-04-16
|
# Broken on 2023-12-11
|
||||||
nixpkgs.config.permittedInsecurePackages = [ "electron-21.4.0" ];
|
# 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" ];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -75,10 +75,18 @@
|
|||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Hostname for metrics server.";
|
description = "Hostname for metrics server.";
|
||||||
};
|
};
|
||||||
|
paperless = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for document server (paperless-ngx).";
|
||||||
|
};
|
||||||
prometheus = lib.mkOption {
|
prometheus = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Hostname for Prometheus server.";
|
description = "Hostname for Prometheus server.";
|
||||||
};
|
};
|
||||||
|
influxdb = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for InfluxDB2 server.";
|
||||||
|
};
|
||||||
secrets = lib.mkOption {
|
secrets = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Hostname for passwords and secrets (Vaultwarden).";
|
description = "Hostname for passwords and secrets (Vaultwarden).";
|
||||||
|
@ -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>";
|
||||||
|
@ -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,13 +23,6 @@
|
|||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Enable Luasnip snippet completion
|
|
||||||
snippet.expand = dsl.rawLua ''
|
|
||||||
function(args)
|
|
||||||
require("luasnip").lsp_expand(args.body)
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Basic completion keybinds
|
# Basic completion keybinds
|
||||||
mapping = {
|
mapping = {
|
||||||
"['<C-n>']" = dsl.rawLua
|
"['<C-n>']" = dsl.rawLua
|
||||||
@ -70,7 +62,6 @@
|
|||||||
sources = [
|
sources = [
|
||||||
{ name = "nvim_lua"; } # Fills in common Neovim lua functions
|
{ name = "nvim_lua"; } # Fills in common Neovim lua functions
|
||||||
{ name = "nvim_lsp"; } # LSP results
|
{ name = "nvim_lsp"; } # LSP results
|
||||||
{ name = "luasnip"; } # Snippets
|
|
||||||
{ name = "path"; } # Shell completion from current PATH
|
{ name = "path"; } # Shell completion from current PATH
|
||||||
{
|
{
|
||||||
name = "buffer"; # Grep for text from the current text buffer
|
name = "buffer"; # Grep for text from the current text buffer
|
||||||
@ -119,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]",
|
||||||
@ -139,13 +129,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
lua = ''
|
lua = ''
|
||||||
-- Load snippets
|
|
||||||
-- Check status: :lua require("luasnip").log.open()
|
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
|
||||||
require("luasnip.loaders.from_vscode").lazy_load({ paths = { "${
|
|
||||||
builtins.toString pkgs.vscode-terraform-snippets
|
|
||||||
}" } })
|
|
||||||
|
|
||||||
-- Use buffer source for `/`
|
-- Use buffer source for `/`
|
||||||
require('cmp').setup.cmdline("/", {
|
require('cmp').setup.cmdline("/", {
|
||||||
sources = {
|
sources = {
|
||||||
|
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,76 +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}
|
|
||||||
|
|
||||||
-- Prevent infinite log size (change this when debugging)
|
use.lspconfig.lua_ls.setup = dsl.callWith {
|
||||||
vim.lsp.set_log_level("off")
|
settings = { Lua = { diagnostics = { globals = [ "vim" "hs" ]; }; }; };
|
||||||
|
capabilities =
|
||||||
|
dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
||||||
|
cmd = [ "${pkgs.lua-language-server}/bin/lua-language-server" ];
|
||||||
|
};
|
||||||
|
|
||||||
require("null-ls").setup({
|
use.lspconfig.nil_ls.setup = dsl.callWith {
|
||||||
sources = {
|
cmd = [ "${pkgs.nil}/bin/nil" ];
|
||||||
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.ruff.with({ command = "${pkgs.ruff}/bin/ruff" }),
|
};
|
||||||
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.pyright.setup = dsl.callWith {
|
||||||
if client.supports_method("textDocument/formatting") then
|
cmd = if config.python then [
|
||||||
-- Auto-format on save
|
"${pkgs.pyright}/bin/pyright-langserver"
|
||||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
"--stdio"
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
] else
|
||||||
group = augroup,
|
[ "echo" ];
|
||||||
buffer = bufnr,
|
};
|
||||||
callback = function()
|
|
||||||
vim.lsp.buf.format({ bufnr = bufnr })
|
use.lspconfig.terraformls.setup = dsl.callWith {
|
||||||
end,
|
cmd = if config.terraform then [
|
||||||
})
|
"${pkgs.terraform-ls}/bin/terraform-ls"
|
||||||
-- Use internal formatting for bindings like gq.
|
"serve"
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
] else
|
||||||
callback = function(args)
|
[ "echo" ];
|
||||||
vim.bo[args.buf].formatexpr = nil
|
};
|
||||||
end,
|
|
||||||
})
|
use.lspconfig.rust_analyzer.setup = dsl.callWith {
|
||||||
end
|
cmd = [ "${pkgs.rust-analyzer}/bin/rust-analyzer" ];
|
||||||
end,
|
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,
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,13 +8,15 @@
|
|||||||
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.vimPlugins.which-key-nvim # Keybind helper
|
||||||
|
pkgs.kitty-scrollback-nvim # Scrollback pager for kitty
|
||||||
];
|
];
|
||||||
|
|
||||||
# Initialize some plugins
|
# Initialize some plugins
|
||||||
setup.Comment = { };
|
setup.Comment = { };
|
||||||
setup.colorizer = { };
|
setup.colorizer = { user_default_options = { names = false; }; };
|
||||||
setup.glow = { };
|
setup.glow = { };
|
||||||
setup.which-key = { };
|
setup.which-key = { };
|
||||||
|
setup.kitty-scrollback = { };
|
||||||
|
|
||||||
vim.o = {
|
vim.o = {
|
||||||
termguicolors = true; # Set to truecolor
|
termguicolors = true; # Set to truecolor
|
||||||
@ -69,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 }
|
||||||
'';
|
'';
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
{ pkgs, lib, ... }: {
|
{ 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-bash
|
tree-sitter-bash
|
||||||
|
tree-sitter-c
|
||||||
tree-sitter-fish
|
tree-sitter-fish
|
||||||
tree-sitter-hcl
|
|
||||||
tree-sitter-ini
|
tree-sitter-ini
|
||||||
tree-sitter-json
|
tree-sitter-json
|
||||||
tree-sitter-lua
|
tree-sitter-lua
|
||||||
@ -13,23 +14,23 @@
|
|||||||
tree-sitter-markdown-inline
|
tree-sitter-markdown-inline
|
||||||
tree-sitter-nix
|
tree-sitter-nix
|
||||||
tree-sitter-puppet
|
tree-sitter-puppet
|
||||||
tree-sitter-python
|
|
||||||
tree-sitter-rasi
|
tree-sitter-rasi
|
||||||
tree-sitter-toml
|
tree-sitter-toml
|
||||||
|
tree-sitter-vimdoc
|
||||||
tree-sitter-yaml
|
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.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.baleia-nvim # Clean ANSI from kitty scrollback
|
||||||
# pkgs.hmts-nvim # Tree-sitter injections for home-manager
|
# pkgs.hmts-nvim # Tree-sitter injections for home-manager
|
||||||
(pkgs.vimUtils.buildVimPluginFrom2Nix {
|
(pkgs.vimUtils.buildVimPlugin {
|
||||||
pname = "nmasur";
|
pname = "nmasur";
|
||||||
version = "0.1";
|
version = "0.1";
|
||||||
src = ../plugin;
|
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; };
|
||||||
|
@ -26,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,4 @@
|
|||||||
{ pkgs, dsl, ... }: {
|
{ pkgs, dsl, config, ... }: {
|
||||||
|
|
||||||
# Toggleterm provides a floating terminal inside the editor for quick access
|
# Toggleterm provides a floating terminal inside the editor for quick access
|
||||||
|
|
||||||
@ -10,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 ""}
|
||||||
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,6 @@
|
|||||||
'';
|
'';
|
||||||
view = { # Set look and feel
|
view = { # Set look and feel
|
||||||
width = 30;
|
width = 30;
|
||||||
hide_root_folder = false;
|
|
||||||
side = "left";
|
side = "left";
|
||||||
number = false;
|
number = false;
|
||||||
relativenumber = false;
|
relativenumber = false;
|
||||||
|
@ -5,6 +5,11 @@ let
|
|||||||
neovim = import ./package {
|
neovim = import ./package {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
colors = config.theme.colors;
|
colors = config.theme.colors;
|
||||||
|
c = config.c.enable;
|
||||||
|
github = true;
|
||||||
|
kubernetes = config.kubernetes.enable;
|
||||||
|
python = config.python.enable;
|
||||||
|
terraform = config.terraform.enable;
|
||||||
};
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
@ -42,8 +47,8 @@ in {
|
|||||||
# Requires removing some of the ANSI escape codes that are sent to the
|
# Requires removing some of the ANSI escape codes that are sent to the
|
||||||
# scrollback using sed and baleia, as well as removing several
|
# scrollback using sed and baleia, as well as removing several
|
||||||
# unnecessary features.
|
# unnecessary features.
|
||||||
programs.kitty.settings.scrollback_pager = ''
|
programs.kitty.settings.scrollback_pager =
|
||||||
$SHELL -c 'sed -r "s/[[:cntrl:]]\]133;[AC]..//g" | ${neovim}/bin/nvim -c "setlocal nonumber norelativenumber nolist laststatus=0" -c "lua baleia = require(\"baleia\").setup({}); baleia.once(0)" -c "map <silent> q :qa!<CR>" -c "autocmd VimEnter * normal G"' '';
|
"${neovim}/bin/nvim --headless +'KittyScrollbackGenerateKittens' +'set nonumber' +'set norelativenumber' +'%print' +'quit!' 2>&1";
|
||||||
|
|
||||||
# Create a desktop option for launching Neovim from a file manager
|
# Create a desktop option for launching Neovim from a file manager
|
||||||
# (Requires launching the terminal and then executing Neovim)
|
# (Requires launching the terminal and then executing Neovim)
|
||||||
|
@ -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 browse %<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>")
|
||||||
|
|
||||||
|
@ -26,13 +26,13 @@
|
|||||||
# ] ++ extraConfig;
|
# ] ++ extraConfig;
|
||||||
# }
|
# }
|
||||||
|
|
||||||
{ pkgs, colors, ... }:
|
{ pkgs, colors, terraform ? false, github ? false, kubernetes ? false, ... }:
|
||||||
|
|
||||||
# Comes from nix2vim overlay:
|
# Comes from nix2vim overlay:
|
||||||
# https://github.com/gytis-ivaskevicius/nix2vim/blob/master/lib/neovim-builder.nix
|
# 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;
|
inherit colors terraform github kubernetes;
|
||||||
imports = [
|
imports = [
|
||||||
../config/align.nix
|
../config/align.nix
|
||||||
../config/bufferline.nix
|
../config/bufferline.nix
|
||||||
|
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 = {
|
||||||
|
39
modules/common/shell/atuin.nix
Normal file
39
modules/common/shell/atuin.nix
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{ config, lib, ... }: {
|
||||||
|
|
||||||
|
# Shell history sync
|
||||||
|
|
||||||
|
options.atuin.enable = lib.mkEnableOption "Atuin";
|
||||||
|
|
||||||
|
config = {
|
||||||
|
|
||||||
|
home-manager.users.${config.user} = lib.mkIf config.atuin.enable {
|
||||||
|
|
||||||
|
programs.atuin = {
|
||||||
|
enable = true;
|
||||||
|
flags = [ "--disable-up-arrow" "--disable-ctrl-r" ];
|
||||||
|
settings = {
|
||||||
|
auto_sync = true;
|
||||||
|
update_check = false;
|
||||||
|
sync_address = "https://api.atuin.sh";
|
||||||
|
search_mode = "fuzzy";
|
||||||
|
filter_mode = "host"; # global, host, session, directory
|
||||||
|
search_mode_shell_up_key_binding = "fuzzy";
|
||||||
|
filter_mode_shell_up_key_binding = "session";
|
||||||
|
style = "compact"; # or auto,full
|
||||||
|
show_help = true;
|
||||||
|
history_filter = [ ];
|
||||||
|
secrets_filter = true;
|
||||||
|
enter_accept = false;
|
||||||
|
keymap_mode = "vim-normal";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# Give root user the same setup
|
||||||
|
home-manager.users.root.programs.atuin =
|
||||||
|
config.home-manager.users.${config.user}.programs.atuin;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
|
./atuin.nix
|
||||||
./bash
|
./bash
|
||||||
./charm.nix
|
./charm.nix
|
||||||
./direnv.nix
|
./direnv.nix
|
||||||
|
@ -7,6 +7,22 @@
|
|||||||
config = { whitelist = { prefix = [ config.dotfilesPath ]; }; };
|
config = { whitelist = { prefix = [ config.dotfilesPath ]; }; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# programs.direnv.direnvrcExtra = ''
|
||||||
|
# layout_postgres() {
|
||||||
|
# export PGDATA="$(direnv_layout_dir)/postgres"
|
||||||
|
# export PGHOST="$PGDATA"
|
||||||
|
#
|
||||||
|
# if [[ ! -d "PGDATA" ]]; then
|
||||||
|
# initdb
|
||||||
|
# cat >> "$PGDATA/postgres.conf" <<- EOF
|
||||||
|
# listen_addresses = '''
|
||||||
|
# unix_socket_directories = '$PGHOST'
|
||||||
|
# EOF
|
||||||
|
# echo "CREATE DATABASE $USER;" | postgres --single -E postgres
|
||||||
|
# fi
|
||||||
|
# }
|
||||||
|
# '';
|
||||||
|
|
||||||
# Prevent garbage collection
|
# Prevent garbage collection
|
||||||
nix.extraOptions = ''
|
nix.extraOptions = ''
|
||||||
keep-outputs = true
|
keep-outputs = true
|
||||||
|
@ -123,9 +123,6 @@
|
|||||||
dr = "docker run --rm -it";
|
dr = "docker run --rm -it";
|
||||||
db = "docker build . -t";
|
db = "docker build . -t";
|
||||||
|
|
||||||
# Rust
|
|
||||||
ca = "cargo";
|
|
||||||
|
|
||||||
};
|
};
|
||||||
shellInit = "";
|
shellInit = "";
|
||||||
};
|
};
|
||||||
|
@ -18,3 +18,5 @@ bind -M insert \cn 'commandline -r "nix shell nixpkgs#"'
|
|||||||
bind -M default \cn 'commandline -r "nix shell nixpkgs#"'
|
bind -M default \cn 'commandline -r "nix shell nixpkgs#"'
|
||||||
bind -M insert \x11F nix-fzf
|
bind -M insert \x11F nix-fzf
|
||||||
bind -M default \x11F nix-fzf
|
bind -M default \x11F nix-fzf
|
||||||
|
bind -M insert \ch _atuin_search --filter-mode global
|
||||||
|
bind -M default \ch _atuin_search --filter-mode global
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, ... }: {
|
{ config, pkgs, ... }: {
|
||||||
|
|
||||||
# FZF is a fuzzy-finder for the terminal
|
# FZF is a fuzzy-finder for the terminal
|
||||||
|
|
||||||
@ -16,10 +16,9 @@
|
|||||||
--search-path $HOME/dev \
|
--search-path $HOME/dev \
|
||||||
--type directory \
|
--type directory \
|
||||||
--exact-depth 2 \
|
--exact-depth 2 \
|
||||||
|
| ${pkgs.proximity-sort}/bin/proximity-sort $PWD \
|
||||||
| sed 's/\\/$//' \
|
| sed 's/\\/$//' \
|
||||||
| fzf \
|
| fzf --tiebreak=index \
|
||||||
--delimiter '/' \
|
|
||||||
--with-nth 6.. \
|
|
||||||
)
|
)
|
||||||
and cd $projdir
|
and cd $projdir
|
||||||
and commandline -f execute
|
and commandline -f execute
|
||||||
|
@ -35,8 +35,20 @@ in {
|
|||||||
init = { defaultBranch = "master"; };
|
init = { defaultBranch = "master"; };
|
||||||
};
|
};
|
||||||
ignores = [ ".direnv/**" "result" ];
|
ignores = [ ".direnv/**" "result" ];
|
||||||
|
includes = [{
|
||||||
|
path = "~/.config/git/personal";
|
||||||
|
condition = "gitdir:~/dev/personal/";
|
||||||
|
}];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Personal git config
|
||||||
|
# TODO: fix with variables
|
||||||
|
xdg.configFile."git/personal".text = ''
|
||||||
|
[user]
|
||||||
|
name = "Noah Masur"
|
||||||
|
email = "7386960+nmasur@users.noreply.github.com"
|
||||||
|
'';
|
||||||
|
|
||||||
programs.fish.shellAbbrs = {
|
programs.fish.shellAbbrs = {
|
||||||
g = "git";
|
g = "git";
|
||||||
gs = "git status";
|
gs = "git status";
|
||||||
@ -58,6 +70,7 @@ in {
|
|||||||
git switch (git symbolic-ref refs/remotes/origin/HEAD | cut -d"/" -f4)'';
|
git switch (git symbolic-ref refs/remotes/origin/HEAD | cut -d"/" -f4)'';
|
||||||
gcob = "git switch -c";
|
gcob = "git switch -c";
|
||||||
gb = "git branch";
|
gb = "git branch";
|
||||||
|
gpd = "git push origin -d";
|
||||||
gbd = "git branch -d";
|
gbd = "git branch -d";
|
||||||
gbD = "git branch -D";
|
gbD = "git branch -D";
|
||||||
gr = "git reset";
|
gr = "git reset";
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
gitCredentialHelper.enable = true;
|
gitCredentialHelper.enable = true;
|
||||||
settings.git_protocol = "https";
|
settings.git_protocol = "https";
|
||||||
|
extensions = [ pkgs.gh-collaborators ];
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.fish =
|
programs.fish =
|
||||||
@ -14,7 +15,7 @@
|
|||||||
shellAbbrs = {
|
shellAbbrs = {
|
||||||
ghr = "gh repo view -w";
|
ghr = "gh repo view -w";
|
||||||
gha =
|
gha =
|
||||||
"gh run list | head -1 | awk '{ print $(NF-2) }' | xargs gh run view";
|
"gh run list | head -1 | awk '{ print \\$\\(NF-2\\) }' | xargs gh run view";
|
||||||
grw = "gh run watch";
|
grw = "gh run watch";
|
||||||
grf = "gh run view --log-failed";
|
grf = "gh run view --log-failed";
|
||||||
grl = "gh run view --log";
|
grl = "gh run view --log";
|
||||||
@ -56,6 +57,7 @@
|
|||||||
| fzf \
|
| fzf \
|
||||||
--header-lines=1 \
|
--header-lines=1 \
|
||||||
--layout=reverse \
|
--layout=reverse \
|
||||||
|
--height=100% \
|
||||||
--bind "ctrl-o:execute:gh repo view -w ''${organization}/{1}" \
|
--bind "ctrl-o:execute:gh repo view -w ''${organization}/{1}" \
|
||||||
--bind "shift-up:preview-half-page-up" \
|
--bind "shift-up:preview-half-page-up" \
|
||||||
--bind "shift-down:preview-half-page-down" \
|
--bind "shift-down:preview-half-page-down" \
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
@ -60,6 +60,18 @@
|
|||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Create nix-index if doesn't exist
|
||||||
|
home.activation.createNixIndex =
|
||||||
|
let cacheDir = "${config.homePath}/.cache/nix-index";
|
||||||
|
in lib.mkIf
|
||||||
|
config.home-manager.users.${config.user}.programs.nix-index.enable
|
||||||
|
(config.home-manager.users.${config.user}.lib.dag.entryAfter
|
||||||
|
[ "writeBoundary" ] ''
|
||||||
|
if [ ! -d ${cacheDir} ]; then
|
||||||
|
$DRY_RUN_CMD ${pkgs.nix-index}/bin/nix-index -f ${pkgs.path}
|
||||||
|
fi
|
||||||
|
'');
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
|
@ -25,10 +25,14 @@ in {
|
|||||||
htop # Show system processes
|
htop # Show system processes
|
||||||
killall # Force quit
|
killall # Force quit
|
||||||
inetutils # Includes telnet, whois
|
inetutils # Includes telnet, whois
|
||||||
|
jless # JSON viewer
|
||||||
|
jo # JSON output
|
||||||
jq # JSON manipulation
|
jq # JSON manipulation
|
||||||
lf # File viewer
|
lf # File viewer
|
||||||
qrencode # Generate qr codes
|
qrencode # Generate qr codes
|
||||||
rsync # Copy folders
|
rsync # Copy folders
|
||||||
|
ren # Rename files
|
||||||
|
# rep # Replace text in files
|
||||||
ripgrep # grep
|
ripgrep # grep
|
||||||
sd # sed
|
sd # sed
|
||||||
tealdeer # Cheatsheets
|
tealdeer # Cheatsheets
|
||||||
@ -44,10 +48,11 @@ in {
|
|||||||
|
|
||||||
home.file = {
|
home.file = {
|
||||||
".rgignore".text = ignorePatterns;
|
".rgignore".text = ignorePatterns;
|
||||||
".fdignore".text = ignorePatterns;
|
|
||||||
".digrc".text = "+noall +answer"; # Cleaner dig commands
|
".digrc".text = "+noall +answer"; # Cleaner dig commands
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg.configFile."fd/ignore".text = ignorePatterns;
|
||||||
|
|
||||||
programs.bat = {
|
programs.bat = {
|
||||||
enable = true; # cat replacement
|
enable = true; # cat replacement
|
||||||
config = {
|
config = {
|
||||||
|
@ -24,9 +24,9 @@
|
|||||||
home.activation.reloadHammerspoon =
|
home.activation.reloadHammerspoon =
|
||||||
config.home-manager.users.${config.user}.lib.dag.entryAfter
|
config.home-manager.users.${config.user}.lib.dag.entryAfter
|
||||||
[ "writeBoundary" ] ''
|
[ "writeBoundary" ] ''
|
||||||
$DRY_RUN_CMD /usr/local/bin/hs -c "hs.reload()"
|
$DRY_RUN_CMD /Applications/Hammerspoon.app/Contents/Frameworks/hs/hs -c "hs.reload()"
|
||||||
$DRY_RUN_CMD sleep 1
|
$DRY_RUN_CMD sleep 1
|
||||||
$DRY_RUN_CMD /usr/local/bin/hs -c "hs.console.clearConsole()"
|
$DRY_RUN_CMD /Applications/Hammerspoon.app/Contents/Frameworks/hs/hs -c "hs.console.clearConsole()"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -54,14 +54,19 @@ function obj:init()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
-- Launcher shortcuts
|
-- Launcher shortcuts
|
||||||
self.launcher:bind("ctrl", "space", function()
|
self.launcher:bind("ctrl", "space", function() end)
|
||||||
end)
|
|
||||||
self.launcher:bind("", "return", function()
|
self.launcher:bind("", "return", function()
|
||||||
self:switch("@kitty@")
|
self:switch("@kitty@")
|
||||||
end)
|
end)
|
||||||
self.launcher:bind("", "C", function()
|
self.launcher:bind("", "C", function()
|
||||||
self:switch("Calendar.app")
|
self:switch("Calendar.app")
|
||||||
end)
|
end)
|
||||||
|
self.launcher:bind("shift", "D", function()
|
||||||
|
hs.execute("launchctl remove com.paloaltonetworks.gp.pangps")
|
||||||
|
hs.execute("launchctl remove com.paloaltonetworks.gp.pangpa")
|
||||||
|
hs.alert.show("Disconnected from GlobalProtect", nil, nil, 4)
|
||||||
|
self.launcher:exit()
|
||||||
|
end)
|
||||||
self.launcher:bind("", "E", function()
|
self.launcher:bind("", "E", function()
|
||||||
self:switch("Mail.app")
|
self:switch("Mail.app")
|
||||||
end)
|
end)
|
||||||
@ -80,6 +85,12 @@ function obj:init()
|
|||||||
self.launcher:bind("", "P", function()
|
self.launcher:bind("", "P", function()
|
||||||
self:switch("System Preferences.app")
|
self:switch("System Preferences.app")
|
||||||
end)
|
end)
|
||||||
|
self.launcher:bind("shift", "P", function()
|
||||||
|
hs.execute("launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangps.plist")
|
||||||
|
hs.execute("launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangpa.plist")
|
||||||
|
hs.alert.show("Reconnecting to GlobalProtect", nil, nil, 4)
|
||||||
|
self.launcher:exit()
|
||||||
|
end)
|
||||||
self.launcher:bind("", "R", function()
|
self.launcher:bind("", "R", function()
|
||||||
hs.console.clearConsole()
|
hs.console.clearConsole()
|
||||||
hs.reload()
|
hs.reload()
|
||||||
|
@ -9,7 +9,7 @@ obj.version = "0.1"
|
|||||||
obj.license = "MIT - https://opensource.org/licenses/MIT"
|
obj.license = "MIT - https://opensource.org/licenses/MIT"
|
||||||
|
|
||||||
function obj:init()
|
function obj:init()
|
||||||
hs.window.animationDuration = 0
|
hs.window.animationDuration = 0.1
|
||||||
dofile(hs.spoons.resourcePath("worklayout.lua"))()
|
dofile(hs.spoons.resourcePath("worklayout.lua"))()
|
||||||
-- bind hotkey
|
-- bind hotkey
|
||||||
hs.hotkey.bind({ "alt", "ctrl", "cmd" }, "n", function()
|
hs.hotkey.bind({ "alt", "ctrl", "cmd" }, "n", function()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
hs.ipc.cliInstall() -- Install Hammerspoon CLI program
|
||||||
hs.loadSpoon("ControlEscape"):start() -- Load Hammerspoon bits from https://github.com/jasonrudolph/ControlEscape.spoon
|
hs.loadSpoon("ControlEscape"):start() -- Load Hammerspoon bits from https://github.com/jasonrudolph/ControlEscape.spoon
|
||||||
hs.loadSpoon("Launcher"):init()
|
hs.loadSpoon("Launcher"):init()
|
||||||
hs.loadSpoon("DismissAlerts"):init()
|
hs.loadSpoon("DismissAlerts"):init()
|
||||||
hs.loadSpoon("MoveWindow"):init()
|
hs.loadSpoon("MoveWindow"):init()
|
||||||
hs.ipc.cliInstall() -- Install Hammerspoon CLI program
|
|
||||||
|
@ -8,11 +8,15 @@
|
|||||||
if ! xcode-select --version 2>/dev/null; then
|
if ! xcode-select --version 2>/dev/null; then
|
||||||
$DRY_RUN_CMD xcode-select --install
|
$DRY_RUN_CMD xcode-select --install
|
||||||
fi
|
fi
|
||||||
if ! /usr/local/bin/brew --version 2>/dev/null; then
|
if ! /opt/homebrew/bin/brew --version 2>/dev/null; then
|
||||||
$DRY_RUN_CMD /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
$DRY_RUN_CMD /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Add homebrew paths to CLI path
|
||||||
|
home-manager.users.${config.user}.home.sessionPath =
|
||||||
|
[ "/opt/homebrew/bin/" ];
|
||||||
|
|
||||||
homebrew = {
|
homebrew = {
|
||||||
enable = true;
|
enable = true;
|
||||||
onActivation = {
|
onActivation = {
|
||||||
@ -24,25 +28,19 @@
|
|||||||
brewfile = true; # Run brew bundle from anywhere
|
brewfile = true; # Run brew bundle from anywhere
|
||||||
lockfiles = false; # Don't save lockfile (since running from anywhere)
|
lockfiles = false; # Don't save lockfile (since running from anywhere)
|
||||||
};
|
};
|
||||||
taps = [
|
|
||||||
"homebrew/cask" # Required for casks
|
|
||||||
"homebrew/cask-drivers" # Used for Logitech G-Hub
|
|
||||||
];
|
|
||||||
brews = [
|
brews = [
|
||||||
"trash" # Delete files and folders to trash instead of rm
|
"trash" # Delete files and folders to trash instead of rm
|
||||||
"openjdk" # Required by Apache Directory Studio
|
|
||||||
];
|
];
|
||||||
casks = [
|
casks = [
|
||||||
"1password" # 1Password packaging on Nix is broken for macOS
|
"1password" # 1Password will not launch from Nix on macOS
|
||||||
"apache-directory-studio" # Packaging on Nix is not available for macOS
|
# "gitify" # Git notifications in menu bar (downgrade manually from 4.6.1)
|
||||||
"gitify" # Git notifications in menu bar
|
|
||||||
"keybase" # GUI on Nix not available for macOS
|
"keybase" # GUI on Nix not available for macOS
|
||||||
"logitech-g-hub" # Mouse and keyboard management
|
# "logitech-g-hub" # Mouse and keyboard management
|
||||||
|
"logitune" # Logitech webcam firmware
|
||||||
"meetingbar" # Show meetings in menu bar
|
"meetingbar" # Show meetings in menu bar
|
||||||
"obsidian" # Obsidian packaging on Nix is not available for macOS
|
|
||||||
"scroll-reverser" # Different scroll style for mouse vs. trackpad
|
"scroll-reverser" # Different scroll style for mouse vs. trackpad
|
||||||
"steam" # Not packaged for Nix
|
# "steam" # Not packaged for Nix
|
||||||
"epic-games" # Not packaged for Nix
|
# "epic-games" # Not packaged for Nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
config = lib.mkIf pkgs.stdenv.isDarwin {
|
config = lib.mkIf pkgs.stdenv.isDarwin {
|
||||||
networking = {
|
networking = {
|
||||||
computerName = "${config.fullName}'\\''s Mac";
|
computerName = config.networking.hostName;
|
||||||
# Adjust if necessary
|
# Adjust if necessary
|
||||||
# hostName = "";
|
# hostName = "";
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
config = lib.mkIf pkgs.stdenv.isDarwin {
|
config = lib.mkIf pkgs.stdenv.isDarwin {
|
||||||
|
|
||||||
@ -34,8 +34,8 @@
|
|||||||
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
|
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
|
||||||
AppleKeyboardUIMode = 3;
|
AppleKeyboardUIMode = 3;
|
||||||
|
|
||||||
# Automatically show and hide the menu bar
|
# Only hide menu bar in fullscreen
|
||||||
_HIHideMenuBar = true;
|
_HIHideMenuBar = false;
|
||||||
|
|
||||||
# Expand save panel by default
|
# Expand save panel by default
|
||||||
NSNavPanelExpandedStateForSaveMode = true;
|
NSNavPanelExpandedStateForSaveMode = true;
|
||||||
@ -112,77 +112,95 @@
|
|||||||
# Disable trackpad tap to click
|
# Disable trackpad tap to click
|
||||||
trackpad.Clicking = false;
|
trackpad.Clicking = false;
|
||||||
|
|
||||||
# universalaccess = {
|
|
||||||
|
|
||||||
# # Zoom in with Control + Scroll Wheel
|
|
||||||
# closeViewScrollWheelToggle = true;
|
|
||||||
# closeViewZoomFollowsFocus = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Where to save screenshots
|
# Where to save screenshots
|
||||||
screencapture.location = "~/Downloads";
|
screencapture.location = "~/Downloads";
|
||||||
|
|
||||||
|
CustomUserPreferences = {
|
||||||
|
# Disable disk image verification
|
||||||
|
"com.apple.frameworks.diskimages" = {
|
||||||
|
skip-verify = true;
|
||||||
|
skip-verify-locked = true;
|
||||||
|
skip-verify-remote = true;
|
||||||
|
};
|
||||||
|
# Avoid creating .DS_Store files on network or USB volumes
|
||||||
|
"com.apple.desktopservices" = {
|
||||||
|
DSDontWriteNetworkStores = true;
|
||||||
|
DSDontWriteUSBStores = true;
|
||||||
|
};
|
||||||
|
"com.apple.dock" = {
|
||||||
|
magnification = true;
|
||||||
|
largesize = 48;
|
||||||
|
persistent-apps = let
|
||||||
|
dockText = app:
|
||||||
|
"<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>${app}</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>";
|
||||||
|
in map dockText [
|
||||||
|
"/Applications/1Password.app"
|
||||||
|
"${pkgs.slack}/Applications/Slack.app"
|
||||||
|
"/System/Applications/Calendar.app"
|
||||||
|
"${pkgs.firefox-bin}/Applications/Firefox.app"
|
||||||
|
"/System/Applications/Messages.app"
|
||||||
|
"/System/Applications/Mail.app"
|
||||||
|
"/Applications/zoom.us.app"
|
||||||
|
"${pkgs.discord}/Applications/Discord.app"
|
||||||
|
"${pkgs.obsidian}/Applications/Obsidian.app"
|
||||||
|
"${pkgs.kitty}/Applications/kitty.app"
|
||||||
|
"/System/Applications/System Settings.app"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
# Require password immediately after screen saver begins
|
||||||
|
"com.apple.screensaver" = {
|
||||||
|
askForPassword = 1;
|
||||||
|
askForPasswordDelay = 0;
|
||||||
|
};
|
||||||
|
"com.apple.finder" = {
|
||||||
|
# Disable the warning before emptying the Trash
|
||||||
|
WarnOnEmptyTrash = false;
|
||||||
|
|
||||||
|
# Finder search in current folder by default
|
||||||
|
FXDefaultSearchScope = "SCcf";
|
||||||
|
|
||||||
|
# Default Finder window set to column view
|
||||||
|
FXPreferredViewStyle = "clmv";
|
||||||
|
};
|
||||||
|
"leits.MeetingBar" = {
|
||||||
|
eventTimeFormat = ''"show"'';
|
||||||
|
eventTitleFormat = ''"none"'';
|
||||||
|
eventTitleIconFormat = ''"iconCalendar"'';
|
||||||
|
slackBrowser =
|
||||||
|
''{"deletable":true,"arguments":"","name":"Slack","path":""}'';
|
||||||
|
zoomBrowser =
|
||||||
|
''{"deletable":true,"arguments":"","name":"Zoom","path":""}'';
|
||||||
|
KeyboardShortcuts_joinEventShortcut =
|
||||||
|
''{"carbonModifiers":6400,"carbonKeyCode":38}'';
|
||||||
|
timeFormat = ''"12-hour"'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
CustomSystemPreferences = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Settings that don't have an option in nix-darwin
|
# Settings that don't have an option in nix-darwin
|
||||||
activationScripts.postActivation.text = ''
|
activationScripts.postActivation.text = ''
|
||||||
echo "Disable disk image verification"
|
|
||||||
defaults write com.apple.frameworks.diskimages skip-verify -bool true
|
|
||||||
defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
|
|
||||||
defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
|
|
||||||
|
|
||||||
echo "Avoid creating .DS_Store files on network volumes"
|
|
||||||
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
|
|
||||||
|
|
||||||
echo "Disable the warning before emptying the Trash"
|
|
||||||
defaults write com.apple.finder WarnOnEmptyTrash -bool false
|
|
||||||
|
|
||||||
echo "Require password immediately after sleep or screen saver begins"
|
|
||||||
defaults write com.apple.screensaver askForPassword -int 1
|
|
||||||
defaults write com.apple.screensaver askForPasswordDelay -int 0
|
|
||||||
|
|
||||||
echo "Allow apps from anywhere"
|
echo "Allow apps from anywhere"
|
||||||
SPCTL=$(spctl --status)
|
SPCTL=$(spctl --status)
|
||||||
if ! [ "$SPCTL" = "assessments disabled" ]; then
|
if ! [ "$SPCTL" = "assessments disabled" ]; then
|
||||||
sudo spctl --master-disable
|
sudo spctl --master-disable
|
||||||
fi
|
fi
|
||||||
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# User-level settings
|
# User-level settings
|
||||||
activationScripts.postUserActivation.text = ''
|
activationScripts.postUserActivation.text = let
|
||||||
|
persistentApps = lib.concatMapStrings (x: ''"'' + x + ''" '')
|
||||||
|
config.system.defaults.CustomUserPreferences."com.apple.dock".persistent-apps;
|
||||||
|
in ''
|
||||||
echo "Show the ~/Library folder"
|
echo "Show the ~/Library folder"
|
||||||
chflags nohidden ~/Library
|
chflags nohidden ~/Library
|
||||||
|
|
||||||
echo "Enable dock magnification"
|
|
||||||
defaults write com.apple.dock magnification -bool true
|
|
||||||
|
|
||||||
echo "Set dock magnification size"
|
|
||||||
defaults write com.apple.dock largesize -int 48
|
|
||||||
|
|
||||||
echo "Define dock icon function"
|
|
||||||
__dock_item() {
|
|
||||||
printf "%s%s%s%s%s" \
|
|
||||||
"<dict><key>tile-data</key><dict><key>file-data</key><dict>" \
|
|
||||||
"<key>_CFURLString</key><string>" \
|
|
||||||
"$1" \
|
|
||||||
"</string><key>_CFURLStringType</key><integer>0</integer>" \
|
|
||||||
"</dict></dict></dict>"
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "Choose and order dock icons"
|
echo "Choose and order dock icons"
|
||||||
defaults write com.apple.dock persistent-apps -array \
|
defaults write com.apple.dock persistent-apps -array ${persistentApps}
|
||||||
"$(__dock_item /Applications/1Password.app)" \
|
|
||||||
"$(__dock_item ${pkgs.slack}/Applications/Slack.app)" \
|
|
||||||
"$(__dock_item /System/Applications/Calendar.app)" \
|
|
||||||
"$(__dock_item ${pkgs.firefox-bin}/Applications/Firefox.app)" \
|
|
||||||
"$(__dock_item /System/Applications/Messages.app)" \
|
|
||||||
"$(__dock_item /System/Applications/Mail.app)" \
|
|
||||||
"$(__dock_item /Applications/zoom.us.app)" \
|
|
||||||
"$(__dock_item ${pkgs.discord}/Applications/Discord.app)" \
|
|
||||||
"$(__dock_item /Applications/Obsidian.app)" \
|
|
||||||
"$(__dock_item ${pkgs.kitty}/Applications/kitty.app)" \
|
|
||||||
"$(__dock_item /System/Applications/System\ Settings.app)"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -9,13 +9,19 @@
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Used for aerc
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
home.sessionVariables = {
|
|
||||||
XDG_CONFIG_HOME = "${config.homePath}/.config";
|
# Default shell setting doesn't work
|
||||||
};
|
home.sessionVariables = { SHELL = "${pkgs.fish}/bin/fish"; };
|
||||||
|
|
||||||
|
# Used for aerc
|
||||||
|
xdg.enable = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Fix for: 'Error: HOME is set to "/var/root" but we expect "/var/empty"'
|
||||||
|
home-manager.users.root.home.homeDirectory = lib.mkForce "/var/root";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
unfreePackages = [ "consul" "vault-bin" ];
|
||||||
|
|
||||||
home-manager.users.${config.user} = lib.mkIf pkgs.stdenv.isDarwin {
|
home-manager.users.${config.user} = lib.mkIf pkgs.stdenv.isDarwin {
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
@ -11,11 +13,12 @@
|
|||||||
youtube-dl # Convert web videos
|
youtube-dl # Convert web videos
|
||||||
pandoc # Convert text documents
|
pandoc # Convert text documents
|
||||||
mpd # TUI slideshows
|
mpd # TUI slideshows
|
||||||
|
mpv # Video player
|
||||||
|
gnupg # Encryption
|
||||||
awscli2
|
awscli2
|
||||||
awslogs
|
awslogs
|
||||||
google-cloud-sdk
|
google-cloud-sdk
|
||||||
ansible
|
vault-bin
|
||||||
vault
|
|
||||||
consul
|
consul
|
||||||
noti # Create notifications programmatically
|
noti # Create notifications programmatically
|
||||||
ipcalc # Make IP network calculations
|
ipcalc # Make IP network calculations
|
||||||
|
@ -95,13 +95,15 @@ in {
|
|||||||
|
|
||||||
# Adjust screen brightness
|
# Adjust screen brightness
|
||||||
"Shift+F12" =
|
"Shift+F12" =
|
||||||
"exec ${pkgs.ddcutil}/bin/ddcutil --display 1 setvcp 10 + 30 && sleep 1; exec ${pkgs.ddcutil}/bin/ddcutil --display 2 setvcp 10 + 30";
|
# Disable dynamic sleep
|
||||||
|
# https://github.com/rockowitz/ddcutil/issues/323
|
||||||
|
"exec ${pkgs.ddcutil}/bin/ddcutil --display 1 setvcp 10 + 30 && sleep 1; exec ${pkgs.ddcutil}/bin/ddcutil --disable-dynamic-sleep --display 2 setvcp 10 + 30";
|
||||||
"Shift+F11" =
|
"Shift+F11" =
|
||||||
"exec ${pkgs.ddcutil}/bin/ddcutil --display 1 setvcp 10 - 30 && sleep 1; exec ${pkgs.ddcutil}/bin/ddcutil --display 2 setvcp 10 - 30";
|
"exec ${pkgs.ddcutil}/bin/ddcutil --display 1 setvcp 10 - 30 && sleep 1; exec ${pkgs.ddcutil}/bin/ddcutil --disable-dynamic-sleep --display 2 setvcp 10 - 30";
|
||||||
"XF86MonBrightnessUp" =
|
"XF86MonBrightnessUp" =
|
||||||
"exec ${pkgs.ddcutil}/bin/ddcutil --display 1 setvcp 10 + 30 && sleep 1; exec ${pkgs.ddcutil}/bin/ddcutil --display 2 setvcp 10 + 30";
|
"exec ${pkgs.ddcutil}/bin/ddcutil --display 1 setvcp 10 + 30 && sleep 1; exec ${pkgs.ddcutil}/bin/ddcutil --disable-dynamic-sleep --display 2 setvcp 10 + 30";
|
||||||
"XF86MonBrightnessDown" =
|
"XF86MonBrightnessDown" =
|
||||||
"exec ${pkgs.ddcutil}/bin/ddcutil --display 1 setvcp 10 - 30 && sleep 1; exec ${pkgs.ddcutil}/bin/ddcutil --display 2 setvcp 10 - 30";
|
"exec ${pkgs.ddcutil}/bin/ddcutil --display 1 setvcp 10 - 30 && sleep 1; exec ${pkgs.ddcutil}/bin/ddcutil --disable-dynamic-sleep --display 2 setvcp 10 - 30";
|
||||||
|
|
||||||
# Media player controls
|
# Media player controls
|
||||||
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
module-margin = 1;
|
module-margin = 1;
|
||||||
modules-left = "i3";
|
modules-left = "i3";
|
||||||
modules-center = "xwindow";
|
modules-center = "xwindow";
|
||||||
modules-right = "mailcount network pulseaudio date power";
|
modules-right = "mailcount network pulseaudio date keyboard power";
|
||||||
cursor-click = "pointer";
|
cursor-click = "pointer";
|
||||||
cursor-scroll = "ns-resize";
|
cursor-scroll = "ns-resize";
|
||||||
enable-ipc = true;
|
enable-ipc = true;
|
||||||
@ -200,10 +200,17 @@
|
|||||||
label-foreground = config.theme.colors.base0A;
|
label-foreground = config.theme.colors.base0A;
|
||||||
# format-background = colors.background;
|
# format-background = colors.background;
|
||||||
};
|
};
|
||||||
|
"module/keyboard" = {
|
||||||
|
type = "custom/text";
|
||||||
|
content = "";
|
||||||
|
click-left = "doas systemctl restart keyd";
|
||||||
|
content-foreground = config.theme.colors.base04;
|
||||||
|
};
|
||||||
"module/power" = {
|
"module/power" = {
|
||||||
type = "custom/text";
|
type = "custom/text";
|
||||||
content = " ";
|
content = " ";
|
||||||
click-left = config.powerCommand;
|
click-left = config.powerCommand;
|
||||||
|
click-right = "polybar-msg cmd restart";
|
||||||
content-foreground = config.theme.colors.base04;
|
content-foreground = config.theme.colors.base04;
|
||||||
};
|
};
|
||||||
"settings" = {
|
"settings" = {
|
||||||
|
@ -28,17 +28,18 @@ in {
|
|||||||
-sep ';' \
|
-sep ';' \
|
||||||
-selected-row 1)
|
-selected-row 1)
|
||||||
|
|
||||||
|
|
||||||
case "$chosen" in
|
case "$chosen" in
|
||||||
"$dimmer")
|
"$dimmer")
|
||||||
${pkgs.ddcutil}/bin/ddcutil --display 1 setvcp 10 25; ${pkgs.ddcutil}/bin/ddcutil --display 2 setvcp 10 25
|
${pkgs.ddcutil}/bin/ddcutil --display 1 setvcp 10 25; ${pkgs.ddcutil}/bin/ddcutil --disable-dynamic-sleep --display 2 setvcp 10 25
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"$medium")
|
"$medium")
|
||||||
${pkgs.ddcutil}/bin/ddcutil --display 1 setvcp 10 75; ${pkgs.ddcutil}/bin/ddcutil --display 2 setvcp 10 75
|
${pkgs.ddcutil}/bin/ddcutil --display 1 setvcp 10 75; ${pkgs.ddcutil}/bin/ddcutil --disable-dynamic-sleep --display 2 setvcp 10 75
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"$brighter")
|
"$brighter")
|
||||||
${pkgs.ddcutil}/bin/ddcutil --display 1 setvcp 10 100; ${pkgs.ddcutil}/bin/ddcutil --display 2 setvcp 10 100
|
${pkgs.ddcutil}/bin/ddcutil --display 1 setvcp 10 100; ${pkgs.ddcutil}/bin/ddcutil --disable-dynamic-sleep --display 2 setvcp 10 100
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*) exit 1 ;;
|
*) exit 1 ;;
|
||||||
|
@ -31,15 +31,17 @@ in {
|
|||||||
-sep ';' \
|
-sep ';' \
|
||||||
-selected-row 2)
|
-selected-row 2)
|
||||||
|
|
||||||
|
confirm () {
|
||||||
|
${builtins.readFile ./rofi-prompt.sh}
|
||||||
|
}
|
||||||
|
|
||||||
case "$chosen" in
|
case "$chosen" in
|
||||||
"$power_off")
|
"$power_off")
|
||||||
${
|
confirm 'Shutdown?' && doas shutdown now
|
||||||
builtins.toString ./rofi-prompt.sh
|
|
||||||
} 'Shutdown?' && doas shutdown now
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"$reboot")
|
"$reboot")
|
||||||
${builtins.toString ./rofi-prompt.sh} 'Reboot?' && doas reboot
|
confirm 'Reboot?' && doas reboot
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"$lock")
|
"$lock")
|
||||||
@ -51,7 +53,7 @@ in {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
"$log_out")
|
"$log_out")
|
||||||
${builtins.toString ./rofi-prompt.sh} 'Logout?' && i3-msg exit
|
confirm 'Logout?' && i3-msg exit
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*) exit 1 ;;
|
*) exit 1 ;;
|
||||||
|
@ -42,6 +42,6 @@ chosen=$(printf '%s;%s\n' "$yes" "$no" |
|
|||||||
-selected-row 1)
|
-selected-row 1)
|
||||||
|
|
||||||
case "$chosen" in
|
case "$chosen" in
|
||||||
"$yes") exit 0 ;;
|
"$yes") return 0 ;;
|
||||||
*) exit 1 ;;
|
*) return 1 ;;
|
||||||
esac
|
esac
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
|
|
||||||
layout = "us";
|
xkb.layout = "us";
|
||||||
|
|
||||||
# Keyboard responsiveness
|
# Keyboard responsiveness
|
||||||
autoRepeatDelay = 250;
|
autoRepeatDelay = 250;
|
||||||
@ -18,14 +18,7 @@
|
|||||||
keyboards = {
|
keyboards = {
|
||||||
default = {
|
default = {
|
||||||
ids = [ "*" ];
|
ids = [ "*" ];
|
||||||
settings = {
|
settings = { main = { capslock = "overload(control, esc)"; }; };
|
||||||
main = { capslock = "overload(control, esc)"; };
|
|
||||||
|
|
||||||
# Fix: ctrl-click sends escape afterwards
|
|
||||||
# Suppresses escape if held for more than 500ms
|
|
||||||
# https://github.com/rvaiya/keyd/issues/424
|
|
||||||
global = { overload_tap_timeout = 500; };
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
domainName = "local";
|
domainName = "local";
|
||||||
ipv6 = false; # Should work either way
|
ipv6 = false; # Should work either way
|
||||||
# Resolve local hostnames using Avahi DNS
|
# Resolve local hostnames using Avahi DNS
|
||||||
nssmdns = true;
|
nssmdns4 = true;
|
||||||
publish = {
|
publish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
addresses = true;
|
addresses = true;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
|
# This config specifies ports for Prometheus to scrape information
|
||||||
arrConfig = {
|
arrConfig = {
|
||||||
radarr = {
|
radarr = {
|
||||||
exportarrPort = "9707";
|
exportarrPort = "9707";
|
||||||
@ -41,6 +42,8 @@ in {
|
|||||||
sabnzbd = {
|
sabnzbd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
group = "media";
|
group = "media";
|
||||||
|
# The config file must be editable within the application
|
||||||
|
# It contains server configs and credentials
|
||||||
configFile = "/data/downloads/sabnzbd/sabnzbd.ini";
|
configFile = "/data/downloads/sabnzbd/sabnzbd.ini";
|
||||||
};
|
};
|
||||||
sonarr = {
|
sonarr = {
|
||||||
@ -53,16 +56,23 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Create a media group to be shared between services
|
||||||
users.groups.media = { };
|
users.groups.media = { };
|
||||||
|
|
||||||
|
# Give the human user access to the media group
|
||||||
users.users.${config.user}.extraGroups = [ "media" ];
|
users.users.${config.user}.extraGroups = [ "media" ];
|
||||||
|
|
||||||
|
# Allows media group to read/write the sabnzbd directory
|
||||||
users.users.sabnzbd.homeMode = "0770";
|
users.users.sabnzbd.homeMode = "0770";
|
||||||
|
|
||||||
unfreePackages = [ "unrar" ]; # Required for sabnzbd
|
unfreePackages = [ "unrar" ]; # Required as a dependency for sabnzbd
|
||||||
|
|
||||||
# Requires updating the base_url config value in each service
|
# Requires updating the base_url config value in each service
|
||||||
# If you try to rewrite the URL, the service won't redirect properly
|
# If you try to rewrite the URL, the service won't redirect properly
|
||||||
caddy.routes = [
|
caddy.routes = [
|
||||||
{
|
{
|
||||||
|
# Group means that routes with the same name are mutually exclusive,
|
||||||
|
# so they are split between the appropriate services.
|
||||||
group = "download";
|
group = "download";
|
||||||
match = [{
|
match = [{
|
||||||
host = [ config.hostnames.download ];
|
host = [ config.hostnames.download ];
|
||||||
@ -70,6 +80,7 @@ in {
|
|||||||
}];
|
}];
|
||||||
handle = [{
|
handle = [{
|
||||||
handler = "reverse_proxy";
|
handler = "reverse_proxy";
|
||||||
|
# We're able to reference the url and port of the service dynamically
|
||||||
upstreams = [{ dial = arrConfig.sonarr.url; }];
|
upstreams = [{ dial = arrConfig.sonarr.url; }];
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
@ -92,6 +103,7 @@ in {
|
|||||||
}];
|
}];
|
||||||
handle = [{
|
handle = [{
|
||||||
handler = "reverse_proxy";
|
handler = "reverse_proxy";
|
||||||
|
# Prowlarr doesn't offer a dynamic config, so we have to hardcode it
|
||||||
upstreams = [{ dial = "localhost:9696"; }];
|
upstreams = [{ dial = "localhost:9696"; }];
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
@ -104,6 +116,7 @@ in {
|
|||||||
handle = [{
|
handle = [{
|
||||||
handler = "reverse_proxy";
|
handler = "reverse_proxy";
|
||||||
upstreams = [{
|
upstreams = [{
|
||||||
|
# Bazarr only dynamically sets the port, not the host
|
||||||
dial = "localhost:${
|
dial = "localhost:${
|
||||||
builtins.toString config.services.bazarr.listenPort
|
builtins.toString config.services.bazarr.listenPort
|
||||||
}";
|
}";
|
||||||
@ -145,10 +158,12 @@ in {
|
|||||||
Type = "simple";
|
Type = "simple";
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
ExecStart = let
|
ExecStart = let
|
||||||
|
# Sabnzbd doesn't accept the URI path, unlike the others
|
||||||
url = if name != "sabnzbd" then
|
url = if name != "sabnzbd" then
|
||||||
"http://${attrs.url}/${name}"
|
"http://${attrs.url}/${name}"
|
||||||
else
|
else
|
||||||
"http://${attrs.url}";
|
"http://${attrs.url}";
|
||||||
|
# Exportarr is trained to pull from the arr services
|
||||||
in ''
|
in ''
|
||||||
${pkgs.exportarr}/bin/exportarr ${name} \
|
${pkgs.exportarr}/bin/exportarr ${name} \
|
||||||
--url ${url} \
|
--url ${url} \
|
||||||
@ -197,7 +212,7 @@ in {
|
|||||||
prefix = "API_KEY=";
|
prefix = "API_KEY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Prometheus scrape targets
|
# Prometheus scrape targets (expose Exportarr to Prometheus)
|
||||||
prometheus.scrapeTargets = map (key:
|
prometheus.scrapeTargets = map (key:
|
||||||
"127.0.0.1:${
|
"127.0.0.1:${
|
||||||
lib.attrsets.getAttrFromPath [ key "exportarrPort" ] arrConfig
|
lib.attrsets.getAttrFromPath [ key "exportarrPort" ] arrConfig
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
# This is my setup for backing up SQlite databases and other systems to S3 or
|
||||||
|
# S3-equivalent services (like Backblaze B2).
|
||||||
|
|
||||||
{ config, lib, ... }: {
|
{ config, lib, ... }: {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
# Bind is a DNS service. This allows me to resolve public domains locally so
|
||||||
|
# when I'm at home, I don't have to travel over the Internet to reach my
|
||||||
|
# server.
|
||||||
|
|
||||||
|
# To set this on all home machines, I point my router's DNS resolver to the
|
||||||
|
# local IP address of the machine running this service (swan).
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -16,11 +23,19 @@ in {
|
|||||||
|
|
||||||
config = lib.mkIf config.services.bind.enable {
|
config = lib.mkIf config.services.bind.enable {
|
||||||
|
|
||||||
|
# Normally I block all requests not coming from Cloudflare, so I have to also
|
||||||
|
# allow my local network.
|
||||||
caddy.cidrAllowlist = [ "192.168.0.0/16" ];
|
caddy.cidrAllowlist = [ "192.168.0.0/16" ];
|
||||||
|
|
||||||
services.bind = {
|
services.bind = {
|
||||||
|
|
||||||
|
# Allow requests coming from these IPs. This way I don't somehow get
|
||||||
|
# spammed with DNS requests coming from the Internet.
|
||||||
cacheNetworks = [ "127.0.0.0/24" "192.168.0.0/16" ];
|
cacheNetworks = [ "127.0.0.0/24" "192.168.0.0/16" ];
|
||||||
|
|
||||||
|
# When making normal DNS requests, forward them to Cloudflare to resolve.
|
||||||
forwarders = [ "1.1.1.1" "1.0.0.1" ];
|
forwarders = [ "1.1.1.1" "1.0.0.1" ];
|
||||||
|
|
||||||
ipv4Only = true;
|
ipv4Only = true;
|
||||||
|
|
||||||
# Use rpz zone as an override
|
# Use rpz zone as an override
|
||||||
@ -47,6 +62,7 @@ in {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# We must allow DNS traffic to hit our machine as well
|
||||||
networking.firewall.allowedTCPPorts = [ 53 ];
|
networking.firewall.allowedTCPPorts = [ 53 ];
|
||||||
networking.firewall.allowedUDPPorts = [ 53 ];
|
networking.firewall.allowedUDPPorts = [ 53 ];
|
||||||
|
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
# Caddy is a reverse proxy, like Nginx or Traefik. This creates an ingress
|
||||||
|
# point from my local network or the public (via Cloudflare). Instead of a
|
||||||
|
# Caddyfile, I'm using the more expressive JSON config file format. This means
|
||||||
|
# I can source routes from other areas in my config and build the JSON file
|
||||||
|
# using the result of the expression.
|
||||||
|
|
||||||
|
# Caddy helpfully provides automatic ACME cert generation and management, but
|
||||||
|
# it requires a form of validation. We are using a custom build of Caddy
|
||||||
|
# (compiled with an overlay) to insert a plugin for managing DNS validation
|
||||||
|
# with Cloudflare's DNS API.
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
@ -42,12 +53,17 @@
|
|||||||
configFile = pkgs.writeText "Caddyfile" (builtins.toJSON {
|
configFile = pkgs.writeText "Caddyfile" (builtins.toJSON {
|
||||||
apps.http.servers.main = {
|
apps.http.servers.main = {
|
||||||
listen = [ ":443" ];
|
listen = [ ":443" ];
|
||||||
|
|
||||||
|
# These routes are pulled from the rest of this repo
|
||||||
routes = config.caddy.routes;
|
routes = config.caddy.routes;
|
||||||
errors.routes = config.caddy.blocks;
|
errors.routes = config.caddy.blocks;
|
||||||
logs = { }; # Uncomment to collect access logs
|
|
||||||
|
logs = { }; # Uncommenting collects access logs
|
||||||
};
|
};
|
||||||
apps.http.servers.metrics = { }; # Enables Prometheus metrics
|
apps.http.servers.metrics = { }; # Enables Prometheus metrics
|
||||||
apps.tls.automation.policies = config.caddy.tlsPolicies;
|
apps.tls.automation.policies = config.caddy.tlsPolicies;
|
||||||
|
|
||||||
|
# Setup logging to file
|
||||||
logging.logs.main = {
|
logging.logs.main = {
|
||||||
encoder = { format = "console"; };
|
encoder = { format = "console"; };
|
||||||
writer = {
|
writer = {
|
||||||
@ -58,13 +74,23 @@
|
|||||||
};
|
};
|
||||||
level = "INFO";
|
level = "INFO";
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Allows Caddy to serve lower ports (443, 80)
|
||||||
|
systemd.services.caddy.serviceConfig.AmbientCapabilities =
|
||||||
|
"CAP_NET_BIND_SERVICE";
|
||||||
|
|
||||||
|
# Required for web traffic to reach this machine
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
|
|
||||||
|
# HTTP/3 QUIC uses UDP (not sure if being used)
|
||||||
networking.firewall.allowedUDPPorts = [ 443 ];
|
networking.firewall.allowedUDPPorts = [ 443 ];
|
||||||
|
|
||||||
|
# Caddy exposes Prometheus metrics with the admin API
|
||||||
|
# https://caddyserver.com/docs/api
|
||||||
prometheus.scrapeTargets = [ "127.0.0.1:2019" ];
|
prometheus.scrapeTargets = [ "127.0.0.1:2019" ];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
# Calibre-web is an E-Book library and management tool.
|
||||||
|
|
||||||
|
# - Exposed to the public via Caddy.
|
||||||
|
# - Hostname defined with config.hostnames.books
|
||||||
|
# - File directory backed up to S3 on a cron schedule.
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -26,6 +32,7 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Allow web traffic to Caddy
|
||||||
caddy.routes = [{
|
caddy.routes = [{
|
||||||
match = [{ host = [ config.hostnames.books ]; }];
|
match = [{ host = [ config.hostnames.books ]; }];
|
||||||
handle = [{
|
handle = [{
|
||||||
@ -35,6 +42,8 @@ in {
|
|||||||
builtins.toString config.services.calibre-web.listen.port
|
builtins.toString config.services.calibre-web.listen.port
|
||||||
}";
|
}";
|
||||||
}];
|
}];
|
||||||
|
# This is required when calibre-web is behind a reverse proxy
|
||||||
|
# https://github.com/janeczku/calibre-web/issues/19
|
||||||
headers.request.add."X-Script-Name" = [ "/calibre-web" ];
|
headers.request.add."X-Script-Name" = [ "/calibre-web" ];
|
||||||
}];
|
}];
|
||||||
}];
|
}];
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
# Cloudflare Tunnel is a service for accessing the network even behind a
|
||||||
|
# firewall, through outbound-only requests. It works by installing an agent on
|
||||||
|
# our machines that exposes services through Cloudflare Access (Zero Trust),
|
||||||
|
# similar to something like Tailscale.
|
||||||
|
|
||||||
|
# In this case, we're using Cloudflare Tunnel to enable SSH access over a web
|
||||||
|
# browser even when outside of my network. This is probably not the safest
|
||||||
|
# choice but I feel comfortable enough with it anyway.
|
||||||
|
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
# First time setup:
|
# First time setup:
|
||||||
@ -40,23 +49,28 @@
|
|||||||
tunnels = {
|
tunnels = {
|
||||||
"${config.cloudflareTunnel.id}" = {
|
"${config.cloudflareTunnel.id}" = {
|
||||||
credentialsFile = config.secrets.cloudflared.dest;
|
credentialsFile = config.secrets.cloudflared.dest;
|
||||||
|
# Catch-all if no match (should never happen anyway)
|
||||||
default = "http_status:404";
|
default = "http_status:404";
|
||||||
|
# Match from ingress of any valid server name to SSH access
|
||||||
ingress = { "*.masu.rs" = "ssh://localhost:22"; };
|
ingress = { "*.masu.rs" = "ssh://localhost:22"; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Grant Cloudflare access to SSH into this server
|
||||||
environment.etc = {
|
environment.etc = {
|
||||||
"ssh/ca.pub".text = ''
|
"ssh/ca.pub".text = ''
|
||||||
${config.cloudflareTunnel.ca}
|
${config.cloudflareTunnel.ca}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Must match the username of the email address in Cloudflare Access
|
# Must match the username portion of the email address in Cloudflare
|
||||||
|
# Access
|
||||||
"ssh/authorized_principals".text = ''
|
"ssh/authorized_principals".text = ''
|
||||||
${config.user}
|
${config.user}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Adjust SSH config to allow access from Cloudflare's certificate
|
||||||
services.openssh.extraConfig = ''
|
services.openssh.extraConfig = ''
|
||||||
PubkeyAuthentication yes
|
PubkeyAuthentication yes
|
||||||
TrustedUserCAKeys /etc/ssh/ca.pub
|
TrustedUserCAKeys /etc/ssh/ca.pub
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
# This module is necessary for hosts that are serving through Cloudflare.
|
# This module is necessary for hosts that are serving through Cloudflare.
|
||||||
|
|
||||||
|
# Cloudflare is a CDN service that is used to serve the domain names and
|
||||||
|
# caching for my websites and services. Since Cloudflare acts as our proxy, we
|
||||||
|
# must allow access over the Internet from Cloudflare's IP ranges.
|
||||||
|
|
||||||
|
# We also want to validate our HTTPS certificates from Caddy. We'll use Caddy's
|
||||||
|
# DNS validation plugin to connect to Cloudflare and automatically create
|
||||||
|
# validation DNS records for our generated certificates.
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -59,10 +67,9 @@ in {
|
|||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
}];
|
}];
|
||||||
|
# Allow Caddy to read Cloudflare API key for DNS validation
|
||||||
systemd.services.caddy.serviceConfig.EnvironmentFile =
|
systemd.services.caddy.serviceConfig.EnvironmentFile =
|
||||||
config.secrets.cloudflareApi.dest;
|
config.secrets.cloudflareApi.dest;
|
||||||
systemd.services.caddy.serviceConfig.AmbientCapabilities =
|
|
||||||
"CAP_NET_BIND_SERVICE";
|
|
||||||
|
|
||||||
# API key must have access to modify Cloudflare DNS records
|
# API key must have access to modify Cloudflare DNS records
|
||||||
secrets.cloudflareApi = {
|
secrets.cloudflareApi = {
|
||||||
@ -73,7 +80,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Allows Nextcloud to trust Cloudflare IPs
|
# Allows Nextcloud to trust Cloudflare IPs
|
||||||
services.nextcloud.config.trustedProxies = cloudflareIpRanges;
|
services.nextcloud.extraOptions.trusted_proxies = cloudflareIpRanges;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
# This file imports all the other files in this directory for use as modules in
|
||||||
|
# my config.
|
||||||
|
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
@ -13,12 +16,15 @@
|
|||||||
./gnupg.nix
|
./gnupg.nix
|
||||||
./grafana.nix
|
./grafana.nix
|
||||||
./honeypot.nix
|
./honeypot.nix
|
||||||
|
./influxdb2.nix
|
||||||
./jellyfin.nix
|
./jellyfin.nix
|
||||||
./keybase.nix
|
./keybase.nix
|
||||||
./mullvad.nix
|
./mullvad.nix
|
||||||
./n8n.nix
|
./n8n.nix
|
||||||
./netdata.nix
|
./netdata.nix
|
||||||
./nextcloud.nix
|
./nextcloud.nix
|
||||||
|
./paperless.nix
|
||||||
|
./postgresql.nix
|
||||||
./prometheus.nix
|
./prometheus.nix
|
||||||
./samba.nix
|
./samba.nix
|
||||||
./secrets.nix
|
./secrets.nix
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
# Gitea Actions is a CI/CD service for the Gitea source code server, meaning it
|
||||||
|
# allows us to run code operations (such as testing or deploys) when our git
|
||||||
|
# repositories are updated. Any machine can act as a Gitea Action Runner, so
|
||||||
|
# the Runners don't necessarily need to be running Gitea. All we need is an API
|
||||||
|
# key for Gitea to connect to it and register ourselves as a Runner.
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -11,11 +11,21 @@ in {
|
|||||||
actions.ENABLED = true;
|
actions.ENABLED = true;
|
||||||
metrics.ENABLED = true;
|
metrics.ENABLED = true;
|
||||||
repository = {
|
repository = {
|
||||||
|
# Pushing to a repo that doesn't exist automatically creates one as
|
||||||
|
# private.
|
||||||
DEFAULT_PUSH_CREATE_PRIVATE = true;
|
DEFAULT_PUSH_CREATE_PRIVATE = true;
|
||||||
|
|
||||||
|
# Allow git over HTTP.
|
||||||
DISABLE_HTTP_GIT = false;
|
DISABLE_HTTP_GIT = false;
|
||||||
|
|
||||||
|
# Allow requests hitting the specified hostname.
|
||||||
ACCESS_CONTROL_ALLOW_ORIGIN = config.hostnames.git;
|
ACCESS_CONTROL_ALLOW_ORIGIN = config.hostnames.git;
|
||||||
|
|
||||||
|
# Automatically create viable users/orgs on push.
|
||||||
ENABLE_PUSH_CREATE_USER = true;
|
ENABLE_PUSH_CREATE_USER = true;
|
||||||
ENABLE_PUSH_CREATE_ORG = true;
|
ENABLE_PUSH_CREATE_ORG = true;
|
||||||
|
|
||||||
|
# Default when creating new repos.
|
||||||
DEFAULT_BRANCH = "main";
|
DEFAULT_BRANCH = "main";
|
||||||
};
|
};
|
||||||
server = {
|
server = {
|
||||||
@ -25,11 +35,15 @@ in {
|
|||||||
SSH_PORT = 22;
|
SSH_PORT = 22;
|
||||||
START_SSH_SERVER = false; # Use sshd instead
|
START_SSH_SERVER = false; # Use sshd instead
|
||||||
DISABLE_SSH = false;
|
DISABLE_SSH = false;
|
||||||
# SSH_LISTEN_HOST = "0.0.0.0";
|
|
||||||
# SSH_LISTEN_PORT = 122;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Don't allow public users to register accounts.
|
||||||
service.DISABLE_REGISTRATION = true;
|
service.DISABLE_REGISTRATION = true;
|
||||||
|
|
||||||
|
# Force using HTTPS for all session access.
|
||||||
session.COOKIE_SECURE = true;
|
session.COOKIE_SECURE = true;
|
||||||
|
|
||||||
|
# Hide users' emails.
|
||||||
ui.SHOW_USER_EMAIL = false;
|
ui.SHOW_USER_EMAIL = false;
|
||||||
};
|
};
|
||||||
extraConfig = null;
|
extraConfig = null;
|
||||||
@ -39,6 +53,7 @@ in {
|
|||||||
users.users.${config.user}.extraGroups = [ "gitea" ];
|
users.users.${config.user}.extraGroups = [ "gitea" ];
|
||||||
|
|
||||||
caddy.routes = [
|
caddy.routes = [
|
||||||
|
# Prevent public access to Prometheus metrics.
|
||||||
{
|
{
|
||||||
match = [{
|
match = [{
|
||||||
host = [ config.hostnames.git ];
|
host = [ config.hostnames.git ];
|
||||||
@ -49,6 +64,7 @@ in {
|
|||||||
status_code = "403";
|
status_code = "403";
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
# Allow access to primary server.
|
||||||
{
|
{
|
||||||
match = [{ host = [ config.hostnames.git ]; }];
|
match = [{ host = [ config.hostnames.git ]; }];
|
||||||
handle = [{
|
handle = [{
|
||||||
@ -63,6 +79,7 @@ in {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Scrape the metrics endpoint for Prometheus.
|
||||||
prometheus.scrapeTargets = [
|
prometheus.scrapeTargets = [
|
||||||
"127.0.0.1:${
|
"127.0.0.1:${
|
||||||
builtins.toString config.services.gitea.settings.server.HTTP_PORT
|
builtins.toString config.services.gitea.settings.server.HTTP_PORT
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# GPG is an encryption tool. This isn't really in use for me at the moment.
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
options.gpg.enable = lib.mkEnableOption "GnuPG encryption.";
|
options.gpg.enable = lib.mkEnableOption "GnuPG encryption.";
|
||||||
|
@ -7,6 +7,7 @@ in {
|
|||||||
|
|
||||||
config = lib.mkIf config.services.grafana.enable {
|
config = lib.mkIf config.services.grafana.enable {
|
||||||
|
|
||||||
|
# Allow Grafana to connect to email service
|
||||||
secrets.mailpass-grafana = {
|
secrets.mailpass-grafana = {
|
||||||
source = ../../../private/mailpass-grafana.age;
|
source = ../../../private/mailpass-grafana.age;
|
||||||
dest = "${config.secretsDirectory}/mailpass-grafana";
|
dest = "${config.secretsDirectory}/mailpass-grafana";
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
# This is a tool for blocking IPs of anyone who attempts to scan all of my
|
||||||
|
# ports.
|
||||||
|
|
||||||
# Currently has some issues that don't make this viable.
|
# Currently has some issues that don't make this viable.
|
||||||
|
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
# Taken from:
|
# Taken from:
|
||||||
# https://dataswamp.org/~solene/2022-09-29-iblock-implemented-in-nixos.html
|
# https://dataswamp.org/~solene/2022-09-29-iblock-implemented-in-nixos.html
|
||||||
|
|
||||||
|
61
modules/nixos/services/influxdb2.nix
Normal file
61
modules/nixos/services/influxdb2.nix
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# InfluxDB is a timeseries database similar to Prometheus. While
|
||||||
|
# VictoriaMetrics can also act as an InfluxDB, this version of it allows for
|
||||||
|
# infinite retention separate from our other metrics, which can be nice for
|
||||||
|
# recording health information, for example.
|
||||||
|
|
||||||
|
{ config, lib, ... }: {
|
||||||
|
|
||||||
|
config = {
|
||||||
|
|
||||||
|
services.influxdb2 = {
|
||||||
|
provision = {
|
||||||
|
enable = true;
|
||||||
|
initialSetup = {
|
||||||
|
bucket = "default";
|
||||||
|
organization = "main";
|
||||||
|
passwordFile = config.secrets.influxdb2Password.dest;
|
||||||
|
retention = 0; # Keep data forever
|
||||||
|
tokenFile = config.secrets.influxdb2Token.dest;
|
||||||
|
username = "admin";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
settings = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
# Create credentials file for InfluxDB admin
|
||||||
|
secrets.influxdb2Password = lib.mkIf config.services.influxdb2.enable {
|
||||||
|
source = ../../../private/influxdb2-password.age;
|
||||||
|
dest = "${config.secretsDirectory}/influxdb2-password";
|
||||||
|
owner = "influxdb2";
|
||||||
|
group = "influxdb2";
|
||||||
|
permissions = "0440";
|
||||||
|
};
|
||||||
|
systemd.services.influxdb2Password-secret =
|
||||||
|
lib.mkIf config.services.influxdb2.enable {
|
||||||
|
requiredBy = [ "influxdb2.service" ];
|
||||||
|
before = [ "influxdb2.service" ];
|
||||||
|
};
|
||||||
|
secrets.influxdb2Token = lib.mkIf config.services.influxdb2.enable {
|
||||||
|
source = ../../../private/influxdb2-token.age;
|
||||||
|
dest = "${config.secretsDirectory}/influxdb2-token";
|
||||||
|
owner = "influxdb2";
|
||||||
|
group = "influxdb2";
|
||||||
|
permissions = "0440";
|
||||||
|
};
|
||||||
|
systemd.services.influxdb2Token-secret =
|
||||||
|
lib.mkIf config.services.influxdb2.enable {
|
||||||
|
requiredBy = [ "influxdb2.service" ];
|
||||||
|
before = [ "influxdb2.service" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
caddy.routes = lib.mkIf config.services.influxdb2.enable [{
|
||||||
|
match = [{ host = [ config.hostnames.influxdb ]; }];
|
||||||
|
handle = [{
|
||||||
|
handler = "reverse_proxy";
|
||||||
|
upstreams = [{ dial = "localhost:8086"; }];
|
||||||
|
}];
|
||||||
|
}];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -1,3 +1,6 @@
|
|||||||
|
# Jellyfin is a self-hosted video streaming service. This means I can play my
|
||||||
|
# server's videos from a webpage, mobile app, or TV client.
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
config = lib.mkIf config.services.jellyfin.enable {
|
config = lib.mkIf config.services.jellyfin.enable {
|
||||||
@ -6,6 +9,7 @@
|
|||||||
users.users.jellyfin = { isSystemUser = true; };
|
users.users.jellyfin = { isSystemUser = true; };
|
||||||
|
|
||||||
caddy.routes = [
|
caddy.routes = [
|
||||||
|
# Prevent public access to Prometheus metrics.
|
||||||
{
|
{
|
||||||
match = [{
|
match = [{
|
||||||
host = [ config.hostnames.stream ];
|
host = [ config.hostnames.stream ];
|
||||||
@ -16,6 +20,7 @@
|
|||||||
status_code = "403";
|
status_code = "403";
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
# Allow access to normal route.
|
||||||
{
|
{
|
||||||
match = [{ host = [ config.hostnames.stream ]; }];
|
match = [{ host = [ config.hostnames.stream ]; }];
|
||||||
handle = [{
|
handle = [{
|
||||||
@ -47,6 +52,9 @@
|
|||||||
users.users.jellyfin.extraGroups =
|
users.users.jellyfin.extraGroups =
|
||||||
[ "render" "video" ]; # Access to /dev/dri
|
[ "render" "video" ]; # Access to /dev/dri
|
||||||
|
|
||||||
|
# Fix issue where Jellyfin-created directories don't allow access for media group
|
||||||
|
systemd.services.jellyfin.serviceConfig.UMask = lib.mkForce "0007";
|
||||||
|
|
||||||
# Requires MetricsEnable is true in /var/lib/jellyfin/config/system.xml
|
# Requires MetricsEnable is true in /var/lib/jellyfin/config/system.xml
|
||||||
prometheus.scrapeTargets = [ "127.0.0.1:8096" ];
|
prometheus.scrapeTargets = [ "127.0.0.1:8096" ];
|
||||||
|
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
|
# Keybase is an encrypted communications tool with a synchronized encrypted
|
||||||
|
# filestore that can be mounted onto a machine's filesystem.
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
options.keybase.enable = lib.mkEnableOption "Keybase.";
|
options.keybase.enable = lib.mkEnableOption "Keybase.";
|
||||||
|
|
||||||
config = lib.mkIf config.keybase.enable {
|
config = lib.mkIf config.keybase.enable {
|
||||||
|
|
||||||
services.keybase.enable = true;
|
home-manager.users.${config.user} = lib.mkIf config.keybase.enable {
|
||||||
services.kbfs = {
|
|
||||||
enable = true;
|
services.keybase.enable = true;
|
||||||
# enableRedirector = true;
|
services.kbfs = {
|
||||||
mountPoint = "/run/user/1000/keybase/kbfs";
|
enable = true;
|
||||||
};
|
mountPoint = "keybase";
|
||||||
security.wrappers.keybase-redirector = {
|
};
|
||||||
setuid = true;
|
|
||||||
owner = "root";
|
# https://github.com/nix-community/home-manager/issues/4722
|
||||||
group = "root";
|
systemd.user.services.kbfs.Service.PrivateTmp = lib.mkForce false;
|
||||||
source = "${pkgs.kbfs}/bin/redirector";
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
home.packages = [ (lib.mkIf config.gui.enable pkgs.keybase-gui) ];
|
home.packages = [ (lib.mkIf config.gui.enable pkgs.keybase-gui) ];
|
||||||
home.file = let
|
home.file = let
|
||||||
ignorePatterns = ''
|
ignorePatterns = ''
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Mullvad is a VPN service. This isn't currently in use for me at the moment.
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
options.mullvad.enable = lib.mkEnableOption "Mullvad VPN.";
|
options.mullvad.enable = lib.mkEnableOption "Mullvad VPN.";
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
# n8n is an automation integration tool for connecting data from services
|
||||||
|
# together with triggers.
|
||||||
|
|
||||||
{ config, lib, ... }: {
|
{ config, lib, ... }: {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
# Netdata is an out-of-the-box monitoring tool that exposes many different
|
||||||
|
# metrics. Not currently in use, in favor of VictoriaMetrics and Grafana.
|
||||||
|
|
||||||
{ config, lib, ... }: {
|
{ config, lib, ... }: {
|
||||||
|
|
||||||
options.netdata.enable = lib.mkEnableOption "Netdata metrics.";
|
options.netdata.enable = lib.mkEnableOption "Netdata metrics.";
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
config = lib.mkIf config.services.nextcloud.enable {
|
config = lib.mkIf config.services.nextcloud.enable {
|
||||||
|
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
package = pkgs.nextcloud27; # Required to specify
|
package = pkgs.nextcloud28; # Required to specify
|
||||||
configureRedis = true;
|
configureRedis = true;
|
||||||
datadir = "/data/nextcloud";
|
datadir = "/data/nextcloud";
|
||||||
database.createLocally = true;
|
database.createLocally = true;
|
||||||
@ -13,18 +13,26 @@
|
|||||||
config = {
|
config = {
|
||||||
adminpassFile = config.secrets.nextcloud.dest;
|
adminpassFile = config.secrets.nextcloud.dest;
|
||||||
dbtype = "mysql";
|
dbtype = "mysql";
|
||||||
extraTrustedDomains = [ config.hostnames.content ];
|
|
||||||
trustedProxies = [ "127.0.0.1" ];
|
|
||||||
};
|
};
|
||||||
extraOptions = { default_phone_region = "US"; };
|
extraOptions = {
|
||||||
|
default_phone_region = "US";
|
||||||
|
# Allow access when hitting either of these hosts or IPs
|
||||||
|
trusted_domains = [ config.hostnames.content ];
|
||||||
|
trusted_proxies = [ "127.0.0.1" ];
|
||||||
|
};
|
||||||
extraAppsEnable = true;
|
extraAppsEnable = true;
|
||||||
extraApps = with config.services.nextcloud.package.packages.apps; {
|
extraApps = with config.services.nextcloud.package.packages.apps; {
|
||||||
inherit calendar contacts;
|
inherit calendar contacts;
|
||||||
|
# These apps are defined and pinned by overlay in flake.
|
||||||
news = pkgs.nextcloudApps.news;
|
news = pkgs.nextcloudApps.news;
|
||||||
external = pkgs.nextcloudApps.external;
|
external = pkgs.nextcloudApps.external;
|
||||||
cookbook = pkgs.nextcloudApps.cookbook;
|
cookbook = pkgs.nextcloudApps.cookbook;
|
||||||
|
snappymail = pkgs.nextcloudApps.snappymail;
|
||||||
|
};
|
||||||
|
phpOptions = {
|
||||||
|
"opcache.interned_strings_buffer" = "16";
|
||||||
|
"output_buffering" = "0";
|
||||||
};
|
};
|
||||||
phpOptions = { "opcache.interned_strings_buffer" = "16"; };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Don't let Nginx use main ports (using Caddy instead)
|
# Don't let Nginx use main ports (using Caddy instead)
|
||||||
@ -47,7 +55,10 @@
|
|||||||
handle = [
|
handle = [
|
||||||
{
|
{
|
||||||
handler = "vars";
|
handler = "vars";
|
||||||
root = config.services.nextcloud.package;
|
# Grab the webroot out of the written config
|
||||||
|
# The webroot is a symlinked combined Nextcloud directory
|
||||||
|
root =
|
||||||
|
config.services.nginx.virtualHosts.${config.services.nextcloud.hostName}.root;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
handler = "headers";
|
handler = "headers";
|
||||||
@ -56,13 +67,6 @@
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
|
||||||
match = [{ path = [ "/nix-apps*" "/store-apps*" ]; }];
|
|
||||||
handle = [{
|
|
||||||
handler = "vars";
|
|
||||||
root = config.services.nextcloud.home;
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
# Reroute carddav and caldav traffic
|
# Reroute carddav and caldav traffic
|
||||||
{
|
{
|
||||||
match =
|
match =
|
||||||
|
71
modules/nixos/services/paperless.nix
Normal file
71
modules/nixos/services/paperless.nix
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
# Paperless-ngx is a document scanning and management solution.
|
||||||
|
|
||||||
|
{ config, lib, ... }: {
|
||||||
|
|
||||||
|
config = lib.mkIf config.services.paperless.enable {
|
||||||
|
|
||||||
|
services.paperless = {
|
||||||
|
mediaDir = "/data/generic/paperless";
|
||||||
|
passwordFile = config.secrets.paperless.dest;
|
||||||
|
settings = {
|
||||||
|
PAPERLESS_OCR_USER_ARGS =
|
||||||
|
builtins.toJSON { invalidate_digital_signatures = true; };
|
||||||
|
|
||||||
|
# Enable if changing the path name in Caddy
|
||||||
|
# PAPERLESS_FORCE_SCRIPT_NAME = "/paperless";
|
||||||
|
# PAPERLESS_STATIC_URL = "/paperless/static/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Allow Nextcloud and user to see files
|
||||||
|
users.users.nextcloud.extraGroups =
|
||||||
|
lib.mkIf config.services.nextcloud.enable [ "paperless" ];
|
||||||
|
users.users.${config.user}.extraGroups = [ "paperless" ];
|
||||||
|
|
||||||
|
caddy.routes = [{
|
||||||
|
match = [{
|
||||||
|
host = [ config.hostnames.paperless ];
|
||||||
|
# path = [ "/paperless*" ]; # Change path name in Caddy
|
||||||
|
}];
|
||||||
|
handle = [{
|
||||||
|
handler = "reverse_proxy";
|
||||||
|
upstreams = [{
|
||||||
|
dial =
|
||||||
|
"localhost:${builtins.toString config.services.paperless.port}";
|
||||||
|
}];
|
||||||
|
}];
|
||||||
|
}];
|
||||||
|
|
||||||
|
secrets.paperless = {
|
||||||
|
source = ../../../private/prometheus.age;
|
||||||
|
dest = "${config.secretsDirectory}/paperless";
|
||||||
|
owner = "paperless";
|
||||||
|
group = "paperless";
|
||||||
|
permissions = "0440";
|
||||||
|
};
|
||||||
|
systemd.services.paperless-secret = {
|
||||||
|
requiredBy = [ "paperless.service" ];
|
||||||
|
before = [ "paperless.service" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Fix permissions on a regular schedule
|
||||||
|
systemd.timers.paperless-permissions = {
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "*-*-* *:0/5"; # Every 5 minutes
|
||||||
|
Unit = "paperless-permissions.service";
|
||||||
|
};
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Fix paperless shared permissions
|
||||||
|
systemd.services.paperless-permissions = {
|
||||||
|
description = "Allow group access to paperless files";
|
||||||
|
serviceConfig = { Type = "oneshot"; };
|
||||||
|
script = ''
|
||||||
|
find ${config.services.paperless.mediaDir} -type f -exec chmod 640 -- {} +
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
22
modules/nixos/services/postgresql.nix
Normal file
22
modules/nixos/services/postgresql.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
services.postgresql = {
|
||||||
|
package = pkgs.postgresql_15;
|
||||||
|
settings = { };
|
||||||
|
identMap = "";
|
||||||
|
ensureUsers = [{
|
||||||
|
name = config.user;
|
||||||
|
ensureClauses = {
|
||||||
|
createdb = true;
|
||||||
|
createrole = true;
|
||||||
|
login = true;
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.${config.user}.home.packages =
|
||||||
|
lib.mkIf config.services.postgresql.enable [
|
||||||
|
pkgs.pgcli # Postgres client with autocomplete
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
@ -1,3 +1,9 @@
|
|||||||
|
# Prometheus is a timeseries database that exposes system and service metrics
|
||||||
|
# for use in visualizing, monitoring, and alerting (with Grafana).
|
||||||
|
|
||||||
|
# Instead of running traditional Prometheus, I generally run VictoriaMetrics as
|
||||||
|
# a more efficient drop-in replacement.
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
options.prometheus = {
|
options.prometheus = {
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Samba is a Windows-compatible file-sharing service.
|
||||||
|
|
||||||
{ config, lib, ... }: {
|
{ config, lib, ... }: {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SSHD service for allowing SSH access to my machines.
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
# Transmission is a bittorrent client, which can run in the background for
|
||||||
|
# automated downloads with a web GUI.
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
# Vaultwarden is an implementation of the Bitwarden password manager backend
|
||||||
|
# service, which allows for self-hosting the synchronization of a Bitwarden
|
||||||
|
# password manager client.
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let vaultwardenPath = "/var/lib/bitwarden_rs"; # Default service directory
|
let vaultwardenPath = "/var/lib/bitwarden_rs"; # Default service directory
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
# VictoriaMetrics is a more efficient drop-in replacement for Prometheus and
|
||||||
|
# InfluxDB (timeseries databases built for monitoring system metrics).
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
# Wireguard is a VPN protocol that can be setup to create a mesh network
|
||||||
|
# between machines on different LANs. This is currently not in use in my setup.
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
options.wireguard.enable = lib.mkEnableOption "Wireguard VPN setup.";
|
options.wireguard.enable = lib.mkEnableOption "Wireguard VPN setup.";
|
||||||
|
@ -26,9 +26,14 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Alias sudo to doas for convenience
|
home-manager.users.${config.user}.programs = {
|
||||||
home-manager.users.${config.user}.programs.fish.shellAliases = {
|
|
||||||
sudo = "doas";
|
# Alias sudo to doas for convenience
|
||||||
|
fish.shellAliases = { sudo = "doas"; };
|
||||||
|
|
||||||
|
# Disable overriding our sudo alias with a TERMINFO alias
|
||||||
|
kitty.settings.shell_integration = "no-sudo";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
# Pin age because it is failing to build
|
|
||||||
|
|
||||||
inputs: _final: prev: {
|
|
||||||
age = prev.age.overrideAttrs (old: { src = inputs.age; });
|
|
||||||
}
|
|
20
overlays/bypass-paywalls-clean.nix
Normal file
20
overlays/bypass-paywalls-clean.nix
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
inputs: _final: prev: {
|
||||||
|
|
||||||
|
# Based on:
|
||||||
|
# https://git.sr.ht/~rycee/nur-expressions/tree/master/item/pkgs/firefox-addons/default.nix#L34
|
||||||
|
|
||||||
|
bypass-paywalls-clean = let addonId = "magnolia@12.34";
|
||||||
|
in prev.stdenv.mkDerivation rec {
|
||||||
|
pname = "bypass-paywalls-clean";
|
||||||
|
version = "3.4.9.0";
|
||||||
|
src = inputs.bypass-paywalls-clean + "/bypass_paywalls_clean-latest.xpi";
|
||||||
|
preferLocalBuild = true;
|
||||||
|
allowSubstitutes = true;
|
||||||
|
buildCommand = ''
|
||||||
|
dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
|
||||||
|
mkdir -p "$dst"
|
||||||
|
install -v -m644 "${src}" "$dst/${addonId}.xpi"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -31,7 +31,7 @@ in {
|
|||||||
|
|
||||||
src = prev.caddy.src;
|
src = prev.caddy.src;
|
||||||
|
|
||||||
vendorSha256 = "sha256:mwIsWJYKuEZpOU38qZOG1LEh4QpK4EO0/8l4UGsroU8=";
|
vendorHash = "sha256:pr2MI2Nv9y357lCEEh6aNdmD9FiCaJIkRfHaoWgdQIE=";
|
||||||
|
|
||||||
overrideModAttrs = (_: {
|
overrideModAttrs = (_: {
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff --git a/cps/__init__.py b/cps/__init__.py
|
diff --git a/cps/__init__.py b/cps/__init__.py
|
||||||
index 269e4aca..e2b828a9 100644
|
index f4f8dbf2..7377acdf 100644
|
||||||
--- a/cps/__init__.py
|
--- a/cps/__init__.py
|
||||||
+++ b/cps/__init__.py
|
+++ b/cps/__init__.py
|
||||||
@@ -150,7 +150,6 @@ def create_app():
|
@@ -151,7 +151,6 @@ def create_app():
|
||||||
|
|
||||||
lm.login_view = 'web.login'
|
lm.login_view = 'web.login'
|
||||||
lm.anonymous_user = ub.Anonymous
|
lm.anonymous_user = ub.Anonymous
|
||||||
@ -11,15 +11,17 @@ index 269e4aca..e2b828a9 100644
|
|||||||
db.CalibreDB.update_config(config)
|
db.CalibreDB.update_config(config)
|
||||||
db.CalibreDB.setup_db(config.config_calibre_dir, cli_param.settings_path)
|
db.CalibreDB.setup_db(config.config_calibre_dir, cli_param.settings_path)
|
||||||
diff --git a/cps/admin.py b/cps/admin.py
|
diff --git a/cps/admin.py b/cps/admin.py
|
||||||
index 20c58aac..99d2ad19 100644
|
index 045a9523..825a28af 100644
|
||||||
--- a/cps/admin.py
|
--- a/cps/admin.py
|
||||||
+++ b/cps/admin.py
|
+++ b/cps/admin.py
|
||||||
@@ -101,8 +101,6 @@ def admin_required(f):
|
@@ -102,10 +102,6 @@ def admin_required(f):
|
||||||
|
|
||||||
@admi.before_app_request
|
@admi.before_app_request
|
||||||
def before_request():
|
def before_request():
|
||||||
- if not ub.check_user_session(current_user.id, flask_session.get('_id')) and 'opds' not in request.path:
|
- if not ub.check_user_session(current_user.id,
|
||||||
|
- flask_session.get('_id')) and 'opds' not in request.path \
|
||||||
|
- and config.config_session == 1:
|
||||||
- logout_user()
|
- logout_user()
|
||||||
g.constants = constants
|
g.constants = constants
|
||||||
g.google_site_verification = os.getenv('GOOGLE_SITE_VERIFICATION','')
|
g.google_site_verification = os.getenv('GOOGLE_SITE_VERIFICATION', '')
|
||||||
g.allow_registration = config.config_public_reg
|
g.allow_registration = config.config_public_reg
|
||||||
|
25
overlays/gh-collaborators.nix
Normal file
25
overlays/gh-collaborators.nix
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
_final: prev: {
|
||||||
|
|
||||||
|
gh-collaborators = prev.buildGo120Module rec {
|
||||||
|
pname = "gh-collaborators";
|
||||||
|
version = "2.0.2";
|
||||||
|
|
||||||
|
src = prev.fetchFromGitHub {
|
||||||
|
owner = "katiem0";
|
||||||
|
repo = "gh-collaborators";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "sha256-sz5LHkwZ28aA2vbMnFMzAlyGiJBDZm7jwDQYxgKBPLU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
vendorHash = "sha256-rsRDOgJBa8T6+bC/APcmuRmg6ykbIp9pwRnJ9rrfHEs=";
|
||||||
|
|
||||||
|
ldflags = [
|
||||||
|
"-s"
|
||||||
|
"-w"
|
||||||
|
"-X github.com/katiem0/gh-collaborators/cmd.Version=${version}"
|
||||||
|
# "-X main.Version=${version}"
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -1,6 +0,0 @@
|
|||||||
# Use latest PR of keyd to update to 2.4.3
|
|
||||||
# https://github.com/NixOS/nixpkgs/pull/245327
|
|
||||||
|
|
||||||
inputs: _final: prev: {
|
|
||||||
inherit (inputs.nixpkgs-keyd.legacyPackages.${prev.system}) keyd;
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user