mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-07 03:10:13 +00:00
Compare commits
160 Commits
5ce9a26441
...
language-c
Author | SHA1 | Date | |
---|---|---|---|
f85a008741 | |||
6c2fc0289b | |||
5034ada458 | |||
e635cf6225 | |||
b901eef822 | |||
e7cdfc1453 | |||
7503335701 | |||
0b571e4565 | |||
f91c9bcfc2 | |||
b27b9136f9 | |||
865dad0f4f | |||
3178a1dea9 | |||
af1b6c8b35 | |||
89e8463b98 | |||
01eccb6655 | |||
e7f8a75df3 | |||
fa03e51d37 | |||
fe1a4c2c29 | |||
26afa49879 | |||
94bc6662ed | |||
06c1f5c372 | |||
4dd94ee59d | |||
69dd348c92 | |||
d823b2a49e | |||
756177826c | |||
c60632a37f | |||
324956c091 | |||
68c5816d4d | |||
643b722eb4 | |||
db0b2b147c | |||
b382bc9fbb | |||
454accd742 | |||
088de57cab | |||
5a992d6d5a | |||
f44cf65c43 | |||
46f3a459b6 | |||
161c1f46b0 | |||
fc2484227a | |||
e7bbf68dde | |||
10f7b97b64 | |||
c8a8b7a897 | |||
6560d2f9a2 | |||
3be397429a | |||
8b17fd035b | |||
8da8fe7efb | |||
59111f5da6 | |||
95e8d5c268 | |||
56d2c95c64 | |||
602d411bad | |||
4cd9572993 | |||
84d7fc9892 | |||
dab40e081a | |||
984a47d3b1 | |||
48cd96858a | |||
2cce4c572f | |||
2f783f2ba3 | |||
1ee22e3a9a | |||
450b211e7e | |||
19f3147f25 | |||
5d6d6fc68e | |||
ec55658fd1 | |||
d25b189952 | |||
a8b07cc365 | |||
70a30ac056 | |||
cfe1f1d1e2 | |||
3396918793 | |||
3ef842f359 | |||
e87cb5981c | |||
6e9419ed92 | |||
ab4e516ba8 | |||
5d2d26b3d9 | |||
50e16f9413 | |||
4653037f1e | |||
f192e53e7a | |||
b5a9da8011 | |||
cbbfb8724b | |||
0bbfe0b6b5 | |||
cc714dd898 | |||
4964e56298 | |||
fafd56612e | |||
3042a0ac19 | |||
9d2a423011 | |||
276c2024b4 | |||
81cffd471d | |||
61a808bad4 | |||
48045c0fee | |||
ef6964f3b4 | |||
7b7f426624 | |||
d1c0472b77 | |||
e6fd6128f4 | |||
e72be000b0 | |||
f50ddd48c8 | |||
3a2d5e2da6 | |||
c929bc6440 | |||
09563de935 | |||
a5615da7dc | |||
6babfae211 | |||
b471d0fa7a | |||
cf7d1b50f8 | |||
ddb5dc39aa | |||
3fd95643b0 | |||
d128511a21 | |||
5709afd835 | |||
f828c1c200 | |||
77708aebd9 | |||
f9ac9b1063 | |||
bdd6c603c4 | |||
31e607d0ad | |||
b2337d3c39 | |||
6428d4fa62 | |||
db315b31b4 | |||
340a64b87a | |||
89b5183f22 | |||
b4c08adea4 | |||
13972b1d66 | |||
352f515798 | |||
d84be966fc | |||
c9aa20c703 | |||
771d41254f | |||
90092c48ec | |||
159a6efe09 | |||
0008de7434 | |||
9826178c0e | |||
d2b1d95281 | |||
4c71797818 | |||
dba975fe86 | |||
1a9ab975d1 | |||
67251a6d8d | |||
967175df70 | |||
5561c85b43 | |||
05a8f4a49b | |||
a1f651010b | |||
3cecb8810c | |||
af753153f1 | |||
d2afdd56ae | |||
18fec1d058 | |||
6a0e70568a | |||
9b44d8f171 | |||
1cf3405103 | |||
7439d4bf39 | |||
316c33e66c | |||
c845ae2fd4 | |||
5bc10bef87 | |||
f0e1fc740f | |||
5826877ad2 | |||
d3b0f21313 | |||
b7d1921c4d | |||
de1337bf58 | |||
3cff7e090c | |||
21794891e7 | |||
20e5d7fef5 | |||
b6a6c761e9 | |||
fc4bd9e4a8 | |||
25e3de5058 | |||
9694467ba0 | |||
71e6780439 | |||
e6d0852be0 | |||
00564c0c40 | |||
57b38a417e | |||
7f9ce5925e |
33
.github/workflows/update.yml
vendored
33
.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,9 +31,39 @@ 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
|
||||||
run: gh pr merge --rebase --auto ${{ steps.update.outputs.pull-request-number }}
|
if: success()
|
||||||
|
run: |
|
||||||
|
gh pr merge \
|
||||||
|
--rebase \
|
||||||
|
--auto \
|
||||||
|
${{ steps.update.outputs.pull-request-number }}
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
- name: Close Pull Request If Failed
|
||||||
|
if: failure()
|
||||||
|
run: |
|
||||||
|
gh pr close \
|
||||||
|
--comment "Auto-closing pull request" \
|
||||||
|
--delete-branch \
|
||||||
|
${{ steps.update.outputs.pull-request-number }}
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
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
|
||||||
|
9
apps/README.md
Normal file
9
apps/README.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Apps
|
||||||
|
|
||||||
|
These are all my miscellaneous utilies and scripts to accompany this project.
|
||||||
|
|
||||||
|
They can be run with:
|
||||||
|
|
||||||
|
```
|
||||||
|
nix run github:nmasur/dotfiles#appname
|
||||||
|
```
|
@ -11,7 +11,7 @@
|
|||||||
tmpfile=$(mktemp)
|
tmpfile=$(mktemp)
|
||||||
echo "''${secret}" > ''${tmpfile}
|
echo "''${secret}" > ''${tmpfile}
|
||||||
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
||||||
builtins.toString ../public-keys
|
builtins.toString ../misc/public-keys
|
||||||
} $tmpfile
|
} $tmpfile
|
||||||
rm $tmpfile
|
rm $tmpfile
|
||||||
'');
|
'');
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
--foreground "#fb4934" \
|
--foreground "#fb4934" \
|
||||||
"Missing required parameter." \
|
"Missing required parameter." \
|
||||||
"Usage: installer -- <disk> <host>" \
|
"Usage: installer -- <disk> <host>" \
|
||||||
"Example: installer -- nvme0n1 desktop" \
|
"Example: installer -- nvme0n1 tempest" \
|
||||||
"Flake example: nix run github:nmasur/dotfiles#installer -- nvme0n1 desktop"
|
"Flake example: nix run github:nmasur/dotfiles#installer -- nvme0n1 tempest"
|
||||||
echo "(exiting)"
|
echo "(exiting)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
program = builtins.toString (pkgs.writeShellScript "loadkey" ''
|
program = builtins.toString (pkgs.writeShellScript "loadkey" ''
|
||||||
printf "\nEnter the seed phrase for your SSH key...\n"
|
printf "\nEnter the seed phrase for your SSH key...\n"
|
||||||
printf "\nThen press ^D when complete.\n\n"
|
printf "\nThen press ^D when complete.\n\n"
|
||||||
|
mkdir -p ~/.ssh/
|
||||||
${pkgs.melt}/bin/melt restore ~/.ssh/id_ed25519
|
${pkgs.melt}/bin/melt restore ~/.ssh/id_ed25519
|
||||||
printf "\n\nContinuing activation.\n\n"
|
printf "\n\nContinuing activation.\n\n"
|
||||||
'');
|
'');
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
--identity ~/.ssh/id_ed25519 $encryptedfile > $tmpfile
|
--identity ~/.ssh/id_ed25519 $encryptedfile > $tmpfile
|
||||||
echo "Encrypting ''${encryptedfile}..."
|
echo "Encrypting ''${encryptedfile}..."
|
||||||
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
||||||
builtins.toString ../public-keys
|
builtins.toString ../misc/public-keys
|
||||||
} $tmpfile > $encryptedfile
|
} $tmpfile > $encryptedfile
|
||||||
rm $tmpfile
|
rm $tmpfile
|
||||||
done
|
done
|
||||||
|
5
colorscheme/README.md
Normal file
5
colorscheme/README.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Colorschemes
|
||||||
|
|
||||||
|
Color information for different themes is found here. The colors are sourced
|
||||||
|
and used with [base16](https://github.com/chriskempson/base16) format
|
||||||
|
consistently across the system.
|
5
disks/README.md
Normal file
5
disks/README.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Disks
|
||||||
|
|
||||||
|
These are my [disko](https://github.com/nix-community/disko) configurations,
|
||||||
|
which allow me to save desired disk formatting layouts as a declarative file so
|
||||||
|
I don't have to remember how to format my disks later on.
|
4
docs/README.md
Normal file
4
docs/README.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Documentation
|
||||||
|
|
||||||
|
Reference documents for some of the more complicated services and maintenance
|
||||||
|
tasks.
|
@ -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
|
||||||
```
|
```
|
||||||
|
|
||||||
|
65
docs/repair-nextcloud.md
Normal file
65
docs/repair-nextcloud.md
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
# Repairing Nextcloud
|
||||||
|
|
||||||
|
You can run the maintenance commands like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo -u nextcloud nextcloud-occ maintenance:mode --on
|
||||||
|
sudo -u nextcloud nextcloud-occ maintenance:repair
|
||||||
|
sudo -u nextcloud nextcloud-occ maintenance:mode --off
|
||||||
|
```
|
||||||
|
|
||||||
|
## Rescan Files
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo -u nextcloud nextcloud-occ files:scan --all
|
||||||
|
```
|
||||||
|
|
||||||
|
## Converting from SQLite to MySQL (mariadb)
|
||||||
|
|
||||||
|
First: keep Nextcloud set to SQLite as its dbtype, and separately launch MySQL
|
||||||
|
as a service by copying the configuration found
|
||||||
|
[here](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/services/web-apps/nextcloud.nix).
|
||||||
|
|
||||||
|
No password is necessary, since the user-based auth works with UNIX sockets.
|
||||||
|
|
||||||
|
You can connect to the MySQL instance like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo -u nextcloud mysql -S /run/mysqld/mysqld.sock
|
||||||
|
```
|
||||||
|
|
||||||
|
Create a blank database for Nextcloud:
|
||||||
|
|
||||||
|
```sql
|
||||||
|
create database nextcloud;
|
||||||
|
```
|
||||||
|
|
||||||
|
Now setup the [conversion](https://docs.nextcloud.com/server/17/admin_manual/configuration_database/db_conversion.html):
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo -u nextcloud nextcloud-occ db:convert-type mysql nextcloud localhost nextcloud
|
||||||
|
```
|
||||||
|
|
||||||
|
Ignore the password prompt. Proceed with the conversion.
|
||||||
|
|
||||||
|
Now `config.php` will be updated but the override config from NixOS will not
|
||||||
|
be. Now update your NixOS configuration:
|
||||||
|
|
||||||
|
- Remove the `mysql` service you created.
|
||||||
|
- Set `dbtype` to `mysql`.
|
||||||
|
- Set `database.createLocally` to `true`.
|
||||||
|
|
||||||
|
Rebuild your configuration.
|
||||||
|
|
||||||
|
Now, make sure to enable [4-byte
|
||||||
|
support](https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/mysql_4byte_support.html)
|
||||||
|
in the database.
|
||||||
|
|
||||||
|
## Backing Up MySQL Database
|
||||||
|
|
||||||
|
Use this mysqldump command:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo -u nextcloud mysqldump -S /run/mysqld/mysqld.sock --default-character-set=utf8mb4 nextcloud > backup.sql
|
||||||
|
```
|
||||||
|
|
@ -1,43 +0,0 @@
|
|||||||
# Restoring Nextcloud From Backup
|
|
||||||
|
|
||||||
Install the `litestream` package.
|
|
||||||
|
|
||||||
```
|
|
||||||
nix-shell --run fish -p litestream
|
|
||||||
```
|
|
||||||
|
|
||||||
Set the S3 credentials:
|
|
||||||
|
|
||||||
```
|
|
||||||
set -x AWS_ACCESS_KEY_ID (read)
|
|
||||||
set -x AWS_SECRET_ACCESS_KEY (read)
|
|
||||||
```
|
|
||||||
|
|
||||||
Restore from S3:
|
|
||||||
|
|
||||||
```
|
|
||||||
litestream restore -o nextcloud.db s3://noahmasur-backup.s3.us-west-002.backblazeb2.com/nextcloud
|
|
||||||
```
|
|
||||||
|
|
||||||
Install Nextcloud. Then copy DB:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo rm /data/nextcloud/data/nextcloud.db*
|
|
||||||
sudo mv nextcloud.db /data/nextcloud/data/
|
|
||||||
sudo chown nextcloud:nextcloud /data/nextcloud/data/nextcloud.db
|
|
||||||
sudo chmod 770 /data/nextcloud/data/nextcloud.db
|
|
||||||
```
|
|
||||||
|
|
||||||
Restart Nextcloud:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo systemctl restart phpfpm-nextcloud.service
|
|
||||||
```
|
|
||||||
|
|
||||||
Adjust Permissions and Directories:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo mkdir /data/nextcloud/data/noah/files
|
|
||||||
sudo chown nextcloud:nextcloud /data/nextcloud/data/noah/files
|
|
||||||
```
|
|
||||||
|
|
45
docs/zfs.md
Normal file
45
docs/zfs.md
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# ZFS
|
||||||
|
|
||||||
|
Swan runs its root on ext4. The ZFS drives are managed imperatively (this
|
||||||
|
[disko configuration](../disks/zfs.nix) is an unused work-in-progress).
|
||||||
|
|
||||||
|
The basic ZFS settings are managed [here](../modules/nixos/hardware/zfs.nix).
|
||||||
|
|
||||||
|
## Creating a New Dataset
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo zfs create tank/mydataset
|
||||||
|
sudo zfs set compression=zstd tank/myzstddataset
|
||||||
|
sudo zfs set mountpoint=/data/mydataset tank/mydataset
|
||||||
|
```
|
||||||
|
|
||||||
|
## Maintenance
|
||||||
|
|
||||||
|
### Get Status
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo zpool status
|
||||||
|
```
|
||||||
|
|
||||||
|
### Replace Disk
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo zdb
|
||||||
|
sudo zpool status -g # Show by GUID
|
||||||
|
sudo zpool offline tank <GUID>
|
||||||
|
sudo zpool status
|
||||||
|
# Remove old disk, insert new disk
|
||||||
|
sudo zdb
|
||||||
|
sudo zpool replace tank <OLD GUID> /dev/disk/by-id/<NEW PATH>
|
||||||
|
sudo zpool status
|
||||||
|
```
|
||||||
|
|
||||||
|
## Initial Setup
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo zpool create tank raidz1 sda sdb sdc
|
||||||
|
sudo zpool set ashift=12 tank
|
||||||
|
sudo zpool set autoexpand=on tank
|
||||||
|
sudo zpool set compression=on tank
|
||||||
|
```
|
||||||
|
|
531
flake.lock
generated
531
flake.lock
generated
@ -20,11 +20,11 @@
|
|||||||
"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": {
|
||||||
@ -36,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": {
|
||||||
@ -73,11 +89,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1690431538,
|
"lastModified": 1706833576,
|
||||||
"narHash": "sha256-Uml8ivMMOFPB9fNSDcw72imGHRdJpaK12sRm2DTLLe8=",
|
"narHash": "sha256-w7BL0EWRts+nD1lbLECIuz6fRzmmV+z8oWwoY7womR0=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "16c07487ac9bc59f58b121d13160c67befa3342e",
|
"rev": "bdbae6ecff8fcc322bf6b9053c0b984912378af7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -94,11 +110,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1690548222,
|
"lastModified": 1706491084,
|
||||||
"narHash": "sha256-EcVjLOpbAuL/y55fLlEl3BNM4FP5Pwtp+6DbTiL6FDM=",
|
"narHash": "sha256-eaEv+orTmr2arXpoE4aFZQMVPOYXCBEbLgK22kOtkhs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "43f17a8b31c49f6696b8b258d317161afdc7e36b",
|
"rev": "f67ba6552845ea5d7f596a24d57c33a8a9dc8de9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -107,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": [
|
||||||
@ -114,11 +147,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1690505116,
|
"lastModified": 1707007453,
|
||||||
"narHash": "sha256-ec0yX+DdfGtw2TQnG29jt1X/89OHTF0VsRrpp0+7s8Y=",
|
"narHash": "sha256-vs7uACn2/8GOApZJv52gAVsLfpjQWFgkHN2QJ7aVkl8=",
|
||||||
"owner": "bandithedoge",
|
"owner": "bandithedoge",
|
||||||
"repo": "nixpkgs-firefox-darwin",
|
"repo": "nixpkgs-firefox-darwin",
|
||||||
"rev": "69010f2ef9fbcef70d12541910ccc6db7a9997db",
|
"rev": "d839feb516758ad28bc1cef43008d55e749c1d6a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -130,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": {
|
||||||
@ -144,12 +177,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1678901627,
|
"lastModified": 1705309234,
|
||||||
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
|
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
|
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -160,14 +196,14 @@
|
|||||||
},
|
},
|
||||||
"flake-utils_2": {
|
"flake-utils_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems"
|
"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"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -176,21 +212,19 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_3": {
|
"hmts-nvim-src": {
|
||||||
"inputs": {
|
"flake": false,
|
||||||
"systems": "systems_2"
|
|
||||||
},
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1689068808,
|
"lastModified": 1706900289,
|
||||||
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
"narHash": "sha256-kw3YJ21nhs/x9Jp7kvnL+9FuiSgLB1hO/ON3QeeZx9g=",
|
||||||
"owner": "numtide",
|
"owner": "calops",
|
||||||
"repo": "flake-utils",
|
"repo": "hmts.nvim",
|
||||||
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
"rev": "ba1239972a1f56b94252d4f85a43e777ac419662",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "numtide",
|
"owner": "calops",
|
||||||
"repo": "flake-utils",
|
"repo": "hmts.nvim",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -201,11 +235,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1690652600,
|
"lastModified": 1706985585,
|
||||||
"narHash": "sha256-Dy09g7mezToVwtFPyY25fAx1hzqNXv73/QmY5/qyR44=",
|
"narHash": "sha256-ptshv4qXiC6V0GCfpABz88UGGPNwqs5tAxaRUKbk1Qo=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "f58889c07efa8e1328fdf93dc1796ec2a5c47f38",
|
"rev": "1ca210648a6ca9b957efde5da957f3de6b1f0c45",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -215,42 +249,87 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nil": {
|
"kitty-scrollback-nvim-src": {
|
||||||
"inputs": {
|
"flake": false,
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"rust-overlay": "rust-overlay"
|
|
||||||
},
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1680544266,
|
"lastModified": 1706891759,
|
||||||
"narHash": "sha256-d/TusDXmIo8IT5DNRA21lN+nOVSER8atIx9TJteR6LQ=",
|
"narHash": "sha256-p7RPqLHO6D5CCTDQzUrEqTu9+jg+V7wtYfGbY4qjE9A=",
|
||||||
"owner": "oxalica",
|
"owner": "mikesmithgh",
|
||||||
"repo": "nil",
|
"repo": "kitty-scrollback.nvim",
|
||||||
"rev": "56a1fa87b98a9508920f4b0ab8fe36d5b54b2362",
|
"rev": "12f7687ac049d46a987c39b2b4f657fdf540fa4e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "oxalica",
|
"owner": "mikesmithgh",
|
||||||
"ref": "2023-04-03",
|
"repo": "kitty-scrollback.nvim",
|
||||||
"repo": "nil",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nextcloud-cookbook": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1702545935,
|
||||||
|
"narHash": "sha256-19LN1nYJJ0RMWj6DrYPvHzocTyhMfYdpdhBFch3fpHE=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.0/cookbook-0.11.0.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.0/cookbook-0.11.0.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nextcloud-external": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1699624334,
|
||||||
|
"narHash": "sha256-RCL2RP5twRDLxI/KfAX6QLYQOzqZmSWsfrC5ZQIwTD4=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/nextcloud-releases/external/releases/download/v5.3.1/external-v5.3.1.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/nextcloud-releases/external/releases/download/v5.3.1/external-v5.3.1.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nextcloud-news": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1703426420,
|
||||||
|
"narHash": "sha256-AENBJH/bEob5JQvw4WEi864mdLYJ5Mqe78HJH6ceCpI=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/nextcloud/news/releases/download/25.0.0-alpha3/news.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/nextcloud/news/releases/download/25.0.0-alpha3/news.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nextcloud-snappymail": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1707018069,
|
||||||
|
"narHash": "sha256-UeZXoZFEPJj7zEVNTXJ3IYNt/wI7VFq3Pjh1ubMHCBo=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix2vim": {
|
"nix2vim": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 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": {
|
||||||
@ -261,11 +340,11 @@
|
|||||||
},
|
},
|
||||||
"nixlib": {
|
"nixlib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1689469483,
|
"lastModified": 1693701915,
|
||||||
"narHash": "sha256-2SBhY7rZQ/iNCxe04Eqxlz9YK9KgbaTMBssq3/BgdWY=",
|
"narHash": "sha256-waHPLdDYUOHSEtMKKabcKIMhlUOHPOOPQ9UyFeEoovs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "02fea408f27186f139153e1ae88f8ab2abd9c22c",
|
"rev": "f5af57d3ef9947a70ac86e42695231ac1ad00c25",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -282,11 +361,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1690133435,
|
"lastModified": 1706085261,
|
||||||
"narHash": "sha256-YNZiefETggroaTLsLJG2M+wpF0pJPwiauKG4q48ddNU=",
|
"narHash": "sha256-7PgpHRHyShINcqgevPP1fJ6N8kM5ZSOJnk3QZBrOCQ0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixos-generators",
|
"repo": "nixos-generators",
|
||||||
"rev": "b1171de4d362c022130c92d7c8adc4bf2b83d586",
|
"rev": "896f6589db5b25023b812bbb6c1f5d3a499b1132",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -297,11 +376,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1690548937,
|
"lastModified": 1706732774,
|
||||||
"narHash": "sha256-x3ZOPGLvtC0/+iFAg9Kvqm/8hTAIkGjc634SqtgaXTA=",
|
"narHash": "sha256-hqJlyJk4MRpcItGYMF+3uHe8HvxNETWvlGtLuVpqLU0=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2a9d660ff0f7ffde9d73be328ee6e6f10ef66b28",
|
"rev": "b8b232ae7b8b144397fdb12d20f592e5e7c1a64d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -311,30 +390,14 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1690470004,
|
|
||||||
"narHash": "sha256-l57RmPhPz9r1LGDg/0v8bYgJO8R+GGTQZtkIxE7negU=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "9462344318b376e157c94fa60c20a25b913b2381",
|
|
||||||
"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": {
|
||||||
"lastModified": 1688652536,
|
"lastModified": 1691810493,
|
||||||
"narHash": "sha256-6KJtj9pbvBm6fOVpnyzO2fEVC+cVrw2XtZHOgq9ieIw=",
|
"narHash": "sha256-cWA0rzkOp/ekVKaFee7iea1lhnqKtWUIU+fW5M950wI=",
|
||||||
"owner": "jose-elias-alvarez",
|
"owner": "jose-elias-alvarez",
|
||||||
"repo": "null-ls.nvim",
|
"repo": "null-ls.nvim",
|
||||||
"rev": "db09b6c691def0038c456551e4e2772186449f35",
|
"rev": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -345,11 +408,11 @@
|
|||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1690721668,
|
"lastModified": 1707013032,
|
||||||
"narHash": "sha256-550poDnDiMXLPQBJnUwhEzv0ZC4zjiFiwTaOIi3jfs4=",
|
"narHash": "sha256-9kEY/D0Q6sF+p6vJRefVXDK4QQdwK4Q0lSQdsYICad0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "1c4ba84e2cbfd43976a0fd3f848b536611735a79",
|
"rev": "ab432acea15134873882610c0e936a882319bc8a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -361,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"
|
||||||
}
|
}
|
||||||
@ -378,11 +441,11 @@
|
|||||||
"nvim-tree-lua-src": {
|
"nvim-tree-lua-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1690616703,
|
"lastModified": 1706571452,
|
||||||
"narHash": "sha256-kTbYvT21wLfiwEpQAgGZtep2GP4F9e7e6XGVpr4D1hY=",
|
"narHash": "sha256-b0LIqLC8cCRX1NyJx4eH5c4v5Fqqw5mMleAnQ2VRctM=",
|
||||||
"owner": "kyazdani42",
|
"owner": "kyazdani42",
|
||||||
"repo": "nvim-tree.lua",
|
"repo": "nvim-tree.lua",
|
||||||
"rev": "4bd30f0137e44dcf3e74cc1164efb568f78f2b02",
|
"rev": "f39f7b6fcd3865ac2146de4cb4045286308f2935",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -394,31 +457,83 @@
|
|||||||
"nvim-treesitter-src": {
|
"nvim-treesitter-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681121236,
|
"lastModified": 1706952848,
|
||||||
"narHash": "sha256-iPsPDLhVKJ14iP1/2cCgcY9SCKK/DQz9Y0mQB1DqNiM=",
|
"narHash": "sha256-pNjEODR+QJPDL58O4NM7SjzZEN8D3bXDHbKLNOS3fL8=",
|
||||||
"owner": "nvim-treesitter",
|
"owner": "nvim-treesitter",
|
||||||
"repo": "nvim-treesitter",
|
"repo": "nvim-treesitter",
|
||||||
"rev": "cc360a9beb1b30d172438f640e2c3450358c4086",
|
"rev": "4fbf150a1621d52f17b099506e1a32f107079210",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nvim-treesitter",
|
"owner": "nvim-treesitter",
|
||||||
"ref": "v0.9.0",
|
"ref": "master",
|
||||||
"repo": "nvim-treesitter",
|
"repo": "nvim-treesitter",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"proton-ge": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1700610476,
|
||||||
|
"narHash": "sha256-IoClZ6hl2lsz9OGfFgnz7vEAGlSY2+1K2lDEEsJQOfU=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-25/GE-Proton8-25.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-25/GE-Proton8-25.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ren": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1704996573,
|
||||||
|
"narHash": "sha256-zVIt6Xp+Mvym6gySvHIZJt1QgzKVP/wbTGTubWk6kzI=",
|
||||||
|
"owner": "robenkleene",
|
||||||
|
"repo": "ren-find",
|
||||||
|
"rev": "50c40172e354caffee48932266edd7c7a76a20fd",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "robenkleene",
|
||||||
|
"repo": "ren-find",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rep": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1705833236,
|
||||||
|
"narHash": "sha256-hm+v+b97z1HnY/7QHZxc0GygCq9W0mJauyjnz48ddaM=",
|
||||||
|
"owner": "robenkleene",
|
||||||
|
"repo": "rep-grep",
|
||||||
|
"rev": "365acc5d599934e94dc066eb85b7ddd684ba508b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "robenkleene",
|
||||||
|
"repo": "rep-grep",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"Comment-nvim-src": "Comment-nvim-src",
|
"Comment-nvim-src": "Comment-nvim-src",
|
||||||
"baleia-nvim-src": "baleia-nvim-src",
|
"baleia-nvim-src": "baleia-nvim-src",
|
||||||
"bufferline-nvim-src": "bufferline-nvim-src",
|
"bufferline-nvim-src": "bufferline-nvim-src",
|
||||||
|
"bypass-paywalls-clean": "bypass-paywalls-clean",
|
||||||
"cmp-nvim-lsp-src": "cmp-nvim-lsp-src",
|
"cmp-nvim-lsp-src": "cmp-nvim-lsp-src",
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
|
"fidget-nvim-src": "fidget-nvim-src",
|
||||||
"firefox-darwin": "firefox-darwin",
|
"firefox-darwin": "firefox-darwin",
|
||||||
|
"hmts-nvim-src": "hmts-nvim-src",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nil": "nil",
|
"kitty-scrollback-nvim-src": "kitty-scrollback-nvim-src",
|
||||||
|
"nextcloud-cookbook": "nextcloud-cookbook",
|
||||||
|
"nextcloud-external": "nextcloud-external",
|
||||||
|
"nextcloud-news": "nextcloud-news",
|
||||||
|
"nextcloud-snappymail": "nextcloud-snappymail",
|
||||||
"nix2vim": "nix2vim",
|
"nix2vim": "nix2vim",
|
||||||
"nixos-generators": "nixos-generators",
|
"nixos-generators": "nixos-generators",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
@ -427,37 +542,22 @@
|
|||||||
"nvim-lspconfig-src": "nvim-lspconfig-src",
|
"nvim-lspconfig-src": "nvim-lspconfig-src",
|
||||||
"nvim-tree-lua-src": "nvim-tree-lua-src",
|
"nvim-tree-lua-src": "nvim-tree-lua-src",
|
||||||
"nvim-treesitter-src": "nvim-treesitter-src",
|
"nvim-treesitter-src": "nvim-treesitter-src",
|
||||||
|
"proton-ge": "proton-ge",
|
||||||
|
"ren": "ren",
|
||||||
|
"rep": "rep",
|
||||||
"telescope-nvim-src": "telescope-nvim-src",
|
"telescope-nvim-src": "telescope-nvim-src",
|
||||||
"telescope-project-nvim-src": "telescope-project-nvim-src",
|
"telescope-project-nvim-src": "telescope-project-nvim-src",
|
||||||
"toggleterm-nvim-src": "toggleterm-nvim-src",
|
"toggleterm-nvim-src": "toggleterm-nvim-src",
|
||||||
"vscode-terraform-snippets": "vscode-terraform-snippets",
|
"tree-sitter-bash": "tree-sitter-bash",
|
||||||
|
"tree-sitter-ini": "tree-sitter-ini",
|
||||||
|
"tree-sitter-lua": "tree-sitter-lua",
|
||||||
|
"tree-sitter-puppet": "tree-sitter-puppet",
|
||||||
|
"tree-sitter-python": "tree-sitter-python",
|
||||||
|
"tree-sitter-rasi": "tree-sitter-rasi",
|
||||||
|
"tree-sitter-vimdoc": "tree-sitter-vimdoc",
|
||||||
"wallpapers": "wallpapers",
|
"wallpapers": "wallpapers",
|
||||||
"wsl": "wsl"
|
"wsl": "wsl",
|
||||||
}
|
"zenyd-mpv-scripts": "zenyd-mpv-scripts"
|
||||||
},
|
|
||||||
"rust-overlay": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": [
|
|
||||||
"nil",
|
|
||||||
"flake-utils"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"nil",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1680488274,
|
|
||||||
"narHash": "sha256-0vYMrZDdokVmPQQXtFpnqA2wEgCCUXf5a3dDuDVshn0=",
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"rev": "7ec2ff598a172c6e8584457167575b3a1a5d80d8",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
@ -493,16 +593,16 @@
|
|||||||
"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"
|
||||||
}
|
}
|
||||||
@ -510,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": {
|
||||||
@ -526,33 +626,132 @@
|
|||||||
"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"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vscode-terraform-snippets": {
|
"tree-sitter-bash": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1614849738,
|
"lastModified": 1705686017,
|
||||||
"narHash": "sha256-v392tyzXV+zyBNt5OCB2NBCK7JcByrTa5Ne/nFtSCJI=",
|
"narHash": "sha256-+Mpks0FyQLl26TX63J6WhaAl/QDUR1k9wSUY5SFwL+w=",
|
||||||
"owner": "run-at-scale",
|
"owner": "tree-sitter",
|
||||||
"repo": "vscode-terraform-doc-snippets",
|
"repo": "tree-sitter-bash",
|
||||||
"rev": "6ab3e44b566e660f38922cf908e6e547eaa5d4b4",
|
"rev": "f7239f638d3dc16762563a9027faeee518ce1bd9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "run-at-scale",
|
"owner": "tree-sitter",
|
||||||
"repo": "vscode-terraform-doc-snippets",
|
"ref": "master",
|
||||||
|
"repo": "tree-sitter-bash",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tree-sitter-ini": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1699877527,
|
||||||
|
"narHash": "sha256-dYPeVTNWO4apY5dsjsKViavU7YtLeGTp6BzEemXhsEU=",
|
||||||
|
"owner": "justinmk",
|
||||||
|
"repo": "tree-sitter-ini",
|
||||||
|
"rev": "bcb84a2d4bcd6f55b911c42deade75c8f90cb0c5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "justinmk",
|
||||||
|
"repo": "tree-sitter-ini",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tree-sitter-lua": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1694072484,
|
||||||
|
"narHash": "sha256-5t5w8KqbefInNbA12/jpNzmky/uOUhsLjKdEqpl1GEc=",
|
||||||
|
"owner": "MunifTanjim",
|
||||||
|
"repo": "tree-sitter-lua",
|
||||||
|
"rev": "9668709211b2e683f27f414454a8b51bf0a6bda1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "MunifTanjim",
|
||||||
|
"ref": "main",
|
||||||
|
"repo": "tree-sitter-lua",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tree-sitter-puppet": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690231696,
|
||||||
|
"narHash": "sha256-YEjjy9WLwITERYqoeSVrRYnwVBIAwdc4o0lvAK9wizw=",
|
||||||
|
"owner": "amaanq",
|
||||||
|
"repo": "tree-sitter-puppet",
|
||||||
|
"rev": "9ce9a5f7d64528572aaa8d59459ba869e634086b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "amaanq",
|
||||||
|
"repo": "tree-sitter-puppet",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tree-sitter-python": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1700218345,
|
||||||
|
"narHash": "sha256-hXNxa895SyNOG7PH2vAIkWbcMjZDjWYDsCafBZuvnT0=",
|
||||||
|
"owner": "tree-sitter",
|
||||||
|
"repo": "tree-sitter-python",
|
||||||
|
"rev": "4bfdd9033a2225cc95032ce77066b7aeca9e2efc",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "tree-sitter",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "tree-sitter-python",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tree-sitter-rasi": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1678701563,
|
||||||
|
"narHash": "sha256-2nYZoLcrxxxiOJEySwHUm93lzMg8mU+V7LIP63ntFdA=",
|
||||||
|
"owner": "Fymyte",
|
||||||
|
"repo": "tree-sitter-rasi",
|
||||||
|
"rev": "371dac6bcce0df5566c1cfebde69d90ecbeefd2d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Fymyte",
|
||||||
|
"repo": "tree-sitter-rasi",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tree-sitter-vimdoc": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1705491128,
|
||||||
|
"narHash": "sha256-q5Ln8WPFrtKBfZnaAAlMh3Q/eczEt6wCMZAtx+ISCKg=",
|
||||||
|
"owner": "neovim",
|
||||||
|
"repo": "tree-sitter-vimdoc",
|
||||||
|
"rev": "ed8695ad8de39c3f073da130156f00b1148e2891",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "neovim",
|
||||||
|
"repo": "tree-sitter-vimdoc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -575,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": 1690553050,
|
"lastModified": 1706867893,
|
||||||
"narHash": "sha256-pK3kF30OykL3v6P8UP6ipihlS34KoGq9SryCj3tHrFw=",
|
"narHash": "sha256-c5bADvtL35S3vsJaXR5YWTXe08W0gSwOrTOXfpJB4Ac=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"rev": "f7a95a37306c46b42e9ce751977c44c752fd5eca",
|
"rev": "bcae8dc73b931b7f0fc65f1f1ef93dc379dfd66b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -591,6 +792,22 @@
|
|||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"zenyd-mpv-scripts": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1706283438,
|
||||||
|
"narHash": "sha256-hpLZDtt5q18aZ8d9LHfT852wtBosKUTJ7Bx+cbjBLcg=",
|
||||||
|
"owner": "zenyd",
|
||||||
|
"repo": "mpv-scripts",
|
||||||
|
"rev": "7100d19d18d111ce77fc9e6e8947c0d542a86397",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "zenyd",
|
||||||
|
"repo": "mpv-scripts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
140
flake.nix
140
flake.nix
@ -9,12 +9,15 @@
|
|||||||
|
|
||||||
# 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 = {
|
||||||
@ -56,15 +59,10 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Nix language server
|
|
||||||
nil = {
|
|
||||||
url = "github:oxalica/nil/2023-04-03";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Neovim plugins
|
# Neovim plugins
|
||||||
nvim-lspconfig-src = {
|
nvim-lspconfig-src = {
|
||||||
url = "github:neovim/nvim-lspconfig/v0.1.6";
|
# https://github.com/neovim/nvim-lspconfig/tags
|
||||||
|
url = "github:neovim/nvim-lspconfig/v0.1.7";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
cmp-nvim-lsp-src = {
|
cmp-nvim-lsp-src = {
|
||||||
@ -76,19 +74,23 @@
|
|||||||
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;
|
||||||
};
|
};
|
||||||
nvim-treesitter-src = {
|
nvim-treesitter-src = {
|
||||||
url = "github:nvim-treesitter/nvim-treesitter/v0.9.0";
|
# https://github.com/nvim-treesitter/nvim-treesitter/tags
|
||||||
|
url = "github:nvim-treesitter/nvim-treesitter/master";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
telescope-nvim-src = {
|
telescope-nvim-src = {
|
||||||
url = "github:nvim-telescope/telescope.nvim/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 = {
|
||||||
@ -96,19 +98,118 @@
|
|||||||
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 = {
|
hmts-nvim-src = {
|
||||||
url = "github:run-at-scale/vscode-terraform-doc-snippets";
|
url = "github:calops/hmts.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
fidget-nvim-src = {
|
||||||
|
# https://github.com/j-hui/fidget.nvim/tags
|
||||||
|
url = "github:j-hui/fidget.nvim/v1.2.0";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
kitty-scrollback-nvim-src = {
|
||||||
|
url = "github:mikesmithgh/kitty-scrollback.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Tree-Sitter Grammars
|
||||||
|
tree-sitter-bash = {
|
||||||
|
url = "github:tree-sitter/tree-sitter-bash/master";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
tree-sitter-python = {
|
||||||
|
url = "github:tree-sitter/tree-sitter-python/master";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
tree-sitter-lua = {
|
||||||
|
url = "github:MunifTanjim/tree-sitter-lua/main";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
tree-sitter-ini = {
|
||||||
|
url = "github:justinmk/tree-sitter-ini";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
tree-sitter-puppet = {
|
||||||
|
url = "github:amaanq/tree-sitter-puppet";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
tree-sitter-rasi = {
|
||||||
|
url = "github:Fymyte/tree-sitter-rasi";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
tree-sitter-vimdoc = {
|
||||||
|
url = "github:neovim/tree-sitter-vimdoc";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# MPV Scripts
|
||||||
|
zenyd-mpv-scripts = {
|
||||||
|
url = "github:zenyd/mpv-scripts";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Ren and rep - CLI find and replace
|
||||||
|
rep = {
|
||||||
|
url = "github:robenkleene/rep-grep";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
ren = {
|
||||||
|
url = "github:robenkleene/ren-find";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# GE version of Proton for game compatibility
|
||||||
|
# Alternatively, could consider using https://github.com/fufexan/nix-gaming
|
||||||
|
proton-ge = {
|
||||||
|
# https://github.com/GloriousEggroll/proton-ge-custom/releases
|
||||||
|
url =
|
||||||
|
"https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-25/GE-Proton8-25.tar.gz";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Firefox addon from outside the extension store
|
||||||
|
bypass-paywalls-clean = {
|
||||||
|
# https://gitlab.com/magnolia1234/bpc-uploads/-/commits/master/?ref_type=HEADS
|
||||||
|
url = "gitlab:magnolia1234/bpc-uploads";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Nextcloud Apps
|
||||||
|
nextcloud-news = {
|
||||||
|
# https://github.com/nextcloud/news/releases
|
||||||
|
url =
|
||||||
|
"https://github.com/nextcloud/news/releases/download/25.0.0-alpha3/news.tar.gz";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
nextcloud-external = {
|
||||||
|
# https://github.com/nextcloud-releases/external/releases
|
||||||
|
url =
|
||||||
|
"https://github.com/nextcloud-releases/external/releases/download/v5.3.1/external-v5.3.1.tar.gz";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
nextcloud-cookbook = {
|
||||||
|
# https://github.com/christianlupus-nextcloud/cookbook-releases/releases/
|
||||||
|
url =
|
||||||
|
"https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.0/cookbook-0.11.0.tar.gz";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
nextcloud-snappymail = {
|
||||||
|
# https://github.com/the-djmaze/snappymail/releases
|
||||||
|
url =
|
||||||
|
"https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -131,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}";
|
||||||
@ -149,7 +252,14 @@
|
|||||||
(import ./overlays/calibre-web.nix)
|
(import ./overlays/calibre-web.nix)
|
||||||
(import ./overlays/disko.nix inputs)
|
(import ./overlays/disko.nix inputs)
|
||||||
(import ./overlays/tree-sitter.nix inputs)
|
(import ./overlays/tree-sitter.nix inputs)
|
||||||
|
(import ./overlays/caddy.nix inputs)
|
||||||
|
(import ./overlays/mpv-scripts.nix inputs)
|
||||||
|
(import ./overlays/nextcloud-apps.nix inputs)
|
||||||
(import ./overlays/betterlockscreen.nix)
|
(import ./overlays/betterlockscreen.nix)
|
||||||
|
(import ./overlays/proton-ge.nix inputs)
|
||||||
|
(import ./overlays/gh-collaborators.nix)
|
||||||
|
(import ./overlays/bypass-paywalls-clean.nix inputs)
|
||||||
|
(import ./overlays/ren-rep.nix inputs)
|
||||||
];
|
];
|
||||||
|
|
||||||
# System types to support.
|
# System types to support.
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# Hosts
|
# Hosts
|
||||||
|
|
||||||
|
These are the individual machines managed by this flake.
|
||||||
|
|
||||||
| Host | Purpose |
|
| Host | Purpose |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| [aws](./aws/default.nix) | AWS AMI |
|
| [aws](./aws/default.nix) | AWS AMI |
|
||||||
@ -10,3 +12,15 @@
|
|||||||
| [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.
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
# The Flame
|
# The Flame
|
||||||
# System configuration for an Oracle free server
|
# System configuration for an Oracle free server
|
||||||
|
|
||||||
|
# See [readme](../README.md) to explain how this file works.
|
||||||
|
|
||||||
# How to install:
|
# How to install:
|
||||||
# https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/
|
# https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/
|
||||||
|
# These days, probably use nixos-anywhere instead.
|
||||||
|
|
||||||
{ inputs, globals, overlays, ... }:
|
{ inputs, globals, overlays, ... }:
|
||||||
|
|
||||||
@ -21,40 +24,49 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
server = true;
|
server = true;
|
||||||
networking.hostName = "flame";
|
networking.hostName = "flame";
|
||||||
|
|
||||||
|
# Not sure what's necessary but too afraid to remove anything
|
||||||
imports = [ (inputs.nixpkgs + "/nixos/modules/profiles/qemu-guest.nix") ];
|
imports = [ (inputs.nixpkgs + "/nixos/modules/profiles/qemu-guest.nix") ];
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" ];
|
||||||
|
|
||||||
|
# File systems must be declared in order to boot
|
||||||
|
|
||||||
|
# This is the root filesystem containing NixOS
|
||||||
|
# I forgot to set a clean label for it
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/e1b6bd50-306d-429a-9f45-78f57bc597c3";
|
device = "/dev/disk/by-uuid/e1b6bd50-306d-429a-9f45-78f57bc597c3";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# This is the boot filesystem for systemd-boot
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-uuid/D5CA-237A";
|
device = "/dev/disk/by-uuid/D5CA-237A";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Theming
|
# Theming
|
||||||
|
|
||||||
|
# Server doesn't require GUI
|
||||||
gui.enable = false;
|
gui.enable = false;
|
||||||
|
|
||||||
|
# Still require colors for programs like Neovim, K9S
|
||||||
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
||||||
|
|
||||||
# Disable passwords, only use SSH key
|
|
||||||
publicKey =
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
|
||||||
|
|
||||||
# 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;
|
||||||
|
giteaRunner.enable = true;
|
||||||
services.caddy.enable = true;
|
services.caddy.enable = true;
|
||||||
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
|
||||||
|
|
||||||
|
# Allows private remote access over the internet
|
||||||
cloudflareTunnel = {
|
cloudflareTunnel = {
|
||||||
enable = true;
|
enable = true;
|
||||||
id = "bd250ee1-ed2e-42d2-b627-039f1eb5a4d2";
|
id = "bd250ee1-ed2e-42d2-b627-039f1eb5a4d2";
|
||||||
@ -63,8 +75,6 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK/6oyVqjFGX3Uvrc3VS8J9sphxzAnRzKC85xgkHfYgR3TK6qBGXzHrknEj21xeZrr3G2y1UsGzphWJd9ZfIcdA= open-ssh-ca@cloudflareaccess.org";
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK/6oyVqjFGX3Uvrc3VS8J9sphxzAnRzKC85xgkHfYgR3TK6qBGXzHrknEj21xeZrr3G2y1UsGzphWJd9ZfIcdA= open-ssh-ca@cloudflareaccess.org";
|
||||||
};
|
};
|
||||||
|
|
||||||
giteaRunner.enable = true;
|
|
||||||
|
|
||||||
# Nextcloud backup config
|
# Nextcloud backup config
|
||||||
backup.s3 = {
|
backup.s3 = {
|
||||||
endpoint = "s3.us-west-002.backblazeb2.com";
|
endpoint = "s3.us-west-002.backblazeb2.com";
|
||||||
@ -72,8 +82,9 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
accessKeyId = "0026b0e73b2e2c80000000005";
|
accessKeyId = "0026b0e73b2e2c80000000005";
|
||||||
};
|
};
|
||||||
|
|
||||||
# # Grant access to Jellyfin directories from Nextcloud
|
# Disable passwords, only use SSH key
|
||||||
# users.users.nextcloud.extraGroups = [ "jellyfin" ];
|
publicKey =
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
||||||
|
|
||||||
# # Wireguard config for Transmission
|
# # Wireguard config for Transmission
|
||||||
# wireguard.enable = true;
|
# wireguard.enable = true;
|
||||||
@ -104,9 +115,6 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
# # VPN port forwarding
|
# # VPN port forwarding
|
||||||
# services.transmission.settings.peer-port = 57599;
|
# services.transmission.settings.peer-port = 57599;
|
||||||
|
|
||||||
# # Grant access to Transmission directories from Jellyfin
|
|
||||||
# users.users.jellyfin.extraGroups = [ "transmission" ];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -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 {
|
||||||
@ -22,7 +24,7 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
colors = (import ../../colorscheme/gruvbox).dark;
|
colors = (import ../../colorscheme/gruvbox).dark;
|
||||||
dark = true;
|
dark = true;
|
||||||
};
|
};
|
||||||
passwordHash = inputs.nixpkgs.lib.fileContents ../../password.sha512;
|
passwordHash = inputs.nixpkgs.lib.fileContents ../../misc/password.sha512;
|
||||||
wsl = {
|
wsl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wslConf.automount.root = "/mnt";
|
wslConf.automount.root = "/mnt";
|
||||||
|
@ -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 {
|
||||||
@ -13,11 +15,14 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
../../modules/common
|
../../modules/common
|
||||||
../../modules/nixos
|
../../modules/nixos
|
||||||
{
|
{
|
||||||
|
nixpkgs.overlays = overlays;
|
||||||
|
|
||||||
# Hardware
|
# Hardware
|
||||||
server = true;
|
server = true;
|
||||||
physical = true;
|
physical = true;
|
||||||
networking.hostName = "swan";
|
networking.hostName = "swan";
|
||||||
|
|
||||||
|
# Not sure what's necessary but too afraid to remove anything
|
||||||
boot.initrd.availableKernelModules =
|
boot.initrd.availableKernelModules =
|
||||||
[ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
[ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
||||||
|
|
||||||
@ -30,29 +35,44 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
"amdgpu.cik_support=1"
|
"amdgpu.cik_support=1"
|
||||||
"amdgpu.dc=1"
|
"amdgpu.dc=1"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Required binary blobs to boot on this machine
|
||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
|
# Prioritize efficiency over performance
|
||||||
powerManagement.cpuFreqGovernor = "powersave";
|
powerManagement.cpuFreqGovernor = "powersave";
|
||||||
|
|
||||||
|
# Allow firmware updates
|
||||||
hardware.cpu.intel.updateMicrocode = true;
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
|
|
||||||
# ZFS
|
# ZFS
|
||||||
zfs.enable = true;
|
zfs.enable = true;
|
||||||
# Generated with: head -c 8 /etc/machine-id
|
# Generated with: head -c 8 /etc/machine-id
|
||||||
networking.hostId = "600279f4"; # Random ID required for ZFS
|
networking.hostId = "600279f4"; # Random ID required for ZFS
|
||||||
|
|
||||||
|
# Sets root ext4 filesystem instead of declaring it manually
|
||||||
disko = {
|
disko = {
|
||||||
enableConfig = true;
|
enableConfig = true;
|
||||||
devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; });
|
devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Automatically load the ZFS pool on boot
|
||||||
boot.zfs.extraPools = [ "tank" ];
|
boot.zfs.extraPools = [ "tank" ];
|
||||||
|
|
||||||
|
# Theming
|
||||||
|
|
||||||
|
# Server doesn't require GUI
|
||||||
gui.enable = false;
|
gui.enable = false;
|
||||||
|
|
||||||
|
# Still require colors for programs like Neovim, K9S
|
||||||
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
||||||
nixpkgs.overlays = overlays;
|
|
||||||
|
# Programs and services
|
||||||
|
atuin.enable = true;
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
cloudflare.enable = true;
|
cloudflare.enable = true;
|
||||||
dotfiles.enable = true;
|
dotfiles.enable = true;
|
||||||
arrs.enable = true;
|
arrs.enable = true;
|
||||||
|
|
||||||
services.bind.enable = true;
|
services.bind.enable = true;
|
||||||
services.caddy.enable = true;
|
services.caddy.enable = true;
|
||||||
services.jellyfin.enable = true;
|
services.jellyfin.enable = true;
|
||||||
@ -62,7 +82,10 @@ 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
|
||||||
cloudflareTunnel = {
|
cloudflareTunnel = {
|
||||||
enable = true;
|
enable = true;
|
||||||
id = "646754ac-2149-4a58-b51a-e1d0a1f3ade2";
|
id = "646754ac-2149-4a58-b51a-e1d0a1f3ade2";
|
||||||
@ -71,6 +94,7 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCHF/UMtJqPFrf6f6GRY0ZFnkCW7b6sYgUTjTtNfRj1RdmNic1NoJZql7y6BrqQinZvy7nsr1UFDNWoHn6ah3tg= open-ssh-ca@cloudflareaccess.org";
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCHF/UMtJqPFrf6f6GRY0ZFnkCW7b6sYgUTjTtNfRj1RdmNic1NoJZql7y6BrqQinZvy7nsr1UFDNWoHn6ah3tg= open-ssh-ca@cloudflareaccess.org";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Send regular backups and litestream for DBs to an S3-like bucket
|
||||||
backup.s3 = {
|
backup.s3 = {
|
||||||
endpoint = "s3.us-west-002.backblazeb2.com";
|
endpoint = "s3.us-west-002.backblazeb2.com";
|
||||||
bucket = "noahmasur-backup";
|
bucket = "noahmasur-backup";
|
||||||
|
@ -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 {
|
||||||
@ -17,14 +19,25 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
physical = true;
|
physical = true;
|
||||||
networking.hostName = "tempest";
|
networking.hostName = "tempest";
|
||||||
|
|
||||||
|
# Not sure what's necessary but too afraid to remove anything
|
||||||
boot.initrd.availableKernelModules =
|
boot.initrd.availableKernelModules =
|
||||||
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||||
|
|
||||||
|
# Graphics and VMs
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||||
|
|
||||||
|
# Required binary blobs to boot on this machine
|
||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
|
# Prioritize performance over efficiency
|
||||||
powerManagement.cpuFreqGovernor = "performance";
|
powerManagement.cpuFreqGovernor = "performance";
|
||||||
|
|
||||||
|
# Allow firmware updates
|
||||||
hardware.cpu.amd.updateMicrocode = true;
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
|
|
||||||
|
# Helps reduce GPU fan noise under idle loads
|
||||||
hardware.fancontrol.enable = true;
|
hardware.fancontrol.enable = true;
|
||||||
hardware.fancontrol.config = ''
|
hardware.fancontrol.config = ''
|
||||||
# Configuration file generated by pwmconfig, changes will be lost
|
# Configuration file generated by pwmconfig, changes will be lost
|
||||||
@ -41,22 +54,29 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
MAXPWM=hwmon0/pwm1=240
|
MAXPWM=hwmon0/pwm1=240
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# File systems must be declared in order to boot
|
||||||
|
|
||||||
|
# This is the root filesystem containing NixOS
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-label/nixos";
|
device = "/dev/disk/by-label/nixos";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# This is the boot filesystem for Grub
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-label/boot";
|
device = "/dev/disk/by-label/boot";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Must be prepared ahead
|
# Secrets must be prepared ahead before deploying
|
||||||
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
|
passwordHash = inputs.nixpkgs.lib.fileContents ../../misc/password.sha512;
|
||||||
passwordHash = inputs.nixpkgs.lib.fileContents ../../password.sha512;
|
|
||||||
|
|
||||||
# Theming
|
# Theming
|
||||||
|
|
||||||
|
# Turn on all features related to desktop and graphical applications
|
||||||
gui.enable = true;
|
gui.enable = true;
|
||||||
|
|
||||||
|
# Set the system-wide theme, also used for non-graphical programs
|
||||||
theme = {
|
theme = {
|
||||||
colors = (import ../../colorscheme/gruvbox-dark).dark;
|
colors = (import ../../colorscheme/gruvbox-dark).dark;
|
||||||
dark = true;
|
dark = true;
|
||||||
@ -65,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;
|
||||||
@ -81,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;
|
||||||
@ -91,9 +113,11 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
leagueoflegends.enable = true;
|
leagueoflegends.enable = true;
|
||||||
ryujinx.enable = true;
|
ryujinx.enable = true;
|
||||||
};
|
};
|
||||||
services.vmagent.enable = true;
|
services.vmagent.enable = true; # Enables Prometheus metrics
|
||||||
|
services.openssh.enable =
|
||||||
|
true; # Required for Cloudflare tunnel and identity file
|
||||||
|
|
||||||
services.openssh.enable = true; # Required for Cloudflare tunnel
|
# Allows private remote access over the internet
|
||||||
cloudflareTunnel = {
|
cloudflareTunnel = {
|
||||||
enable = true;
|
enable = true;
|
||||||
id = "ac133a82-31fb-480c-942a-cdbcd4c58173";
|
id = "ac133a82-31fb-480c-942a-cdbcd4c58173";
|
||||||
@ -103,6 +127,8 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Allows requests to force machine to wake up
|
# Allows requests to force machine to wake up
|
||||||
|
# This network interface might change, needs to be set specifically for each machine.
|
||||||
|
# Or set usePredictableInterfaceNames = false
|
||||||
networking.interfaces.enp5s0.wakeOnLan.enable = true;
|
networking.interfaces.enp5s0.wakeOnLan.enable = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
21
misc/README.md
Normal file
21
misc/README.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Miscellaneous
|
||||||
|
|
||||||
|
These files contain important data sourced by the configuration, or simply
|
||||||
|
information to store for safekeeping later.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Creating hashed password for [password.sha512](./password.sha512):
|
||||||
|
|
||||||
|
```
|
||||||
|
mkpasswd -m sha-512
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Getting key for [public-keys](./public-keys):
|
||||||
|
|
||||||
|
```
|
||||||
|
ssh-keyscan -t ed25519 <hostname>
|
||||||
|
```
|
||||||
|
|
23
misc/libratbag-profile
Normal file
23
misc/libratbag-profile
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
Profile 1: (active)
|
||||||
|
Name: n/a
|
||||||
|
Report Rate: 1000Hz
|
||||||
|
Resolutions:
|
||||||
|
0: 400dpi (active) (default)
|
||||||
|
1: 800dpi
|
||||||
|
2: 1600dpi
|
||||||
|
3: 2400dpi
|
||||||
|
4: 0dpi
|
||||||
|
Button: 0 is mapped to 'button 1'
|
||||||
|
Button: 1 is mapped to 'button 2'
|
||||||
|
Button: 2 is mapped to 'button 3'
|
||||||
|
Button: 3 is mapped to 'button 4'
|
||||||
|
Button: 4 is mapped to 'button 5'
|
||||||
|
Button: 5 is mapped to macro '↕F11'
|
||||||
|
Button: 6 is mapped to macro '↕VOLUMEDOWN'
|
||||||
|
Button: 7 is mapped to macro '↕VOLUMEUP'
|
||||||
|
Button: 8 is mapped to 'unknown'
|
||||||
|
Button: 9 is mapped to 'wheel-right'
|
||||||
|
Button: 10 is mapped to 'wheel-left'
|
||||||
|
LED: 0, depth: monochrome, mode: on, color: 000000
|
||||||
|
LED: 1, depth: monochrome, mode: on, color: 000000
|
||||||
|
LED: 2, depth: monochrome, mode: on, color: 000000
|
@ -1,5 +1,6 @@
|
|||||||
# Scan hosts: ssh-keyscan -t ed25519 <hostnames>
|
# Scan hosts: ssh-keyscan -t ed25519 <hostnames>
|
||||||
|
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s tempest
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s personal
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHVknmPi7sG6ES0G0jcsvebzKGWWaMfJTYgvOue6EULI flame
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHVknmPi7sG6ES0G0jcsvebzKGWWaMfJTYgvOue6EULI flame
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ9mwXlZnIALt9SnH3FOZvdgHLM5ZqwYUERXBbM7Rwh6 swan
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ9mwXlZnIALt9SnH3FOZvdgHLM5ZqwYUERXBbM7Rwh6 swan
|
||||||
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3yHivgEXr2ecwe58h9bkhwTYivf3GwL8xenQKMeiUb tempest
|
@ -5,4 +5,5 @@
|
|||||||
| [common](./common/default.nix) | User programs and OS-agnostic configuration |
|
| [common](./common/default.nix) | User programs and OS-agnostic configuration |
|
||||||
| [darwin](./darwin/default.nix) | macOS-specific configuration |
|
| [darwin](./darwin/default.nix) | macOS-specific configuration |
|
||||||
| [nixos](./nixos/default.nix) | NixOS-specific configuration |
|
| [nixos](./nixos/default.nix) | NixOS-specific configuration |
|
||||||
|
| [wsl](./wsl/default.nix) | WSL-specific configuration |
|
||||||
|
|
||||||
|
@ -9,12 +9,22 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf
|
config = lib.mkIf (config.gui.enable && config._1password.enable) {
|
||||||
(config.gui.enable && config._1password.enable && pkgs.stdenv.isLinux) {
|
unfreePackages = [ "1password" "_1password-gui" "1password-cli" ];
|
||||||
unfreePackages = [ "1password" "_1password-gui" ];
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
home.packages = with pkgs; [ _1password-gui ];
|
home.packages = with pkgs; [ _1password-gui _1password ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# 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",
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
unfreePackages = [
|
unfreePackages = [
|
||||||
(lib.mkIf config._1password.enable "onepassword-password-manager")
|
(lib.mkIf config._1password.enable "onepassword-password-manager")
|
||||||
"okta-browser-plugin"
|
"okta-browser-plugin"
|
||||||
|
"wappalyzer"
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
@ -28,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 = {
|
||||||
@ -73,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 = ''
|
||||||
@ -114,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;
|
||||||
|
@ -31,21 +31,7 @@
|
|||||||
pkgs.mpvScripts.autoload
|
pkgs.mpvScripts.autoload
|
||||||
|
|
||||||
# Delete current file after quitting
|
# Delete current file after quitting
|
||||||
(pkgs.stdenv.mkDerivation rec {
|
pkgs.mpvScripts.mpv-delete-file
|
||||||
pname = "mpv-delete-file";
|
|
||||||
version = "0.1"; # made-up
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "zenyd";
|
|
||||||
repo = "mpv-scripts";
|
|
||||||
rev = "19ea069abcb794d1bf8fac2f59b50d71ab992130";
|
|
||||||
sha256 = "sha256-OBCuzCtgfSwj0i/rBNranuu4LRc47jObwQIJgQQoerg=";
|
|
||||||
} + "/delete_file.lua";
|
|
||||||
dontBuild = true;
|
|
||||||
dontUnpack = true;
|
|
||||||
installPhase =
|
|
||||||
"install -Dm644 ${src} $out/share/mpv/scripts/delete_file.lua";
|
|
||||||
passthru.scriptName = "delete_file.lua";
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -54,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 = {
|
||||||
@ -62,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>";
|
||||||
|
@ -44,7 +44,8 @@
|
|||||||
# Better local mail search
|
# Better local mail search
|
||||||
programs.notmuch = {
|
programs.notmuch = {
|
||||||
enable = true;
|
enable = true;
|
||||||
new.ignore = [ ".mbsyncstate.lock" ".mbsyncstate.journal" ];
|
new.ignore =
|
||||||
|
[ ".mbsyncstate.lock" ".mbsyncstate.journal" ".mbsyncstate.new" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
accounts.email = {
|
accounts.email = {
|
||||||
@ -104,7 +105,7 @@
|
|||||||
|
|
||||||
# Used to login and send and receive emails
|
# Used to login and send and receive emails
|
||||||
passwordCommand =
|
passwordCommand =
|
||||||
"${pkgs.age}/bin/age --decrypt --identity ${config.identityFile} ${
|
"${pkgs.age}/bin/age --decrypt --identity ~/.ssh/id_ed25519 ${
|
||||||
pkgs.writeText "mailpass.age"
|
pkgs.writeText "mailpass.age"
|
||||||
(builtins.readFile ../../../private/mailpass.age)
|
(builtins.readFile ../../../private/mailpass.age)
|
||||||
}";
|
}";
|
||||||
|
@ -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,28 +1,74 @@
|
|||||||
{ pkgs, dsl, ... }: {
|
{ pkgs, lib, config, dsl, ... }: {
|
||||||
|
|
||||||
|
# Terraform optional because non-free
|
||||||
|
options.github = lib.mkEnableOption "Whether to enable GitHub features";
|
||||||
|
options.kubernetes =
|
||||||
|
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";
|
||||||
|
|
||||||
|
config =
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
terraformFormat = if config.terraform then ''
|
||||||
|
require("null-ls").builtins.formatting.terraform_fmt.with({
|
||||||
|
command = "${pkgs.terraform}/bin/terraform",
|
||||||
|
extra_filetypes = { "hcl" },
|
||||||
|
}),
|
||||||
|
'' else
|
||||||
|
"";
|
||||||
|
|
||||||
|
pythonFormat = if config.python then ''
|
||||||
|
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
|
||||||
|
"";
|
||||||
|
|
||||||
|
in {
|
||||||
plugins = [
|
plugins = [
|
||||||
pkgs.vimPlugins.nvim-lspconfig
|
pkgs.vimPlugins.nvim-lspconfig
|
||||||
pkgs.vimPlugins.lsp-colors-nvim
|
|
||||||
pkgs.vimPlugins.null-ls-nvim
|
pkgs.vimPlugins.null-ls-nvim
|
||||||
|
pkgs.vimPlugins.fidget-nvim
|
||||||
];
|
];
|
||||||
|
|
||||||
|
setup.fidget = { };
|
||||||
|
|
||||||
use.lspconfig.lua_ls.setup = dsl.callWith {
|
use.lspconfig.lua_ls.setup = dsl.callWith {
|
||||||
settings = { Lua = { diagnostics = { globals = [ "vim" "hs" ]; }; }; };
|
settings = { Lua = { diagnostics = { globals = [ "vim" "hs" ]; }; }; };
|
||||||
capabilities = dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
capabilities =
|
||||||
|
dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
||||||
cmd = [ "${pkgs.lua-language-server}/bin/lua-language-server" ];
|
cmd = [ "${pkgs.lua-language-server}/bin/lua-language-server" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
use.lspconfig.nil_ls.setup = dsl.callWith {
|
use.lspconfig.nil_ls.setup = dsl.callWith {
|
||||||
cmd = [ "${pkgs.nil}/bin/nil" ];
|
cmd = [ "${pkgs.nil}/bin/nil" ];
|
||||||
capabilities = dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
capabilities =
|
||||||
|
dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
||||||
};
|
};
|
||||||
|
|
||||||
use.lspconfig.pyright.setup = dsl.callWith {
|
use.lspconfig.pyright.setup = dsl.callWith {
|
||||||
cmd = [ "${pkgs.pyright}/bin/pyright-langserver" "--stdio" ];
|
cmd = if config.python then [
|
||||||
|
"${pkgs.pyright}/bin/pyright-langserver"
|
||||||
|
"--stdio"
|
||||||
|
] else
|
||||||
|
[ "echo" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
use.lspconfig.terraformls.setup =
|
use.lspconfig.terraformls.setup = dsl.callWith {
|
||||||
dsl.callWith { cmd = [ "${pkgs.terraform-ls}/bin/terraform-ls" "serve" ]; };
|
cmd = if config.terraform then [
|
||||||
|
"${pkgs.terraform-ls}/bin/terraform-ls"
|
||||||
|
"serve"
|
||||||
|
] else
|
||||||
|
[ "echo" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
use.lspconfig.rust_analyzer.setup = dsl.callWith {
|
||||||
|
cmd = [ "${pkgs.rust-analyzer}/bin/rust-analyzer" ];
|
||||||
|
settings = {
|
||||||
|
"['rust-analyzer']" = { check = { command = "clippy"; }; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
vim.api.nvim_create_augroup = dsl.callWith [ "LspFormatting" { } ];
|
vim.api.nvim_create_augroup = dsl.callWith [ "LspFormatting" { } ];
|
||||||
|
|
||||||
@ -35,8 +81,6 @@
|
|||||||
require("null-ls").setup({
|
require("null-ls").setup({
|
||||||
sources = {
|
sources = {
|
||||||
require("null-ls").builtins.formatting.stylua.with({ command = "${pkgs.stylua}/bin/stylua" }),
|
require("null-ls").builtins.formatting.stylua.with({ command = "${pkgs.stylua}/bin/stylua" }),
|
||||||
require("null-ls").builtins.formatting.black.with({ command = "${pkgs.black}/bin/black" }),
|
|
||||||
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.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.nixfmt.with({ command = "${pkgs.nixfmt}/bin/nixfmt" }),
|
||||||
require("null-ls").builtins.formatting.rustfmt.with({ command = "${pkgs.rustfmt}/bin/rustfmt" }),
|
require("null-ls").builtins.formatting.rustfmt.with({ command = "${pkgs.rustfmt}/bin/rustfmt" }),
|
||||||
@ -45,10 +89,8 @@
|
|||||||
command = "${pkgs.shfmt}/bin/shfmt",
|
command = "${pkgs.shfmt}/bin/shfmt",
|
||||||
extra_args = { "-i", "4", "-ci" },
|
extra_args = { "-i", "4", "-ci" },
|
||||||
}),
|
}),
|
||||||
require("null-ls").builtins.formatting.terraform_fmt.with({
|
${pythonFormat}
|
||||||
command = "${pkgs.terraform}/bin/terraform",
|
${terraformFormat}
|
||||||
extra_filetypes = { "hcl" },
|
|
||||||
}),
|
|
||||||
},
|
},
|
||||||
|
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
@ -73,4 +115,6 @@
|
|||||||
})
|
})
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
@ -52,7 +54,9 @@
|
|||||||
vim.o.backup = true; # Easier to recover and more secure
|
vim.o.backup = true; # Easier to recover and more secure
|
||||||
vim.bo.swapfile = false; # Instead of swaps, create backups
|
vim.bo.swapfile = false; # Instead of swaps, create backups
|
||||||
vim.bo.undofile = true; # Keeps undos after quit
|
vim.bo.undofile = true; # Keeps undos after quit
|
||||||
vim.o.backupdir = dsl.rawLua ''vim.fn.stdpath("cache") .. "/backup"'';
|
vim.o.backupdir =
|
||||||
|
dsl.rawLua ''vim.fn.expand("~/.local/state/nvim/backup//")'';
|
||||||
|
vim.o.undodir = dsl.rawLua ''vim.fn.expand("~/.local/state/nvim/undo//")'';
|
||||||
|
|
||||||
# Required for nvim-cmp completion
|
# Required for nvim-cmp completion
|
||||||
vim.opt.completeopt = [ "menu" "menuone" "noselect" ];
|
vim.opt.completeopt = [ "menu" "menuone" "noselect" ];
|
||||||
@ -67,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,22 +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.vimUtils.buildVimPluginFrom2Nix {
|
# pkgs.hmts-nvim # Tree-sitter injections for home-manager
|
||||||
|
(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 {
|
||||||
@ -20,6 +25,7 @@ in {
|
|||||||
|
|
||||||
# Use Neovim as the editor for git commit messages
|
# Use Neovim as the editor for git commit messages
|
||||||
programs.git.extraConfig.core.editor = "nvim";
|
programs.git.extraConfig.core.editor = "nvim";
|
||||||
|
programs.jujutsu.settings.ui.editor = "nvim";
|
||||||
|
|
||||||
# Set Neovim as the default app for text editing and manual pages
|
# Set Neovim as the default app for text editing and manual pages
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
@ -41,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>")
|
||||||
|
|
||||||
@ -65,6 +64,12 @@ key("n", "<C-Down>", ":resize -2<CR>", { silent = true })
|
|||||||
key("n", "<C-Left>", ":vertical resize -2<CR>", { silent = true })
|
key("n", "<C-Left>", ":vertical resize -2<CR>", { silent = true })
|
||||||
key("n", "<C-Right>", ":vertical resize +2<CR>", { silent = true })
|
key("n", "<C-Right>", ":vertical resize +2<CR>", { silent = true })
|
||||||
|
|
||||||
|
-- Quickfix
|
||||||
|
key("n", "]q", ":cnext<CR>")
|
||||||
|
key("n", "[q", ":cprevious<CR>")
|
||||||
|
key("n", "co", ":copen<CR>")
|
||||||
|
key("n", "cq", ":cclose<CR>")
|
||||||
|
|
||||||
-- Other
|
-- Other
|
||||||
key("n", "<A-CR>", ":noh<CR>", { silent = true }) --- Clear search in VimWiki
|
key("n", "<A-CR>", ":noh<CR>", { silent = true }) --- Clear search in VimWiki
|
||||||
key("n", "Y", "y$") --- Copy to end of line
|
key("n", "Y", "y$") --- Copy to end of line
|
||||||
|
@ -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,18 +24,29 @@
|
|||||||
# Terminal Kubernetes UI
|
# Terminal Kubernetes UI
|
||||||
programs.k9s = {
|
programs.k9s = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# settings = { k9s = { headless = true; }; };
|
settings = {
|
||||||
skin = {
|
k9s = {
|
||||||
|
ui = {
|
||||||
|
enableMouse = true;
|
||||||
|
headless = true;
|
||||||
|
logoless = true;
|
||||||
|
crumbsless = false;
|
||||||
|
skin = "main";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
skins = {
|
||||||
|
main = {
|
||||||
k9s = {
|
k9s = {
|
||||||
body = {
|
body = {
|
||||||
fgColor = config.theme.colors.base06;
|
fgColor = config.theme.colors.base06;
|
||||||
bgColor = config.theme.colors.base00;
|
bgColor = "default";
|
||||||
logoColor = config.theme.colors.base02; # *blue ?
|
logoColor = config.theme.colors.base02; # *blue ?
|
||||||
};
|
};
|
||||||
# Search bar
|
# Search bar
|
||||||
prompt = {
|
prompt = {
|
||||||
fgColor = config.theme.colors.base06;
|
fgColor = config.theme.colors.base06;
|
||||||
bgColor = config.theme.colors.base00;
|
bgColor = "default";
|
||||||
suggestColor = config.theme.colors.base03;
|
suggestColor = config.theme.colors.base03;
|
||||||
};
|
};
|
||||||
# Header left side
|
# Header left side
|
||||||
@ -45,7 +56,7 @@
|
|||||||
};
|
};
|
||||||
dialog = {
|
dialog = {
|
||||||
fgColor = config.theme.colors.base06;
|
fgColor = config.theme.colors.base06;
|
||||||
bgColor = config.theme.colors.base00;
|
bgColor = "default";
|
||||||
buttonFgColor = config.theme.colors.base06;
|
buttonFgColor = config.theme.colors.base06;
|
||||||
buttonBgColor = config.theme.colors.base0E;
|
buttonBgColor = config.theme.colors.base0E;
|
||||||
buttonFocusFgColor = config.theme.colors.base07;
|
buttonFocusFgColor = config.theme.colors.base07;
|
||||||
@ -79,7 +90,7 @@
|
|||||||
};
|
};
|
||||||
title = {
|
title = {
|
||||||
fgColor = config.theme.colors.base06;
|
fgColor = config.theme.colors.base06;
|
||||||
bgColor = config.theme.colors.base00;
|
bgColor = "default";
|
||||||
highlightColor = config.theme.colors.base09; # *orange
|
highlightColor = config.theme.colors.base09; # *orange
|
||||||
counterColor = config.theme.colors.base0D; # *blue
|
counterColor = config.theme.colors.base0D; # *blue
|
||||||
filterColor = config.theme.colors.base0E; # *magenta
|
filterColor = config.theme.colors.base0E; # *magenta
|
||||||
@ -87,7 +98,7 @@
|
|||||||
};
|
};
|
||||||
views = {
|
views = {
|
||||||
charts = {
|
charts = {
|
||||||
bgColor = config.theme.colors.base00;
|
bgColor = "default";
|
||||||
defaultDialColors =
|
defaultDialColors =
|
||||||
[ config.theme.colors.base0D config.theme.colors.base08 ];
|
[ config.theme.colors.base0D config.theme.colors.base08 ];
|
||||||
# - *blue
|
# - *blue
|
||||||
@ -100,7 +111,7 @@
|
|||||||
table = {
|
table = {
|
||||||
# List of resources
|
# List of resources
|
||||||
fgColor = config.theme.colors.base06;
|
fgColor = config.theme.colors.base06;
|
||||||
bgColor = config.theme.colors.base00;
|
bgColor = "default";
|
||||||
|
|
||||||
# Row selection
|
# Row selection
|
||||||
cursorFgColor = config.theme.colors.base07;
|
cursorFgColor = config.theme.colors.base07;
|
||||||
@ -109,13 +120,13 @@
|
|||||||
# Header row
|
# Header row
|
||||||
header = {
|
header = {
|
||||||
fgColor = config.theme.colors.base0D;
|
fgColor = config.theme.colors.base0D;
|
||||||
bgColor = config.theme.colors.base00;
|
bgColor = "default";
|
||||||
sorterColor = config.theme.colors.base0A; # *selection
|
sorterColor = config.theme.colors.base0A; # *selection
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
xray = {
|
xray = {
|
||||||
fgColor = config.theme.colors.base06;
|
fgColor = config.theme.colors.base06;
|
||||||
bgColor = config.theme.colors.base00;
|
bgColor = "default";
|
||||||
cursorColor = config.theme.colors.base06;
|
cursorColor = config.theme.colors.base06;
|
||||||
graphicColor = config.theme.colors.base0D;
|
graphicColor = config.theme.colors.base0D;
|
||||||
showIcons = false;
|
showIcons = false;
|
||||||
@ -127,10 +138,11 @@
|
|||||||
};
|
};
|
||||||
logs = {
|
logs = {
|
||||||
fgColor = config.theme.colors.base06;
|
fgColor = config.theme.colors.base06;
|
||||||
bgColor = config.theme.colors.base00;
|
bgColor = "default";
|
||||||
indicator = {
|
indicator = {
|
||||||
fgColor = config.theme.colors.base06;
|
fgColor = config.theme.colors.base06;
|
||||||
bgColor = config.theme.colors.base00;
|
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;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -10,6 +10,7 @@
|
|||||||
glow # Markdown previews
|
glow # Markdown previews
|
||||||
skate # Key-value store
|
skate # Key-value store
|
||||||
charm # Manage account and filesystem
|
charm # Manage account and filesystem
|
||||||
|
pop # Send emails from a TUI
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
|
./atuin.nix
|
||||||
./bash
|
./bash
|
||||||
./charm.nix
|
./charm.nix
|
||||||
./direnv.nix
|
./direnv.nix
|
||||||
@ -7,6 +8,7 @@
|
|||||||
./fzf.nix
|
./fzf.nix
|
||||||
./git.nix
|
./git.nix
|
||||||
./github.nix
|
./github.nix
|
||||||
|
./jujutsu.nix
|
||||||
./nixpkgs.nix
|
./nixpkgs.nix
|
||||||
./starship.nix
|
./starship.nix
|
||||||
./utilities.nix
|
./utilities.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
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
users.users.${config.user}.shell = pkgs.fish;
|
users.users.${config.user}.shell = pkgs.fish;
|
||||||
programs.fish.enable =
|
programs.fish.enable = true; # Needed for LightDM to remember username
|
||||||
true; # Needed for LightDM to remember username (TODO: fix)
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
# Packages used in abbreviations and aliases
|
# Packages used in abbreviations and aliases
|
||||||
home.packages = with pkgs; [ curl exa ];
|
home.packages = with pkgs; [ curl ];
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -16,8 +15,8 @@
|
|||||||
# Version of bash which works much better on the terminal
|
# Version of bash which works much better on the terminal
|
||||||
bash = "${pkgs.bashInteractive}/bin/bash";
|
bash = "${pkgs.bashInteractive}/bin/bash";
|
||||||
|
|
||||||
# Use exa instead of ls for fancier output
|
# Use eza (exa) instead of ls for fancier output
|
||||||
ls = "exa --group";
|
ls = "${pkgs.eza}/bin/eza --group";
|
||||||
|
|
||||||
# Move files to XDG trash on the commandline
|
# Move files to XDG trash on the commandline
|
||||||
trash = lib.mkIf pkgs.stdenv.isLinux "${pkgs.trash-cli}/bin/trash-put";
|
trash = lib.mkIf pkgs.stdenv.isLinux "${pkgs.trash-cli}/bin/trash-put";
|
||||||
@ -124,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";
|
||||||
|
@ -5,8 +5,9 @@
|
|||||||
programs.gh =
|
programs.gh =
|
||||||
lib.mkIf config.home-manager.users.${config.user}.programs.git.enable {
|
lib.mkIf config.home-manager.users.${config.user}.programs.git.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableGitCredentialHelper = 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" \
|
||||||
|
21
modules/common/shell/jujutsu.nix
Normal file
21
modules/common/shell/jujutsu.nix
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{ config, ... }: {
|
||||||
|
|
||||||
|
config = {
|
||||||
|
|
||||||
|
home-manager.users.${config.user}.programs.jujutsu = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
|
||||||
|
# https://github.com/martinvonz/jj/blob/main/docs/config.md
|
||||||
|
settings = {
|
||||||
|
user = {
|
||||||
|
name = config.home-manager.users.${config.user}.programs.git.userName;
|
||||||
|
email =
|
||||||
|
config.home-manager.users.${config.user}.programs.git.userEmail;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -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()
|
||||||
|
@ -55,6 +55,15 @@ local function worklayout()
|
|||||||
local layout = concat(left, right, laptop)
|
local layout = concat(left, right, laptop)
|
||||||
hs.layout.apply(layout)
|
hs.layout.apply(layout)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- Reload Hammerspoon whenever layout changes
|
||||||
|
hs.screen.watcher.new(function()
|
||||||
|
-- Pause for 5 seconds to give time for layout to change
|
||||||
|
hs.timer.doAfter(5, function()
|
||||||
|
-- Perform the actual reload
|
||||||
|
hs.reload()
|
||||||
|
end)
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
return worklayout
|
return worklayout
|
||||||
|
@ -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,24 +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
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -22,6 +22,15 @@
|
|||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Adapted in part from: https://github.com/Shawn8901/nix-configuration/blob/1c48be94238a9f463cf0bbd1e1842a4454286514/modules/nixos/steam-compat-tools/default.nix
|
||||||
|
# Based on: https://github.com/NixOS/nixpkgs/issues/73323
|
||||||
|
environment.sessionVariables.STEAM_EXTRA_COMPAT_TOOLS_PATHS =
|
||||||
|
lib.makeBinPath [ pkgs.proton-ge-custom ];
|
||||||
|
|
||||||
|
# Seems like NetworkManager can help speed up Steam launch
|
||||||
|
# https://www.reddit.com/r/archlinux/comments/qguhco/steam_startup_time_arch_1451_seconds_fedora_34/hi8opet/
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./dunst.nix
|
./dunst.nix
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
|
./gtk.nix
|
||||||
./i3.nix
|
./i3.nix
|
||||||
./picom.nix
|
./picom.nix
|
||||||
./polybar.nix
|
./polybar.nix
|
||||||
|
51
modules/nixos/graphical/gtk.nix
Normal file
51
modules/nixos/graphical/gtk.nix
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options = {
|
||||||
|
gtk.theme = {
|
||||||
|
name = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Theme name for GTK applications";
|
||||||
|
};
|
||||||
|
package = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
description = "Theme package for GTK applications";
|
||||||
|
default = pkgs.gnome-themes-extra;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.gui.enable {
|
||||||
|
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
|
gtk = let
|
||||||
|
gtkExtraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = config.theme.dark;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
name = config.gtk.theme.name;
|
||||||
|
package = config.gtk.theme.package;
|
||||||
|
};
|
||||||
|
gtk3.extraConfig = gtkExtraConfig;
|
||||||
|
gtk4.extraConfig = gtkExtraConfig;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# Required for setting GTK theme (for preferred-color-scheme in browser)
|
||||||
|
services.dbus.packages = [ pkgs.dconf ];
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
# Make the login screen dark
|
||||||
|
services.xserver.displayManager.lightdm.greeters.gtk.theme = {
|
||||||
|
name = config.gtk.theme.name;
|
||||||
|
package = config.gtk.theme.package;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.sessionVariables = { GTK_THEME = config.gtk.theme.name; };
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -45,7 +45,7 @@ in {
|
|||||||
{ class = "obsidian"; }
|
{ class = "obsidian"; }
|
||||||
];
|
];
|
||||||
"${ws3}" = [{ class = "discord"; }];
|
"${ws3}" = [{ class = "discord"; }];
|
||||||
"${ws4}" = [{ class = "Steam"; }];
|
"${ws4}" = [ { class = "steam"; } { class = "Steam"; } ];
|
||||||
};
|
};
|
||||||
bars = [{ command = "echo"; }]; # Disable i3bar
|
bars = [{ command = "echo"; }]; # Disable i3bar
|
||||||
colors = let
|
colors = let
|
||||||
@ -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" = {
|
||||||
|
@ -59,7 +59,7 @@ in {
|
|||||||
border = mkLiteral "0px";
|
border = mkLiteral "0px";
|
||||||
border-radius = mkLiteral "0px";
|
border-radius = mkLiteral "0px";
|
||||||
border-color = mkLiteral config.theme.colors.base04;
|
border-color = mkLiteral config.theme.colors.base04;
|
||||||
children = map mkLiteral [ "inputbar" "listview" ];
|
children = map mkLiteral [ "inputbar" "message" "listview" ];
|
||||||
spacing = mkLiteral "10px";
|
spacing = mkLiteral "10px";
|
||||||
padding = mkLiteral "10px";
|
padding = mkLiteral "10px";
|
||||||
};
|
};
|
||||||
|
@ -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 ;;
|
||||||
|
@ -25,21 +25,23 @@ in {
|
|||||||
| ${rofi}/bin/rofi \
|
| ${rofi}/bin/rofi \
|
||||||
-theme-str '@import "power.rasi"' \
|
-theme-str '@import "power.rasi"' \
|
||||||
-hover-select \
|
-hover-select \
|
||||||
-me-select-entry ''' \
|
-me-select-entry "" \
|
||||||
-me-accept-entry MousePrimary \
|
-me-accept-entry MousePrimary \
|
||||||
-dmenu \
|
-dmenu \
|
||||||
-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 ;;
|
||||||
|
@ -32,7 +32,7 @@ done
|
|||||||
chosen=$(printf '%s;%s\n' "$yes" "$no" |
|
chosen=$(printf '%s;%s\n' "$yes" "$no" |
|
||||||
rofi -theme-str '@import "prompt.rasi"' \
|
rofi -theme-str '@import "prompt.rasi"' \
|
||||||
-hover-select \
|
-hover-select \
|
||||||
-me-select-entry '' \
|
-me-select-entry "" \
|
||||||
-me-accept-entry MousePrimary \
|
-me-accept-entry MousePrimary \
|
||||||
-p "$query" \
|
-p "$query" \
|
||||||
-dmenu \
|
-dmenu \
|
||||||
@ -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
|
||||||
|
@ -1,27 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
options = {
|
config = lib.mkIf config.gui.enable {
|
||||||
gtk.theme = {
|
|
||||||
name = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Theme name for GTK applications";
|
|
||||||
};
|
|
||||||
package = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Theme package name for GTK applications";
|
|
||||||
default = "gnome-themes-extra";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = let
|
|
||||||
|
|
||||||
gtkTheme = {
|
|
||||||
name = config.gtk.theme.name;
|
|
||||||
package = pkgs."${config.gtk.theme.package}";
|
|
||||||
};
|
|
||||||
|
|
||||||
in lib.mkIf config.gui.enable {
|
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
@ -36,10 +15,8 @@
|
|||||||
enable = config.services.xserver.enable;
|
enable = config.services.xserver.enable;
|
||||||
background = config.wallpaper;
|
background = config.wallpaper;
|
||||||
|
|
||||||
# Make the login screen dark
|
|
||||||
greeters.gtk.theme = gtkTheme;
|
|
||||||
|
|
||||||
# Show default user
|
# Show default user
|
||||||
|
# Also make sure /var/lib/AccountsService/users/<user> has SystemAccount=false
|
||||||
extraSeatDefaults = ''
|
extraSeatDefaults = ''
|
||||||
greeter-hide-users = false
|
greeter-hide-users = false
|
||||||
'';
|
'';
|
||||||
@ -54,12 +31,6 @@
|
|||||||
xclip # Clipboard
|
xclip # Clipboard
|
||||||
];
|
];
|
||||||
|
|
||||||
# Required for setting GTK theme (for preferred-color-scheme in browser)
|
|
||||||
services.dbus.packages = [ pkgs.dconf ];
|
|
||||||
programs.dconf.enable = true;
|
|
||||||
|
|
||||||
environment.sessionVariables = { GTK_THEME = config.gtk.theme.name; };
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
programs.fish.shellAliases = {
|
programs.fish.shellAliases = {
|
||||||
@ -67,17 +38,6 @@
|
|||||||
pbpaste = "xclip -selection clipboard -out";
|
pbpaste = "xclip -selection clipboard -out";
|
||||||
};
|
};
|
||||||
|
|
||||||
gtk = let
|
|
||||||
gtkExtraConfig = {
|
|
||||||
gtk-application-prefer-dark-theme = config.theme.dark;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
enable = true;
|
|
||||||
theme = gtkTheme;
|
|
||||||
gtk3.extraConfig = gtkExtraConfig;
|
|
||||||
gtk4.extraConfig = gtkExtraConfig;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{ config, ... }: {
|
{ config, pkgs, ... }: {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
|
|
||||||
layout = "us";
|
xkb.layout = "us";
|
||||||
|
|
||||||
# Keyboard responsiveness
|
# Keyboard responsiveness
|
||||||
autoRepeatDelay = 250;
|
autoRepeatDelay = 250;
|
||||||
@ -23,6 +23,10 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# For some reason, keyd doesn't restart properly when updating
|
||||||
|
system.activationScripts.keyd.text =
|
||||||
|
"${pkgs.systemd}/bin/systemctl restart keyd.service";
|
||||||
|
|
||||||
# Enable num lock on login
|
# Enable num lock on login
|
||||||
home-manager.users.${config.user}.xsession.numlock.enable = true;
|
home-manager.users.${config.user}.xsession.numlock.enable = true;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
config = lib.mkIf config.physical {
|
config = lib.mkIf config.physical {
|
||||||
|
|
||||||
networking.useDHCP = true;
|
networking.useDHCP = !config.networking.networkmanager.enable;
|
||||||
|
|
||||||
networking.firewall.allowPing = lib.mkIf config.server true;
|
networking.firewall.allowPing = lib.mkIf config.server true;
|
||||||
|
|
||||||
@ -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;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
config = lib.mkIf (config.physical && pkgs.stdenv.isLinux) {
|
config = lib.mkIf (config.physical && pkgs.stdenv.isLinux) {
|
||||||
|
|
||||||
# Enables wireless support via wpa_supplicant.
|
# Enables wireless support via wpa_supplicant.
|
||||||
networking.wireless.enable = true;
|
networking.wireless.enable = !config.networking.networkmanager.enable;
|
||||||
|
|
||||||
# Allows the user to control the WiFi settings.
|
# Allows the user to control the WiFi settings.
|
||||||
networking.wireless.userControlled.enable = true;
|
networking.wireless.userControlled.enable = 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,28 +53,44 @@
|
|||||||
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 = {
|
||||||
output = "file";
|
output = "file";
|
||||||
filename = "${config.services.caddy.logDir}/caddy.log";
|
filename = "${config.services.caddy.logDir}/caddy.log";
|
||||||
roll = true;
|
roll = true;
|
||||||
|
roll_size_mb = 1;
|
||||||
};
|
};
|
||||||
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,11 +32,18 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Allow web traffic to Caddy
|
||||||
caddy.routes = [{
|
caddy.routes = [{
|
||||||
match = [{ host = [ config.hostnames.books ]; }];
|
match = [{ host = [ config.hostnames.books ]; }];
|
||||||
handle = [{
|
handle = [{
|
||||||
handler = "reverse_proxy";
|
handler = "reverse_proxy";
|
||||||
upstreams = [{ dial = "localhost:8083"; }];
|
upstreams = [{
|
||||||
|
dial = "localhost:${
|
||||||
|
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
|
||||||
@ -44,10 +52,7 @@ in {
|
|||||||
caddy.cidrAllowlist = cloudflareIpRanges;
|
caddy.cidrAllowlist = cloudflareIpRanges;
|
||||||
|
|
||||||
# Tell Caddy to use Cloudflare DNS for ACME challenge validation
|
# Tell Caddy to use Cloudflare DNS for ACME challenge validation
|
||||||
services.caddy.package = (pkgs.callPackage ../../../overlays/caddy.nix {
|
services.caddy.package = pkgs.caddy-cloudflare; # Patched overlay
|
||||||
plugins = [ "github.com/caddy-dns/cloudflare" ];
|
|
||||||
# vendorSha256 = "sha256-K9HPZnr+hMcK5aEd1H4gEg6PXAaNrNWFvaHYm5m62JY=";
|
|
||||||
});
|
|
||||||
caddy.tlsPolicies = [{
|
caddy.tlsPolicies = [{
|
||||||
issuers = [{
|
issuers = [{
|
||||||
module = "acme";
|
module = "acme";
|
||||||
@ -62,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 = {
|
||||||
@ -76,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.";
|
||||||
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user