mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-06 10:50:13 +00:00
Compare commits
175 Commits
962515c10e
...
nixd
Author | SHA1 | Date | |
---|---|---|---|
6cf5f08fd5 | |||
8cba026f10 | |||
a6e4b3130d | |||
33868c1add | |||
d806bd7f56 | |||
120b97f970 | |||
5f71437e57 | |||
e8e65ba4d1 | |||
c594a0b161 | |||
57c3719600 | |||
98c9c85e95 | |||
3ef36c4873 | |||
1d1d5014a0 | |||
1f64ed0bb8 | |||
2bfb8ea8b5 | |||
e91d6665fb | |||
7e3ab279af | |||
cdb9da9c50 | |||
46bbd2c967 | |||
51bee71faf | |||
a7adc18463 | |||
25a959f404 | |||
9f31d775c7 | |||
5306070bc5 | |||
b729eff679 | |||
4883532c65 | |||
982d3ce2d8 | |||
64311e6e1c | |||
83c9393837 | |||
e72d4eb548 | |||
b51df2f3a3 | |||
f47f397e1f | |||
48b1d41aff | |||
25c4e79ccc | |||
3b86a666fd | |||
264ad53f67 | |||
1cb5d3138c | |||
9c4438bed2 | |||
642d3c183f | |||
5798406977 | |||
81cb603bb7 | |||
1e7c69b3ea | |||
45deba10af | |||
d1721efc6c | |||
96caba63c4 | |||
01cd6151c1 | |||
e6644ab7b9 | |||
e43f6cf000 | |||
a9cdf6ac38 | |||
9fb7f68b07 | |||
845fc000b6 | |||
0b0556f057 | |||
771cac63a3 | |||
f7c5d3510f | |||
6866ca5fee | |||
883dc15b3d | |||
842f373101 | |||
65aa25b213 | |||
5b2fef7e01 | |||
2a812c1bdb | |||
16a372ce64 | |||
fb45ccdd5c | |||
74e6d740af | |||
2ad5411b90 | |||
3b494bed5b | |||
de4c8c32ef | |||
a7be0ed5cc | |||
e7f8d706b2 | |||
39fda67d6e | |||
4eb0327a1b | |||
029119ce93 | |||
b15fd34e30 | |||
a47bcf8949 | |||
6c024107ee | |||
4ca25aa194 | |||
20fcca6bda | |||
0bbbabd6e8 | |||
ff05b99fe1 | |||
abdf4b64be | |||
6d0d36165e | |||
b4470727e5 | |||
126baae735 | |||
892dfbbee4 | |||
0198469b83 | |||
c89ca7ea94 | |||
0a98b72784 | |||
c7de16b14c | |||
1d405e1828 | |||
97f99a149e | |||
bc794f89bc | |||
63b90102f2 | |||
c86188d734 | |||
f1cdd4ae98 | |||
332921edd3 | |||
cc69cbaa6c | |||
d165428a37 | |||
3e7955533e | |||
0b9886f93e | |||
2f39eb2ceb | |||
cf19085158 | |||
a387950c9a | |||
dec46bcc97 | |||
0d6230b3dc | |||
517ae65cf1 | |||
6f4ee32e8e | |||
2c2f366c47 | |||
e509943103 | |||
8937d214f1 | |||
af4161c4f4 | |||
0a225d6599 | |||
b78bbf2003 | |||
97cfaf0708 | |||
dceb0c5c65 | |||
a309e96754 | |||
83e95b306d | |||
6742103195 | |||
57ce387402 | |||
265144d957 | |||
f0b9bfc0a7 | |||
a4c9813341 | |||
b051885b52 | |||
985e69b4b8 | |||
8e9d556cfe | |||
99581ae1ea | |||
96d410e1b2 | |||
8e88d70a52 | |||
8b1032ebda | |||
e55ee05c5c | |||
0cdae3569e | |||
0f1cbe2e06 | |||
7a22e798fc | |||
196d2e53e0 | |||
204621a0ba | |||
ab050582c1 | |||
6cf4c4979d | |||
ad0bb2d804 | |||
5117b14388 | |||
e6bde77984 | |||
b546d5b43a | |||
5aa0a935ad | |||
4555797667 | |||
5edd1a50d3 | |||
a16e3ae3cb | |||
edff6fc768 | |||
45ec4e5a3f | |||
48fbb2e2d9 | |||
7ce9ed564e | |||
8074276643 | |||
6edc828ece | |||
4b22c774e2 | |||
b7e81e009c | |||
3d90674522 | |||
0582b4a147 | |||
c06cb27bcc | |||
de106298d6 | |||
b34997257c | |||
ddfaf0064c | |||
e561d5984b | |||
de766b6893 | |||
654009ba74 | |||
a7006af5ad | |||
452afd70c1 | |||
0c399fc269 | |||
e59c565e2f | |||
d0e613f093 | |||
14538d83f5 | |||
2d31f5726f | |||
f4ed3f0ec6 | |||
d07abccbce | |||
0feb11b017 | |||
da559f808a | |||
9ebdfa1071 | |||
5bd81813cb | |||
69b2332700 | |||
d4708cd5f6 |
36
.github/workflows/arrow-aws.yml
vendored
36
.github/workflows/arrow-aws.yml
vendored
@ -42,6 +42,12 @@ jobs:
|
||||
- name: Checkout Repo Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Free Disk Space (Ubuntu)
|
||||
if: inputs.rebuild && inputs.action != 'destroy'
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
with:
|
||||
tool-cache: true
|
||||
|
||||
# Enable access to KVM, required to build an image
|
||||
- name: Enable KVM group perms
|
||||
if: inputs.rebuild && inputs.action != 'destroy'
|
||||
@ -60,22 +66,19 @@ jobs:
|
||||
# Install Nix
|
||||
- name: Install Nix
|
||||
if: inputs.rebuild && inputs.action != 'destroy'
|
||||
uses: cachix/install-nix-action@v17
|
||||
uses: cachix/install-nix-action@v20
|
||||
|
||||
# Build the image
|
||||
- name: Build Image
|
||||
if: inputs.rebuild && inputs.action != 'destroy'
|
||||
run: nix build .#arrow-aws
|
||||
|
||||
# # Copy the image to S3
|
||||
# - name: Upload Image to Cache
|
||||
# env:
|
||||
# NIX_CACHE_PRIVATE_KEY: ${{ secrets.NIX_CACHE_PRIVATE_KEY }}
|
||||
# run: |
|
||||
# echo "$NIX_CACHE_PRIVATE_KEY" > cache.key
|
||||
# nix store sign --key-file cache.key $(readlink result)
|
||||
# nix copy --to s3://t2-aws-nixos-test $(readlink result)
|
||||
# rm cache.key
|
||||
- name: Upload Image to S3
|
||||
if: inputs.rebuild && inputs.action != 'destroy'
|
||||
run: |
|
||||
aws s3 cp \
|
||||
result/nixos-amazon-image-*.vhd \
|
||||
s3://${{ secrets.IMAGES_BUCKET }}/arrow.vhd \
|
||||
|
||||
# Installs the Terraform binary and some other accessory functions.
|
||||
- name: Setup Terraform
|
||||
@ -91,16 +94,18 @@ jobs:
|
||||
# Connects to remote state backend and download providers.
|
||||
- name: Terraform Init
|
||||
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
|
||||
run: terraform init
|
||||
run: |
|
||||
terraform init \
|
||||
-backend-config="bucket=${{ secrets.TERRAFORM_STATE_BUCKET }}" \
|
||||
-backend-config="key=arrow.tfstate"
|
||||
|
||||
# Deploys infrastructure or changes to infrastructure.
|
||||
- name: Terraform Apply
|
||||
if: inputs.action == 'create'
|
||||
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
|
||||
env:
|
||||
TF_VAR_terraform_state_bucket: ${{ secrets.TERRAFORM_STATE_BUCKET }}
|
||||
TF_VAR_terraform_state_key: arrow.tfstate
|
||||
TF_VAR_ec2_size: ${{ inputs.size }}
|
||||
TF_VAR_images_bucket: ${{ secrets.IMAGES_BUCKET }}
|
||||
run: |
|
||||
terraform apply \
|
||||
-auto-approve \
|
||||
@ -110,6 +115,9 @@ jobs:
|
||||
- name: Terraform Destroy
|
||||
if: inputs.action == 'destroy'
|
||||
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
|
||||
env:
|
||||
TF_VAR_ec2_size: ${{ inputs.size }}
|
||||
TF_VAR_images_bucket: ${{ secrets.IMAGES_BUCKET }}
|
||||
run: |
|
||||
terraform destroy \
|
||||
-auto-approve \
|
||||
@ -151,7 +159,7 @@ jobs:
|
||||
RECORD_ID=$(curl --request GET \
|
||||
--url https://api.cloudflare.com/client/v4/zones/${{ env.CLOUDFLARE_ZONE_ID }}/dns_records \
|
||||
--header 'Content-Type: application/json' \
|
||||
--header "Authorization: Bearer ${{ env.CLOUDFLARE_API_TOKEN }}" | jq -r '.result[] | select(.name == "transmission.${{ env.ZONE_NAME }}") | .id')
|
||||
--header "Authorization: Bearer ${{ env.CLOUDFLARE_API_TOKEN }}" | jq -r '.result[] | select(.name == "n8n2.${{ env.ZONE_NAME }}") | .id')
|
||||
curl --request DELETE \
|
||||
--url https://api.cloudflare.com/client/v4/zones/${{ env.CLOUDFLARE_ZONE_ID }}/dns_records/${RECORD_ID} \
|
||||
--header 'Content-Type: application/json' \
|
||||
|
12
.github/workflows/arrow.yml
vendored
12
.github/workflows/arrow.yml
vendored
@ -75,16 +75,6 @@ jobs:
|
||||
s3://noahmasur-arrow-images/arrow.iso \
|
||||
--endpoint-url "https://${{ env.CLOUDFLARE_R2_ENDPOINT }}"
|
||||
|
||||
# # Copy the image to S3
|
||||
# - name: Upload Image to Cache
|
||||
# env:
|
||||
# NIX_CACHE_PRIVATE_KEY: ${{ secrets.NIX_CACHE_PRIVATE_KEY }}
|
||||
# run: |
|
||||
# echo "$NIX_CACHE_PRIVATE_KEY" > cache.key
|
||||
# nix store sign --key-file cache.key $(readlink result)
|
||||
# nix copy --to s3://t2-aws-nixos-test $(readlink result)
|
||||
# rm cache.key
|
||||
|
||||
# Installs the Terraform binary and some other accessory functions.
|
||||
- name: Setup Terraform
|
||||
uses: hashicorp/setup-terraform@v2
|
||||
@ -157,7 +147,7 @@ jobs:
|
||||
RECORD_ID=$(curl --request GET \
|
||||
--url https://api.cloudflare.com/client/v4/zones/${{ env.CLOUDFLARE_ZONE_ID }}/dns_records \
|
||||
--header 'Content-Type: application/json' \
|
||||
--header "Authorization: Bearer ${{ env.CLOUDFLARE_API_TOKEN }}" | jq -r '.result[] | select(.name == "transmission.${{ env.ZONE_NAME }}") | .id')
|
||||
--header "Authorization: Bearer ${{ env.CLOUDFLARE_API_TOKEN }}" | jq -r '.result[] | select(.name == "n8n2.${{ env.ZONE_NAME }}") | .id')
|
||||
curl --request DELETE \
|
||||
--url https://api.cloudflare.com/client/v4/zones/${{ env.CLOUDFLARE_ZONE_ID }}/dns_records/${RECORD_ID} \
|
||||
--header 'Content-Type: application/json' \
|
||||
|
6
.github/workflows/check.yml
vendored
6
.github/workflows/check.yml
vendored
@ -11,10 +11,10 @@ jobs:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v4
|
||||
uses: DeterminateSystems/nix-installer-action@v11
|
||||
- name: Check Nixpkgs Inputs
|
||||
uses: DeterminateSystems/flake-checker-action@v5
|
||||
uses: DeterminateSystems/flake-checker-action@v7
|
||||
- name: Add Nix Cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@v2
|
||||
uses: DeterminateSystems/magic-nix-cache-action@v6
|
||||
- name: Check the Flake
|
||||
run: nix flake check
|
||||
|
12
.github/workflows/update.yml
vendored
12
.github/workflows/update.yml
vendored
@ -3,7 +3,7 @@ name: Update Flake
|
||||
on:
|
||||
workflow_dispatch: # allows manual triggering
|
||||
schedule:
|
||||
- cron: '33 3 * * 0' # runs weekly on Sunday at 03:33
|
||||
- cron: '33 3 * * 6' # runs weekly on Saturday at 03:33
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@ -18,13 +18,15 @@ jobs:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v4
|
||||
uses: DeterminateSystems/nix-installer-action@v11
|
||||
with:
|
||||
nix-package-url: https://releases.nixos.org/nix/nix-2.18.4/nix-2.18.4-x86_64-linux.tar.xz
|
||||
- name: Check Nixpkgs Inputs
|
||||
uses: DeterminateSystems/flake-checker-action@v5
|
||||
uses: DeterminateSystems/flake-checker-action@v7
|
||||
- name: Add Nix Cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@v2
|
||||
uses: DeterminateSystems/magic-nix-cache-action@v6
|
||||
- name: Update flake.lock
|
||||
uses: DeterminateSystems/update-flake-lock@v19
|
||||
uses: DeterminateSystems/update-flake-lock@v23
|
||||
id: update
|
||||
with:
|
||||
pr-title: "Update flake.lock" # Title of PR to be created
|
||||
|
@ -9,7 +9,7 @@ configuration may be difficult to translate to a non-Nix system.
|
||||
## System Features
|
||||
|
||||
| Feature | Program | Configuration |
|
||||
| --- | --- | --- |
|
||||
|----------------|-----------------------------------------------------|-----------------------------------------------|
|
||||
| OS | [NixOS](https://nixos.org) | [Link](./modules/nixos) |
|
||||
| Display Server | [X11](https://www.x.org/wiki/) | [Link](./modules/nixos/graphical/xorg.nix) |
|
||||
| Compositor | [Picom](https://github.com/yshui/picom) | [Link](./modules/nixos/graphical/picom.nix) |
|
||||
@ -21,11 +21,11 @@ configuration may be difficult to translate to a non-Nix system.
|
||||
## User Features
|
||||
|
||||
| Feature | Program | Configuration |
|
||||
| --- | --- | --- |
|
||||
|--------------|----------------------------------------------------------------------------------|----------------------------------------------------|
|
||||
| Dotfiles | [Home-Manager](https://github.com/nix-community/home-manager) | [Link](./modules/common) |
|
||||
| Terminal | [Kitty](https://sw.kovidgoyal.net/kitty/) | [Link](./modules/common/applications/kitty.nix) |
|
||||
| Shell | [Fish](https://fishshell.com/) | [Link](./modules/common/shell/fish) |
|
||||
| Shell Prompt | [Starship](https://starship.rs/) | [Link](./modules/common/shell/starship.nix) |
|
||||
| Shell Prompt | [Starship](https://starship.rs/) | [Link](./modules/common/shell/starship.nix) |
|
||||
| Colorscheme | [Gruvbox](https://github.com/morhetz/gruvbox) | [Link](./colorscheme/gruvbox/default.nix) |
|
||||
| Wallpaper | [Road](https://gitlab.com/exorcist365/wallpapers/-/blob/master/gruvbox/road.jpg) | [Link](./hosts/tempest/default.nix) |
|
||||
| Text Editor | [Neovim](https://neovim.io/) | [Link](./modules/common/neovim/config) |
|
||||
@ -38,7 +38,7 @@ configuration may be difficult to translate to a non-Nix system.
|
||||
## macOS Features
|
||||
|
||||
| Feature | Program | Configuration |
|
||||
| --- | --- | --- |
|
||||
|----------|---------------------------------------------|--------------------------------------|
|
||||
| Keybinds | [Hammerspoon](https://www.hammerspoon.org/) | [Link](./modules/darwin/hammerspoon) |
|
||||
|
||||
# Diagram
|
||||
|
500
flake.lock
generated
500
flake.lock
generated
@ -3,11 +3,11 @@
|
||||
"baleia-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1704551058,
|
||||
"narHash": "sha256-0NmiGzMFvL1awYOVtiaSd+O4sAR524x68xwWLgArlqs=",
|
||||
"lastModified": 1721805312,
|
||||
"narHash": "sha256-qA1x5kplP2I8bURO0I4R0gt/zeznu9hQQ+XHptLGuwc=",
|
||||
"owner": "m00qek",
|
||||
"repo": "baleia.nvim",
|
||||
"rev": "6d9cbdaca3a428bc7296f838fdfce3ad01ee7495",
|
||||
"rev": "1b25eac3ac03659c3d3af75c7455e179e5f197f7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -19,11 +19,11 @@
|
||||
"base16-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1713467988,
|
||||
"narHash": "sha256-p3HWYasmi0gVUM5l9jLWL4Iy37Uxnvbj3SO/cMCpDBg=",
|
||||
"lastModified": 1716483968,
|
||||
"narHash": "sha256-GRF/6AobXHamw8TZ3FjL7SI6ulcpwpcohsIuZeCSh2A=",
|
||||
"owner": "RRethy",
|
||||
"repo": "base16-nvim",
|
||||
"rev": "eec6882101dd189117f79c5d18d389d20cfc0415",
|
||||
"rev": "6ac181b5733518040a33017dde654059cd771b7c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -35,40 +35,43 @@
|
||||
"bufferline-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1706180994,
|
||||
"narHash": "sha256-/iGzUDJaodkUyWpwim8UtwaRuarfu/Nk6wxVApk+QxY=",
|
||||
"lastModified": 1716555412,
|
||||
"narHash": "sha256-8PCkY1zrlMrPGnQOb7MjqDXNlkeX46jrT4ScIL+MOwM=",
|
||||
"owner": "akinsho",
|
||||
"repo": "bufferline.nvim",
|
||||
"rev": "d6cb9b7cac52887bcac65f8698e67479553c0748",
|
||||
"rev": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "akinsho",
|
||||
"ref": "v4.5.0",
|
||||
"ref": "v4.6.1",
|
||||
"repo": "bufferline.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"bypass-paywalls-clean": {
|
||||
"flake": false,
|
||||
"cl-nix-lite": {
|
||||
"locked": {
|
||||
"narHash": "sha256-VZey1VgabUpsiN+mdSNzoMfxICSNKtZIuvISFcMUDw4=",
|
||||
"type": "file",
|
||||
"url": "https://github.com/bpc-clone/bpc_updates/releases/download/latest/bypass_paywalls_clean-3.6.6.0.xpi"
|
||||
"lastModified": 1717972076,
|
||||
"narHash": "sha256-hnZEsDInTcsVSL5LBGDAZegAxVLBus/wiJh+sNM15zU=",
|
||||
"owner": "hraban",
|
||||
"repo": "cl-nix-lite",
|
||||
"rev": "cc920bfb0a6402d3871f470c98d65266126973e4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"type": "file",
|
||||
"url": "https://github.com/bpc-clone/bpc_updates/releases/download/latest/bypass_paywalls_clean-3.6.6.0.xpi"
|
||||
"owner": "hraban",
|
||||
"repo": "cl-nix-lite",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"cmp-nvim-lsp-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1702205473,
|
||||
"narHash": "sha256-/0sh9vJBD9pUuD7q3tNSQ1YLvxFMNykdg5eG+LjZAA8=",
|
||||
"lastModified": 1715931395,
|
||||
"narHash": "sha256-CT1+Z4XJBVsl/RqvJeGmyitD6x7So0ylXvvef5jh7I8=",
|
||||
"owner": "hrsh7th",
|
||||
"repo": "cmp-nvim-lsp",
|
||||
"rev": "5af77f54de1b16c34b23cba810150689a3a90312",
|
||||
"rev": "39e2eda76828d88b773cc27a3f61d2ad782c922d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -77,23 +80,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"comment-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1681214440,
|
||||
"narHash": "sha256-48hy+hiaDJLlgWqC7IeZI3dT+VwWkRo4atQbyPxu/ys=",
|
||||
"owner": "numToStr",
|
||||
"repo": "Comment.nvim",
|
||||
"rev": "e51f2b142d88bb666dcaa77d93a07f4b419aca70",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numToStr",
|
||||
"ref": "v0.8.0",
|
||||
"repo": "Comment.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@ -101,11 +87,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713946171,
|
||||
"narHash": "sha256-lc75rgRQLdp4Dzogv5cfqOg6qYc5Rp83oedF2t0kDp8=",
|
||||
"lastModified": 1728385805,
|
||||
"narHash": "sha256-mUd38b0vhB7yzgAjNOaFz7VY9xIVzlbn3P2wjGBcVV0=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "230a197063de9287128e2c68a7a4b0cd7d0b50a7",
|
||||
"rev": "48b50b3b137be5cfb9f4d006835ce7c3fe558ccc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -122,11 +108,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714612856,
|
||||
"narHash": "sha256-W7+rtMzRmdovzndN2NYUv5xzkbMudtQ3jbyFuGk0O1E=",
|
||||
"lastModified": 1728687662,
|
||||
"narHash": "sha256-D9TChzb00eTG1YWBx8eN2s6lJJnBjB5Y7RpxkAzGvyQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "d57058eb09dd5ec00c746df34fe0a603ea744370",
|
||||
"rev": "bdbdb725d632863bdedb80baabf21327614dd237",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -138,16 +124,16 @@
|
||||
"fidget-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1704696337,
|
||||
"narHash": "sha256-uAX/RGfOmsUIUaDepNwUpK8MBaTMBJ4rLZ69y0MwpNE=",
|
||||
"lastModified": 1716093309,
|
||||
"narHash": "sha256-Gpk/G0ByOAIE8uX4Xr94CvAjJBSJMEOwBuvrhmYYGsg=",
|
||||
"owner": "j-hui",
|
||||
"repo": "fidget.nvim",
|
||||
"rev": "3a93300c076109d86c7ce35ec67a8034ae6ba9db",
|
||||
"rev": "ef99df04a1c53a453602421bc0f756997edc8289",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "j-hui",
|
||||
"ref": "v1.2.0",
|
||||
"ref": "v1.4.5",
|
||||
"repo": "fidget.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
@ -159,11 +145,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714869979,
|
||||
"narHash": "sha256-kTAMHZ1DDGauq3f5IzPw+EtVOgWdctLPUMJiqciqOx0=",
|
||||
"lastModified": 1728694479,
|
||||
"narHash": "sha256-NFFW6RrOTBuIk29LKtAO3MU5Y0ll7zAp9Skd9HvCGfs=",
|
||||
"owner": "bandithedoge",
|
||||
"repo": "nixpkgs-firefox-darwin",
|
||||
"rev": "7e9014891eebabffa68351e3360da3fbc59b8066",
|
||||
"rev": "8a3143c1ce147481db4463e71bc3b7002e6ebc56",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -173,6 +159,23 @@
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1697816753,
|
||||
"narHash": "sha256-40to80AEIyKCQI0xMKCeF5ePoIKTYgjVVCZeu4CnTxM=",
|
||||
"owner": "hraban",
|
||||
"repo": "flake-compat",
|
||||
"rev": "6025bade1336a36014639bc3f67eacc853dab78f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hraban",
|
||||
"ref": "fixed-output",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
@ -192,6 +195,23 @@
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "flake-utils",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705309234,
|
||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||
@ -206,16 +226,16 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"flake-utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"lastModified": 1726560853,
|
||||
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -224,14 +244,30 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gh-collaborators": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1717117275,
|
||||
"narHash": "sha256-x3p2bHL6U8gWanXnTTJGgA9x4Ixy9AOZiBbfcfn5VVw=",
|
||||
"owner": "katiem0",
|
||||
"repo": "gh-collaborators",
|
||||
"rev": "4dfcd0b5c2e31f2d0fbfd4b83fdfae787a5e6ff8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "katiem0",
|
||||
"repo": "gh-collaborators",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hmts-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1710430870,
|
||||
"narHash": "sha256-bsOQX56ciQ8ni7Zh4ZNtTvptvy/YaDPG318AsEaZRpE=",
|
||||
"lastModified": 1727357627,
|
||||
"narHash": "sha256-8FJlLw5LApQs7S8xEh2UE9wdYCAweZTbvgozCGPfQJc=",
|
||||
"owner": "calops",
|
||||
"repo": "hmts.nvim",
|
||||
"rev": "473d74cf54da8f51aaa9993ec3e6bfae278eb47b",
|
||||
"rev": "1ecb68b9f89abdb23d2754f9d69f90eab2d33eaa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -247,11 +283,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714865296,
|
||||
"narHash": "sha256-02r2Qzh4fGYBPB/3Lj8vwPMtE6H/UchZnN7A/dQMHIA=",
|
||||
"lastModified": 1728685293,
|
||||
"narHash": "sha256-1WowL96pksT/XCi+ZXHgqiQ9NiU5oxWuNIQYWqOoEYc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "e0825ea2112d09d9f0680833cd716f6aee3b973f",
|
||||
"rev": "2b13611eaed8326789f76f70d21d06fbb14e3e47",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -261,87 +297,94 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"kitty-scrollback-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1714049193,
|
||||
"narHash": "sha256-LICARktpc04vaHpFuAFDrZsYKy2HJme6LMtoXMi7jJ8=",
|
||||
"owner": "mikesmithgh",
|
||||
"repo": "kitty-scrollback.nvim",
|
||||
"rev": "22f524f1fa9c7660804a1800ed0fe981c5d392c8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mikesmithgh",
|
||||
"repo": "kitty-scrollback.nvim",
|
||||
"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": 1699624348,
|
||||
"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": 1714909152,
|
||||
"narHash": "sha256-CsAUnbA/9XiVuk96pOK+E++lp8BlJITtfExWcb9rqPk=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/nmasur/snappymail-nextcloud/releases/download/v2.36.1/snappymail-2.36.1-nextcloud.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/nmasur/snappymail-nextcloud/releases/download/v2.36.1/snappymail-2.36.1-nextcloud.tar.gz"
|
||||
}
|
||||
},
|
||||
"nix2vim": {
|
||||
"mac-app-util": {
|
||||
"inputs": {
|
||||
"cl-nix-lite": "cl-nix-lite",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1707832982,
|
||||
"narHash": "sha256-Jsrj8HJyo+PmjrHIDhq4gjZCE0eYCVmmTrx24cG8eOQ=",
|
||||
"lastModified": 1727470707,
|
||||
"narHash": "sha256-BqkwZ2mvzn+COdfIuzllSzWmiaBwQktt4sw9slfwM70=",
|
||||
"owner": "hraban",
|
||||
"repo": "mac-app-util",
|
||||
"rev": "9c6bbe2a6a7ec647d03f64f0fadb874284f59eac",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hraban",
|
||||
"repo": "mac-app-util",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nextcloud-cookbook": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1719431638,
|
||||
"narHash": "sha256-a8ekMnEzudHGiqHF53jPtgsVTOTc2QLuPg6YtTw5h68=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.1/cookbook-0.11.1.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.1/cookbook-0.11.1.tar.gz"
|
||||
}
|
||||
},
|
||||
"nextcloud-external": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1710338675,
|
||||
"narHash": "sha256-bJJ/dVmE1o04QCyrxD0sko0okRsnxJmT6sOTOmBiifs=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/nextcloud-releases/external/releases/download/v5.4.0/external-v5.4.0.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/nextcloud-releases/external/releases/download/v5.4.0/external-v5.4.0.tar.gz"
|
||||
}
|
||||
},
|
||||
"nextcloud-news": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1718102703,
|
||||
"narHash": "sha256-XNGjf7SWgJYFdVNOh3ED0jxSG0GJwWImVQq4cJT1Lo4=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/nextcloud/news/releases/download/25.0.0-alpha7/news.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/nextcloud/news/releases/download/25.0.0-alpha7/news.tar.gz"
|
||||
}
|
||||
},
|
||||
"nextcloud-snappymail": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1728704544,
|
||||
"narHash": "sha256-WwCRAZzxYWUpOy6iVTDpVIr/DrkJkQGjgIdVWNfCH3Q=",
|
||||
"type": "tarball",
|
||||
"url": "https://snappymail.eu/repository/nextcloud/snappymail-2.37.2-nextcloud.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://snappymail.eu/repository/nextcloud/snappymail-2.37.2-nextcloud.tar.gz"
|
||||
}
|
||||
},
|
||||
"nix2vim": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727867024,
|
||||
"narHash": "sha256-yimXLupF3hG57imRMpqWho/Wstcj7P8Yh8t0SBiX+dQ=",
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"repo": "nix2vim",
|
||||
"rev": "2fb1328cf058fc967b02f9a5330a99253b4c247e",
|
||||
"rev": "da26caae6c7776eedbc6514a0f57f1ccd6a759ed",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -352,11 +395,11 @@
|
||||
},
|
||||
"nixlib": {
|
||||
"locked": {
|
||||
"lastModified": 1712450863,
|
||||
"narHash": "sha256-K6IkdtMtq9xktmYPj0uaYc8NsIqHuaAoRBaMgu9Fvrw=",
|
||||
"lastModified": 1728176478,
|
||||
"narHash": "sha256-px3Q0W//c+mZ4kPMXq4poztsjtXM1Ja1rN+825YMDUQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "3c62b6a12571c9a7f65ab037173ee153d539905f",
|
||||
"rev": "b61309c3c1b6013d36299bc8285612865b3b9e4c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -373,11 +416,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713783234,
|
||||
"narHash": "sha256-3yh0nqI1avYUmmtqqTW3EVfwaLE+9ytRWxsA5aWtmyI=",
|
||||
"lastModified": 1728522165,
|
||||
"narHash": "sha256-UQpsJ0Ev6JBGsCYRlS2oOVvb+eWcDD0xTV3RVlqbeVU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"rev": "722b512eb7e6915882f39fff0e4c9dd44f42b77e",
|
||||
"rev": "40c8d30c490414910fc63626ad1b67af7db40cd3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -388,11 +431,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1714635257,
|
||||
"narHash": "sha256-4cPymbty65RvF1DWQfc+Bc8B233A1BWxJnNULJKQ1EY=",
|
||||
"lastModified": 1728492678,
|
||||
"narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "63c3a29ca82437c87573e4c6919b09a24ea61b0f",
|
||||
"rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -418,13 +461,29 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1728627514,
|
||||
"narHash": "sha256-r+SF9AnHrTg+bk6YszoKfV9lgyw+yaFUQe0dOjI0Z2o=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c505ebf777526041d792a49d5f6dd4095ea391a7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1714880338,
|
||||
"narHash": "sha256-G/dc755qMdAMvXuZsi1OFCzD49OWszdMSnp12+1eFcM=",
|
||||
"lastModified": 1728704557,
|
||||
"narHash": "sha256-HnYBB+oE+03rNDzTTVazBcysPOu5udRpTOGpP7/A5Ow=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nur",
|
||||
"rev": "49f72c695fb2f46c8aeb1549704246b9558b2011",
|
||||
"rev": "1d143f52b0a046924ee7fe74bce0bd2e10e07c3d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -436,11 +495,11 @@
|
||||
"nvim-lint-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1714489830,
|
||||
"narHash": "sha256-aM4oWSZrZb660wEpLQnFyoBkH+MSi0WgfBIztk98Qtk=",
|
||||
"lastModified": 1728582620,
|
||||
"narHash": "sha256-wfui4kE3oxveCJPjJfkJSbE69zVTeAsasDdfJkElmn8=",
|
||||
"owner": "mfussenegger",
|
||||
"repo": "nvim-lint",
|
||||
"rev": "861a04313501563bb1b11f125ae9b7237a517b9b",
|
||||
"rev": "f707b3ae50417067fa63fdfe179b0bff6b380da1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -452,16 +511,16 @@
|
||||
"nvim-lspconfig-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1701687137,
|
||||
"narHash": "sha256-qFjFofA2LoD4yRfx4KGfSCpR3mDkpFaagcm+TVNPqco=",
|
||||
"lastModified": 1716281382,
|
||||
"narHash": "sha256-foJ7a59N0a3QaBW24PtwbyYDQVlIsFxiatADLO/hQvc=",
|
||||
"owner": "neovim",
|
||||
"repo": "nvim-lspconfig",
|
||||
"rev": "cf3dd4a290084a868fac0e2e876039321d57111c",
|
||||
"rev": "0b8165cf95806bc4bb8f745bb0c92021b2ed4b98",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "neovim",
|
||||
"ref": "v0.1.7",
|
||||
"ref": "v0.1.8",
|
||||
"repo": "nvim-lspconfig",
|
||||
"type": "github"
|
||||
}
|
||||
@ -469,11 +528,11 @@
|
||||
"nvim-tree-lua-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1714794673,
|
||||
"narHash": "sha256-rY4FbuqBM4zOUkaA3QBc+UrpfTha8uGtp+lIzrYK+cg=",
|
||||
"lastModified": 1728614821,
|
||||
"narHash": "sha256-WYtu+jtsQSFqruTxdzkHE9UQJBE2TGoNoFar36AAoqo=",
|
||||
"owner": "kyazdani42",
|
||||
"repo": "nvim-tree.lua",
|
||||
"rev": "64f61e4c913047a045ff90bd188dd3b54ee443cf",
|
||||
"rev": "5ad87620ec9d1190d15c88171a3f0122bc16b0fe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -485,16 +544,16 @@
|
||||
"nvim-treesitter-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1714811590,
|
||||
"narHash": "sha256-3Ae3ieCqckVAElTufJxgBRNXdWg81++oI0qesKevcb4=",
|
||||
"lastModified": 1705679158,
|
||||
"narHash": "sha256-zAyiitJIgOCZTB0CmgNt0MHENM70SOHLIoWrVwOJKFg=",
|
||||
"owner": "nvim-treesitter",
|
||||
"repo": "nvim-treesitter",
|
||||
"rev": "4e21361e15b1d4147830c5fe571556eb1b14e6f9",
|
||||
"rev": "f197a15b0d1e8d555263af20add51450e5aaa1f0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-treesitter",
|
||||
"ref": "master",
|
||||
"ref": "v0.9.2",
|
||||
"repo": "nvim-treesitter",
|
||||
"type": "github"
|
||||
}
|
||||
@ -536,16 +595,15 @@
|
||||
"baleia-nvim-src": "baleia-nvim-src",
|
||||
"base16-nvim-src": "base16-nvim-src",
|
||||
"bufferline-nvim-src": "bufferline-nvim-src",
|
||||
"bypass-paywalls-clean": "bypass-paywalls-clean",
|
||||
"cmp-nvim-lsp-src": "cmp-nvim-lsp-src",
|
||||
"comment-nvim-src": "comment-nvim-src",
|
||||
"darwin": "darwin",
|
||||
"disko": "disko",
|
||||
"fidget-nvim-src": "fidget-nvim-src",
|
||||
"firefox-darwin": "firefox-darwin",
|
||||
"gh-collaborators": "gh-collaborators",
|
||||
"hmts-nvim-src": "hmts-nvim-src",
|
||||
"home-manager": "home-manager",
|
||||
"kitty-scrollback-nvim-src": "kitty-scrollback-nvim-src",
|
||||
"mac-app-util": "mac-app-util",
|
||||
"nextcloud-cookbook": "nextcloud-cookbook",
|
||||
"nextcloud-external": "nextcloud-external",
|
||||
"nextcloud-news": "nextcloud-news",
|
||||
@ -554,6 +612,7 @@
|
||||
"nixos-generators": "nixos-generators",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-caddy": "nixpkgs-caddy",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nur": "nur",
|
||||
"nvim-lint-src": "nvim-lint-src",
|
||||
"nvim-lspconfig-src": "nvim-lspconfig-src",
|
||||
@ -561,8 +620,10 @@
|
||||
"nvim-treesitter-src": "nvim-treesitter-src",
|
||||
"ren": "ren",
|
||||
"rep": "rep",
|
||||
"snipe-nvim-src": "snipe-nvim-src",
|
||||
"telescope-nvim-src": "telescope-nvim-src",
|
||||
"telescope-project-nvim-src": "telescope-project-nvim-src",
|
||||
"tiny-inline-diagnostic-nvim-src": "tiny-inline-diagnostic-nvim-src",
|
||||
"toggleterm-nvim-src": "toggleterm-nvim-src",
|
||||
"tree-sitter-bash": "tree-sitter-bash",
|
||||
"tree-sitter-ini": "tree-sitter-ini",
|
||||
@ -576,6 +637,22 @@
|
||||
"zenyd-mpv-scripts": "zenyd-mpv-scripts"
|
||||
}
|
||||
},
|
||||
"snipe-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1724418876,
|
||||
"narHash": "sha256-G4g/OzyXhDhX84HkxlhFSy6E+EAGxH+HL1Bw5s5FWHE=",
|
||||
"owner": "leath-dub",
|
||||
"repo": "snipe.nvim",
|
||||
"rev": "f1abd4aaaef6398b45dcddc9f1a40dd982f732b0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "leath-dub",
|
||||
"repo": "snipe.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
@ -606,19 +683,34 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"telescope-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1701167040,
|
||||
"narHash": "sha256-H5RpyWMluE+Yxg7xFX43AZTVW+Yg70DF3FmEGXBUSNg=",
|
||||
"lastModified": 1716532947,
|
||||
"narHash": "sha256-e1ulhc4IIvUgpjKQrSqPY4WpXuez6wlxL6Min9U0o5Q=",
|
||||
"owner": "nvim-telescope",
|
||||
"repo": "telescope.nvim",
|
||||
"rev": "d90956833d7c27e73c621a61f20b29fdb7122709",
|
||||
"rev": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-telescope",
|
||||
"ref": "0.1.5",
|
||||
"ref": "0.1.8",
|
||||
"repo": "telescope.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
@ -626,11 +718,11 @@
|
||||
"telescope-project-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1701464478,
|
||||
"narHash": "sha256-touMCltcnqkrQYV1NtNeWLQeFVGt+WM3aIWIdKilA7w=",
|
||||
"lastModified": 1725880250,
|
||||
"narHash": "sha256-wO/cm5PT1L0hFr/CX466w0UimoFg/tWrDK8T0QeKZMU=",
|
||||
"owner": "nvim-telescope",
|
||||
"repo": "telescope-project.nvim",
|
||||
"rev": "1aaf16580a614601a7f7077d9639aeb457dc5559",
|
||||
"rev": "796200876bb0fe8157b8eb1ce03d927d3827a052",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -639,19 +731,35 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tiny-inline-diagnostic-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1726582328,
|
||||
"narHash": "sha256-NBcUVUSnk2TlbSr/vFTbp3Rh35ms8lAcfDqpmE1KTq4=",
|
||||
"owner": "rachartier",
|
||||
"repo": "tiny-inline-diagnostic.nvim",
|
||||
"rev": "1a83e7ce5c9d0ae4d89fc5c812b55ff8ed1d39e7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rachartier",
|
||||
"repo": "tiny-inline-diagnostic.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"toggleterm-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1701858874,
|
||||
"narHash": "sha256-vJApw7XY2wOX9InfWcah+hkNxBfS1+kQUWr4ITxRmgA=",
|
||||
"lastModified": 1721232722,
|
||||
"narHash": "sha256-hJ6nBCgSyYF1pY4lX+b8WZd49i5F6BwOmrl7xVSIwRw=",
|
||||
"owner": "akinsho",
|
||||
"repo": "toggleterm.nvim",
|
||||
"rev": "cbd041d91b90cd3c02df03fe6133208888f8e008",
|
||||
"rev": "48be57eaba817f038d61bbf64d2c597f578c0827",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "akinsho",
|
||||
"ref": "v2.9.0",
|
||||
"ref": "v2.12.0",
|
||||
"repo": "toggleterm.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
@ -659,11 +767,11 @@
|
||||
"tree-sitter-bash": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1712878661,
|
||||
"narHash": "sha256-sj1qYb42k0hXXcNCKg1hINYD11wDcVpnoPhZNtlYT6k=",
|
||||
"lastModified": 1725407033,
|
||||
"narHash": "sha256-xqiUJhl7nfOlS6wBYWpmrGLCvWoJCA5fz8DCX85Lxog=",
|
||||
"owner": "tree-sitter",
|
||||
"repo": "tree-sitter-bash",
|
||||
"rev": "f8fb3274f72a30896075585b32b0c54cad65c086",
|
||||
"rev": "c8713e50f0bd77d080832fc61ad128bc8f2934e9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -676,11 +784,11 @@
|
||||
"tree-sitter-ini": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1699877527,
|
||||
"narHash": "sha256-dYPeVTNWO4apY5dsjsKViavU7YtLeGTp6BzEemXhsEU=",
|
||||
"lastModified": 1725233451,
|
||||
"narHash": "sha256-G11Aynq2rnkRwdkhspjYqtBD/h5k4aD+NvuE0QfploU=",
|
||||
"owner": "justinmk",
|
||||
"repo": "tree-sitter-ini",
|
||||
"rev": "bcb84a2d4bcd6f55b911c42deade75c8f90cb0c5",
|
||||
"rev": "962568c9efa71d25720ab42c5d36e222626ef3a6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -692,11 +800,11 @@
|
||||
"tree-sitter-lua": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1710150044,
|
||||
"narHash": "sha256-uFaEptW4wPrqgHfB1mYmVltf+4no61L2cPgpsr5qBIU=",
|
||||
"lastModified": 1725894603,
|
||||
"narHash": "sha256-Q2LtrifoKf16N1dRBf2xLi12kpMkcFncZL4jaVbtK3M=",
|
||||
"owner": "MunifTanjim",
|
||||
"repo": "tree-sitter-lua",
|
||||
"rev": "a24dab177e58c9c6832f96b9a73102a0cfbced4a",
|
||||
"rev": "99fc677e6971c425e8d407f59c77ab897e585c92",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -725,11 +833,11 @@
|
||||
"tree-sitter-python": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1714528221,
|
||||
"narHash": "sha256-hHQ5gK4dTRSdp0fLKarytU9vFhsBeQp7Ka61vFoIr7Y=",
|
||||
"lastModified": 1725324041,
|
||||
"narHash": "sha256-8mdBN1vP64PJKxN2y0GoaObLs6j/lcsU47sr+8/8oTQ=",
|
||||
"owner": "tree-sitter",
|
||||
"repo": "tree-sitter-python",
|
||||
"rev": "71778c2a472ed00a64abf4219544edbf8e4b86d7",
|
||||
"rev": "8c65e256f971812276ff2a69a2f515c218ed7f82",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -742,11 +850,11 @@
|
||||
"tree-sitter-rasi": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1707776004,
|
||||
"narHash": "sha256-7zhQ5wGm0FFyuTiBVN2KgvUTw8G6fwUGR8HKJ69kR+c=",
|
||||
"lastModified": 1716296585,
|
||||
"narHash": "sha256-sPrIVgGGaBaXeqHNxjcdJ/S2FvxyV6rD9UPKU/tpspw=",
|
||||
"owner": "Fymyte",
|
||||
"repo": "tree-sitter-rasi",
|
||||
"rev": "43196d934a9a6ab3c7093a8683efd0111bb03db1",
|
||||
"rev": "6c9bbcfdf5f0f553d9ebc01750a3aa247a37b8aa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -758,11 +866,11 @@
|
||||
"tree-sitter-vimdoc": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1713806200,
|
||||
"narHash": "sha256-+QbLL5EC3oNiwd7h7MW/mutHhGPUHhbYTQcu6x6atcI=",
|
||||
"lastModified": 1717834376,
|
||||
"narHash": "sha256-v+XSWGm2Wdn9/rxNFMqXYACkGn6AvxZdxkClLuKnWGU=",
|
||||
"owner": "neovim",
|
||||
"repo": "tree-sitter-vimdoc",
|
||||
"rev": "b711df784dd43d0a8ed8ddbfca0ddcc3239d94b4",
|
||||
"rev": "2249c44ecd3f5cf22da3dcccfb74f816ddb29245",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -789,18 +897,18 @@
|
||||
},
|
||||
"wsl": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714355896,
|
||||
"narHash": "sha256-rtv+nJJ12V7w68j8vIcGacfS1yuK1/dBgglSKWzYMTM=",
|
||||
"lastModified": 1728588346,
|
||||
"narHash": "sha256-P1j+Nf+pzxPYK2Qe7lF2yB0vR3YvW8Td5sD0ZvrKIq8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NixOS-WSL",
|
||||
"rev": "acb893461a4bee4e77b1a27b1410d4995b52174c",
|
||||
"rev": "0fc8d9bb51cc46b31d950513df6d088905c8fe55",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
74
flake.nix
74
flake.nix
@ -7,6 +7,9 @@
|
||||
# Used for system packages
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
# Used for specific stable packages
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
|
||||
# Used for caddy plugins
|
||||
nixpkgs-caddy.url = "github:jpds/nixpkgs/caddy-external-plugins";
|
||||
|
||||
@ -37,6 +40,12 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Better App install management in macOS
|
||||
mac-app-util = {
|
||||
url = "github:hraban/mac-app-util";
|
||||
inputs.nixpkgs.follows = "nixpkgs"; # Use system packages list for their inputs
|
||||
};
|
||||
|
||||
# Manage disk format and partitioning
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
@ -68,7 +77,7 @@
|
||||
};
|
||||
nvim-lspconfig-src = {
|
||||
# https://github.com/neovim/nvim-lspconfig/tags
|
||||
url = "github:neovim/nvim-lspconfig/v0.1.7";
|
||||
url = "github:neovim/nvim-lspconfig/v0.1.8";
|
||||
flake = false;
|
||||
};
|
||||
cmp-nvim-lsp-src = {
|
||||
@ -80,19 +89,14 @@
|
||||
url = "github:m00qek/baleia.nvim";
|
||||
flake = false;
|
||||
};
|
||||
comment-nvim-src = {
|
||||
# https://github.com/numToStr/Comment.nvim/releases
|
||||
url = "github:numToStr/Comment.nvim/v0.8.0";
|
||||
flake = false;
|
||||
};
|
||||
nvim-treesitter-src = {
|
||||
# https://github.com/nvim-treesitter/nvim-treesitter/tags
|
||||
url = "github:nvim-treesitter/nvim-treesitter/master";
|
||||
url = "github:nvim-treesitter/nvim-treesitter/v0.9.2";
|
||||
flake = false;
|
||||
};
|
||||
telescope-nvim-src = {
|
||||
# https://github.com/nvim-telescope/telescope.nvim/releases
|
||||
url = "github:nvim-telescope/telescope.nvim/0.1.5";
|
||||
url = "github:nvim-telescope/telescope.nvim/0.1.8";
|
||||
flake = false;
|
||||
};
|
||||
telescope-project-nvim-src = {
|
||||
@ -101,12 +105,12 @@
|
||||
};
|
||||
toggleterm-nvim-src = {
|
||||
# https://github.com/akinsho/toggleterm.nvim/tags
|
||||
url = "github:akinsho/toggleterm.nvim/v2.9.0";
|
||||
url = "github:akinsho/toggleterm.nvim/v2.12.0";
|
||||
flake = false;
|
||||
};
|
||||
bufferline-nvim-src = {
|
||||
# https://github.com/akinsho/bufferline.nvim/releases
|
||||
url = "github:akinsho/bufferline.nvim/v4.5.0";
|
||||
url = "github:akinsho/bufferline.nvim/v4.6.1";
|
||||
flake = false;
|
||||
};
|
||||
nvim-tree-lua-src = {
|
||||
@ -119,17 +123,21 @@
|
||||
};
|
||||
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";
|
||||
url = "github:j-hui/fidget.nvim/v1.4.5";
|
||||
flake = false;
|
||||
};
|
||||
nvim-lint-src = {
|
||||
url = "github:mfussenegger/nvim-lint";
|
||||
flake = false;
|
||||
};
|
||||
tiny-inline-diagnostic-nvim-src = {
|
||||
url = "github:rachartier/tiny-inline-diagnostic.nvim";
|
||||
flake = false;
|
||||
};
|
||||
snipe-nvim-src = {
|
||||
url = "github:leath-dub/snipe.nvim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# Tree-Sitter Grammars
|
||||
tree-sitter-bash = {
|
||||
@ -177,33 +185,32 @@
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# Firefox addon from outside the extension store
|
||||
bypass-paywalls-clean = {
|
||||
# https://gitlab.com/magnolia1234/bpc-uploads/-/commits/master/?ref_type=HEADS
|
||||
url = "https://github.com/bpc-clone/bpc_updates/releases/download/latest/bypass_paywalls_clean-3.6.6.0.xpi";
|
||||
gh-collaborators = {
|
||||
url = "github:katiem0/gh-collaborators";
|
||||
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";
|
||||
url = "https://github.com/nextcloud/news/releases/download/25.0.0-alpha7/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";
|
||||
url = "https://github.com/nextcloud-releases/external/releases/download/v5.4.0/external-v5.4.0.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";
|
||||
url = "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.1/cookbook-0.11.1.tar.gz";
|
||||
flake = false;
|
||||
};
|
||||
nextcloud-snappymail = {
|
||||
# https://github.com/the-djmaze/snappymail/releases
|
||||
# https://snappymail.eu/repository/nextcloud
|
||||
url = "https://github.com/nmasur/snappymail-nextcloud/releases/download/v2.36.1/snappymail-2.36.1-nextcloud.tar.gz";
|
||||
url = "https://snappymail.eu/repository/nextcloud/snappymail-2.37.2-nextcloud.tar.gz";
|
||||
# url = "https://github.com/nmasur/snappymail-nextcloud/releases/download/v2.36.3/snappymail-2.36.3-nextcloud.tar.gz";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
@ -228,11 +235,15 @@
|
||||
mail.smtpHost = "smtp.purelymail.com";
|
||||
dotfilesRepo = "https://github.com/nmasur/dotfiles";
|
||||
hostnames = {
|
||||
audiobooks = "read.${baseName}";
|
||||
files = "files.${baseName}";
|
||||
git = "git.${baseName}";
|
||||
influxdb = "influxdb.${baseName}";
|
||||
irc = "irc.${baseName}";
|
||||
metrics = "metrics.${baseName}";
|
||||
minecraft = "minecraft.${baseName}";
|
||||
n8n = "n8n.${baseName}";
|
||||
notifications = "ntfy.${baseName}";
|
||||
prometheus = "prom.${baseName}";
|
||||
paperless = "paper.${baseName}";
|
||||
secrets = "vault.${baseName}";
|
||||
@ -240,6 +251,7 @@
|
||||
content = "cloud.${baseName}";
|
||||
books = "books.${baseName}";
|
||||
download = "download.${baseName}";
|
||||
status = "status.${baseName}";
|
||||
transmission = "transmission.${baseName}";
|
||||
};
|
||||
};
|
||||
@ -249,14 +261,12 @@
|
||||
inputs.nur.overlay
|
||||
inputs.nix2vim.overlay
|
||||
(import ./overlays/neovim-plugins.nix inputs)
|
||||
(import ./overlays/calibre-web.nix)
|
||||
(import ./overlays/disko.nix inputs)
|
||||
(import ./overlays/tree-sitter.nix inputs)
|
||||
(import ./overlays/mpv-scripts.nix inputs)
|
||||
(import ./overlays/nextcloud-apps.nix inputs)
|
||||
(import ./overlays/betterlockscreen.nix)
|
||||
(import ./overlays/gh-collaborators.nix)
|
||||
(import ./overlays/bypass-paywalls-clean.nix inputs)
|
||||
(import ./overlays/gh-collaborators.nix inputs)
|
||||
(import ./overlays/ren-rep.nix inputs)
|
||||
];
|
||||
|
||||
@ -325,21 +335,23 @@
|
||||
in
|
||||
{
|
||||
x86_64-linux.staff = staff "x86_64-linux";
|
||||
x86_64-linux.arrow = inputs.nixos-generators.nixosGenerate {
|
||||
x86_64-linux.arrow = inputs.nixos-generators.nixosGenerate rec {
|
||||
system = "x86_64-linux";
|
||||
format = "iso";
|
||||
specialArgs = {
|
||||
pkgs-stable = import inputs.nixpkgs-stable { inherit system; };
|
||||
pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
|
||||
};
|
||||
modules = import ./hosts/arrow/modules.nix { inherit inputs globals overlays; };
|
||||
};
|
||||
x86_64-linux.arrow-aws = inputs.nixos-generators.nixosGenerate rec {
|
||||
system = "x86_64-linux";
|
||||
format = "amazon";
|
||||
specialArgs = {
|
||||
pkgs-stable = import inputs.nixpkgs-stable { inherit system; };
|
||||
pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
|
||||
};
|
||||
modules = import ./hosts/arrow/modules.nix { inherit inputs globals overlays; } ++ [
|
||||
# import
|
||||
# ./modules/aws
|
||||
# { inherit inputs; }
|
||||
(
|
||||
{ ... }:
|
||||
{
|
||||
@ -348,6 +360,8 @@
|
||||
permitRootLogin = "prohibit-password";
|
||||
boot.loader.systemd-boot.enable = inputs.nixpkgs.lib.mkForce false;
|
||||
boot.loader.efi.canTouchEfiVariables = inputs.nixpkgs.lib.mkForce false;
|
||||
services.amazon-ssm-agent.enable = true;
|
||||
users.users.ssm-user.extraGroups = [ "wheel" ];
|
||||
}
|
||||
)
|
||||
];
|
||||
|
@ -1,26 +1,40 @@
|
||||
resource "aws_instance" "instance" {
|
||||
ami = aws_ami.image.id
|
||||
iam_instance_profile = aws_iam_instance_profile.instance.name
|
||||
instance_type = var.ec2_size
|
||||
vpc_security_group_ids = [aws_security_group.instance.id]
|
||||
|
||||
tags = merge(local.default_tags, {
|
||||
tags = {
|
||||
Name = "aws-nixos"
|
||||
})
|
||||
}
|
||||
|
||||
lifecycle {
|
||||
create_before_destroy = true
|
||||
}
|
||||
}
|
||||
|
||||
resource "aws_ec2_instance_state" "instance" {
|
||||
instance_id = aws_instance.instance.id
|
||||
state = "running"
|
||||
}
|
||||
|
||||
data "aws_vpc" "vpc" {
|
||||
default = true
|
||||
}
|
||||
|
||||
resource "aws_security_group" "instance" {
|
||||
name = "t2-aws-nixos-test"
|
||||
name = "aws-nixos"
|
||||
description = "Allow SSH and HTTPS"
|
||||
vpc_id = data.aws_vpc.vpc.id
|
||||
|
||||
ingress {
|
||||
description = "Ping"
|
||||
from_port = -1
|
||||
to_port = -1
|
||||
protocol = "icmp"
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
}
|
||||
|
||||
ingress {
|
||||
description = "SSH"
|
||||
from_port = 22
|
||||
@ -45,3 +59,40 @@ resource "aws_security_group" "instance" {
|
||||
ipv6_cidr_blocks = ["::/0"]
|
||||
}
|
||||
}
|
||||
|
||||
# Setup IAM for the instance to use SSM
|
||||
data "aws_iam_policy_document" "ec2_assume_role" {
|
||||
statement {
|
||||
actions = ["sts:AssumeRole"]
|
||||
principals {
|
||||
type = "Service"
|
||||
identifiers = ["ec2.amazonaws.com"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data "aws_iam_policy_document" "instance_profile" {
|
||||
statement {
|
||||
actions = [
|
||||
"s3:ListAllMyBuckets",
|
||||
]
|
||||
resources = ["*"]
|
||||
}
|
||||
}
|
||||
|
||||
resource "aws_iam_role" "instance_profile" {
|
||||
name = "nixos"
|
||||
assume_role_policy = data.aws_iam_policy_document.ec2_assume_role.json
|
||||
inline_policy {
|
||||
name = "instance-profile"
|
||||
policy = data.aws_iam_policy_document.instance_profile.json
|
||||
}
|
||||
}
|
||||
resource "aws_iam_role_policy_attachment" "instance_ssm" {
|
||||
role = aws_iam_role.instance_profile.name
|
||||
policy_arn = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
|
||||
}
|
||||
resource "aws_iam_instance_profile" "instance" {
|
||||
name = "nixos"
|
||||
role = aws_iam_role.instance_profile.name
|
||||
}
|
||||
|
@ -1,13 +1,23 @@
|
||||
locals {
|
||||
image_file = one(fileset(path.root, "result/nixos-amazon-image-*.vhd"))
|
||||
# locals {
|
||||
# image_file = one(fileset(path.root, "../../../result/nixos-amazon-image-*.vhd"))
|
||||
# }
|
||||
#
|
||||
# # Upload image to S3
|
||||
# resource "aws_s3_object" "image" {
|
||||
# bucket = var.images_bucket
|
||||
# key = basename(local.image_file)
|
||||
# source = local.image_file
|
||||
# etag = filemd5(local.image_file)
|
||||
# }
|
||||
|
||||
# Use existing image in S3
|
||||
data "aws_s3_object" "image" {
|
||||
bucket = var.images_bucket
|
||||
key = "arrow.vhd"
|
||||
}
|
||||
|
||||
# Upload image to S3
|
||||
resource "aws_s3_object" "image" {
|
||||
bucket = var.images_bucket
|
||||
key = basename(local.image_file)
|
||||
source = local.image_file
|
||||
etag = filemd5(local.image_file)
|
||||
resource "terraform_data" "image_replacement" {
|
||||
input = data.aws_s3_object.image.etag
|
||||
}
|
||||
|
||||
# Setup IAM access for the VM Importer
|
||||
@ -29,8 +39,8 @@ data "aws_iam_policy_document" "vmimport" {
|
||||
"s3:ListBucket",
|
||||
]
|
||||
resources = [
|
||||
"arn:aws:s3:::${aws_s3_object.image.bucket}",
|
||||
"arn:aws:s3:::${aws_s3_object.image.bucket}/*",
|
||||
"arn:aws:s3:::${data.aws_s3_object.image.bucket}",
|
||||
"arn:aws:s3:::${data.aws_s3_object.image.bucket}/*",
|
||||
]
|
||||
}
|
||||
statement {
|
||||
@ -58,23 +68,28 @@ resource "aws_ebs_snapshot_import" "image" {
|
||||
disk_container {
|
||||
format = "VHD"
|
||||
user_bucket {
|
||||
s3_bucket = aws_s3_object.image.bucket
|
||||
s3_key = aws_s3_object.image.key
|
||||
s3_bucket = data.aws_s3_object.image.bucket
|
||||
s3_key = data.aws_s3_object.image.key
|
||||
}
|
||||
}
|
||||
|
||||
role_name = aws_iam_role.vmimport.name
|
||||
lifecycle {
|
||||
replace_triggered_by = [terraform_data.image_replacement]
|
||||
}
|
||||
}
|
||||
|
||||
# Convert to AMI
|
||||
resource "aws_ami" "image" {
|
||||
description = "Created with NixOS."
|
||||
name = replace(basename(local.image_file), "/\\.vhd$/", "")
|
||||
name = replace(basename(data.aws_s3_object.image.key), "/\\.vhd$/", "")
|
||||
virtualization_type = "hvm"
|
||||
root_device_name = "/dev/xvda"
|
||||
ena_support = true
|
||||
|
||||
ebs_block_device {
|
||||
device_name = "/dev/xvda"
|
||||
snapshot_id = aws_ebs_snapshot_import.image.id
|
||||
volume_size = 8
|
||||
volume_size = 17
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
terraform {
|
||||
backend "s3" {
|
||||
bucket = var.terraform_state_bucket
|
||||
key = var.terraform_state_key
|
||||
region = "us-east-1"
|
||||
dynamodb_table = "terraform-state-lock"
|
||||
}
|
||||
|
3
hosts/arrow/aws/outputs.tf
Normal file
3
hosts/arrow/aws/outputs.tf
Normal file
@ -0,0 +1,3 @@
|
||||
output "host_ip" {
|
||||
value = aws_instance.instance.public_ip
|
||||
}
|
@ -8,13 +8,3 @@ variable "images_bucket" {
|
||||
description = "Name of the bucket in which to store the NixOS VM images."
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "terraform_state_bucket" {
|
||||
description = "Name of the bucket in which to store the Terraform state information."
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "terraform_state_key" {
|
||||
description = "Path of the file in which to store the Terraform state information."
|
||||
type = string
|
||||
}
|
||||
|
@ -26,6 +26,16 @@ inputs.nixpkgs.lib.nixosSystem rec {
|
||||
device = "/dev/disk/by-label/boot";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
virtualisation.vmVariant = {
|
||||
virtualisation.forwardPorts = [
|
||||
{
|
||||
from = "host";
|
||||
host.port = 2222;
|
||||
guest.port = 22;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
@ -22,19 +22,10 @@
|
||||
cloudflare.enable = true;
|
||||
services.openssh.enable = true;
|
||||
services.caddy.enable = true;
|
||||
services.n8n.enable = true;
|
||||
|
||||
# nix-index seems to eat up too much memory for Vultr
|
||||
home-manager.users.${globals.user}.programs.nix-index.enable = inputs.nixpkgs.lib.mkForce false;
|
||||
|
||||
virtualisation.vmVariant = {
|
||||
virtualisation.forwardPorts = [
|
||||
{
|
||||
from = "host";
|
||||
host.port = 2222;
|
||||
guest.port = 22;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
../../modules/common
|
||||
../../modules/nixos
|
||||
|
@ -30,15 +30,6 @@ terraform {
|
||||
}
|
||||
}
|
||||
|
||||
# locals {
|
||||
# image_file = one(fileset(path.root, "result/iso/nixos.iso"))
|
||||
# }
|
||||
|
||||
# variable "cloudflare_r2_endpoint" {
|
||||
# type = string
|
||||
# description = "Domain for the Cloudflare R2 endpoint"
|
||||
# }
|
||||
|
||||
variable "vultr_api_key" {
|
||||
type = string
|
||||
description = "API key for Vultr management"
|
||||
@ -64,18 +55,6 @@ provider "vultr" {
|
||||
api_key = var.vultr_api_key
|
||||
}
|
||||
|
||||
# data "aws_s3_bucket" "images" {
|
||||
# bucket = "noahmasur-arrow-images"
|
||||
# }
|
||||
#
|
||||
# resource "aws_s3_object" "image" {
|
||||
# bucket = data.aws_s3_bucket.images.id
|
||||
# key = "arrow.iso"
|
||||
# source = local.image_file
|
||||
# etag = filemd5(local.image_file)
|
||||
# acl = "public-read"
|
||||
# }
|
||||
|
||||
resource "vultr_iso_private" "image" {
|
||||
# url = "https://${var.cloudflare_account_id}.r2.cloudflarestorage.com/${data.aws_s3_bucket.images.id}/${aws_s3_object.image.key}"
|
||||
url = "https://arrow-images.masu.rs/arrow.iso"
|
||||
|
@ -14,9 +14,12 @@
|
||||
...
|
||||
}:
|
||||
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
inputs.nixpkgs.lib.nixosSystem rec {
|
||||
system = "aarch64-linux";
|
||||
specialArgs = { };
|
||||
specialArgs = {
|
||||
pkgs-stable = import inputs.nixpkgs-stable { inherit system; };
|
||||
pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
|
||||
};
|
||||
modules = [
|
||||
globals
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
@ -77,6 +80,10 @@ inputs.nixpkgs.lib.nixosSystem {
|
||||
services.gitea.enable = true;
|
||||
services.vaultwarden.enable = true;
|
||||
services.minecraft-server.enable = true; # Setup Minecraft server
|
||||
services.n8n.enable = true;
|
||||
services.ntfy-sh.enable = true;
|
||||
services.uptime-kuma.enable = true;
|
||||
system.autoUpgrade.enable = true;
|
||||
|
||||
# Allows private remote access over the internet
|
||||
cloudflareTunnel = {
|
||||
|
@ -23,6 +23,7 @@ inputs.darwin.lib.darwinSystem {
|
||||
}
|
||||
)
|
||||
inputs.home-manager.darwinModules.home-manager
|
||||
inputs.mac-app-util.darwinModules.default
|
||||
{
|
||||
nixpkgs.overlays = [ inputs.firefox-darwin.overlay ] ++ overlays;
|
||||
networking.hostName = "lookingglass";
|
||||
@ -51,6 +52,8 @@ inputs.darwin.lib.darwinSystem {
|
||||
kubernetes.enable = true;
|
||||
_1password.enable = true;
|
||||
slack.enable = true;
|
||||
wezterm.enable = true;
|
||||
yt-dlp.enable = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
@ -8,9 +8,12 @@
|
||||
...
|
||||
}:
|
||||
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
inputs.nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { };
|
||||
specialArgs = {
|
||||
pkgs-stable = import inputs.nixpkgs-stable { inherit system; };
|
||||
pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
|
||||
};
|
||||
modules = [
|
||||
globals
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
@ -64,6 +67,14 @@ inputs.nixpkgs.lib.nixosSystem {
|
||||
devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; });
|
||||
};
|
||||
|
||||
zramSwap.enable = true;
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swapfile";
|
||||
size = 4 * 1024; # 4 GB
|
||||
}
|
||||
];
|
||||
|
||||
boot.zfs = {
|
||||
# Automatically load the ZFS pool on boot
|
||||
extraPools = [ "tank" ];
|
||||
@ -94,6 +105,8 @@ inputs.nixpkgs.lib.nixosSystem {
|
||||
cloudflare.enable = true;
|
||||
dotfiles.enable = true;
|
||||
arrs.enable = true;
|
||||
filebrowser.enable = true;
|
||||
services.audiobookshelf.enable = true;
|
||||
services.bind.enable = true;
|
||||
services.caddy.enable = true;
|
||||
services.jellyfin.enable = true;
|
||||
@ -105,6 +118,7 @@ inputs.nixpkgs.lib.nixosSystem {
|
||||
services.samba.enable = true;
|
||||
services.paperless.enable = true;
|
||||
services.postgresql.enable = true;
|
||||
system.autoUpgrade.enable = false;
|
||||
|
||||
# Allows private remote access over the internet
|
||||
cloudflareTunnel = {
|
||||
|
@ -8,8 +8,12 @@
|
||||
...
|
||||
}:
|
||||
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
inputs.nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
pkgs-stable = import inputs.nixpkgs-stable { inherit system; };
|
||||
pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
|
||||
};
|
||||
modules = [
|
||||
globals
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
@ -112,11 +116,13 @@ inputs.nixpkgs.lib.nixosSystem {
|
||||
mullvad.enable = false;
|
||||
rust.enable = true;
|
||||
terraform.enable = true;
|
||||
wezterm.enable = true;
|
||||
yt-dlp.enable = true;
|
||||
gaming = {
|
||||
dwarf-fortress.enable = true;
|
||||
enable = true;
|
||||
steam.enable = true;
|
||||
moonlight.enable = true;
|
||||
legendary.enable = true;
|
||||
lutris.enable = true;
|
||||
ryujinx.enable = true;
|
||||
|
@ -22,10 +22,9 @@
|
||||
"1password-cli"
|
||||
];
|
||||
home-manager.users.${config.user} = {
|
||||
home.packages = with pkgs; [
|
||||
_1password-gui
|
||||
_1password
|
||||
];
|
||||
home.packages = [
|
||||
pkgs._1password
|
||||
] ++ (if pkgs.stdenv.isLinux then [ pkgs._1password-gui ] else [ ]);
|
||||
};
|
||||
|
||||
# https://1password.community/discussion/135462/firefox-extension-does-not-connect-to-linux-app
|
||||
|
@ -11,6 +11,7 @@
|
||||
./obsidian.nix
|
||||
./qbittorrent.nix
|
||||
./slack.nix
|
||||
./wezterm.nix
|
||||
./yt-dlp.nix
|
||||
];
|
||||
}
|
||||
|
@ -35,7 +35,6 @@
|
||||
# https://nur.nix-community.org/repos/rycee/
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
(lib.mkIf config._1password.enable onepassword-password-manager)
|
||||
pkgs.bypass-paywalls-clean
|
||||
darkreader
|
||||
don-t-fuck-with-paste
|
||||
facebook-container
|
||||
@ -72,6 +71,8 @@
|
||||
"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
|
||||
"browser.tabs.hoverPreview.enabled" = false; # Disable tab previews
|
||||
"browser.tabs.hoverPreview.showThumbnails" = false; # Disable tab previews
|
||||
};
|
||||
userChrome = ''
|
||||
:root {
|
||||
@ -158,13 +159,26 @@
|
||||
};
|
||||
};
|
||||
|
||||
# Mimic nixpkgs package environment for read-only profiles.ini management
|
||||
# From: https://github.com/booxter/home-manager/commit/dd1602e306fec366280f5953c5e1b553e3d9672a
|
||||
home.sessionVariables = {
|
||||
MOZ_LEGACY_PROFILES = 1;
|
||||
MOZ_ALLOW_DOWNGRADE = 1;
|
||||
};
|
||||
|
||||
# launchd.user.envVariables = config.home-manager.users.${config.user}.home.sessionVariables;
|
||||
|
||||
xdg.mimeApps = {
|
||||
associations.added = {
|
||||
"text.html" = [ "firefox.desktop" ];
|
||||
"text/html" = [ "firefox.desktop" ];
|
||||
};
|
||||
defaultApplications = {
|
||||
"text.html" = [ "firefox.desktop" ];
|
||||
"text/html" = [ "firefox.desktop" ];
|
||||
};
|
||||
associations.removed = {
|
||||
"text/html" = [ "wine-extension-htm.desktop" ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
xsession.windowManager.i3.config.keybindings = lib.mkIf pkgs.stdenv.isLinux {
|
||||
|
@ -22,7 +22,7 @@
|
||||
environment =
|
||||
{ }
|
||||
// lib.attrsets.optionalAttrs (builtins.hasAttr "sessionVariables" config.environment) {
|
||||
sessionVariables.ROFI_SYSTEMD_TERM = "${pkgs.kitty}/bin/kitty";
|
||||
sessionVariables.ROFI_SYSTEMD_TERM = lib.mkDefault "${pkgs.kitty}/bin/kitty";
|
||||
};
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
@ -31,13 +31,16 @@
|
||||
xsession.windowManager.i3.config.terminal = lib.mkIf pkgs.stdenv.isLinux "kitty";
|
||||
|
||||
# Set the Rofi terminal for running programs
|
||||
programs.rofi.terminal = lib.mkIf pkgs.stdenv.isLinux "${pkgs.kitty}/bin/kitty";
|
||||
programs.rofi.terminal = lib.mkIf pkgs.stdenv.isLinux (lib.mkDefault "${pkgs.kitty}/bin/kitty");
|
||||
|
||||
# Display images in the terminal
|
||||
programs.fish.shellAliases = {
|
||||
icat = "kitty +kitten icat";
|
||||
ssh = "kitty +kitten ssh";
|
||||
};
|
||||
programs.fish.interactiveShellInit = # fish
|
||||
''
|
||||
if test "$TERM" = "xterm-kitty"
|
||||
alias icat="kitty +kitten icat"
|
||||
alias ssh="kitty +kitten ssh"
|
||||
end
|
||||
'';
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
@ -50,18 +53,9 @@
|
||||
|
||||
# Easy fullscreen toggle (for macOS)
|
||||
"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 = {
|
||||
|
||||
# Required for kitty-scrollback.nvim
|
||||
allow_remote_control = "socket-only";
|
||||
listen_on = "unix:/tmp/kitty";
|
||||
action_alias = "kitty_scrollback_nvim kitten ${pkgs.vimPlugins.kitty-scrollback-nvim}/python/kitty_scrollback_nvim.py";
|
||||
|
||||
# Colors (adapted from: https://github.com/kdrag0n/base16-kitty/blob/master/templates/default-256.mustache)
|
||||
background = config.theme.colors.base00;
|
||||
foreground = config.theme.colors.base05;
|
||||
|
238
modules/common/applications/wezterm.nix
Normal file
238
modules/common/applications/wezterm.nix
Normal file
@ -0,0 +1,238 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
options = {
|
||||
wezterm = {
|
||||
enable = lib.mkEnableOption {
|
||||
description = "Enable WezTerm terminal.";
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
font = config.home-manager.users.${config.user}.programs.kitty.font.name;
|
||||
in
|
||||
lib.mkIf (config.gui.enable && config.wezterm.enable) {
|
||||
|
||||
# Set the Rofi-Systemd terminal for viewing logs
|
||||
# Using optionalAttrs because only available in NixOS
|
||||
environment =
|
||||
{ }
|
||||
// lib.attrsets.optionalAttrs (builtins.hasAttr "sessionVariables" config.environment) {
|
||||
sessionVariables.ROFI_SYSTEMD_TERM = "${pkgs.wezterm}/bin/wezterm";
|
||||
};
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
# Set the i3 terminal
|
||||
xsession.windowManager.i3.config.terminal = lib.mkIf pkgs.stdenv.isLinux "wezterm";
|
||||
|
||||
# Set the Rofi terminal for running programs
|
||||
programs.rofi.terminal = lib.mkIf pkgs.stdenv.isLinux "${pkgs.wezterm}/bin/wezterm";
|
||||
|
||||
# Display images in the terminal
|
||||
programs.fish.shellAliases = {
|
||||
icat = lib.mkForce "wezterm imgcat";
|
||||
};
|
||||
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
colorSchemes = {
|
||||
myTheme = {
|
||||
background = config.theme.colors.base00;
|
||||
foreground = config.theme.colors.base05;
|
||||
cursor_bg = config.theme.colors.base05;
|
||||
cursor_fg = config.theme.colors.base00;
|
||||
cursor_border = config.theme.colors.base05;
|
||||
selection_bg = config.theme.colors.base05;
|
||||
selection_fg = config.theme.colors.base00;
|
||||
scrollbar_thumb = config.theme.colors.base03;
|
||||
ansi = [
|
||||
config.theme.colors.base01 # black
|
||||
config.theme.colors.base0F # maroon
|
||||
config.theme.colors.base0B # green
|
||||
config.theme.colors.base0A # olive
|
||||
config.theme.colors.base0D # navy
|
||||
config.theme.colors.base0E # purple
|
||||
config.theme.colors.base0C # teal
|
||||
config.theme.colors.base06 # silver
|
||||
];
|
||||
brights = [
|
||||
config.theme.colors.base03 # grey
|
||||
config.theme.colors.base08 # red
|
||||
config.theme.colors.base0B # lime
|
||||
config.theme.colors.base0A # yellow
|
||||
config.theme.colors.base0D # blue
|
||||
config.theme.colors.base0E # fuchsia
|
||||
config.theme.colors.base0C # aqua
|
||||
config.theme.colors.base07 # white
|
||||
];
|
||||
compose_cursor = config.theme.colors.base09; # orange
|
||||
copy_mode_active_highlight_bg = {
|
||||
Color = config.theme.colors.base03;
|
||||
};
|
||||
copy_mode_active_highlight_fg = {
|
||||
Color = config.theme.colors.base07;
|
||||
};
|
||||
copy_mode_inactive_highlight_bg = {
|
||||
Color = config.theme.colors.base02;
|
||||
};
|
||||
copy_mode_inactive_highlight_fg = {
|
||||
Color = config.theme.colors.base06;
|
||||
};
|
||||
quick_select_label_bg = {
|
||||
Color = config.theme.colors.base02;
|
||||
};
|
||||
quick_select_label_fg = {
|
||||
Color = config.theme.colors.base06;
|
||||
};
|
||||
quick_select_match_bg = {
|
||||
Color = config.theme.colors.base03;
|
||||
};
|
||||
quick_select_match_fg = {
|
||||
Color = config.theme.colors.base07;
|
||||
};
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
return {
|
||||
color_scheme = "myTheme",
|
||||
|
||||
-- Scrollback
|
||||
scrollback_lines = 10000,
|
||||
|
||||
-- Window
|
||||
window_padding = {
|
||||
left = 10,
|
||||
right = 10,
|
||||
top = 10,
|
||||
bottom = 10,
|
||||
},
|
||||
|
||||
font = wezterm.font('${font}', { weight = 'Bold'}),
|
||||
font_size = ${if pkgs.stdenv.isLinux then "14.0" else "18.0"},
|
||||
|
||||
-- Fix color blocks instead of text
|
||||
front_end = "WebGpu",
|
||||
|
||||
-- Tab Bar
|
||||
hide_tab_bar_if_only_one_tab = true,
|
||||
window_frame = {
|
||||
font = wezterm.font('${font}', { weight = 'Bold'}),
|
||||
font_size = ${if pkgs.stdenv.isLinux then "12.0" else "16.0"},
|
||||
},
|
||||
|
||||
colors = {
|
||||
tab_bar = {
|
||||
active_tab = {
|
||||
bg_color = '${config.theme.colors.base00}',
|
||||
fg_color = '${config.theme.colors.base04}',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Disable audio
|
||||
audible_bell = "Disabled",
|
||||
|
||||
initial_rows = 80,
|
||||
initial_cols = 200,
|
||||
|
||||
keys = {
|
||||
-- sends completion string for fish autosuggestions
|
||||
{
|
||||
key = 'Enter',
|
||||
mods = 'SHIFT',
|
||||
action = wezterm.action.SendString '\x1F'
|
||||
},
|
||||
-- ctrl-shift-h was "hide"
|
||||
{
|
||||
key = 'H',
|
||||
mods = 'SHIFT|CTRL',
|
||||
action = wezterm.action.DisableDefaultAssignment
|
||||
},
|
||||
-- alt-enter was "fullscreen"
|
||||
{
|
||||
key = 'Enter',
|
||||
mods = 'ALT',
|
||||
action = wezterm.action.DisableDefaultAssignment
|
||||
},
|
||||
-- make super-f "fullscreen"
|
||||
{
|
||||
key = 'f',
|
||||
mods = 'SUPER',
|
||||
action = wezterm.action.ToggleFullScreen
|
||||
},
|
||||
-- super-t open new tab in new dir
|
||||
{
|
||||
key = 't',
|
||||
mods = ${if pkgs.stdenv.isDarwin then "'SUPER'" else "'ALT'"},
|
||||
action = wezterm.action.SpawnCommandInNewTab {
|
||||
cwd = wezterm.home_dir,
|
||||
},
|
||||
},
|
||||
-- shift-super-t open new tab in same dir
|
||||
{
|
||||
key = 't',
|
||||
mods = 'SUPER|SHIFT',
|
||||
action = wezterm.action.SpawnTab 'CurrentPaneDomain'
|
||||
},
|
||||
-- project switcher
|
||||
{
|
||||
key = 'P',
|
||||
mods = 'SUPER',
|
||||
action = wezterm.action_callback(function(window, pane)
|
||||
local choices = {}
|
||||
|
||||
wezterm.log_info "working?"
|
||||
|
||||
function scandir(directory)
|
||||
local i, t, popen = 0, {}, io.popen
|
||||
local pfile = popen('${pkgs.fd}/bin/fd --search-path "'..directory..'" --type directory --exact-depth 2 | ${pkgs.proximity-sort}/bin/proximity-sort "'..os.getenv("HOME").."/dev/work"..'"')
|
||||
for filename in pfile:lines() do
|
||||
i = i + 1
|
||||
t[i] = filename
|
||||
end
|
||||
pfile:close()
|
||||
return t
|
||||
end
|
||||
|
||||
for _, v in pairs(scandir(os.getenv("HOME").."/dev")) do
|
||||
table.insert(choices, { label = v })
|
||||
end
|
||||
|
||||
window:perform_action(
|
||||
wezterm.action.InputSelector {
|
||||
action = wezterm.action_callback(function(window, pane, id, label)
|
||||
if not id and not label then
|
||||
wezterm.log_info "cancelled"
|
||||
else
|
||||
window:perform_action(
|
||||
wezterm.action.SpawnCommandInNewTab {
|
||||
cwd = label,
|
||||
},
|
||||
pane
|
||||
)
|
||||
end
|
||||
end),
|
||||
fuzzy = true,
|
||||
title = "Select Project",
|
||||
choices = choices,
|
||||
},
|
||||
pane
|
||||
)
|
||||
end),
|
||||
},
|
||||
},
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -77,6 +77,10 @@
|
||||
default = [ ];
|
||||
};
|
||||
hostnames = {
|
||||
files = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Hostname for files server (Filebrowser).";
|
||||
};
|
||||
git = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Hostname for git server (Gitea).";
|
||||
@ -125,6 +129,18 @@
|
||||
type = lib.types.str;
|
||||
description = "Hostname for IRC services.";
|
||||
};
|
||||
n8n = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Hostname for n8n automation.";
|
||||
};
|
||||
notifications = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Hostname for push notification services (ntfy).";
|
||||
};
|
||||
status = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Hostname for status page (Uptime-Kuma).";
|
||||
};
|
||||
transmission = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Hostname for peer2peer downloads (Transmission).";
|
||||
|
@ -158,7 +158,11 @@
|
||||
};
|
||||
};
|
||||
extraConfig = {
|
||||
general.unsafe-accounts-conf = true;
|
||||
general = {
|
||||
unsafe-accounts-conf = true;
|
||||
# log-file = "~/.cache/aerc.log";
|
||||
# log-level = "debug";
|
||||
};
|
||||
viewer = {
|
||||
pager = "${pkgs.less}/bin/less -R";
|
||||
};
|
||||
|
@ -6,6 +6,7 @@
|
||||
plugins = [
|
||||
pkgs.vimPlugins.bufferline-nvim
|
||||
pkgs.vimPlugins.vim-bbye # Better closing of buffers
|
||||
pkgs.vimPlugins.snipe-nvim # Jump between open buffers
|
||||
];
|
||||
setup.bufferline = {
|
||||
options = {
|
||||
@ -15,6 +16,7 @@
|
||||
offsets = [ { filetype = "NvimTree"; } ];
|
||||
};
|
||||
};
|
||||
setup.snipe = { };
|
||||
lua = ''
|
||||
-- Move buffers
|
||||
vim.keymap.set("n", "L", ":BufferLineCycleNext<CR>", { silent = true })
|
||||
@ -22,5 +24,7 @@
|
||||
|
||||
-- Kill buffer
|
||||
vim.keymap.set("n", "<Leader>x", " :Bdelete<CR>", { silent = true })
|
||||
'';
|
||||
|
||||
-- Jump to buffer
|
||||
vim.keymap.set("n", "gb", require("snipe").open_buffer_menu, { silent = true }) '';
|
||||
}
|
||||
|
@ -26,15 +26,15 @@
|
||||
|
||||
# Basic completion keybinds
|
||||
mapping = {
|
||||
"['<C-n>']" = dsl.rawLua "require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Insert })";
|
||||
"['<C-p>']" = dsl.rawLua "require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Insert })";
|
||||
"['<Down>']" = dsl.rawLua "require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Select })";
|
||||
"['<Up>']" = dsl.rawLua "require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Select })";
|
||||
"['<C-n>']" = dsl.rawLua "require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Insert }, { 'i', 'c' })";
|
||||
"['<C-p>']" = dsl.rawLua "require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Insert }, { 'i', 'c' })";
|
||||
"['<Down>']" = dsl.rawLua "require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Select }, { 'i', 'c' })";
|
||||
"['<Up>']" = dsl.rawLua "require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Select }, { 'i', 'c' })";
|
||||
"['<C-d>']" = dsl.rawLua "require('cmp').mapping.scroll_docs(-4)";
|
||||
"['<C-f>']" = dsl.rawLua "require('cmp').mapping.scroll_docs(4)";
|
||||
"['<C-e>']" = dsl.rawLua "require('cmp').mapping.abort()";
|
||||
"['<CR>']" = dsl.rawLua "require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, })";
|
||||
"['<C-r>']" = dsl.rawLua "require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, })";
|
||||
"['<C-y>']" = dsl.rawLua "require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Insert, select = true, }, { 'i', 'c' })";
|
||||
"['<C-r>']" = dsl.rawLua "require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, }, { 'i', 'c' })";
|
||||
"['<Esc>']" = dsl.rawLua ''
|
||||
function(_)
|
||||
cmp.mapping({
|
||||
@ -44,7 +44,7 @@
|
||||
vim.cmd("stopinsert") --- Abort and leave insert mode
|
||||
end
|
||||
'';
|
||||
"['<C-l>']" = dsl.rawLua ''
|
||||
"['<C-k>']" = dsl.rawLua ''
|
||||
cmp.mapping(function(_)
|
||||
if require("luasnip").expand_or_jumpable() then
|
||||
require("luasnip").expand_or_jump()
|
||||
@ -131,13 +131,41 @@
|
||||
lua = ''
|
||||
-- Use buffer source for `/`
|
||||
require('cmp').setup.cmdline("/", {
|
||||
sources = {
|
||||
{ name = "buffer", keyword_length = 5 },
|
||||
mapping = {
|
||||
['<C-n>'] = {
|
||||
c = require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Insert }, { 'i', 'c' })
|
||||
},
|
||||
['<C-p>'] = {
|
||||
c = require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Insert }, { 'i', 'c' })
|
||||
},
|
||||
['<C-y>'] = {
|
||||
c = require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Insert, select = true, }, { 'i', 'c' })
|
||||
},
|
||||
['<C-r>'] = {
|
||||
c = require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, }, { 'i', 'c' })
|
||||
},
|
||||
},
|
||||
sources = require('cmp').config.sources({
|
||||
{ name = "buffer", keyword_length = 5 },
|
||||
}),
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':'
|
||||
require('cmp').setup.cmdline(":", {
|
||||
mapping = {
|
||||
['<C-n>'] = {
|
||||
c = require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Insert }, { 'i', 'c' })
|
||||
},
|
||||
['<C-p>'] = {
|
||||
c = require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Insert }, { 'i', 'c' })
|
||||
},
|
||||
['<C-y>'] = {
|
||||
c = require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Insert, select = true, }, { 'i', 'c' })
|
||||
},
|
||||
['<C-r>'] = {
|
||||
c = require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, }, { 'i', 'c' })
|
||||
},
|
||||
},
|
||||
sources = require('cmp').config.sources({
|
||||
{ name = "path" },
|
||||
}, {
|
||||
|
@ -2,8 +2,11 @@
|
||||
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'" })
|
||||
local gitwatch = require("toggleterm.terminal").Terminal:new({
|
||||
cmd = "fish --interactive --init-command 'gh run watch'",
|
||||
hidden = true,
|
||||
direction = "float",
|
||||
})
|
||||
|
||||
-- Set a toggle for this terminal
|
||||
function GITWATCH_TOGGLE()
|
||||
@ -11,4 +14,4 @@ function GITWATCH_TOGGLE()
|
||||
end
|
||||
|
||||
-- Keymap to toggle the run
|
||||
vim.keymap.set("n", "<Leader>gw", GITWATCH_TOGGLE)
|
||||
vim.keymap.set("n", "<Leader>W", GITWATCH_TOGGLE)
|
||||
|
@ -11,6 +11,11 @@
|
||||
options.terraform = lib.mkEnableOption "Whether to enable Terraform LSP";
|
||||
options.github = lib.mkEnableOption "Whether to enable GitHub features";
|
||||
options.kubernetes = lib.mkEnableOption "Whether to enable Kubernetes features";
|
||||
options.nixosConfiguration = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Configuration to use for nixd options checking";
|
||||
default = "default";
|
||||
};
|
||||
|
||||
config = {
|
||||
plugins = [
|
||||
@ -18,9 +23,12 @@
|
||||
pkgs.vimPlugins.conform-nvim
|
||||
pkgs.vimPlugins.fidget-nvim
|
||||
pkgs.vimPlugins.nvim-lint
|
||||
pkgs.vimPlugins.vim-table-mode
|
||||
pkgs.vimPlugins.tiny-inline-diagnostic-nvim
|
||||
];
|
||||
|
||||
setup.fidget = { };
|
||||
setup.tiny-inline-diagnostic = { };
|
||||
|
||||
use.lspconfig.lua_ls.setup = dsl.callWith {
|
||||
settings = {
|
||||
@ -40,6 +48,21 @@
|
||||
use.lspconfig.nixd.setup = dsl.callWith {
|
||||
cmd = [ "${pkgs.nixd}/bin/nixd" ];
|
||||
capabilities = dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
||||
# settings = {
|
||||
# nixd = {
|
||||
# options = {
|
||||
# nixos = {
|
||||
# expr = "(builtins.getFlake (\"git+file://\" + toString ./.)).nixosConfigurations.${config.nixosConfiguration}.options";
|
||||
# };
|
||||
# home-manager = {
|
||||
# expr = "(builtins.getFlake (\"git+file://\" + toString ./.)).homeConfigurations.${config.nixosConfiguration}.options";
|
||||
# };
|
||||
# darwin = {
|
||||
# expr = "(builtins.getFlake (\"git+file://\" + toString ./.)).darwinConfigurations.${config.nixosConfiguration}.options";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
|
||||
use.lspconfig.pyright.setup = dsl.callWith {
|
||||
@ -70,6 +93,9 @@
|
||||
files = {
|
||||
excludeDirs = [ ".direnv" ];
|
||||
};
|
||||
cargo = {
|
||||
features = "all";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -88,7 +114,7 @@
|
||||
rust = [ "rustfmt" ];
|
||||
sh = [ "shfmt" ];
|
||||
terraform = if config.terraform then [ "terraform_fmt" ] else [ ];
|
||||
hcl = if config.terraform then [ "terraform_fmt" ] else [ ];
|
||||
hcl = [ "hcl" ];
|
||||
};
|
||||
formatters = {
|
||||
lua.command = "${pkgs.stylua}/bin/stylua";
|
||||
@ -105,6 +131,7 @@
|
||||
];
|
||||
};
|
||||
terraform_fmt.command = if config.terraform then "${pkgs.terraform}/bin/terraform" else "";
|
||||
hcl.command = "${pkgs.hclfmt}/bin/hclfmt";
|
||||
};
|
||||
};
|
||||
|
||||
@ -131,6 +158,9 @@
|
||||
|
||||
-- Prevent infinite log size (change this when debugging)
|
||||
vim.lsp.set_log_level("off")
|
||||
|
||||
-- Hide buffer diagnostics (use tiny-inline-diagnostic.nvim instead)
|
||||
vim.diagnostic.config({ virtual_text = false })
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -10,23 +10,20 @@
|
||||
pkgs.vimPlugins.vim-eunuch # File manipulation commands
|
||||
pkgs.vimPlugins.vim-fugitive # Git commands
|
||||
pkgs.vimPlugins.vim-repeat # Better repeat using .
|
||||
pkgs.vimPlugins.comment-nvim # Smart comment commands
|
||||
pkgs.vimPlugins.glow-nvim # Markdown preview popup
|
||||
pkgs.vimPlugins.vim-abolish # Keep capitalization in substitute (Subvert)
|
||||
pkgs.vimPlugins.markview-nvim # Markdown preview
|
||||
pkgs.vimPlugins.nvim-colorizer-lua # Hex color previews
|
||||
pkgs.vimPlugins.which-key-nvim # Keybind helper
|
||||
pkgs.vimPlugins.kitty-scrollback-nvim # Scrollback pager for kitty
|
||||
];
|
||||
|
||||
# Initialize some plugins
|
||||
setup.Comment = { };
|
||||
setup.colorizer = {
|
||||
user_default_options = {
|
||||
names = false;
|
||||
};
|
||||
};
|
||||
setup.glow = { };
|
||||
setup.markview = { };
|
||||
setup.which-key = { };
|
||||
setup.kitty-scrollback = { };
|
||||
|
||||
vim.o = {
|
||||
termguicolors = true; # Set to truecolor
|
||||
@ -44,7 +41,6 @@
|
||||
scrolloff = 3; # Margin of lines to see while scrolling
|
||||
splitright = true; # Vertical splits on the right side
|
||||
splitbelow = true; # Horizontal splits on the bottom side
|
||||
pastetoggle = "<F3>"; # Use F3 to enter raw paste mode
|
||||
clipboard = "unnamedplus"; # Uses system clipboard for yanking
|
||||
updatetime = 300; # Faster diagnostics
|
||||
mouse = "nv"; # Mouse interaction / scrolling
|
||||
@ -62,8 +58,8 @@
|
||||
|
||||
# Better backup, swap and undo storage
|
||||
vim.o.backup = true; # Easier to recover and more secure
|
||||
vim.bo.swapfile = false; # Instead of swaps, create backups
|
||||
vim.bo.undofile = true; # Keeps undos after quit
|
||||
vim.opt.undofile = true; # Keeps undos after quit
|
||||
vim.opt.swapfile = false; # Instead of swaps, create backups
|
||||
vim.o.backupdir = dsl.rawLua ''vim.fn.expand("~/.local/state/nvim/backup//")'';
|
||||
vim.o.undodir = dsl.rawLua ''vim.fn.expand("~/.local/state/nvim/undo//")'';
|
||||
|
||||
|
@ -26,7 +26,6 @@
|
||||
pkgs.vimPlugins.playground # Tree-sitter experimenting
|
||||
pkgs.vimPlugins.nginx-vim
|
||||
pkgs.vimPlugins.vim-helm
|
||||
pkgs.vimPlugins.baleia-nvim # Clean ANSI from kitty scrollback
|
||||
# pkgs.vimPlugins.hmts-nvim # Tree-sitter injections for home-manager
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "nmasur";
|
||||
|
@ -13,6 +13,7 @@ let
|
||||
terraform = config.terraform.enable;
|
||||
github = true;
|
||||
kubernetes = config.kubernetes.enable;
|
||||
nixosConfiguration = config.networking.hostName; # Used for Nixd
|
||||
};
|
||||
in
|
||||
{
|
||||
@ -48,17 +49,11 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# Set Neovim as the kitty terminal "scrollback" (vi mode) option.
|
||||
# Requires removing some of the ANSI escape codes that are sent to the
|
||||
# scrollback using sed and baleia, as well as removing several
|
||||
# unnecessary features.
|
||||
programs.kitty.settings.scrollback_pager = "${neovim}/bin/nvim --headless +'KittyScrollbackGenerateKittens' +'set nonumber' +'set norelativenumber' +'%print' +'quit!' 2>&1";
|
||||
|
||||
# Create a desktop option for launching Neovim from a file manager
|
||||
# (Requires launching the terminal and then executing Neovim)
|
||||
xdg.desktopEntries.nvim = lib.mkIf pkgs.stdenv.isLinux {
|
||||
xdg.desktopEntries.nvim = lib.mkIf (pkgs.stdenv.isLinux && config.gui.enable) {
|
||||
name = "Neovim wrapper";
|
||||
exec = "kitty nvim %F";
|
||||
exec = "${config.home-manager.users.${config.user}.programs.rofi.terminal} nvim %F";
|
||||
mimeType = [
|
||||
"text/plain"
|
||||
"text/markdown"
|
||||
|
@ -71,8 +71,8 @@ key("n", "co", ":copen<CR>")
|
||||
key("n", "cq", ":cclose<CR>")
|
||||
|
||||
-- Other
|
||||
key("n", "<A-CR>", ":noh<CR>", { silent = true }) --- Clear search in VimWiki
|
||||
key("n", "Y", "y$") --- Copy to end of line
|
||||
key("n", "<A-CR>", ":noh<CR>", { silent = true }) --- Clear search in VimWiki
|
||||
key("n", "Y", "y$") --- Copy to end of line
|
||||
key("v", "<C-r>", "y<Esc>:%s/<C-r>+//gc<left><left><left>") --- Substitute selected
|
||||
key("v", "D", "y'>gp") --- Duplicate selected
|
||||
key("x", "<Leader>p", '"_dP') --- Paste but keep register
|
||||
key("v", "D", "y'>gp") --- Duplicate selected
|
||||
key("x", "<Leader>p", '"_dP') --- Paste but keep register
|
||||
|
@ -11,8 +11,20 @@ vim.filetype.add({
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "*.eml",
|
||||
pattern = "mail",
|
||||
callback = function()
|
||||
vim.o.wrapmargin = 79 -- Wrap text automatically
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "markdown",
|
||||
command = "TableModeEnable",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "terraform",
|
||||
callback = function()
|
||||
vim.bo.commentstring = "# %s"
|
||||
end,
|
||||
})
|
||||
|
@ -32,6 +32,7 @@
|
||||
terraform ? false,
|
||||
github ? false,
|
||||
kubernetes ? false,
|
||||
nixosConfiguration ? "default",
|
||||
...
|
||||
}:
|
||||
|
||||
@ -44,6 +45,7 @@ pkgs.neovimBuilder {
|
||||
terraform
|
||||
github
|
||||
kubernetes
|
||||
nixosConfiguration
|
||||
;
|
||||
imports = [
|
||||
../config/align.nix
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# python310 # Standard Python interpreter
|
||||
nodePackages.pyright # Python language server
|
||||
pyright # Python language server
|
||||
black # Python formatter
|
||||
python310Packages.flake8 # Python linter
|
||||
];
|
||||
|
22
modules/common/shell/bash/scripts/aws-ec2.sh
Executable file
22
modules/common/shell/bash/scripts/aws-ec2.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Retrieve list of AWS instances
|
||||
# Use enter to jump into their sessions with SSM
|
||||
|
||||
# Specify AWS_PROFILE and AWS_REGION before running this script
|
||||
|
||||
aws ec2 describe-instances \
|
||||
--filters "Name=instance-state-name,Values=running" |
|
||||
jq -r \
|
||||
'.Reservations[]
|
||||
| .Instances[]
|
||||
| .InstanceId + " - " +
|
||||
(.PrivateIpAddress // "n/a") + " - " +
|
||||
(.PublicIpAddress // "n/a") + " - " +
|
||||
(.Tags // [] | from_entries | .Name // "n/a")' |
|
||||
fzf \
|
||||
--height 100% \
|
||||
--layout reverse \
|
||||
--header $'Press Enter to start SSM session\nInstance ID - Private IP - Public IP - Name' \
|
||||
--preview "aws ec2 describe-instances --instance-ids \"\$(echo {} | cut -d' ' -f1)\" | jq -r '.Reservations[].Instances[0]'" \
|
||||
--bind "enter:become(aws ssm start-session --target \$(echo {} | cut -d' ' -f1))"
|
55
modules/common/shell/bash/scripts/terraform-init.sh
Executable file
55
modules/common/shell/bash/scripts/terraform-init.sh
Executable file
@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export AWS_PROFILE="gs"
|
||||
|
||||
BUCKET_NAME_PART_1="t2"
|
||||
BUCKET_NAME_PART_2="global"
|
||||
BUCKET_NAME_PART_3="terraformstate"
|
||||
|
||||
PROJECT_ROOT=$(git rev-parse --show-toplevel)
|
||||
WORKFLOW_FILE="${PROJECT_ROOT}/.github/workflows/terraform.yml"
|
||||
|
||||
if [ ! -f "$WORKFLOW_FILE" ]; then
|
||||
WORKFLOW_FILE="${PROJECT_ROOT}/.github/workflows/apply.yml"
|
||||
fi
|
||||
|
||||
AWS_ACCOUNT_NUMBER=$(
|
||||
awk '/aws_account_number: .*/ {print $2}' "$WORKFLOW_FILE" | # Grab account number
|
||||
echo "$(
|
||||
read -r s
|
||||
s=${s//\'/}
|
||||
echo "$s"
|
||||
)" # Remove single quote if it exists
|
||||
)
|
||||
|
||||
if [ -z "${AWS_ACCOUNT_NUMBER}" ]; then
|
||||
AWS_ACCOUNT_NUMBER=$(
|
||||
awk '/AWS_ACCOUNT_NUMBER: .*/ {print $2}' "$WORKFLOW_FILE" | # Grab account number
|
||||
echo "$(
|
||||
read -r s
|
||||
s=${s//\'/}
|
||||
echo "$s"
|
||||
)" # Remove single quote if it exists
|
||||
)
|
||||
fi
|
||||
|
||||
REPOSITORY=$(
|
||||
git remote get-url origin |
|
||||
awk -F'/' -v OFS='/' '{print $(NF-1),$NF }' |
|
||||
echo "$(
|
||||
read -r s
|
||||
s=${s%.git}
|
||||
echo "$s"
|
||||
)" # Remove .git suffix if it exists
|
||||
)
|
||||
BRANCH=$(git branch --show-current)
|
||||
|
||||
terraform init \
|
||||
-backend-config="region=us-east-1" \
|
||||
-backend-config="bucket=${BUCKET_NAME_PART_1}${BUCKET_NAME_PART_2}${BUCKET_NAME_PART_3}" \
|
||||
-backend-config="workspace_key_prefix=accounts/${AWS_ACCOUNT_NUMBER}/${REPOSITORY}" \
|
||||
-backend-config="key=state.tfstate" \
|
||||
-backend-config="dynamodb_table=global-tf-state-lock" \
|
||||
-upgrade
|
||||
|
||||
terraform workspace select "$BRANCH"
|
@ -76,6 +76,10 @@
|
||||
description = "Full git commit on notes";
|
||||
body = builtins.readFile ./functions/syncnotes.fish;
|
||||
};
|
||||
_which = {
|
||||
description = "Identify the path to a program in the shell";
|
||||
body = "command --search (string sub --start=2 $argv)";
|
||||
};
|
||||
};
|
||||
interactiveShellInit = ''
|
||||
fish_vi_key_bindings
|
||||
@ -101,10 +105,18 @@
|
||||
"-" = "cd -";
|
||||
mkd = "mkdir -pv";
|
||||
|
||||
# Convert a program into its full path
|
||||
"=" = {
|
||||
position = "anywhere";
|
||||
regex = "=\\w+";
|
||||
function = "_which";
|
||||
};
|
||||
|
||||
# System
|
||||
s = "sudo";
|
||||
sc = "systemctl";
|
||||
scs = "systemctl status";
|
||||
sca = "systemctl cat";
|
||||
m = "make";
|
||||
t = "trash";
|
||||
|
||||
|
@ -113,6 +113,11 @@ in
|
||||
gpd = "git push origin -d";
|
||||
gbd = "git branch -d";
|
||||
gbD = "git branch -D";
|
||||
gdd = {
|
||||
position = "anywhere";
|
||||
setCursor = true;
|
||||
expansion = "BRANCH=% git push origin -d $BRANCH and git branch -d $BRANCH";
|
||||
};
|
||||
gr = "git reset";
|
||||
grh = "git reset --hard";
|
||||
gm = "git merge";
|
||||
@ -158,6 +163,13 @@ in
|
||||
and git branch -D $branch
|
||||
'';
|
||||
};
|
||||
git-delete-both = {
|
||||
argumentNames = "branch";
|
||||
body = ''
|
||||
git push origin -d $branch
|
||||
git branch -d $branch
|
||||
'';
|
||||
};
|
||||
git-merge-fuzzy = {
|
||||
body = ''
|
||||
set branch (git-fuzzy-branch "merge from...")
|
||||
|
@ -12,7 +12,10 @@
|
||||
enable = true;
|
||||
gitCredentialHelper.enable = true;
|
||||
settings.git_protocol = "https";
|
||||
extensions = [ pkgs.gh-collaborators ];
|
||||
extensions = [
|
||||
pkgs.gh-collaborators
|
||||
pkgs.gh-dash
|
||||
];
|
||||
};
|
||||
|
||||
programs.fish = lib.mkIf config.home-manager.users.${config.user}.programs.gh.enable {
|
||||
|
@ -12,34 +12,36 @@
|
||||
home.packages =
|
||||
let
|
||||
ldap_scheme = "ldaps";
|
||||
magic_number = "2";
|
||||
magic_end_seq = "corp";
|
||||
magic_prefix = "take";
|
||||
ldap_host = "${magic_prefix}${magic_number}.t${magic_number}.${magic_end_seq}";
|
||||
ldap_port = 636;
|
||||
ldap_dc_1 = "${magic_prefix}${magic_number}";
|
||||
ldap_dc_2 = "t${magic_number}";
|
||||
ldap_dc_3 = magic_end_seq;
|
||||
ldap_script = pkgs.writeShellScriptBin "ldap" ''
|
||||
# if ! [ "$LDAP_HOST" ]; then
|
||||
# echo "No LDAP_HOST specified!"
|
||||
# exit 1
|
||||
# fi
|
||||
if ! [ "$LDAP_HOST" ]; then
|
||||
echo "No LDAP_HOST specified!"
|
||||
exit 1
|
||||
fi
|
||||
SEARCH_FILTER="$@"
|
||||
ldapsearch -LLL \
|
||||
-B -o ldif-wrap=no \
|
||||
-H "${ldap_scheme}://${ldap_host}:${builtins.toString ldap_port}" \
|
||||
-D "${pkgs.lib.toUpper magic_prefix}${magic_number}\\${pkgs.lib.toLower config.user}" \
|
||||
-w "$(${pkgs._1password}/bin/op item get T${magic_number} --fields label=password)" \
|
||||
-b "DC=${ldap_dc_1},DC=${ldap_dc_2},DC=${ldap_dc_3}" \
|
||||
-s "sub" -x "(cn=$SEARCH_FILTER)" \
|
||||
-H "${ldap_scheme}://''${LDAP_HOST}:${builtins.toString ldap_port}" \
|
||||
-D "${pkgs.lib.toUpper magic_prefix}2\\${pkgs.lib.toLower config.user}" \
|
||||
-w "$(${pkgs._1password}/bin/op item get T2 --fields label=password)" \
|
||||
-b "dc=''${LDAP_HOST//./,dc=}" \
|
||||
-s "sub" -x "(cn=''${SEARCH_FILTER})" \
|
||||
| jq --slurp \
|
||||
--raw-input 'split("\n\n")|map(split("\n")|map(select(.[0:1]!="#" and length>0)) |select(length > 0)|map(capture("^(?<key>[^:]*:?): *(?<value>.*)") |if .key[-1:.key|length] == ":" then .key=.key[0:-1]|.value=(.value|@base64d) else . end)| group_by(.key) | map({key:.[0].key,value:(if .|length > 1 then [.[].value] else .[].value end)}) | from_entries)' | jq -r 'del(.[].thumbnailPhoto)'
|
||||
'';
|
||||
ldapm_script = pkgs.writeShellScriptBin "ldapm" ''
|
||||
if ! [ "$LDAP_HOST" ]; then
|
||||
echo "No LDAP_HOST specified!"
|
||||
exit 1
|
||||
fi
|
||||
${ldap_script}/bin/ldap "$@" | jq '[ .[].memberOf] | add'
|
||||
'';
|
||||
ldapg_script = pkgs.writeShellScriptBin "ldapg" ''
|
||||
if ! [ "$LDAP_HOST" ]; then
|
||||
echo "No LDAP_HOST specified!"
|
||||
exit 1
|
||||
fi
|
||||
${ldap_script}/bin/ldap "$@" | jq '[ .[].member] | add'
|
||||
'';
|
||||
in
|
||||
|
@ -18,7 +18,7 @@
|
||||
src = ./hammerspoon/Spoons/Launcher.spoon/init.lua;
|
||||
firefox = "${pkgs.firefox-bin}/Applications/Firefox.app";
|
||||
discord = "${pkgs.discord}/Applications/Discord.app";
|
||||
kitty = "${pkgs.kitty}/Applications/kitty.app";
|
||||
wezterm = "${pkgs.wezterm}/Applications/WezTerm.app";
|
||||
obsidian = "${pkgs.obsidian}/Applications/Obsidian.app";
|
||||
slack = "${pkgs.slack}/Applications/Slack.app";
|
||||
};
|
||||
|
@ -56,7 +56,7 @@ function obj:init()
|
||||
-- Launcher shortcuts
|
||||
self.launcher:bind("ctrl", "space", function() end)
|
||||
self.launcher:bind("", "return", function()
|
||||
self:switch("@kitty@")
|
||||
self:switch("@wezterm@")
|
||||
end)
|
||||
self.launcher:bind("", "C", function()
|
||||
self:switch("Calendar.app")
|
||||
|
@ -41,15 +41,15 @@ local function worklayout()
|
||||
local u = hs.geometry.unitrect
|
||||
-- set the layout
|
||||
local left = {
|
||||
{ "kitty", nil, WORK_ONLY_MONITOR, u(0, 0, 1 / 2, 1), nil, nil, visible = true },
|
||||
{ "WezTerm", nil, WORK_ONLY_MONITOR, u(0, 0, 1 / 2, 1), nil, nil, visible = true },
|
||||
}
|
||||
local right = {
|
||||
{ "Slack", nil, WORK_ONLY_MONITOR, u(1 / 2, 0, 1 / 2, 1), nil, nil, visible = true },
|
||||
{ "Mail", nil, WORK_ONLY_MONITOR, u(1 / 2, 0, 1 / 2, 1), nil, nil, visible = true },
|
||||
{ "Slack", nil, WORK_ONLY_MONITOR, u(1 / 2, 0, 1 / 2, 1), nil, nil, visible = true },
|
||||
{ "Mail", nil, WORK_ONLY_MONITOR, u(1 / 2, 0, 1 / 2, 1), nil, nil, visible = true },
|
||||
{ "zoom.us", nil, WORK_ONLY_MONITOR, u(5 / 8, 1 / 4, 1 / 4, 1 / 2), nil, nil, visible = true },
|
||||
}
|
||||
local laptop = {
|
||||
{ "Firefox", nil, LAPTOP_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true },
|
||||
{ "Firefox", nil, LAPTOP_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true },
|
||||
{ "Obsidian", nil, LAPTOP_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true },
|
||||
{ "Calendar", nil, LAPTOP_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true },
|
||||
}
|
||||
|
@ -44,7 +44,8 @@
|
||||
"logitune" # Logitech webcam firmware
|
||||
"meetingbar" # Show meetings in menu bar
|
||||
"scroll-reverser" # Different scroll style for mouse vs. trackpad
|
||||
# "steam" # Not packaged for Nix
|
||||
"notunes" # Don't launch Apple Music with the play button
|
||||
"steam" # Not packaged for Nixon macOS
|
||||
# "epic-games" # Not packaged for Nix
|
||||
];
|
||||
};
|
||||
|
@ -23,6 +23,8 @@
|
||||
|
||||
system = {
|
||||
|
||||
stateVersion = 5;
|
||||
|
||||
keyboard = {
|
||||
remapCapsLockToControl = true;
|
||||
enableKeyMapping = true; # Allows for skhd
|
||||
@ -105,8 +107,7 @@
|
||||
"/Applications/zoom.us.app"
|
||||
"${pkgs.discord}/Applications/Discord.app"
|
||||
"${pkgs.obsidian}/Applications/Obsidian.app"
|
||||
"${pkgs.kitty}/Applications/kitty.app"
|
||||
"/System/Applications/System Settings.app"
|
||||
"${pkgs.wezterm}/Applications/WezTerm.app"
|
||||
];
|
||||
};
|
||||
|
||||
@ -171,6 +172,7 @@
|
||||
eventTitleIconFormat = ''"iconCalendar"'';
|
||||
slackBrowser = ''{"deletable":true,"arguments":"","name":"Slack","path":""}'';
|
||||
zoomBrowser = ''{"deletable":true,"arguments":"","name":"Zoom","path":""}'';
|
||||
teamsBrowser = ''{"deletable":true,"arguments":"","name":"Teams","path":""}'';
|
||||
KeyboardShortcuts_joinEventShortcut = ''{"carbonModifiers":6400,"carbonKeyCode":38}'';
|
||||
timeFormat = ''"12-hour"'';
|
||||
};
|
||||
|
@ -11,9 +11,12 @@
|
||||
users.users."${config.user}" = {
|
||||
# macOS user
|
||||
home = config.homePath;
|
||||
shell = pkgs.fish; # Default shell
|
||||
# shell = pkgs.fish; # Default shell
|
||||
};
|
||||
|
||||
# This might fix the shell issues
|
||||
# users.knownUsers = [ config.user ];
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
# Default shell setting doesn't work
|
||||
|
@ -10,32 +10,53 @@
|
||||
unfreePackages = [
|
||||
"consul"
|
||||
"vault-bin"
|
||||
"teams"
|
||||
];
|
||||
|
||||
home-manager.users.${config.user} = lib.mkIf pkgs.stdenv.isDarwin {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
visidata # CSV inspector
|
||||
dos2unix # Convert Windows text files
|
||||
inetutils # Includes telnet
|
||||
youtube-dl # Convert web videos
|
||||
pandoc # Convert text documents
|
||||
mpd # TUI slideshows
|
||||
mpv # Video player
|
||||
gnupg # Encryption
|
||||
awscli2
|
||||
ssm-session-manager-plugin
|
||||
awslogs
|
||||
google-cloud-sdk
|
||||
vault-bin
|
||||
consul
|
||||
noti # Create notifications programmatically
|
||||
ipcalc # Make IP network calculations
|
||||
(writeShellApplication {
|
||||
home.packages = [
|
||||
pkgs.visidata # CSV inspector
|
||||
pkgs.dos2unix # Convert Windows text files
|
||||
pkgs.inetutils # Includes telnet
|
||||
pkgs.pandoc # Convert text documents
|
||||
pkgs.mpd # TUI slideshows
|
||||
pkgs.mpv # Video player
|
||||
pkgs.gnupg # Encryption
|
||||
pkgs.awscli2
|
||||
pkgs.ssm-session-manager-plugin
|
||||
pkgs.awslogs
|
||||
pkgs.stu # TUI for AWS S3
|
||||
pkgs.google-cloud-sdk
|
||||
pkgs.vault-bin
|
||||
pkgs.consul
|
||||
pkgs.noti # Create notifications programmatically
|
||||
pkgs.ipcalc # Make IP network calculations
|
||||
pkgs.teams
|
||||
pkgs.cloudflared # Allow connecting to Cloudflare tunnels
|
||||
(pkgs.writeShellApplication {
|
||||
name = "ocr";
|
||||
runtimeInputs = [ tesseract ];
|
||||
runtimeInputs = [ pkgs.tesseract ];
|
||||
text = builtins.readFile ../../modules/common/shell/bash/scripts/ocr.sh;
|
||||
})
|
||||
(pkgs.writeShellApplication {
|
||||
name = "ec2";
|
||||
runtimeInputs = [
|
||||
pkgs.awscli2
|
||||
pkgs.jq
|
||||
pkgs.fzf
|
||||
];
|
||||
text = builtins.readFile ../../modules/common/shell/bash/scripts/aws-ec2.sh;
|
||||
})
|
||||
(pkgs.writeShellApplication {
|
||||
name = "tfinit";
|
||||
runtimeInputs = [
|
||||
pkgs.terraform
|
||||
pkgs.gawk
|
||||
pkgs.git
|
||||
];
|
||||
text = builtins.readFile ../../modules/common/shell/bash/scripts/terraform-init.sh;
|
||||
})
|
||||
];
|
||||
|
||||
programs.fish.shellAbbrs = {
|
||||
|
37
modules/nixos/applications/calendar.nix
Normal file
37
modules/nixos/applications/calendar.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
options = {
|
||||
calendar = {
|
||||
enable = lib.mkEnableOption {
|
||||
description = "Enable calendar.";
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf (config.gui.enable && config.calendar.enable) {
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
accounts.calendar.accounts.default = {
|
||||
basePath = "other/calendars"; # Where to save calendars in ~ directory
|
||||
name = "personal";
|
||||
local.type = "filesystem";
|
||||
primary = true;
|
||||
remote = {
|
||||
passwordCommand = [ "" ];
|
||||
type = "caldav";
|
||||
url = "https://${config.hostnames.content}/remote.php/dav/principals/users/${config.user}";
|
||||
userName = config.user;
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [ gnome-calendar ];
|
||||
};
|
||||
};
|
||||
}
|
@ -2,6 +2,7 @@
|
||||
{
|
||||
|
||||
imports = [
|
||||
./calendar.nix
|
||||
./calibre.nix
|
||||
./nautilus.nix
|
||||
];
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
# Quick preview with spacebar
|
||||
services.gnome.sushi.enable = true;
|
||||
environment.systemPackages = [ pkgs.gnome.nautilus ];
|
||||
environment.systemPackages = [ pkgs.nautilus ];
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
@ -28,13 +28,13 @@
|
||||
xsession.windowManager.i3.config.keybindings = {
|
||||
"${
|
||||
config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier
|
||||
}+n" = "exec --no-startup-id ${pkgs.gnome.nautilus}/bin/nautilus";
|
||||
}+n" = "exec --no-startup-id ${pkgs.nautilus}/bin/nautilus";
|
||||
};
|
||||
|
||||
# Generates a QR code and previews it with sushi
|
||||
programs.fish.functions = {
|
||||
qr = {
|
||||
body = "${pkgs.qrencode}/bin/qrencode $argv[1] -o /tmp/qr.png | ${pkgs.gnome.sushi}/bin/sushi /tmp/qr.png";
|
||||
body = "${pkgs.qrencode}/bin/qrencode $argv[1] -o /tmp/qr.png | ${pkgs.sushi}/bin/sushi /tmp/qr.png";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
./legendary.nix
|
||||
./lutris.nix
|
||||
./minecraft-server.nix
|
||||
./moonlight.nix
|
||||
./ryujinx.nix
|
||||
./steam.nix
|
||||
];
|
||||
@ -19,10 +20,9 @@
|
||||
options.gaming.enable = lib.mkEnableOption "Enable gaming features.";
|
||||
|
||||
config = lib.mkIf (config.gaming.enable && pkgs.stdenv.isLinux) {
|
||||
hardware.opengl = {
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
programs.gamemode.enable = true;
|
||||
};
|
||||
|
@ -9,7 +9,10 @@
|
||||
options.gaming.dwarf-fortress.enable = lib.mkEnableOption "Dwarf Fortress free edition.";
|
||||
|
||||
config = lib.mkIf config.gaming.dwarf-fortress.enable {
|
||||
unfreePackages = [ "dwarf-fortress" ];
|
||||
unfreePackages = [
|
||||
"dwarf-fortress"
|
||||
"phoebus-theme"
|
||||
];
|
||||
environment.systemPackages =
|
||||
let
|
||||
dfDesktopItem = pkgs.makeDesktopItem {
|
||||
|
14
modules/nixos/gaming/moonlight.nix
Normal file
14
modules/nixos/gaming/moonlight.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
options.gaming.moonlight.enable = lib.mkEnableOption "Enable Moonlight game streaming client.";
|
||||
|
||||
config = lib.mkIf config.gaming.moonlight.enable {
|
||||
environment.systemPackages = with pkgs; [ moonlight-qt ];
|
||||
};
|
||||
}
|
@ -9,6 +9,7 @@ let
|
||||
|
||||
lockCmd = "${pkgs.betterlockscreen}/bin/betterlockscreen --lock --display 1 --blur 0.5 --span";
|
||||
lockUpdate = "${pkgs.betterlockscreen}/bin/betterlockscreen --update ${config.wallpaper} --display 1 --span";
|
||||
terminal = "wezterm";
|
||||
in
|
||||
{
|
||||
|
||||
@ -47,9 +48,10 @@ in
|
||||
assigns = {
|
||||
"${ws1}" = [ { class = "Firefox"; } ];
|
||||
"${ws2}" = [
|
||||
{ class = "kitty"; }
|
||||
{ class = "aerc"; }
|
||||
{ class = "kitty"; }
|
||||
{ class = "obsidian"; }
|
||||
{ class = "wezterm"; }
|
||||
];
|
||||
"${ws3}" = [ { class = "discord"; } ];
|
||||
"${ws4}" = [
|
||||
@ -126,7 +128,9 @@ in
|
||||
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||
|
||||
# Launchers
|
||||
"${modifier}+Return" = "exec --no-startup-id kitty; workspace ${ws2}; layout tabbed";
|
||||
"${modifier}+Return" = "exec --no-startup-id ${
|
||||
config.home-manager.users.${config.user}.programs.rofi.terminal
|
||||
}; workspace ${ws2}; layout tabbed";
|
||||
"${modifier}+space" = "exec --no-startup-id ${config.launcherCommand}";
|
||||
"${modifier}+Shift+s" = "exec --no-startup-id ${config.systemdSearch}";
|
||||
"${modifier}+Shift+a" = "exec --no-startup-id ${config.audioSwitchCommand}";
|
||||
@ -138,8 +142,12 @@ in
|
||||
"${modifier}+Shift+r" = "restart";
|
||||
"${modifier}+Shift+q" = ''exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"'';
|
||||
"${modifier}+Shift+x" = "exec ${lockCmd}";
|
||||
"${modifier}+Mod1+h" = "exec --no-startup-id kitty sh -c '${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#${config.networking.hostName} || read'";
|
||||
"${modifier}+Mod1+r" = "exec --no-startup-id kitty sh -c 'doas nixos-rebuild switch --flake ${config.dotfilesPath}#${config.networking.hostName} || read'";
|
||||
"${modifier}+Mod1+h" = "exec --no-startup-id ${
|
||||
config.home-manager.users.${config.user}.programs.rofi.terminal
|
||||
} -e sh -c '${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#${config.networking.hostName} || read'";
|
||||
"${modifier}+Mod1+r" = "exec --no-startup-id ${
|
||||
config.home-manager.users.${config.user}.programs.rofi.terminal
|
||||
} -e sh -c 'doas nixos-rebuild switch --flake ${config.dotfilesPath}#${config.networking.hostName} || read'";
|
||||
|
||||
# Window options
|
||||
"${modifier}+q" = "kill";
|
||||
|
@ -42,7 +42,7 @@
|
||||
module-margin = 1;
|
||||
modules-left = "i3";
|
||||
modules-center = "xwindow";
|
||||
modules-right = "mailcount network pulseaudio date keyboard power";
|
||||
modules-right = "mailcount network pulseaudio date power";
|
||||
cursor-click = "pointer";
|
||||
cursor-scroll = "ns-resize";
|
||||
enable-ipc = true;
|
||||
@ -209,12 +209,6 @@
|
||||
label-foreground = config.theme.colors.base06;
|
||||
# format-background = colors.background;
|
||||
};
|
||||
"module/keyboard" = {
|
||||
type = "custom/text";
|
||||
content = "";
|
||||
click-left = "doas systemctl restart keyd";
|
||||
content-foreground = config.theme.colors.base04;
|
||||
};
|
||||
"module/power" = {
|
||||
type = "custom/text";
|
||||
content = " ";
|
||||
|
@ -18,9 +18,6 @@ in
|
||||
|
||||
config = lib.mkIf (pkgs.stdenv.isLinux && config.services.xserver.enable) {
|
||||
|
||||
# Set the Rofi-Systemd terminal for viewing logs
|
||||
environment.sessionVariables.ROFI_SYSTEMD_TERM = lib.mkIf config.kitty.enable "${pkgs.kitty}/bin/kitty";
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
@ -8,13 +8,13 @@
|
||||
|
||||
config = lib.mkIf config.gui.enable {
|
||||
|
||||
# Enable touchpad support
|
||||
services.libinput.enable = true;
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver = {
|
||||
enable = config.gui.enable;
|
||||
|
||||
# Enable touchpad support
|
||||
libinput.enable = true;
|
||||
|
||||
# Login screen
|
||||
displayManager = {
|
||||
lightdm = {
|
||||
|
@ -36,8 +36,6 @@ in
|
||||
{
|
||||
|
||||
config = lib.mkIf (pkgs.stdenv.isLinux && config.gui.enable) {
|
||||
sound.enable = true;
|
||||
|
||||
# Enable PipeWire
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
|
@ -1,9 +1,4 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
|
||||
config = lib.mkIf config.physical {
|
||||
@ -17,24 +12,30 @@
|
||||
autoRepeatInterval = 40;
|
||||
};
|
||||
|
||||
# Use capslock as escape and/or control
|
||||
services.keyd = {
|
||||
# Swap Caps-Lock with Escape when pressed or LCtrl when held/combined with others
|
||||
# Inspired by: https://www.youtube.com/watch?v=XuQVbZ0wENE
|
||||
services.kanata = {
|
||||
enable = true;
|
||||
keyboards = {
|
||||
default = {
|
||||
ids = [ "*" ];
|
||||
settings = {
|
||||
main = {
|
||||
capslock = "overload(control, esc)";
|
||||
};
|
||||
};
|
||||
};
|
||||
keyboards.default = {
|
||||
devices = [
|
||||
"/dev/input/by-id/usb-Logitech_Logitech_G710_Keyboard-event-kbd"
|
||||
"/dev/input/by-id/usb-Logitech_Logitech_G710_Keyboard-if01-event-kbd"
|
||||
];
|
||||
extraDefCfg = "process-unmapped-keys yes";
|
||||
config = ''
|
||||
(defsrc
|
||||
caps
|
||||
)
|
||||
(defalias
|
||||
escctrl (tap-hold-press 1000 1000 esc lctrl)
|
||||
)
|
||||
(deflayer base
|
||||
@escctrl
|
||||
)
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# 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
|
||||
home-manager.users.${config.user}.xsession.numlock.enable = true;
|
||||
};
|
||||
|
@ -16,10 +16,20 @@
|
||||
piper # Mouse adjustments GUI
|
||||
];
|
||||
|
||||
services.xserver.libinput.mouse = {
|
||||
services.libinput.mouse = {
|
||||
# Disable mouse acceleration
|
||||
accelProfile = "flat";
|
||||
accelSpeed = "1.15";
|
||||
};
|
||||
|
||||
# Cursor
|
||||
home-manager.users.${config.user}.home.pointerCursor = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
size = 24;
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,9 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
options = {
|
||||
@ -8,7 +13,7 @@
|
||||
config = lib.mkIf (config.server && config.zfs.enable) {
|
||||
|
||||
# Only use compatible Linux kernel, since ZFS can be behind
|
||||
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||
boot.kernelPackages = pkgs.linuxPackages; # Defaults to latest LTS
|
||||
boot.kernelParams = [ "nohibernate" ];
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
services.prometheus.exporters.zfs.enable = config.prometheus.exporters.enable;
|
||||
|
@ -14,6 +14,11 @@ let
|
||||
url = "localhost:7878";
|
||||
apiKey = config.secrets.radarrApiKey.dest;
|
||||
};
|
||||
readarr = {
|
||||
exportarrPort = "9711";
|
||||
url = "localhost:8787";
|
||||
apiKey = config.secrets.readarrApiKey.dest;
|
||||
};
|
||||
sonarr = {
|
||||
exportarrPort = "9708";
|
||||
url = "localhost:8989";
|
||||
@ -61,6 +66,10 @@ in
|
||||
enable = true;
|
||||
group = "media";
|
||||
};
|
||||
readarr = {
|
||||
enable = true;
|
||||
group = "media";
|
||||
};
|
||||
};
|
||||
|
||||
# Create a media group to be shared between services
|
||||
@ -110,6 +119,21 @@ in
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
group = "download";
|
||||
match = [
|
||||
{
|
||||
host = [ config.hostnames.download ];
|
||||
path = [ "/readarr*" ];
|
||||
}
|
||||
];
|
||||
handle = [
|
||||
{
|
||||
handler = "reverse_proxy";
|
||||
upstreams = [ { dial = arrConfig.readarr.url; } ];
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
group = "download";
|
||||
match = [
|
||||
@ -223,6 +247,11 @@ in
|
||||
dest = "/var/private/radarr-api";
|
||||
prefix = "API_KEY=";
|
||||
};
|
||||
secrets.readarrApiKey = {
|
||||
source = ../../../private/radarr-api-key.age;
|
||||
dest = "/var/private/readarr-api";
|
||||
prefix = "API_KEY=";
|
||||
};
|
||||
secrets.sonarrApiKey = {
|
||||
source = ../../../private/sonarr-api-key.age;
|
||||
dest = "/var/private/sonarr-api";
|
||||
|
44
modules/nixos/services/audiobookshelf.nix
Normal file
44
modules/nixos/services/audiobookshelf.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
|
||||
options = {
|
||||
hostnames.audiobooks = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Hostname for audiobook server (Audiobookshelf).";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.services.audiobookshelf.enable {
|
||||
|
||||
services.audiobookshelf = {
|
||||
dataDir = "audiobookshelf";
|
||||
};
|
||||
|
||||
# Allow web traffic to Caddy
|
||||
caddy.routes = [
|
||||
{
|
||||
match = [ { host = [ config.hostnames.audiobooks ]; } ];
|
||||
handle = [
|
||||
{
|
||||
handler = "reverse_proxy";
|
||||
upstreams = [ { dial = "localhost:${builtins.toString config.services.audiobookshelf.port}"; } ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
# Configure Cloudflare DNS to point to this machine
|
||||
services.cloudflare-dyndns.domains = [ config.hostnames.audiobooks ];
|
||||
|
||||
# Grant user access to Audiobookshelf directories
|
||||
users.users.${config.user}.extraGroups = [ config.services.audiobookshelf.group ];
|
||||
|
||||
# Grant audiobookshelf access to media and Calibre directories
|
||||
users.users.${config.services.audiobookshelf.user}.extraGroups = [
|
||||
"media"
|
||||
"calibre-web"
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -44,6 +44,10 @@
|
||||
settings = { };
|
||||
};
|
||||
|
||||
# Broken on 2024-08-23
|
||||
# https://github.com/NixOS/nixpkgs/commit/0875d0ce1c778f344cd2377a5337a45385d6ffa0
|
||||
nixpkgs.config.permittedInsecurePackages = [ "litestream-0.3.13" ];
|
||||
|
||||
# Wait for secret to exist
|
||||
systemd.services.litestream = {
|
||||
after = [ "backup-secret.service" ];
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
# Force Caddy to 403 if not coming from allowlisted source
|
||||
caddy.cidrAllowlist = [ "127.0.0.1/32" ];
|
||||
caddy.routes = [
|
||||
caddy.routes = lib.mkBefore [
|
||||
{
|
||||
match = [ { not = [ { remote_ip.ranges = config.caddy.cidrAllowlist; } ]; } ];
|
||||
handle = [
|
||||
@ -58,42 +58,155 @@
|
||||
}
|
||||
];
|
||||
|
||||
services.caddy = {
|
||||
adapter = "''"; # Required to enable JSON
|
||||
configFile = pkgs.writeText "Caddyfile" (
|
||||
builtins.toJSON {
|
||||
apps.http.servers.main = {
|
||||
listen = [ ":443" ];
|
||||
services.caddy =
|
||||
let
|
||||
default_logger_name = "other";
|
||||
roll_size_mb = 25;
|
||||
# Extract list of hostnames (fqdns) from current caddy routes
|
||||
getHostnameFromMatch = match: if (lib.hasAttr "host" match) then match.host else [ ];
|
||||
getHostnameFromRoute =
|
||||
route:
|
||||
if (lib.hasAttr "match" route) then (lib.concatMap getHostnameFromMatch route.match) else [ ];
|
||||
hostnames_non_unique = lib.concatMap getHostnameFromRoute config.caddy.routes;
|
||||
hostnames = lib.unique hostnames_non_unique;
|
||||
# Create attrset of subdomains to their fqdns
|
||||
hostname_map = builtins.listToAttrs (
|
||||
map (hostname: {
|
||||
name = builtins.head (lib.splitString "." hostname);
|
||||
value = hostname;
|
||||
}) hostnames
|
||||
);
|
||||
in
|
||||
{
|
||||
adapter = "''"; # Required to enable JSON
|
||||
configFile = pkgs.writeText "Caddyfile" (
|
||||
builtins.toJSON {
|
||||
apps.http.servers.main = {
|
||||
listen = [ ":443" ];
|
||||
|
||||
# These routes are pulled from the rest of this repo
|
||||
routes = config.caddy.routes;
|
||||
errors.routes = config.caddy.blocks;
|
||||
# These routes are pulled from the rest of this repo
|
||||
routes = config.caddy.routes;
|
||||
errors.routes = config.caddy.blocks;
|
||||
|
||||
logs = { }; # Uncommenting collects access logs
|
||||
};
|
||||
apps.http.servers.metrics = { }; # Enables Prometheus metrics
|
||||
apps.tls.automation.policies = config.caddy.tlsPolicies;
|
||||
|
||||
# Setup logging to file
|
||||
logging.logs.main = {
|
||||
encoder = {
|
||||
format = "console";
|
||||
# Uncommenting collects access logs
|
||||
logs = {
|
||||
inherit default_logger_name;
|
||||
# Invert hostnames keys and values
|
||||
logger_names = lib.mapAttrs' (name: value: {
|
||||
name = value;
|
||||
value = name;
|
||||
}) hostname_map;
|
||||
};
|
||||
};
|
||||
writer = {
|
||||
output = "file";
|
||||
filename = "${config.services.caddy.logDir}/caddy.log";
|
||||
roll = true;
|
||||
roll_size_mb = 1;
|
||||
};
|
||||
level = "INFO";
|
||||
};
|
||||
}
|
||||
);
|
||||
apps.http.servers.metrics = { }; # Enables Prometheus metrics
|
||||
apps.tls.automation.policies = config.caddy.tlsPolicies;
|
||||
|
||||
# Setup logging to journal and files
|
||||
logging.logs =
|
||||
{
|
||||
# System logs and catch-all
|
||||
# Must be called `default` to override Caddy's built-in default logger
|
||||
default = {
|
||||
level = "INFO";
|
||||
encoder.format = "console";
|
||||
writer = {
|
||||
output = "stderr";
|
||||
};
|
||||
exclude = (map (hostname: "http.log.access.${hostname}") (builtins.attrNames hostname_map)) ++ [
|
||||
"http.log.access.${default_logger_name}"
|
||||
];
|
||||
};
|
||||
# This is for the default access logs (anything not captured by hostname)
|
||||
other = {
|
||||
level = "INFO";
|
||||
encoder.format = "json";
|
||||
writer = {
|
||||
output = "file";
|
||||
filename = "${config.services.caddy.logDir}/other.log";
|
||||
roll = true;
|
||||
inherit roll_size_mb;
|
||||
};
|
||||
include = [ "http.log.access.${default_logger_name}" ];
|
||||
};
|
||||
# This is for using the Caddy API, which will probably never happen
|
||||
admin = {
|
||||
level = "INFO";
|
||||
encoder.format = "json";
|
||||
writer = {
|
||||
output = "file";
|
||||
filename = "${config.services.caddy.logDir}/admin.log";
|
||||
roll = true;
|
||||
inherit roll_size_mb;
|
||||
};
|
||||
include = [ "admin" ];
|
||||
};
|
||||
# This is for TLS cert management tracking
|
||||
tls = {
|
||||
level = "INFO";
|
||||
encoder.format = "json";
|
||||
writer = {
|
||||
output = "file";
|
||||
filename = "${config.services.caddy.logDir}/tls.log";
|
||||
roll = true;
|
||||
inherit roll_size_mb;
|
||||
};
|
||||
include = [ "tls" ];
|
||||
};
|
||||
# This is for debugging
|
||||
debug = {
|
||||
level = "DEBUG";
|
||||
encoder.format = "json";
|
||||
writer = {
|
||||
output = "file";
|
||||
filename = "${config.services.caddy.logDir}/debug.log";
|
||||
roll = true;
|
||||
roll_keep = 1;
|
||||
inherit roll_size_mb;
|
||||
};
|
||||
};
|
||||
}
|
||||
# These are the access logs for individual hostnames
|
||||
// (lib.mapAttrs (name: value: {
|
||||
level = "INFO";
|
||||
encoder.format = "json";
|
||||
writer = {
|
||||
output = "file";
|
||||
filename = "${config.services.caddy.logDir}/${name}-access.log";
|
||||
roll = true;
|
||||
inherit roll_size_mb;
|
||||
};
|
||||
include = [ "http.log.access.${name}" ];
|
||||
}) hostname_map)
|
||||
# We also capture just the errors separately for easy debugging
|
||||
// (lib.mapAttrs' (name: value: {
|
||||
name = "${name}-error";
|
||||
value = {
|
||||
level = "ERROR";
|
||||
encoder.format = "json";
|
||||
writer = {
|
||||
output = "file";
|
||||
filename = "${config.services.caddy.logDir}/${name}-error.log";
|
||||
roll = true;
|
||||
inherit roll_size_mb;
|
||||
};
|
||||
include = [ "http.log.access.${name}" ];
|
||||
};
|
||||
}) hostname_map);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
systemd.services.caddy.serviceConfig = {
|
||||
|
||||
# Allows Caddy to serve lower ports (443, 80)
|
||||
AmbientCapabilities = "CAP_NET_BIND_SERVICE";
|
||||
|
||||
# Prevent flooding of logs by rate-limiting
|
||||
LogRateLimitIntervalSec = "5s"; # Limit period
|
||||
LogRateLimitBurst = 100; # Limit threshold
|
||||
|
||||
};
|
||||
|
||||
# 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
|
||||
|
@ -78,6 +78,8 @@ in
|
||||
issuers = [
|
||||
{
|
||||
module = "acme";
|
||||
email = "acme@${config.mail.server}";
|
||||
account_key = "{env.ACME_ACCOUNT_KEY}";
|
||||
challenges = {
|
||||
dns = {
|
||||
provider = {
|
||||
@ -92,7 +94,18 @@ in
|
||||
}
|
||||
];
|
||||
# Allow Caddy to read Cloudflare API key for DNS validation
|
||||
systemd.services.caddy.serviceConfig.EnvironmentFile = config.secrets.cloudflare-api.dest;
|
||||
systemd.services.caddy.serviceConfig.EnvironmentFile = [
|
||||
config.secrets.cloudflare-api.dest
|
||||
config.secrets.letsencrypt-key.dest
|
||||
];
|
||||
|
||||
# Private key is used for LetsEncrypt
|
||||
secrets.letsencrypt-key = {
|
||||
source = ../../../private/letsencrypt-key.age;
|
||||
dest = "${config.secretsDirectory}/letsencrypt-key";
|
||||
owner = "caddy";
|
||||
group = "caddy";
|
||||
};
|
||||
|
||||
# API key must have access to modify Cloudflare DNS records
|
||||
secrets.cloudflare-api = {
|
||||
@ -104,8 +117,14 @@ in
|
||||
|
||||
# Wait for secret to exist
|
||||
systemd.services.caddy = {
|
||||
after = [ "cloudflare-api-secret.service" ];
|
||||
requires = [ "cloudflare-api-secret.service" ];
|
||||
after = [
|
||||
"cloudflare-api-secret.service"
|
||||
"letsencrypt-key-secret.service"
|
||||
];
|
||||
requires = [
|
||||
"cloudflare-api-secret.service"
|
||||
"letsencrypt-key-secret.service"
|
||||
];
|
||||
};
|
||||
|
||||
# Allows Nextcloud to trust Cloudflare IPs
|
||||
@ -116,6 +135,9 @@ in
|
||||
[ "127.0.0.1" ] ++ cloudflareIpRanges
|
||||
);
|
||||
|
||||
# Using dyn-dns instead of ddclient because I can't find a way to choose
|
||||
# between proxied and non-proxied records for Cloudflare using just
|
||||
# ddclient.
|
||||
services.cloudflare-dyndns =
|
||||
lib.mkIf ((builtins.length config.services.cloudflare-dyndns.domains) > 0)
|
||||
{
|
||||
|
@ -5,6 +5,7 @@
|
||||
{
|
||||
|
||||
imports = [
|
||||
./audiobookshelf.nix
|
||||
./arr.nix
|
||||
./backups.nix
|
||||
./bind.nix
|
||||
@ -12,6 +13,7 @@
|
||||
./calibre.nix
|
||||
./cloudflare-tunnel.nix
|
||||
./cloudflare.nix
|
||||
./filebrowser.nix
|
||||
./identity.nix
|
||||
./irc.nix
|
||||
./gitea-runner.nix
|
||||
@ -26,6 +28,7 @@
|
||||
./n8n.nix
|
||||
./netdata.nix
|
||||
./nextcloud.nix
|
||||
./ntfy.nix
|
||||
./paperless.nix
|
||||
./postgresql.nix
|
||||
./prometheus.nix
|
||||
@ -33,6 +36,7 @@
|
||||
./secrets.nix
|
||||
./sshd.nix
|
||||
./transmission.nix
|
||||
./uptime-kuma.nix
|
||||
./vaultwarden.nix
|
||||
./victoriametrics.nix
|
||||
./wireguard.nix
|
||||
|
74
modules/nixos/services/filebrowser.nix
Normal file
74
modules/nixos/services/filebrowser.nix
Normal file
@ -0,0 +1,74 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
user =
|
||||
if config.services.nextcloud.enable then
|
||||
config.services.phpfpm.pools.nextcloud.user
|
||||
else
|
||||
"filebrowser";
|
||||
|
||||
dataDir = "/var/lib/filebrowser";
|
||||
|
||||
settings = {
|
||||
port = 8020;
|
||||
baseURL = "";
|
||||
address = "";
|
||||
log = "stdout";
|
||||
database = "${dataDir}/filebrowser.db";
|
||||
root = "";
|
||||
"auth.method" = "json";
|
||||
username = config.user;
|
||||
# Generate password: htpasswd -nBC 10 "" | tr -d ':\n'
|
||||
password = "$2y$10$ze1cMob0k6pnXRjLowYfZOVZWg4G.dsPtH3TohbUeEbI0sdkG9.za";
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
options.filebrowser.enable = lib.mkEnableOption "Use Filebrowser.";
|
||||
|
||||
config = lib.mkIf config.filebrowser.enable {
|
||||
|
||||
environment.etc."filebrowser/.filebrowser.json".text = builtins.toJSON settings;
|
||||
|
||||
systemd.services.filebrowser = lib.mkIf config.filebrowser.enable {
|
||||
description = "Filebrowser cloud file services";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
startLimitIntervalSec = 14400;
|
||||
startLimitBurst = 10;
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.filebrowser}/bin/filebrowser";
|
||||
DynamicUser = !config.services.nextcloud.enable; # Unique user if not using Nextcloud
|
||||
User = user;
|
||||
Group = user;
|
||||
ReadWritePaths = [ dataDir ];
|
||||
StateDirectory = [ "filebrowser" ];
|
||||
Restart = "on-failure";
|
||||
RestartPreventExitStatus = 1;
|
||||
RestartSec = "5s";
|
||||
};
|
||||
};
|
||||
|
||||
caddy.routes = [
|
||||
{
|
||||
match = [ { host = [ config.hostnames.files ]; } ];
|
||||
handle = [
|
||||
{
|
||||
handler = "reverse_proxy";
|
||||
upstreams = [ { dial = "localhost:${builtins.toString settings.port}"; } ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
# Configure Cloudflare DNS to point to this machine
|
||||
services.cloudflare-dyndns.domains = [ config.hostnames.files ];
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -53,6 +53,7 @@ in
|
||||
uid = promUid;
|
||||
}
|
||||
];
|
||||
# TODO: Add option to pull services from a list like Caddy does
|
||||
dashboards.settings.providers = [
|
||||
{
|
||||
name = "test";
|
||||
@ -368,6 +369,18 @@ in
|
||||
range = true;
|
||||
refId = "C";
|
||||
}
|
||||
{
|
||||
datasource = {
|
||||
type = "prometheus";
|
||||
uid = promUid;
|
||||
};
|
||||
editorMode = "code";
|
||||
expr = "readarr_system_status";
|
||||
hide = false;
|
||||
legendFormat = "Readarr";
|
||||
range = true;
|
||||
refId = "F";
|
||||
}
|
||||
{
|
||||
datasource = {
|
||||
type = "prometheus";
|
||||
@ -669,7 +682,7 @@ in
|
||||
};
|
||||
editorMode = "code";
|
||||
exemplar = false;
|
||||
"expr" = ''increase(zfs_dataset_used_bytes{name="tank"}[1d])'';
|
||||
"expr" = ''delta(zfs_dataset_used_bytes{name="tank"}[1d])'';
|
||||
hide = false;
|
||||
instant = false;
|
||||
interval = "";
|
||||
@ -683,7 +696,7 @@ in
|
||||
uid = promUid;
|
||||
};
|
||||
editorMode = "code";
|
||||
"expr" = ''increase(zfs_dataset_used_bytes{name="tank"}[7d])'';
|
||||
"expr" = ''delta(zfs_dataset_used_bytes{name="tank"}[7d])'';
|
||||
hide = false;
|
||||
legendFormat = "Past Week";
|
||||
range = true;
|
||||
@ -695,7 +708,7 @@ in
|
||||
uid = promUid;
|
||||
};
|
||||
editorMode = "code";
|
||||
"expr" = ''increase(zfs_dataset_used_bytes{name="tank"}[30d])'';
|
||||
"expr" = ''delta(zfs_dataset_used_bytes{name="tank"}[30d])'';
|
||||
hide = false;
|
||||
legendFormat = "Past Month";
|
||||
range = true;
|
||||
@ -819,6 +832,28 @@ in
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
matcher = {
|
||||
id = "byName";
|
||||
options = "localhost:8787";
|
||||
};
|
||||
properties = [
|
||||
{
|
||||
id = "displayName";
|
||||
value = "Readarr";
|
||||
}
|
||||
{
|
||||
id = "links";
|
||||
value = [
|
||||
{
|
||||
targetBlank = true;
|
||||
title = "";
|
||||
url = "https://${config.hostnames.download}/readarr";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
matcher = {
|
||||
id = "byName";
|
||||
@ -885,6 +920,28 @@ in
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
matcher = {
|
||||
id = "byName";
|
||||
options = "localhost:8086";
|
||||
};
|
||||
properties = [
|
||||
{
|
||||
id = "displayName";
|
||||
value = "InfluxDB";
|
||||
}
|
||||
{
|
||||
id = "links";
|
||||
value = [
|
||||
{
|
||||
targetBlank = true;
|
||||
title = "";
|
||||
url = "https://${config.hostnames.influxdb}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
matcher = {
|
||||
id = "byName";
|
||||
@ -929,6 +986,28 @@ in
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
matcher = {
|
||||
id = "byName";
|
||||
options = "localhost:9000";
|
||||
};
|
||||
properties = [
|
||||
{
|
||||
id = "displayName";
|
||||
value = "The Lounge";
|
||||
}
|
||||
{
|
||||
id = "links";
|
||||
value = [
|
||||
{
|
||||
targetBlank = true;
|
||||
title = "";
|
||||
url = "https://${config.hostnames.irc}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
matcher = {
|
||||
id = "byName";
|
||||
@ -1039,6 +1118,50 @@ in
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
matcher = {
|
||||
id = "byName";
|
||||
options = "localhost:${builtins.toString config.services.paperless.port}";
|
||||
};
|
||||
properties = [
|
||||
{
|
||||
id = "displayName";
|
||||
value = "Paperless";
|
||||
}
|
||||
{
|
||||
id = "links";
|
||||
value = [
|
||||
{
|
||||
targetBlank = true;
|
||||
title = "";
|
||||
url = "https://${config.hostnames.paperless}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
matcher = {
|
||||
id = "byName";
|
||||
options = "localhost:${builtins.toString config.services.audiobookshelf.port}";
|
||||
};
|
||||
properties = [
|
||||
{
|
||||
id = "displayName";
|
||||
value = "Audiobookshelf";
|
||||
}
|
||||
{
|
||||
id = "links";
|
||||
value = [
|
||||
{
|
||||
targetBlank = true;
|
||||
title = "";
|
||||
url = "https://${config.hostnames.audiobooks}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
gridPos = {
|
||||
@ -2321,7 +2444,7 @@ in
|
||||
datasourceUid = promUid;
|
||||
model = {
|
||||
editorMode = "code";
|
||||
expr = ''systemd_unit_state{name=~"cloudflared-tunnel-.*", state="active"}'';
|
||||
expr = ''systemd_unit_state{name=~"cloudflared-tunnel-.*", state="active", job!="tempest"}'';
|
||||
hide = false;
|
||||
instant = true;
|
||||
intervalMs = 1000;
|
||||
@ -2418,7 +2541,7 @@ in
|
||||
execErrState = "Error";
|
||||
for = "5m";
|
||||
annotations = {
|
||||
description = "Cloudflare Tunnel for {{ $job }}.";
|
||||
description = "Cloudflare Tunnel for {{ index $labels \"job\" }}.";
|
||||
summary = "Cloudflare Tunnel is down.";
|
||||
};
|
||||
isPaused = false;
|
||||
|
@ -54,9 +54,8 @@
|
||||
];
|
||||
|
||||
# Enable VA-API for hardware transcoding
|
||||
hardware.opengl = {
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
extraPackages = [ pkgs.libva ];
|
||||
};
|
||||
environment.systemPackages = [ pkgs.libva-utils ];
|
||||
|
@ -4,33 +4,34 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
|
||||
options = {
|
||||
n8nServer = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "Hostname for n8n automation";
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.services.n8n.enable {
|
||||
|
||||
config = lib.mkIf (config.n8nServer != null) {
|
||||
unfreePackages = [ "n8n" ];
|
||||
|
||||
services.n8n = {
|
||||
enable = true;
|
||||
webhookUrl = "https://${config.hostnames.n8n}";
|
||||
settings = {
|
||||
n8n = {
|
||||
listenAddress = "127.0.0.1";
|
||||
port = 5678;
|
||||
};
|
||||
listen_address = "127.0.0.1";
|
||||
port = 5678;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.n8n.environment = {
|
||||
N8N_EDITOR_BASE_URL = config.services.n8n.webhookUrl;
|
||||
};
|
||||
|
||||
# Configure Cloudflare DNS to point to this machine
|
||||
services.cloudflare-dyndns.domains = [ config.hostnames.n8n ];
|
||||
|
||||
# Allow web traffic to Caddy
|
||||
caddy.routes = [
|
||||
{
|
||||
match = [ { host = [ config.n8nServer ]; } ];
|
||||
match = [ { host = [ config.hostnames.n8n ]; } ];
|
||||
handle = [
|
||||
{
|
||||
handler = "reverse_proxy";
|
||||
upstreams = [ { dial = "localhost:5678"; } ];
|
||||
upstreams = [ { dial = "localhost:${builtins.toString config.services.n8n.settings.port}"; } ];
|
||||
}
|
||||
];
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
config = lib.mkIf config.services.nextcloud.enable {
|
||||
|
||||
services.nextcloud = {
|
||||
package = pkgs.nextcloud28; # Required to specify
|
||||
package = pkgs.nextcloud29; # Required to specify
|
||||
configureRedis = true;
|
||||
datadir = "/data/nextcloud";
|
||||
database.createLocally = true;
|
||||
@ -26,10 +26,13 @@
|
||||
trusted_domains = [ config.hostnames.content ];
|
||||
trusted_proxies = [ "127.0.0.1" ];
|
||||
maintenance_window_start = 4; # Run jobs at 4am UTC
|
||||
log_type = "file";
|
||||
loglevel = 1; # Include all actions in the log
|
||||
};
|
||||
extraAppsEnable = true;
|
||||
extraApps = with config.services.nextcloud.package.packages.apps; {
|
||||
inherit calendar contacts;
|
||||
extraApps = {
|
||||
calendar = config.services.nextcloud.package.packages.apps.calendar;
|
||||
contacts = config.services.nextcloud.package.packages.apps.contacts;
|
||||
# These apps are defined and pinned by overlay in flake.
|
||||
news = pkgs.nextcloudApps.news;
|
||||
external = pkgs.nextcloudApps.external;
|
||||
|
33
modules/nixos/services/ntfy.nix
Normal file
33
modules/nixos/services/ntfy.nix
Normal file
@ -0,0 +1,33 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
|
||||
config = lib.mkIf config.services.ntfy-sh.enable {
|
||||
services.ntfy-sh = {
|
||||
settings = {
|
||||
base-url = "https://${config.hostnames.notifications}";
|
||||
upstream-base-url = "https://ntfy.sh";
|
||||
listen-http = ":8333";
|
||||
behind-proxy = true;
|
||||
auth-default-access = "deny-all";
|
||||
auth-file = "/var/lib/ntfy-sh/user.db";
|
||||
};
|
||||
};
|
||||
|
||||
caddy.routes = [
|
||||
{
|
||||
match = [ { host = [ config.hostnames.notifications ]; } ];
|
||||
handle = [
|
||||
{
|
||||
handler = "reverse_proxy";
|
||||
upstreams = [ { dial = "localhost${config.services.ntfy-sh.settings.listen-http}"; } ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
# Configure Cloudflare DNS to point to this machine
|
||||
services.cloudflare-dyndns.domains = [ config.hostnames.notifications ];
|
||||
|
||||
};
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
|
||||
services.samba = lib.mkIf config.services.samba.enable {
|
||||
openFirewall = true;
|
||||
shares.data = {
|
||||
settings.data = {
|
||||
path = "/data";
|
||||
browseable = "yes";
|
||||
"read only" = "no";
|
||||
|
32
modules/nixos/services/uptime-kuma.nix
Normal file
32
modules/nixos/services/uptime-kuma.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
|
||||
config = lib.mkIf config.services.uptime-kuma.enable {
|
||||
|
||||
services.uptime-kuma = {
|
||||
settings = {
|
||||
PORT = "3033";
|
||||
};
|
||||
};
|
||||
|
||||
# Allow web traffic to Caddy
|
||||
caddy.routes = [
|
||||
{
|
||||
match = [ { host = [ config.hostnames.status ]; } ];
|
||||
handle = [
|
||||
{
|
||||
handler = "reverse_proxy";
|
||||
upstreams = [
|
||||
{ dial = "localhost:${config.services.uptime-kuma.settings.PORT}"; }
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
# Configure Cloudflare DNS to point to this machine
|
||||
services.cloudflare-dyndns.domains = [ config.hostnames.status ];
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -5,6 +5,7 @@
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
pkgs-stable,
|
||||
...
|
||||
}:
|
||||
|
||||
@ -12,7 +13,7 @@ let
|
||||
|
||||
username = "prometheus";
|
||||
|
||||
prometheusConfig = (pkgs.formats.yaml { }).generate "prometheus.yml" {
|
||||
prometheusConfig = {
|
||||
scrape_configs = [
|
||||
{
|
||||
job_name = config.networking.hostName;
|
||||
@ -38,7 +39,9 @@ in
|
||||
|
||||
config = {
|
||||
|
||||
services.victoriametrics.extraOptions = [ "-promscrape.config=${prometheusConfig}" ];
|
||||
services.victoriametrics.extraOptions = [
|
||||
"-promscrape.config=${(pkgs.formats.yaml { }).generate "scrape.yml" prometheusConfig}"
|
||||
];
|
||||
|
||||
systemd.services.vmauth = lib.mkIf config.services.victoriametrics.enable {
|
||||
description = "VictoriaMetrics basic auth proxy";
|
||||
@ -85,21 +88,21 @@ in
|
||||
|
||||
# VMAgent
|
||||
|
||||
services.vmagent.prometheusConfig = prometheusConfig; # Overwritten below
|
||||
systemd.services.vmagent.serviceConfig = lib.mkIf config.services.vmagent.enable {
|
||||
ExecStart = lib.mkForce ''
|
||||
${pkgs.victoriametrics}/bin/vmagent \
|
||||
-promscrape.config=${prometheusConfig} \
|
||||
-remoteWrite.url="https://${config.hostnames.prometheus}/api/v1/write" \
|
||||
-remoteWrite.basicAuth.username=${username} \
|
||||
-remoteWrite.basicAuth.passwordFile=${config.secrets.vmagent.dest}'';
|
||||
services.vmagent = {
|
||||
package = pkgs-stable.vmagent;
|
||||
prometheusConfig = prometheusConfig;
|
||||
# https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5567
|
||||
extraArgs = [ "-promscrape.maxScrapeSize 450000000" ];
|
||||
remoteWrite = {
|
||||
url = "https://${config.hostnames.prometheus}/api/v1/write";
|
||||
basicAuthUsername = username;
|
||||
basicAuthPasswordFile = config.secrets.vmagent.dest;
|
||||
};
|
||||
};
|
||||
|
||||
secrets.vmagent = lib.mkIf config.services.vmagent.enable {
|
||||
source = ../../../private/prometheus.age;
|
||||
dest = "${config.secretsDirectory}/vmagent";
|
||||
owner = "vmagent";
|
||||
group = "vmagent";
|
||||
};
|
||||
systemd.services.vmagent-secret = lib.mkIf config.services.vmagent.enable {
|
||||
requiredBy = [ "vmagent.service" ];
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
# Update the system daily by pointing it at the flake repository
|
||||
system.autoUpgrade = {
|
||||
enable = config.server; # Only auto upgrade servers
|
||||
enable = lib.mkDefault false; # Don't enable by default
|
||||
dates = "09:33";
|
||||
flake = "git+${config.dotfilesRepo}";
|
||||
randomizedDelaySec = "25min";
|
||||
|
@ -4,7 +4,10 @@
|
||||
# How long to keep journalctl entries
|
||||
# This helps to make sure log disk usage doesn't grow too unwieldy
|
||||
services.journald.extraConfig = ''
|
||||
SystemMaxUse=100M
|
||||
SystemMaxUse=4G
|
||||
SystemKeepFree=10G
|
||||
SystemMaxFileSize=128M
|
||||
SystemMaxFiles=500
|
||||
MaxFileSec=1month
|
||||
MaxRetentionSec=2month
|
||||
'';
|
||||
|
@ -1,27 +0,0 @@
|
||||
diff --git a/cps/__init__.py b/cps/__init__.py
|
||||
index f4f8dbf2..7377acdf 100644
|
||||
--- a/cps/__init__.py
|
||||
+++ b/cps/__init__.py
|
||||
@@ -151,7 +151,6 @@ def create_app():
|
||||
|
||||
lm.login_view = 'web.login'
|
||||
lm.anonymous_user = ub.Anonymous
|
||||
- lm.session_protection = 'strong' if config.config_session == 1 else "basic"
|
||||
|
||||
db.CalibreDB.update_config(config)
|
||||
db.CalibreDB.setup_db(config.config_calibre_dir, cli_param.settings_path)
|
||||
diff --git a/cps/admin.py b/cps/admin.py
|
||||
index 045a9523..825a28af 100644
|
||||
--- a/cps/admin.py
|
||||
+++ b/cps/admin.py
|
||||
@@ -102,10 +102,6 @@ def admin_required(f):
|
||||
|
||||
@admi.before_app_request
|
||||
def before_request():
|
||||
- if not ub.check_user_session(current_user.id,
|
||||
- flask_session.get('_id')) and 'opds' not in request.path \
|
||||
- and config.config_session == 1:
|
||||
- logout_user()
|
||||
g.constants = constants
|
||||
g.google_site_verification = os.getenv('GOOGLE_SITE_VERIFICATION', '')
|
||||
g.allow_registration = config.config_public_reg
|
@ -1,7 +0,0 @@
|
||||
# Fix: https://github.com/janeczku/calibre-web/issues/2422
|
||||
|
||||
_final: prev: {
|
||||
calibre-web = prev.calibre-web.overrideAttrs (old: {
|
||||
patches = (old.patches or [ ]) ++ [ ./calibre-web-cloudflare.patch ];
|
||||
});
|
||||
}
|
@ -1,17 +1,12 @@
|
||||
_final: prev: {
|
||||
inputs: _final: prev: {
|
||||
|
||||
gh-collaborators = prev.buildGoModule rec {
|
||||
pname = "gh-collaborators";
|
||||
version = "2.0.2";
|
||||
version = "v2.0.3";
|
||||
src = inputs.gh-collaborators;
|
||||
|
||||
src = prev.fetchFromGitHub {
|
||||
owner = "katiem0";
|
||||
repo = "gh-collaborators";
|
||||
rev = version;
|
||||
sha256 = "sha256-sz5LHkwZ28aA2vbMnFMzAlyGiJBDZm7jwDQYxgKBPLU=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-rsRDOgJBa8T6+bC/APcmuRmg6ykbIp9pwRnJ9rrfHEs=";
|
||||
# vendorHash = "sha256-rsRDOgJBa8T6+bC/APcmuRmg6ykbIp9pwRnJ9rrfHEs=";
|
||||
vendorHash = "sha256-fykxRb2U9DDsXorRTLiVWmhMY89N7RS07sal8ww6gz4=";
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git a/lua/kitty-scrollback/health.lua b/lua/kitty-scrollback/health.lua
|
||||
index 9d87dfa..a231b8d 100644
|
||||
--- a/lua/kitty-scrollback/health.lua
|
||||
+++ b/lua/kitty-scrollback/health.lua
|
||||
@@ -234,7 +234,7 @@ local function check_kitty_debug_config()
|
||||
end
|
||||
|
||||
local function check_kitty_scrollback_nvim_version()
|
||||
- local current_version = nil
|
||||
+ local current_version = 'master'
|
||||
local tag_cmd = { 'git', 'describe', '--exact-match', '--tags' }
|
||||
local ksb_dir =
|
||||
vim.fn.fnamemodify(vim.api.nvim_get_runtime_file('lua/kitty-scrollback', false)[1], ':h:h')
|
@ -25,7 +25,6 @@ in
|
||||
|
||||
nvim-lspconfig = withSrc prev.vimPlugins.nvim-lspconfig inputs.nvim-lspconfig-src;
|
||||
cmp-nvim-lsp = withSrc prev.vimPlugins.cmp-nvim-lsp inputs.cmp-nvim-lsp-src;
|
||||
comment-nvim = withSrc prev.vimPlugins.comment-nvim inputs.comment-nvim-src;
|
||||
nvim-treesitter = withSrc prev.vimPlugins.nvim-treesitter inputs.nvim-treesitter-src;
|
||||
telescope-nvim = withSrc prev.vimPlugins.telescope-nvim inputs.telescope-nvim-src;
|
||||
telescope-project-nvim = withSrc prev.vimPlugins.telescope-project-nvim inputs.telescope-project-nvim-src;
|
||||
@ -39,11 +38,7 @@ in
|
||||
base16-nvim = plugin "base16-nvim" inputs.base16-nvim-src;
|
||||
baleia-nvim = plugin "baleia-nvim" inputs.baleia-nvim-src;
|
||||
hmts-nvim = plugin "hmts-nvim" inputs.hmts-nvim-src;
|
||||
kitty-scrollback-nvim = prev.vimUtils.buildVimPlugin {
|
||||
pname = "kitty-scrollback-nvim";
|
||||
src = inputs.kitty-scrollback-nvim-src;
|
||||
version = "master";
|
||||
patches = [ ./kitty-scrollback-nvim.patch ];
|
||||
};
|
||||
tiny-inline-diagnostic-nvim = plugin "tiny-inline-diagnostic-nvim" inputs.tiny-inline-diagnostic-nvim-src;
|
||||
snipe-nvim = plugin "snipe-nvim" inputs.snipe-nvim-src;
|
||||
};
|
||||
}
|
||||
|
@ -5,21 +5,25 @@ inputs: _final: prev: {
|
||||
url = inputs.nextcloud-news.outPath;
|
||||
sha256 = inputs.nextcloud-news.narHash;
|
||||
license = "agpl3Plus";
|
||||
unpack = true;
|
||||
};
|
||||
external = prev.fetchNextcloudApp {
|
||||
url = inputs.nextcloud-external.outPath;
|
||||
sha256 = inputs.nextcloud-external.narHash;
|
||||
license = "agpl3Plus";
|
||||
unpack = true;
|
||||
};
|
||||
cookbook = prev.fetchNextcloudApp {
|
||||
url = inputs.nextcloud-cookbook.outPath;
|
||||
sha256 = inputs.nextcloud-cookbook.narHash;
|
||||
license = "agpl3Plus";
|
||||
unpack = true;
|
||||
};
|
||||
snappymail = prev.fetchNextcloudApp {
|
||||
url = inputs.nextcloud-snappymail.outPath;
|
||||
sha256 = inputs.nextcloud-snappymail.narHash;
|
||||
license = "agpl3Plus";
|
||||
unpack = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
21
private/letsencrypt-key.age
Normal file
21
private/letsencrypt-key.age
Normal file
@ -0,0 +1,21 @@
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IE1nSGFPdyBCc2hS
|
||||
RUw4Y200allVODI0QTYxdXlHSHRiS1pWWHg5SW9tZ0tGVmc2ajJZCitXeEd0dk9K
|
||||
MmRkZlRYd253RWFzNXpUR0xuTXI2dWVhNFZpQnNlU0VFdEUKLT4gc3NoLWVkMjU1
|
||||
MTkgWXlTVU1RIHNScVkwd1RmVGhNcFVSRTlxQzlvSUc2cGxNWUc0YVJ5RjRydk9J
|
||||
RG1peDQKVU5iN1ZmWEJyOXBiNWdiRFlnNFFKR09vaFB4SWZWK0x3VWJwMDZtYlBj
|
||||
MAotPiBzc2gtZWQyNTUxOSBuanZYNUEgSXR5OEk5cWZHUEZ3WmFCUTVFeTBnTG5h
|
||||
cmNxVWFLV2JhUTRBaUJGWERncwpYMFBIN0kySXdjOE5YcS85bXRCRnRsK3NyMHY4
|
||||
N0JKelFyeHB6T1dEZ2VnCi0+IHNzaC1lZDI1NTE5IENxSU9VQSAyQVJYRXJ1cFVl
|
||||
dldaa0Qydlc3MzlFYnN5YUx0amdWZm5PcWovRm1MaVg0CkJsSFZRdGJIZzA1T0Ny
|
||||
bUNnL0Zxa05ubHluSVBUenVCZTZpYlA5UUFEMDQKLT4gc3NoLWVkMjU1MTkgejFP
|
||||
Y1p3IDFPQU5HZm5mRFl5NnNLVHUvdUlmTEtyS0djNWZaMWg5VDl1ZldNTkVWbXMK
|
||||
RkVBTzNUa0d6c3NJUHQrazdKWXNZY3NIRzRndGdRNjFjMXZCSEhIQnIyYwotLS0g
|
||||
VzNOa3dXS0hrMWxNUlJ4UzAxNlkzSXM4RWc1RGFzQjFyb1dGZXFnL3RCVQoq002V
|
||||
S5MQqBjKKOacO4OWgn5KpmU2D7zJWJjNMxH80L6HFNoyOj4wNa+8TA0Q7MTn3bKN
|
||||
YvAuwbDAGjjDt8vZFKOiZB0xAex+H7A1MVvuGIA8xQa6iNBMwj7nWTLif5pCbVk+
|
||||
9aAAprcJVDJx4TeFXlNF6XtcQ3J8abwi6TDqNFpfwwBb/wruyzutgvlOiz1XSBX0
|
||||
xlCGckq/BCnItLURIb7zhqRMqk/JODPjOKArmP86nCq25Wm+W5JQ8ViQ7LHJyoFj
|
||||
zbiwabqeBJZgqoVdVMj8Glz+91RVodn6f9VwQcHINgHxmkd6j2z75AmWZecwD2ic
|
||||
pUMnikqIMI0B3zW5H38t2cJv+aIMTl7lH5Hf1P5jEn3NPw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
@ -1,34 +1,50 @@
|
||||
{
|
||||
description = "Python project flake";
|
||||
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
inputs.poetry2nix.url = "github:nix-community/poetry2nix";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
poetry2nix.url = "github:nix-community/poetry2nix";
|
||||
};
|
||||
outputs =
|
||||
{ nixpkgs, poetry2nix, ... }:
|
||||
let
|
||||
projectDir = ./.;
|
||||
supportedSystems = [
|
||||
"x86_64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-linux"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
in
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
poetry2nix,
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ poetry2nix.overlay ];
|
||||
};
|
||||
projectDir = ./.;
|
||||
in
|
||||
{
|
||||
defaultPackage = pkgs.poetry2nix.mkPoetryApplication { inherit projectDir; };
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
(pkgs.poetry2nix.mkPoetryEnv { inherit projectDir; })
|
||||
pkgs.poetry
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ poetry2nix.overlays.default ];
|
||||
};
|
||||
in
|
||||
{
|
||||
default = pkgs.poetry2nix.mkPoetryApplication { inherit projectDir; };
|
||||
}
|
||||
);
|
||||
devShells = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ poetry2nix.overlays.default ];
|
||||
};
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
(pkgs.poetry2nix.mkPoetryEnv { inherit projectDir; })
|
||||
pkgs.poetry
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
24
windows/autohotkey/RemapCapsCtrlEscapeV2.ahk
Normal file
24
windows/autohotkey/RemapCapsCtrlEscapeV2.ahk
Normal file
@ -0,0 +1,24 @@
|
||||
#Requires AutoHotkey v2.0
|
||||
#SingleInstance
|
||||
|
||||
ih := InputHook("B L1 T1", "{Esc}")
|
||||
|
||||
*Ctrl::
|
||||
{
|
||||
ih.Start()
|
||||
reason := ih.Wait()
|
||||
if (reason = "Stopped") {
|
||||
Send "{Esc}"
|
||||
} else if (reason = "Max") {
|
||||
Send "{Blind}{Ctrl down}" ih.Input
|
||||
}
|
||||
}
|
||||
|
||||
*Ctrl up::
|
||||
{
|
||||
if (ih.InProgress) {
|
||||
ih.Stop()
|
||||
} else {
|
||||
Send "{Ctrl up}"
|
||||
}
|
||||
}
|
8
windows/caps-lock-ctrl.reg
Normal file
8
windows/caps-lock-ctrl.reg
Normal file
@ -0,0 +1,8 @@
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
; Changes registry to map Caps Lock key to Ctrl key
|
||||
; More info here: https://www.autohotkey.com/boards/viewtopic.php?p=468638#p468638
|
||||
; And here: https://superuser.com/a/949533
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
|
||||
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
|
Reference in New Issue
Block a user