mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-06 21:20:13 +00:00
Compare commits
540 Commits
keyd-2.4.3
...
90fd9f54a7
Author | SHA1 | Date | |
---|---|---|---|
90fd9f54a7 | |||
2b1106ec94 | |||
fbb00d9504 | |||
75d4dbe868 | |||
37d1d7724a | |||
f59ac536a2 | |||
e90c6b1724 | |||
2722a8bf61 | |||
3e8b14d671 | |||
a3dcca556f | |||
97fdb76328 | |||
cd0b7debd4 | |||
1b05fa3745 | |||
350c94af3c | |||
9d7c6b3215 | |||
50a1be634c | |||
bcf1737858 | |||
c36ca39a0d | |||
98c561f462 | |||
1276bcf19e | |||
dd95c94b6e | |||
8f5b3e86e3 | |||
fc8f460559 | |||
05e3996eb3 | |||
eed097f270 | |||
50863e7232 | |||
a4bebe653c | |||
e7366f9510 | |||
3206b48f28 | |||
7007567207 | |||
1d4ad5b0af | |||
2b988b1e9c | |||
78076b0de7 | |||
ebd7b88909 | |||
7de88ba2b6 | |||
1062369a78 | |||
dc6b6f8328 | |||
b36895f108 | |||
617fc6cce2 | |||
2425c76a84 | |||
798bac75e8 | |||
c7f20e958b | |||
59a52dc033 | |||
6217871960 | |||
61b1ceffd9 | |||
9c5de4c54f | |||
1e5fd5d9ae | |||
620c72f731 | |||
bb1a36330b | |||
8819bb9b9b | |||
6f2b2a7694 | |||
1226eafef2 | |||
ea3ab18cca | |||
f77f0c2fd6 | |||
e1f987e83b | |||
b123ae3e69 | |||
0ebd0bac2c | |||
c7933f8502 | |||
a4b5e05f8f | |||
83f548e95f | |||
c66ca460c0 | |||
2b36140fbf | |||
66207830ba | |||
0f7c15bf36 | |||
d31a083ed6 | |||
148839b0ab | |||
7714635fa0 | |||
ca6c275cd8 | |||
54a897abb6 | |||
45eb33485d | |||
cbdf17f618 | |||
fdf231b46e | |||
e9d611fc03 | |||
f899a76f7f | |||
aa93604a6a | |||
6d8fb63d54 | |||
1cb5827438 | |||
fccee387b8 | |||
6f22a3031b | |||
185258ad8a | |||
b69a9a2de7 | |||
f16859893d | |||
b668c991c8 | |||
405b1ce60f | |||
e6f5649999 | |||
ef03bb112d | |||
da172aaa66 | |||
11625adbe8 | |||
b691895e05 | |||
66ef1fa38d | |||
30cc02c2a7 | |||
0d3e42be3f | |||
61ab3e1b3f | |||
bc604bc2ce | |||
39f80ea79a | |||
6ca944fe42 | |||
28ffa10a59 | |||
006554f545 | |||
1b04f9a883 | |||
00f23f4b9c | |||
9b948f45ee | |||
1f0ee6b27f | |||
3348bd0b39 | |||
780ff152c8 | |||
d61ac18707 | |||
bee5631fab | |||
78d34d9177 | |||
100eedc8cd | |||
ce298b9600 | |||
7128cd8d0d | |||
7007577176 | |||
ca1c7cc23f | |||
ae43d24f62 | |||
c6de176b0b | |||
a36df414c1 | |||
1022a3998f | |||
67727954ec | |||
cf8fc2ac56 | |||
4c38ae86a9 | |||
4b3bc8a216 | |||
e9a2ce6df3 | |||
875054aa2c | |||
4b9eea276b | |||
fc5ed5e892 | |||
1d01ddbbbc | |||
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 | |||
962515c10e | |||
ee97213b9f | |||
97ccf1c170 | |||
37e66f32c5 | |||
572459ba88 | |||
b47ca4c785 | |||
8f0f7911b0 | |||
c0356cab62 | |||
b98ced2939 | |||
aea3359236 | |||
760a016842 | |||
f59c228803 | |||
951570c88c | |||
c066d27909 | |||
e43fc0f8db | |||
b23efc4d77 | |||
2258e68bc2 | |||
bb23e9fdbe | |||
358206f6fb | |||
402d168304 | |||
1865f6985e | |||
c338ff5579 | |||
bf58cf62d3 | |||
520f0587c8 | |||
81f2c6372e | |||
b4b2a7f511 | |||
bc2d0a347d | |||
07137fdd91 | |||
e8e0c97e59 | |||
83496bcad1 | |||
7d82e18c4d | |||
3c2a971fc4 | |||
742fba29f9 | |||
56da4afb5b | |||
2088d82252 | |||
566a654f5b | |||
1462214a8e | |||
efc7daf5fc | |||
fa582fcc34 | |||
c66cedf146 | |||
8dde578676 | |||
5e1534451d | |||
c4a1c7564c | |||
0de2c429f2 | |||
eb6b72a25c | |||
0618fc3962 | |||
1b7e4687e4 | |||
9f33371daf | |||
bbc529287d | |||
f757e4a894 | |||
5cb7b87e74 | |||
a853352a57 | |||
a15c05491e | |||
82f7da5858 | |||
5d34ed5a68 | |||
f73c52e2b7 | |||
fecd66465d | |||
9b0d363909 | |||
400d45df39 | |||
634805d36d | |||
db051a737e | |||
cbf0d2680c | |||
316439dc9a | |||
edaf95cc1c | |||
5f867fa2dd | |||
bdaf63da20 | |||
c12d54314e | |||
f50bbeba94 | |||
848c8aac5f | |||
488b5d61fd | |||
6b5892eb1d | |||
c3be92dcaf | |||
64bee30b17 | |||
568fdc7491 | |||
8585574100 | |||
6b37ba13c9 | |||
efac745bdd | |||
7e0a0bbbd2 | |||
16e228b7b0 | |||
277c400248 | |||
2b03dd5198 | |||
bdd922d318 | |||
6b2dfb4aa9 | |||
67ab65fa16 | |||
b06ebc7185 | |||
a30b189207 | |||
eb3c1f7a4c | |||
c697cd4e38 | |||
661ef8dcbf | |||
ec09db42e6 | |||
3403924105 | |||
3d234072f6 | |||
b39cda6b84 | |||
47be4291a3 | |||
67f7506636 | |||
bbdfeb645e | |||
7f60d88f30 | |||
8babcf342b | |||
a5ec39cd2a | |||
63434c8309 | |||
1a5fe54d06 | |||
b2cfdc1fdf | |||
3a4568bc69 | |||
203bb6a13a | |||
4bfd65acb3 | |||
d636de890c | |||
1e9401eef2 | |||
ea67467cbf | |||
fc6bdeb1ad | |||
2758637953 | |||
f747c80c2a | |||
013f67c0a8 | |||
fb145e5772 | |||
408b329684 | |||
ad70457600 | |||
f54f7b6e2e | |||
2700efa6e4 | |||
e44adf4568 | |||
471b258ff7 | |||
ac6329baf6 | |||
a61ac456a9 | |||
cf77adb366 | |||
2217568a59 | |||
05deb5b979 | |||
8621e2375d | |||
25975da0c1 | |||
a79719c21a | |||
5aea58df79 | |||
1833bfddfb | |||
6c2fc0289b | |||
5034ada458 | |||
e635cf6225 | |||
b901eef822 | |||
e7cdfc1453 | |||
7503335701 | |||
0b571e4565 | |||
f91c9bcfc2 | |||
b27b9136f9 | |||
865dad0f4f | |||
3178a1dea9 | |||
af1b6c8b35 | |||
89e8463b98 | |||
01eccb6655 | |||
e7f8a75df3 | |||
fa03e51d37 | |||
fe1a4c2c29 | |||
26afa49879 | |||
94bc6662ed | |||
06c1f5c372 | |||
4dd94ee59d | |||
69dd348c92 | |||
d823b2a49e | |||
756177826c | |||
c60632a37f | |||
324956c091 | |||
68c5816d4d | |||
643b722eb4 | |||
db0b2b147c | |||
b382bc9fbb | |||
454accd742 | |||
088de57cab | |||
5a992d6d5a | |||
f44cf65c43 | |||
46f3a459b6 | |||
161c1f46b0 | |||
fc2484227a | |||
e7bbf68dde | |||
10f7b97b64 | |||
c8a8b7a897 | |||
6560d2f9a2 | |||
3be397429a | |||
8b17fd035b | |||
8da8fe7efb | |||
59111f5da6 | |||
95e8d5c268 | |||
56d2c95c64 | |||
602d411bad | |||
4cd9572993 | |||
84d7fc9892 | |||
dab40e081a | |||
984a47d3b1 | |||
48cd96858a | |||
2cce4c572f | |||
2f783f2ba3 | |||
1ee22e3a9a | |||
450b211e7e | |||
19f3147f25 | |||
5d6d6fc68e | |||
ec55658fd1 | |||
d25b189952 | |||
a8b07cc365 | |||
70a30ac056 | |||
cfe1f1d1e2 | |||
3396918793 | |||
3ef842f359 | |||
e87cb5981c | |||
6e9419ed92 | |||
ab4e516ba8 | |||
5d2d26b3d9 | |||
50e16f9413 | |||
4653037f1e | |||
f192e53e7a | |||
b5a9da8011 | |||
cbbfb8724b | |||
0bbfe0b6b5 | |||
cc714dd898 | |||
4964e56298 | |||
fafd56612e | |||
3042a0ac19 | |||
9d2a423011 | |||
276c2024b4 | |||
81cffd471d | |||
61a808bad4 | |||
48045c0fee | |||
ef6964f3b4 | |||
7b7f426624 | |||
d1c0472b77 | |||
e6fd6128f4 | |||
e72be000b0 | |||
f50ddd48c8 | |||
3a2d5e2da6 | |||
c929bc6440 | |||
09563de935 | |||
a5615da7dc | |||
6babfae211 | |||
b471d0fa7a | |||
cf7d1b50f8 | |||
ddb5dc39aa | |||
3fd95643b0 | |||
d128511a21 | |||
5709afd835 | |||
f828c1c200 | |||
77708aebd9 | |||
f9ac9b1063 | |||
bdd6c603c4 | |||
31e607d0ad | |||
b2337d3c39 | |||
6428d4fa62 | |||
db315b31b4 | |||
340a64b87a | |||
89b5183f22 |
166
.github/workflows/arrow-aws.yml
vendored
Normal file
166
.github/workflows/arrow-aws.yml
vendored
Normal file
@ -0,0 +1,166 @@
|
|||||||
|
name: Arrow (AWS)
|
||||||
|
|
||||||
|
run-name: Arrow (AWS) - ${{ inputs.rebuild && 'Rebuild and ' || '' }}${{ inputs.action == 'create' && 'Create' || ( inputs.action == 'destroy' && 'Destroy' || 'No Action' ) }}
|
||||||
|
|
||||||
|
env:
|
||||||
|
TERRAFORM_DIRECTORY: hosts/arrow/aws
|
||||||
|
DEPLOY_IDENTITY_BASE64: ${{ secrets.DEPLOY_IDENTITY_BASE64 }}
|
||||||
|
ARROW_IDENTITY_BASE64: ${{ secrets.ARROW_IDENTITY_BASE64 }}
|
||||||
|
ZONE_NAME: masu.rs
|
||||||
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
|
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
rebuild:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
action:
|
||||||
|
type: choice
|
||||||
|
required: true
|
||||||
|
default: create
|
||||||
|
options:
|
||||||
|
- create
|
||||||
|
- destroy
|
||||||
|
- nothing
|
||||||
|
size:
|
||||||
|
type: choice
|
||||||
|
required: false
|
||||||
|
options:
|
||||||
|
- t3a.small # 2 GB RAM / $10
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-deploy:
|
||||||
|
name: Build and Deploy
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- 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'
|
||||||
|
run: |
|
||||||
|
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
||||||
|
sudo udevadm control --reload-rules
|
||||||
|
sudo udevadm trigger --name-match=kvm
|
||||||
|
|
||||||
|
# Login to AWS
|
||||||
|
- name: AWS Assume Role
|
||||||
|
uses: aws-actions/configure-aws-credentials@v4
|
||||||
|
with:
|
||||||
|
role-to-assume: arn:aws:iam::286370965832:role/github_actions_admin
|
||||||
|
aws-region: us-east-1
|
||||||
|
|
||||||
|
# Install Nix
|
||||||
|
- name: Install Nix
|
||||||
|
if: inputs.rebuild && inputs.action != 'destroy'
|
||||||
|
uses: cachix/install-nix-action@v20
|
||||||
|
|
||||||
|
# Build the image
|
||||||
|
- name: Build Image
|
||||||
|
if: inputs.rebuild && inputs.action != 'destroy'
|
||||||
|
run: nix build .#arrow-aws
|
||||||
|
|
||||||
|
- 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
|
||||||
|
uses: hashicorp/setup-terraform@v2
|
||||||
|
|
||||||
|
# Checks whether Terraform is formatted properly. If this fails, you
|
||||||
|
# should install the pre-commit hook.
|
||||||
|
- name: Check Formatting
|
||||||
|
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
|
||||||
|
run: |
|
||||||
|
terraform fmt -no-color -check -diff -recursive
|
||||||
|
|
||||||
|
# Connects to remote state backend and download providers.
|
||||||
|
- name: Terraform Init
|
||||||
|
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
|
||||||
|
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_ec2_size: ${{ inputs.size }}
|
||||||
|
TF_VAR_images_bucket: ${{ secrets.IMAGES_BUCKET }}
|
||||||
|
run: |
|
||||||
|
terraform apply \
|
||||||
|
-auto-approve \
|
||||||
|
-input=false
|
||||||
|
|
||||||
|
# Removes infrastructure.
|
||||||
|
- 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 \
|
||||||
|
-input=false
|
||||||
|
|
||||||
|
- name: Get Host IP
|
||||||
|
if: inputs.action == 'create'
|
||||||
|
id: host
|
||||||
|
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
|
||||||
|
run: terraform output -raw host_ip
|
||||||
|
|
||||||
|
- name: Wait on SSH
|
||||||
|
if: inputs.action == 'create'
|
||||||
|
run: |
|
||||||
|
for i in $(seq 1 15); do
|
||||||
|
if $(nc -z -w 3 ${{ steps.host.outputs.stdout }} 22); then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
sleep 10
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Write Identity Keys to Files
|
||||||
|
if: inputs.action == 'create'
|
||||||
|
run: |
|
||||||
|
echo "${{ env.DEPLOY_IDENTITY_BASE64 }}" | base64 -d > deploy_ed25519
|
||||||
|
chmod 0600 deploy_ed25519
|
||||||
|
echo "${{ env.ARROW_IDENTITY_BASE64 }}" | base64 -d > arrow_ed25519
|
||||||
|
chmod 0600 arrow_ed25519
|
||||||
|
|
||||||
|
- name: Copy Identity File to Host
|
||||||
|
if: inputs.action == 'create'
|
||||||
|
run: |
|
||||||
|
ssh -i deploy_ed25519 -o StrictHostKeyChecking=accept-new noah@${{ steps.host.outputs.stdout }} 'mkdir -pv .ssh'
|
||||||
|
scp -i deploy_ed25519 arrow_ed25519 noah@${{ steps.host.outputs.stdout }}:~/.ssh/id_ed25519
|
||||||
|
|
||||||
|
- name: Wipe Records
|
||||||
|
if: ${{ inputs.action == 'destroy' }}
|
||||||
|
run: |
|
||||||
|
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 == "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' \
|
||||||
|
--header "Authorization: Bearer ${{ env.CLOUDFLARE_API_TOKEN }}"
|
154
.github/workflows/arrow.yml
vendored
Normal file
154
.github/workflows/arrow.yml
vendored
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
name: Arrow
|
||||||
|
|
||||||
|
run-name: Arrow - ${{ inputs.rebuild && 'Rebuild and ' || '' }}${{ inputs.action == 'create' && 'Create' || ( inputs.action == 'destroy' && 'Destroy' || 'No Action' ) }}
|
||||||
|
|
||||||
|
env:
|
||||||
|
TERRAFORM_DIRECTORY: hosts/arrow/vultr
|
||||||
|
DEPLOY_IDENTITY_BASE64: ${{ secrets.DEPLOY_IDENTITY_BASE64 }}
|
||||||
|
ARROW_IDENTITY_BASE64: ${{ secrets.ARROW_IDENTITY_BASE64 }}
|
||||||
|
CLOUDFLARE_R2_ENDPOINT: "${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com"
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_R2_ACCESS_KEY }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_R2_SECRET_KEY }}
|
||||||
|
AWS_DEFAULT_REGION: auto
|
||||||
|
AWS_ENDPOINT_URL_S3: "https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com"
|
||||||
|
TF_VAR_vultr_api_key: ${{ secrets.VULTR_API_KEY }}
|
||||||
|
ZONE_NAME: masu.rs
|
||||||
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
|
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
rebuild:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
action:
|
||||||
|
type: choice
|
||||||
|
required: true
|
||||||
|
default: create
|
||||||
|
options:
|
||||||
|
- create
|
||||||
|
- destroy
|
||||||
|
- nothing
|
||||||
|
plan:
|
||||||
|
type: choice
|
||||||
|
required: false
|
||||||
|
options:
|
||||||
|
- vc2-1c-1gb # 25 GB / $5
|
||||||
|
- vc2-1c-2gb # 55 GB / $10 (default)
|
||||||
|
- vc2-2c-2gb # 65 GB / $15
|
||||||
|
- vc2-2c-4gb # 80 GB / $20
|
||||||
|
- vc2-4c-8gb # 160 GB / $40
|
||||||
|
- vc2-6c-16gb # 320 GB / $80
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-deploy:
|
||||||
|
name: Build and Deploy
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repo Code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Enable access to KVM, required to build an image
|
||||||
|
- name: Enable KVM group perms
|
||||||
|
if: inputs.rebuild && inputs.action != 'destroy'
|
||||||
|
run: |
|
||||||
|
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
||||||
|
sudo udevadm control --reload-rules
|
||||||
|
sudo udevadm trigger --name-match=kvm
|
||||||
|
|
||||||
|
# Install Nix
|
||||||
|
- name: Install Nix
|
||||||
|
if: inputs.rebuild && inputs.action != 'destroy'
|
||||||
|
uses: cachix/install-nix-action@v17
|
||||||
|
|
||||||
|
# Build the image
|
||||||
|
- name: Build Image
|
||||||
|
if: inputs.rebuild && inputs.action != 'destroy'
|
||||||
|
run: nix build .#arrow
|
||||||
|
|
||||||
|
- name: Upload Image to S3
|
||||||
|
if: inputs.rebuild && inputs.action != 'destroy'
|
||||||
|
run: |
|
||||||
|
aws s3 cp \
|
||||||
|
result/iso/nixos.iso \
|
||||||
|
s3://noahmasur-arrow-images/arrow.iso \
|
||||||
|
--endpoint-url "https://${{ env.CLOUDFLARE_R2_ENDPOINT }}"
|
||||||
|
|
||||||
|
# Installs the Terraform binary and some other accessory functions.
|
||||||
|
- name: Setup Terraform
|
||||||
|
uses: hashicorp/setup-terraform@v2
|
||||||
|
|
||||||
|
# Checks whether Terraform is formatted properly. If this fails, you
|
||||||
|
# should install the pre-commit hook.
|
||||||
|
- name: Check Formatting
|
||||||
|
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
|
||||||
|
run: |
|
||||||
|
terraform fmt -no-color -check -diff -recursive
|
||||||
|
|
||||||
|
# Connects to remote state backend and download providers.
|
||||||
|
- name: Terraform Init
|
||||||
|
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
|
||||||
|
run: terraform init
|
||||||
|
|
||||||
|
# Deploys infrastructure or changes to infrastructure.
|
||||||
|
- name: Terraform Apply
|
||||||
|
if: inputs.action == 'create'
|
||||||
|
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
|
||||||
|
env:
|
||||||
|
TF_VAR_vultr_plan: ${{ inputs.plan }}
|
||||||
|
run: |
|
||||||
|
terraform apply \
|
||||||
|
-auto-approve \
|
||||||
|
-input=false
|
||||||
|
|
||||||
|
# Removes infrastructure.
|
||||||
|
- name: Terraform Destroy
|
||||||
|
if: inputs.action == 'destroy'
|
||||||
|
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
|
||||||
|
run: |
|
||||||
|
terraform destroy \
|
||||||
|
-auto-approve \
|
||||||
|
-input=false
|
||||||
|
|
||||||
|
- name: Get Host IP
|
||||||
|
if: inputs.action == 'create'
|
||||||
|
id: host
|
||||||
|
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
|
||||||
|
run: terraform output -raw host_ip
|
||||||
|
|
||||||
|
- name: Wait on SSH
|
||||||
|
if: inputs.action == 'create'
|
||||||
|
run: |
|
||||||
|
for i in $(seq 1 15); do
|
||||||
|
if $(nc -z -w 3 ${{ steps.host.outputs.stdout }} 22); then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
sleep 10
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Write Identity Keys to Files
|
||||||
|
if: inputs.action == 'create'
|
||||||
|
run: |
|
||||||
|
echo "${{ env.DEPLOY_IDENTITY_BASE64 }}" | base64 -d > deploy_ed25519
|
||||||
|
chmod 0600 deploy_ed25519
|
||||||
|
echo "${{ env.ARROW_IDENTITY_BASE64 }}" | base64 -d > arrow_ed25519
|
||||||
|
chmod 0600 arrow_ed25519
|
||||||
|
|
||||||
|
- name: Copy Identity File to Host
|
||||||
|
if: inputs.action == 'create'
|
||||||
|
run: |
|
||||||
|
ssh -i deploy_ed25519 -o StrictHostKeyChecking=accept-new noah@${{ steps.host.outputs.stdout }} 'mkdir -pv .ssh'
|
||||||
|
scp -i deploy_ed25519 arrow_ed25519 noah@${{ steps.host.outputs.stdout }}:~/.ssh/id_ed25519
|
||||||
|
|
||||||
|
- name: Wipe Records
|
||||||
|
if: ${{ inputs.action == 'destroy' }}
|
||||||
|
run: |
|
||||||
|
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 == "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' \
|
||||||
|
--header "Authorization: Bearer ${{ env.CLOUDFLARE_API_TOKEN }}"
|
6
.github/workflows/check.yml
vendored
6
.github/workflows/check.yml
vendored
@ -11,10 +11,10 @@ jobs:
|
|||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: DeterminateSystems/nix-installer-action@v4
|
uses: DeterminateSystems/nix-installer-action@v11
|
||||||
- name: Check Nixpkgs Inputs
|
- name: Check Nixpkgs Inputs
|
||||||
uses: DeterminateSystems/flake-checker-action@v5
|
uses: DeterminateSystems/flake-checker-action@v7
|
||||||
- name: Add Nix Cache
|
- name: Add Nix Cache
|
||||||
uses: DeterminateSystems/magic-nix-cache-action@v2
|
uses: DeterminateSystems/magic-nix-cache-action@v6
|
||||||
- name: Check the Flake
|
- name: Check the Flake
|
||||||
run: nix flake check
|
run: nix flake check
|
||||||
|
29
.github/workflows/update.yml
vendored
29
.github/workflows/update.yml
vendored
@ -3,11 +3,12 @@ name: Update Flake
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch: # allows manual triggering
|
workflow_dispatch: # allows manual triggering
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '33 3 * * 0' # runs weekly on Sunday at 03:33
|
- cron: '33 3 * * 6' # runs weekly on Saturday at 03:33
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
checks: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lockfile:
|
lockfile:
|
||||||
@ -17,21 +18,39 @@ jobs:
|
|||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Install Nix
|
- 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
|
- name: Check Nixpkgs Inputs
|
||||||
uses: DeterminateSystems/flake-checker-action@v5
|
uses: DeterminateSystems/flake-checker-action@v7
|
||||||
- name: Add Nix Cache
|
- name: Add Nix Cache
|
||||||
uses: DeterminateSystems/magic-nix-cache-action@v2
|
uses: DeterminateSystems/magic-nix-cache-action@v6
|
||||||
- name: Update flake.lock
|
- name: Update flake.lock
|
||||||
uses: DeterminateSystems/update-flake-lock@v19
|
uses: DeterminateSystems/update-flake-lock@v23
|
||||||
id: update
|
id: update
|
||||||
with:
|
with:
|
||||||
pr-title: "Update flake.lock" # Title of PR to be created
|
pr-title: "Update flake.lock" # Title of PR to be created
|
||||||
pr-labels: | # Labels to be set on the PR
|
pr-labels: | # Labels to be set on the PR
|
||||||
dependencies
|
dependencies
|
||||||
automated
|
automated
|
||||||
|
pr-body: |
|
||||||
|
Automated changes by the [update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) GitHub Action.
|
||||||
|
|
||||||
|
```
|
||||||
|
{{ env.GIT_COMMIT_MESSAGE }}
|
||||||
|
```
|
||||||
- name: Check the Flake
|
- name: Check the Flake
|
||||||
|
id: check
|
||||||
run: nix flake check
|
run: nix flake check
|
||||||
|
- name: Update Check Status
|
||||||
|
uses: LouisBrunner/checks-action@v1.6.1
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
name: Update Flake
|
||||||
|
conclusion: ${{ job.status }}
|
||||||
|
output: |
|
||||||
|
{"summary":"${{ steps.check.outputs.stdout }}"}
|
||||||
- name: Enable Pull Request Automerge
|
- name: Enable Pull Request Automerge
|
||||||
if: success()
|
if: success()
|
||||||
run: |
|
run: |
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,6 +1,7 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
*.bak
|
*.bak
|
||||||
*.db
|
*.db
|
||||||
|
*.qcow2
|
||||||
**/.direnv/**
|
**/.direnv/**
|
||||||
result
|
result
|
||||||
private/**
|
private/**
|
||||||
|
28
README.md
28
README.md
@ -9,7 +9,7 @@ configuration may be difficult to translate to a non-Nix system.
|
|||||||
## System Features
|
## System Features
|
||||||
|
|
||||||
| Feature | Program | Configuration |
|
| Feature | Program | Configuration |
|
||||||
| --- | --- | --- |
|
|----------------|-----------------------------------------------------|-----------------------------------------------|
|
||||||
| OS | [NixOS](https://nixos.org) | [Link](./modules/nixos) |
|
| OS | [NixOS](https://nixos.org) | [Link](./modules/nixos) |
|
||||||
| Display Server | [X11](https://www.x.org/wiki/) | [Link](./modules/nixos/graphical/xorg.nix) |
|
| 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) |
|
| 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
|
## User Features
|
||||||
|
|
||||||
| Feature | Program | Configuration |
|
| Feature | Program | Configuration |
|
||||||
| --- | --- | --- |
|
|--------------|----------------------------------------------------------------------------------|----------------------------------------------------|
|
||||||
| Dotfiles | [Home-Manager](https://github.com/nix-community/home-manager) | [Link](./modules/common) |
|
| 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) |
|
| Terminal | [Kitty](https://sw.kovidgoyal.net/kitty/) | [Link](./modules/common/applications/kitty.nix) |
|
||||||
| Shell | [Fish](https://fishshell.com/) | [Link](./modules/common/shell/fish) |
|
| Shell | [Fish](https://fishshell.com/) | [Link](./modules/common/shell/fish) |
|
||||||
| Shell Prompt | [Starship](https://starship.rs/) | [Link](./modules/common/shell/starhip.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) |
|
| 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) |
|
| 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) |
|
| Text Editor | [Neovim](https://neovim.io/) | [Link](./modules/common/neovim/config) |
|
||||||
@ -38,9 +38,29 @@ configuration may be difficult to translate to a non-Nix system.
|
|||||||
## macOS Features
|
## macOS Features
|
||||||
|
|
||||||
| Feature | Program | Configuration |
|
| Feature | Program | Configuration |
|
||||||
| --- | --- | --- |
|
|----------|---------------------------------------------|--------------------------------------|
|
||||||
| Keybinds | [Hammerspoon](https://www.hammerspoon.org/) | [Link](./modules/darwin/hammerspoon) |
|
| Keybinds | [Hammerspoon](https://www.hammerspoon.org/) | [Link](./modules/darwin/hammerspoon) |
|
||||||
|
|
||||||
|
# Diagram
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Unique Configurations
|
||||||
|
|
||||||
|
This repo contains a few more elaborate elements of configuration.
|
||||||
|
|
||||||
|
- [Neovim config](./modules/common/neovim/default.nix) generated with Nix2Vim
|
||||||
|
and source-controlled plugins, differing based on installed LSPs, for example.
|
||||||
|
- [Caddy JSON](./modules/nixos/services/caddy.nix) file (routes, etc.) based
|
||||||
|
dynamically on enabled services rendered with Nix.
|
||||||
|
- [Grafana config](./modules/nixos/services/grafana.nix) rendered with Nix.
|
||||||
|
- Custom [secrets deployment](./modules/nixos/services/secrets.nix) similar to
|
||||||
|
agenix.
|
||||||
|
- Base16 [colorschemes](./colorscheme/) applied to multiple applications,
|
||||||
|
including Firefox userChrome.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
# Apps
|
|
||||||
|
|
||||||
These are all my miscellaneous utilies and scripts to accompany this project.
|
|
||||||
|
|
||||||
They can be run with:
|
|
||||||
|
|
||||||
```
|
|
||||||
nix run github:nmasur/dotfiles#appname
|
|
||||||
```
|
|
@ -1,34 +0,0 @@
|
|||||||
{ pkgs, ... }: rec {
|
|
||||||
|
|
||||||
# Show quick helper
|
|
||||||
default = import ./help.nix { inherit pkgs; };
|
|
||||||
|
|
||||||
# Format primary disk
|
|
||||||
format-root = import ./format-root.nix { inherit pkgs; };
|
|
||||||
|
|
||||||
# Format and install from nothing (deprecated)
|
|
||||||
installer = import ./installer.nix { inherit pkgs; };
|
|
||||||
|
|
||||||
# Display the readme for this repository
|
|
||||||
readme = import ./readme.nix { inherit pkgs; };
|
|
||||||
|
|
||||||
# Rebuild
|
|
||||||
rebuild = import ./rebuild.nix { inherit pkgs; };
|
|
||||||
|
|
||||||
# Load the SSH key for this machine
|
|
||||||
loadkey = import ./loadkey.nix { inherit pkgs; };
|
|
||||||
|
|
||||||
# Encrypt secret for all machines
|
|
||||||
encrypt-secret = import ./encrypt-secret.nix { inherit pkgs; };
|
|
||||||
|
|
||||||
# Re-encrypt secrets for all machines
|
|
||||||
reencrypt-secrets = import ./reencrypt-secrets.nix { inherit pkgs; };
|
|
||||||
|
|
||||||
# Connect machine metrics to Netdata Cloud
|
|
||||||
netdata = import ./netdata-cloud.nix { inherit pkgs; };
|
|
||||||
|
|
||||||
# Run neovim as an app
|
|
||||||
neovim = import ./neovim.nix { inherit pkgs; };
|
|
||||||
nvim = neovim;
|
|
||||||
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
{ pkgs, ... }: {
|
|
||||||
|
|
||||||
# nix run github:nmasur/dotfiles#encrypt-secret > private/mysecret.age
|
|
||||||
|
|
||||||
type = "app";
|
|
||||||
|
|
||||||
program = builtins.toString (pkgs.writeShellScript "encrypt-secret" ''
|
|
||||||
printf "\nEnter the secret data to encrypt for all hosts...\n\n" 1>&2
|
|
||||||
read -p "Secret: " secret
|
|
||||||
printf "\nEncrypting...\n\n" 1>&2
|
|
||||||
tmpfile=$(mktemp)
|
|
||||||
echo "''${secret}" > ''${tmpfile}
|
|
||||||
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
|
||||||
builtins.toString ../misc/public-keys
|
|
||||||
} $tmpfile
|
|
||||||
rm $tmpfile
|
|
||||||
'');
|
|
||||||
|
|
||||||
}
|
|
@ -1,39 +0,0 @@
|
|||||||
{ pkgs, ... }: {
|
|
||||||
|
|
||||||
# This script will partition and format drives; use at your own risk!
|
|
||||||
|
|
||||||
type = "app";
|
|
||||||
|
|
||||||
program = builtins.toString (pkgs.writeShellScript "format-root" ''
|
|
||||||
set -e
|
|
||||||
|
|
||||||
DISK=$1
|
|
||||||
|
|
||||||
if [ -z "''${DISK}" ]; then
|
|
||||||
${pkgs.gum}/bin/gum style --width 50 --margin "1 2" --padding "2 4" \
|
|
||||||
--foreground "#fb4934" \
|
|
||||||
"Missing required parameter." \
|
|
||||||
"Usage: format-root -- <disk>" \
|
|
||||||
"Flake example: nix run github:nmasur/dotfiles#format-root -- nvme0n1"
|
|
||||||
echo "(exiting)"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
${pkgs.disko-packaged}/bin/disko \
|
|
||||||
--mode create \
|
|
||||||
--dry-run \
|
|
||||||
--flake "path:$(pwd)#root" \
|
|
||||||
--arg disk \""/dev/''${DISK}"\"
|
|
||||||
|
|
||||||
${pkgs.gum}/bin/gum confirm \
|
|
||||||
"This will ERASE ALL DATA on the disk /dev/''${DISK}. Are you sure you want to continue?" \
|
|
||||||
--default=false
|
|
||||||
|
|
||||||
${pkgs.disko-packaged}/bin/disko \
|
|
||||||
--mode create \
|
|
||||||
--flake "path:$(pwd)#root" \
|
|
||||||
--arg disk "/dev/''${DISK}"
|
|
||||||
|
|
||||||
'');
|
|
||||||
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
{ pkgs, ... }: {
|
|
||||||
|
|
||||||
type = "app";
|
|
||||||
|
|
||||||
program = builtins.toString (pkgs.writeShellScript "default" ''
|
|
||||||
${pkgs.gum}/bin/gum style --margin "1 2" --padding "0 2" --foreground "15" --background "55" "Options"
|
|
||||||
${pkgs.gum}/bin/gum format --type=template -- ' {{ Italic "Run with" }} {{ Color "15" "69" " nix run github:nmasur/dotfiles#" }}{{ Color "15" "62" "someoption" }}{{ Color "15" "69" " " }}.'
|
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
${pkgs.gum}/bin/gum format --type=template -- \
|
|
||||||
' • {{ Color "15" "57" " readme " }} {{ Italic "Documentation for this repository." }}' \
|
|
||||||
' • {{ Color "15" "57" " rebuild " }} {{ Italic "Switch to this configuration." }}' \
|
|
||||||
' • {{ Color "15" "57" " installer " }} {{ Italic "Format and install from nothing." }}' \
|
|
||||||
' • {{ Color "15" "57" " neovim " }} {{ Italic "Test out the Neovim package." }}' \
|
|
||||||
' • {{ Color "15" "57" " loadkey " }} {{ Italic "Load an ssh key for this machine using melt." }}' \
|
|
||||||
' • {{ Color "15" "57" " encrypt-secret " }} {{ Italic "Encrypt a secret for all machines." }}' \
|
|
||||||
' • {{ Color "15" "57" " reencrypt-secrets " }} {{ Italic "Reencrypt all secrets when new machine is added." }}' \
|
|
||||||
' • {{ Color "15" "57" " netdata " }} {{ Italic "Connect a machine to Netdata cloud." }}'
|
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
'');
|
|
||||||
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
{ pkgs, ... }: {
|
|
||||||
|
|
||||||
# Inspired by https://github.com/cleverca22/nix-tests/blob/master/kexec/justdoit.nix
|
|
||||||
# This script will partition and format drives; use at your own risk!
|
|
||||||
|
|
||||||
type = "app";
|
|
||||||
|
|
||||||
program = builtins.toString (pkgs.writeShellScript "installer" ''
|
|
||||||
set -e
|
|
||||||
|
|
||||||
DISK=$1
|
|
||||||
FLAKE=$2
|
|
||||||
PARTITION_PREFIX=""
|
|
||||||
|
|
||||||
if [ -z "$DISK" ] || [ -z "$FLAKE" ]; then
|
|
||||||
${pkgs.gum}/bin/gum style --width 50 --margin "1 2" --padding "2 4" \
|
|
||||||
--foreground "#fb4934" \
|
|
||||||
"Missing required parameter." \
|
|
||||||
"Usage: installer -- <disk> <host>" \
|
|
||||||
"Example: installer -- nvme0n1 tempest" \
|
|
||||||
"Flake example: nix run github:nmasur/dotfiles#installer -- nvme0n1 tempest"
|
|
||||||
echo "(exiting)"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$DISK" in nvme*)
|
|
||||||
PARTITION_PREFIX="p"
|
|
||||||
esac
|
|
||||||
|
|
||||||
${pkgs.gum}/bin/gum confirm \
|
|
||||||
"This will ERASE ALL DATA on the disk /dev/''${DISK}. Are you sure you want to continue?" \
|
|
||||||
--default=false
|
|
||||||
|
|
||||||
${pkgs.parted}/bin/parted /dev/''${DISK} -- mklabel gpt
|
|
||||||
${pkgs.parted}/bin/parted /dev/''${DISK} -- mkpart primary 512MiB 100%
|
|
||||||
${pkgs.parted}/bin/parted /dev/''${DISK} -- mkpart ESP fat32 1MiB 512MiB
|
|
||||||
${pkgs.parted}/bin/parted /dev/''${DISK} -- set 3 esp on
|
|
||||||
mkfs.ext4 -L nixos /dev/''${DISK}''${PARTITION_PREFIX}1
|
|
||||||
mkfs.fat -F 32 -n boot /dev/''${DISK}''${PARTITION_PREFIX}2
|
|
||||||
|
|
||||||
mount /dev/disk/by-label/nixos /mnt
|
|
||||||
mkdir --parents /mnt/boot
|
|
||||||
mount /dev/disk/by-label/boot /mnt/boot
|
|
||||||
|
|
||||||
${pkgs.nixos-install-tools}/bin/nixos-install --flake github:nmasur/dotfiles#''${FLAKE}
|
|
||||||
'');
|
|
||||||
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
{ pkgs, ... }: {
|
|
||||||
|
|
||||||
type = "app";
|
|
||||||
|
|
||||||
program = builtins.toString (pkgs.writeShellScript "loadkey" ''
|
|
||||||
printf "\nEnter the seed phrase for your SSH key...\n"
|
|
||||||
printf "\nThen press ^D when complete.\n\n"
|
|
||||||
${pkgs.melt}/bin/melt restore ~/.ssh/id_ed25519
|
|
||||||
printf "\n\nContinuing activation.\n\n"
|
|
||||||
'');
|
|
||||||
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
{ pkgs, ... }: {
|
|
||||||
|
|
||||||
type = "app";
|
|
||||||
|
|
||||||
program = "${
|
|
||||||
(import ../modules/common/neovim/package {
|
|
||||||
inherit pkgs;
|
|
||||||
colors = (import ../colorscheme/nord).dark;
|
|
||||||
})
|
|
||||||
}/bin/nvim";
|
|
||||||
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
{ pkgs, ... }: {
|
|
||||||
|
|
||||||
type = "app";
|
|
||||||
|
|
||||||
program = builtins.toString (pkgs.writeShellScript "netdata-cloud" ''
|
|
||||||
if [ "$EUID" -ne 0 ]; then
|
|
||||||
echo "Please run as root"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
mkdir --parents --mode 0750 /var/lib/netdata/cloud.d
|
|
||||||
printf "\nEnter the claim token for netdata cloud...\n\n"
|
|
||||||
read -p "Token: " token
|
|
||||||
echo "''${token}" > /var/lib/netdata/cloud.d/token
|
|
||||||
chown -R netdata:netdata /var/lib/netdata
|
|
||||||
${pkgs.netdata}/bin/netdata-claim.sh -id=$(uuidgen)
|
|
||||||
printf "\n\nNow restart netdata service.\n\n"
|
|
||||||
'');
|
|
||||||
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
{ pkgs, ... }: {
|
|
||||||
|
|
||||||
type = "app";
|
|
||||||
|
|
||||||
program = builtins.toString (pkgs.writeShellScript "readme" ''
|
|
||||||
${pkgs.glow}/bin/glow --pager ${builtins.toString ../README.md}
|
|
||||||
'');
|
|
||||||
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
{ pkgs, ... }: {
|
|
||||||
|
|
||||||
type = "app";
|
|
||||||
|
|
||||||
program = builtins.toString (pkgs.writeShellScript "rebuild" ''
|
|
||||||
echo ${pkgs.system}
|
|
||||||
SYSTEM=${if pkgs.stdenv.isDarwin then "darwin" else "linux"}
|
|
||||||
if [ "$SYSTEM" == "darwin" ]; then
|
|
||||||
sudo darwin-rebuild switch --flake ${builtins.toString ../.}
|
|
||||||
else
|
|
||||||
doas nixos-rebuild switch --flake ${builtins.toString ../.}
|
|
||||||
fi
|
|
||||||
'');
|
|
||||||
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
{ pkgs, ... }: {
|
|
||||||
|
|
||||||
# nix run github:nmasur/dotfiles#reencrypt-secrets ./private
|
|
||||||
|
|
||||||
type = "app";
|
|
||||||
|
|
||||||
program = builtins.toString (pkgs.writeShellScript "reencrypt-secrets" ''
|
|
||||||
if [ $# -eq 0 ]; then
|
|
||||||
echo "Must provide directory to reencrypt."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
encrypted=$1
|
|
||||||
for encryptedfile in ''${1}/*; do
|
|
||||||
tmpfile=$(mktemp)
|
|
||||||
echo "Decrypting ''${encryptedfile}..."
|
|
||||||
${pkgs.age}/bin/age --decrypt \
|
|
||||||
--identity ~/.ssh/id_ed25519 $encryptedfile > $tmpfile
|
|
||||||
echo "Encrypting ''${encryptedfile}..."
|
|
||||||
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
|
||||||
builtins.toString ../misc/public-keys
|
|
||||||
} $tmpfile > $encryptedfile
|
|
||||||
rm $tmpfile
|
|
||||||
done
|
|
||||||
echo "Finished."
|
|
||||||
'');
|
|
||||||
|
|
||||||
}
|
|
@ -16,9 +16,7 @@
|
|||||||
base0B = "#dbbc7f"; # Strings, Inherited Class, Markup Code, Diff Inserted
|
base0B = "#dbbc7f"; # Strings, Inherited Class, Markup Code, Diff Inserted
|
||||||
base0C = "#e69875"; # Support, Regular Expressions, Escape Characters, ...
|
base0C = "#e69875"; # Support, Regular Expressions, Escape Characters, ...
|
||||||
base0D = "#a7c080"; # Functions, Methods, Attribute IDs, Headings
|
base0D = "#a7c080"; # Functions, Methods, Attribute IDs, Headings
|
||||||
base0E =
|
base0E = "#e67e80"; # Keywords, Storage, Selector, Markup Italic, Diff Changed
|
||||||
"#e67e80"; # Keywords, Storage, Selector, Markup Italic, Diff Changed
|
base0F = "#d699b6"; # Deprecated, Opening/Closing Embedded Language Tags, ...
|
||||||
base0F =
|
|
||||||
"#d699b6"; # Deprecated, Opening/Closing Embedded Language Tags, ...
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
name = "gruvbox-dark"; # Dark, Medium
|
name = "gruvbox-dark"; # Dark, Medium
|
||||||
author =
|
author = "Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox), ElRastaOk (https://www.reddit.com/user/ElRastaOk)";
|
||||||
"Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox), ElRastaOk (https://www.reddit.com/user/ElRastaOk)";
|
|
||||||
dark = {
|
dark = {
|
||||||
base00 = "#1D2122"; # ---- This is the change from normal gruvbox
|
base00 = "#1D2122"; # ---- This is the change from normal gruvbox
|
||||||
base01 = "#3c3836"; # ---
|
base01 = "#3c3836"; # ---
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
name = "gruvbox"; # Dark, Medium
|
name = "gruvbox"; # Dark, Medium
|
||||||
author =
|
author = "Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)";
|
||||||
"Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)";
|
|
||||||
dark = {
|
dark = {
|
||||||
base00 = "#282828"; # ----
|
base00 = "#282828"; # ----
|
||||||
base01 = "#3c3836"; # ---
|
base01 = "#3c3836"; # ---
|
||||||
|
98
deploy/aws/ec2.tf
Normal file
98
deploy/aws/ec2.tf
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
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 = {
|
||||||
|
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 = "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
|
||||||
|
to_port = 22
|
||||||
|
protocol = "tcp"
|
||||||
|
cidr_blocks = ["0.0.0.0/0"]
|
||||||
|
}
|
||||||
|
|
||||||
|
ingress {
|
||||||
|
description = "HTTPS"
|
||||||
|
from_port = 443
|
||||||
|
to_port = 443
|
||||||
|
protocol = "tcp"
|
||||||
|
cidr_blocks = ["0.0.0.0/0"]
|
||||||
|
}
|
||||||
|
|
||||||
|
egress {
|
||||||
|
from_port = 0
|
||||||
|
to_port = 0
|
||||||
|
protocol = "-1"
|
||||||
|
cidr_blocks = ["0.0.0.0/0"]
|
||||||
|
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 {
|
# locals {
|
||||||
image_file = one(fileset(path.root, "result/nixos-amazon-image-*.vhd"))
|
# 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 to S3
|
resource "terraform_data" "image_replacement" {
|
||||||
resource "aws_s3_object" "image" {
|
input = data.aws_s3_object.image.etag
|
||||||
bucket = "your_bucket_name"
|
|
||||||
key = basename(local.image_file)
|
|
||||||
source = local.image_file
|
|
||||||
etag = filemd5(local.image_file)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Setup IAM access for the VM Importer
|
# Setup IAM access for the VM Importer
|
||||||
@ -29,8 +39,8 @@ data "aws_iam_policy_document" "vmimport" {
|
|||||||
"s3:ListBucket",
|
"s3:ListBucket",
|
||||||
]
|
]
|
||||||
resources = [
|
resources = [
|
||||||
"arn:aws:s3:::${aws_s3_object.image.bucket}",
|
"arn:aws:s3:::${data.aws_s3_object.image.bucket}",
|
||||||
"arn:aws:s3:::${aws_s3_object.image.bucket}/*",
|
"arn:aws:s3:::${data.aws_s3_object.image.bucket}/*",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
statement {
|
statement {
|
||||||
@ -58,23 +68,28 @@ resource "aws_ebs_snapshot_import" "image" {
|
|||||||
disk_container {
|
disk_container {
|
||||||
format = "VHD"
|
format = "VHD"
|
||||||
user_bucket {
|
user_bucket {
|
||||||
s3_bucket = aws_s3_object.image.bucket
|
s3_bucket = data.aws_s3_object.image.bucket
|
||||||
s3_key = aws_s3_object.image.key
|
s3_key = data.aws_s3_object.image.key
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
role_name = aws_iam_role.vmimport.name
|
role_name = aws_iam_role.vmimport.name
|
||||||
|
lifecycle {
|
||||||
|
replace_triggered_by = [terraform_data.image_replacement]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Convert to AMI
|
# Convert to AMI
|
||||||
resource "aws_ami" "image" {
|
resource "aws_ami" "image" {
|
||||||
description = "Created with NixOS."
|
description = "Created with NixOS."
|
||||||
name = replace(basename(local.image_file), "/\\.vhd$/", "")
|
name = replace(basename(data.aws_s3_object.image.key), "/\\.vhd$/", "")
|
||||||
virtualization_type = "hvm"
|
virtualization_type = "hvm"
|
||||||
|
root_device_name = "/dev/xvda"
|
||||||
|
ena_support = true
|
||||||
|
|
||||||
ebs_block_device {
|
ebs_block_device {
|
||||||
device_name = "/dev/xvda"
|
device_name = "/dev/xvda"
|
||||||
snapshot_id = aws_ebs_snapshot_import.image.id
|
snapshot_id = aws_ebs_snapshot_import.image.id
|
||||||
volume_size = 8
|
volume_size = 17
|
||||||
}
|
}
|
||||||
}
|
}
|
13
deploy/aws/main.tf
Normal file
13
deploy/aws/main.tf
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
terraform {
|
||||||
|
backend "s3" {
|
||||||
|
region = "us-east-1"
|
||||||
|
dynamodb_table = "terraform-state-lock"
|
||||||
|
}
|
||||||
|
required_version = ">= 1.0.0"
|
||||||
|
required_providers {
|
||||||
|
aws = {
|
||||||
|
source = "hashicorp/aws"
|
||||||
|
version = "5.42.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3
deploy/aws/outputs.tf
Normal file
3
deploy/aws/outputs.tf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
output "host_ip" {
|
||||||
|
value = aws_instance.instance.public_ip
|
||||||
|
}
|
10
deploy/aws/variables.tf
Normal file
10
deploy/aws/variables.tf
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
variable "ec2_size" {
|
||||||
|
type = string
|
||||||
|
description = "Size of instance to launch"
|
||||||
|
default = "t3a.small" # 2 GB RAM ($14/mo)
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "images_bucket" {
|
||||||
|
description = "Name of the bucket in which to store the NixOS VM images."
|
||||||
|
type = string
|
||||||
|
}
|
78
deploy/vultr/main.tf
Normal file
78
deploy/vultr/main.tf
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
terraform {
|
||||||
|
backend "s3" {
|
||||||
|
bucket = "noahmasur-terraform"
|
||||||
|
key = "arrow.tfstate"
|
||||||
|
region = "auto"
|
||||||
|
skip_credentials_validation = true
|
||||||
|
skip_metadata_api_check = true
|
||||||
|
skip_region_validation = true
|
||||||
|
skip_requesting_account_id = true
|
||||||
|
skip_s3_checksum = true
|
||||||
|
use_path_style = true
|
||||||
|
/*
|
||||||
|
ENVIRONMENT VARIABLES
|
||||||
|
---------------------
|
||||||
|
AWS_ACCESS_KEY_ID - R2 token
|
||||||
|
AWS_SECRET_ACCESS_KEY - R2 secret
|
||||||
|
AWS_ENDPOINT_URL_S3 - R2 location: https://ACCOUNT_ID.r2.cloudflarestorage.com
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
required_version = ">= 1.0.0"
|
||||||
|
required_providers {
|
||||||
|
aws = {
|
||||||
|
source = "hashicorp/aws"
|
||||||
|
version = "5.42.0"
|
||||||
|
}
|
||||||
|
vultr = {
|
||||||
|
source = "vultr/vultr"
|
||||||
|
version = "2.19.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "vultr_api_key" {
|
||||||
|
type = string
|
||||||
|
description = "API key for Vultr management"
|
||||||
|
sensitive = true
|
||||||
|
}
|
||||||
|
|
||||||
|
# https://api.vultr.com/v2/plans
|
||||||
|
variable "vultr_plan" {
|
||||||
|
type = string
|
||||||
|
description = "Size of instance to launch"
|
||||||
|
default = "vc2-1c-2gb" # 55 GB SSD ($10/mo)
|
||||||
|
}
|
||||||
|
|
||||||
|
provider "aws" {
|
||||||
|
region = "auto"
|
||||||
|
skip_credentials_validation = true
|
||||||
|
skip_metadata_api_check = true
|
||||||
|
skip_region_validation = true
|
||||||
|
skip_requesting_account_id = true
|
||||||
|
}
|
||||||
|
|
||||||
|
provider "vultr" {
|
||||||
|
api_key = var.vultr_api_key
|
||||||
|
}
|
||||||
|
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "vultr_instance" "arrow" {
|
||||||
|
plan = var.vultr_plan
|
||||||
|
region = "ewr"
|
||||||
|
iso_id = vultr_iso_private.image.id
|
||||||
|
label = "arrow"
|
||||||
|
tags = ["arrow"]
|
||||||
|
enable_ipv6 = false
|
||||||
|
disable_public_ipv4 = false
|
||||||
|
backups = "disabled"
|
||||||
|
ddos_protection = false
|
||||||
|
activation_email = false
|
||||||
|
}
|
||||||
|
|
||||||
|
output "host_ip" {
|
||||||
|
value = vultr_instance.arrow.main_ip
|
||||||
|
}
|
@ -1,5 +0,0 @@
|
|||||||
# Disks
|
|
||||||
|
|
||||||
These are my [disko](https://github.com/nix-community/disko) configurations,
|
|
||||||
which allow me to save desired disk formatting layouts as a declarative file so
|
|
||||||
I don't have to remember how to format my disks later on.
|
|
@ -1,42 +0,0 @@
|
|||||||
{ disk, ... }: {
|
|
||||||
disk = {
|
|
||||||
boot = {
|
|
||||||
type = "disk";
|
|
||||||
device = disk;
|
|
||||||
content = {
|
|
||||||
type = "table";
|
|
||||||
format = "gpt";
|
|
||||||
partitions = [
|
|
||||||
# Boot partition
|
|
||||||
{
|
|
||||||
name = "ESP";
|
|
||||||
start = "0";
|
|
||||||
end = "512MiB";
|
|
||||||
fs-type = "fat32";
|
|
||||||
bootable = true;
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "vfat";
|
|
||||||
mountpoint = "/boot";
|
|
||||||
extraArgs = [ "-n boot" ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
# Root partition ext4
|
|
||||||
{
|
|
||||||
name = "root";
|
|
||||||
start = "512MiB";
|
|
||||||
end = "100%";
|
|
||||||
part-type = "primary";
|
|
||||||
bootable = true;
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "ext4";
|
|
||||||
mountpoint = "/";
|
|
||||||
extraArgs = [ "-L nixos" ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,95 +0,0 @@
|
|||||||
{ pool, disks, ... }: {
|
|
||||||
disk = lib.genAttrs disks (disk: {
|
|
||||||
"${disk}" = {
|
|
||||||
type = "disk";
|
|
||||||
device = "/dev/${disk}";
|
|
||||||
content = {
|
|
||||||
type = "table";
|
|
||||||
format = "gpt";
|
|
||||||
partitions = [{
|
|
||||||
type = "partition";
|
|
||||||
name = "zfs";
|
|
||||||
start = "128MiB";
|
|
||||||
end = "100%";
|
|
||||||
content = {
|
|
||||||
type = "zfs";
|
|
||||||
pool = pool;
|
|
||||||
};
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
});
|
|
||||||
zpool = {
|
|
||||||
"${pool}" = {
|
|
||||||
type = "zpool";
|
|
||||||
mode = "raidz1";
|
|
||||||
rootFsOptions = {
|
|
||||||
compression = "on"; # lz4 by default
|
|
||||||
"com.sun:auto-snapshot" = "false";
|
|
||||||
ashift = "12";
|
|
||||||
};
|
|
||||||
# mountpoint = "/";
|
|
||||||
|
|
||||||
datasets = {
|
|
||||||
root = {
|
|
||||||
zfs_type = "filesystem";
|
|
||||||
mountpoint = null;
|
|
||||||
options."com.sun:auto-snapshot" = "false";
|
|
||||||
};
|
|
||||||
# "media/movies" = {
|
|
||||||
# zfs_type = "filesystem";
|
|
||||||
# mountpoint = "/media/movies";
|
|
||||||
# options.recordsize = "1M";
|
|
||||||
# };
|
|
||||||
# "media/tv" = {
|
|
||||||
# zfs_type = "filesystem";
|
|
||||||
# mountpoint = "/media/tv";
|
|
||||||
# options.recordsize = "1M";
|
|
||||||
# };
|
|
||||||
# "media/books" = {
|
|
||||||
# zfs_type = "filesystem";
|
|
||||||
# mountpoint = "/media/books";
|
|
||||||
# };
|
|
||||||
# archive = {
|
|
||||||
# zfs_type = "filesystem";
|
|
||||||
# mountpoint = "/archive";
|
|
||||||
# options.compression = "zstd";
|
|
||||||
# options."com.sun:auto-snapshot" = "true";
|
|
||||||
# };
|
|
||||||
# zfs_unmounted_fs = {
|
|
||||||
# zfs_type = "filesystem";
|
|
||||||
# options.mountpoint = "none";
|
|
||||||
# };
|
|
||||||
# zfs_legacy_fs = {
|
|
||||||
# zfs_type = "filesystem";
|
|
||||||
# options.mountpoint = "legacy";
|
|
||||||
# mountpoint = "/zfs_legacy_fs";
|
|
||||||
# };
|
|
||||||
# zfs_testvolume = {
|
|
||||||
# zfs_type = "volume";
|
|
||||||
# size = "10M";
|
|
||||||
# content = {
|
|
||||||
# type = "filesystem";
|
|
||||||
# format = "ext4";
|
|
||||||
# mountpoint = "/ext4onzfs";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# encrypted = {
|
|
||||||
# zfs_type = "filesystem";
|
|
||||||
# size = "20M";
|
|
||||||
# options = {
|
|
||||||
# mountpoint = "none";
|
|
||||||
# encryption = "aes-256-gcm";
|
|
||||||
# keyformat = "passphrase";
|
|
||||||
# keylocation = "file:///tmp/secret.key";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# "encrypted/test" = {
|
|
||||||
# zfs_type = "filesystem";
|
|
||||||
# size = "2M";
|
|
||||||
# mountpoint = "/zfs_crypted";
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -49,19 +49,25 @@ move the `windows/alacritty.yml` file to
|
|||||||
To get started on a bare macOS installation, first install Nix:
|
To get started on a bare macOS installation, first install Nix:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sh -c "$(curl -L https://nixos.org/nix/install)"
|
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
|
||||||
```
|
```
|
||||||
|
|
||||||
Then use Nix to build nix-darwin:
|
Launch a new shell. Then use Nix to switch to the macOS configuration:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
|
sudo rm /etc/bashrc
|
||||||
./result/bin/darwin-installer
|
sudo rm /etc/nix/nix.conf
|
||||||
|
export NIX_SSL_CERT_FILE="$HOME/Documents/t2-ca-bundle.pem"
|
||||||
|
nix \
|
||||||
|
--extra-experimental-features flakes \
|
||||||
|
--extra-experimental-features nix-command \
|
||||||
|
run nix-darwin -- switch \
|
||||||
|
--flake github:nmasur/dotfiles#lookingglass
|
||||||
```
|
```
|
||||||
|
|
||||||
Then switch to the macOS configuration:
|
Once installed, you can continue to update the macOS configuration:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
darwin-rebuild switch --flake github:nmasur/dotfiles#lookingglass
|
darwin-rebuild switch --flake ~/dev/personal/dotfiles
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -63,3 +63,20 @@ Use this mysqldump command:
|
|||||||
sudo -u nextcloud mysqldump -S /run/mysqld/mysqld.sock --default-character-set=utf8mb4 nextcloud > backup.sql
|
sudo -u nextcloud mysqldump -S /run/mysqld/mysqld.sock --default-character-set=utf8mb4 nextcloud > backup.sql
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Converting to Postgres
|
||||||
|
|
||||||
|
Same as MySQL, but run this command instead:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo -u nextcloud nextcloud-occ db:convert-type pgsql nextcloud /run/postgresql/ nextcloud
|
||||||
|
```
|
||||||
|
|
||||||
|
Then set the `dbtype` to `pgsql`.
|
||||||
|
|
||||||
|
## Backing Up Postgres Database
|
||||||
|
|
||||||
|
Use this pg_dump command:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo -u nextcloud pg_dump nextcloud > backup.sql
|
||||||
|
```
|
||||||
|
659
flake.lock
generated
659
flake.lock
generated
@ -1,85 +1,17 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"Comment-nvim-src": {
|
"cl-nix-lite": {
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681214440,
|
"lastModified": 1728174978,
|
||||||
"narHash": "sha256-48hy+hiaDJLlgWqC7IeZI3dT+VwWkRo4atQbyPxu/ys=",
|
"narHash": "sha256-Grqqg+xuicANB85j0gNEXxi9SBKY7bzGeTuyi95eGcY=",
|
||||||
"owner": "numToStr",
|
"owner": "hraban",
|
||||||
"repo": "Comment.nvim",
|
"repo": "cl-nix-lite",
|
||||||
"rev": "e51f2b142d88bb666dcaa77d93a07f4b419aca70",
|
"rev": "31cfe6275c341eb3120a99f4b1c8516c49a29d87",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "numToStr",
|
"owner": "hraban",
|
||||||
"ref": "v0.8.0",
|
"repo": "cl-nix-lite",
|
||||||
"repo": "Comment.nvim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"age": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1672087018,
|
|
||||||
"narHash": "sha256-LRxxJQLQkzoCNYGS/XBixVmYXoZ1mPHKvFicPGXYLcw=",
|
|
||||||
"owner": "FiloSottile",
|
|
||||||
"repo": "age",
|
|
||||||
"rev": "c6dcfa1efcaa27879762a934d5bea0d1b83a894c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "FiloSottile",
|
|
||||||
"ref": "v1.1.1",
|
|
||||||
"repo": "age",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"baleia-nvim-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681806450,
|
|
||||||
"narHash": "sha256-jxRlIzWbnSj89032msc5w+2TVt7zVyzlxdXxiH1dQqY=",
|
|
||||||
"owner": "m00qek",
|
|
||||||
"repo": "baleia.nvim",
|
|
||||||
"rev": "00bb4af31c8c3865b735d40ebefa6c3f07b2dd16",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "m00qek",
|
|
||||||
"repo": "baleia.nvim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"bufferline-nvim-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1687763763,
|
|
||||||
"narHash": "sha256-wbOeylzjjScQXkrDbBU2HtrOZrp2YUK+wQ2aOkgxmRQ=",
|
|
||||||
"owner": "akinsho",
|
|
||||||
"repo": "bufferline.nvim",
|
|
||||||
"rev": "bf2f6b7edd0abf6b0732f5e5c0a8f30e51611c75",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "akinsho",
|
|
||||||
"ref": "v4.2.0",
|
|
||||||
"repo": "bufferline.nvim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"cmp-nvim-lsp-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1687494203,
|
|
||||||
"narHash": "sha256-mU0soCz79erJXMMqD/FyrJZ0mu2n6fE0deymPzQlxts=",
|
|
||||||
"owner": "hrsh7th",
|
|
||||||
"repo": "cmp-nvim-lsp",
|
|
||||||
"rev": "44b16d11215dce86f253ce0c30949813c0a90765",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hrsh7th",
|
|
||||||
"repo": "cmp-nvim-lsp",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -90,11 +22,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696043447,
|
"lastModified": 1741229100,
|
||||||
"narHash": "sha256-VbJ1dY5pVH2fX1bS+cT2+4+BYEk4lMHRP0+udu9G6tk=",
|
"narHash": "sha256-0HwrTDXp9buEwal/1ymK9uQmzUD5ozIA7CJGqnT/gLs=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "792c2e01347cb1b2e7ec84a1ef73453ca86537d8",
|
"rev": "adf5c88ba1fe21af5c083b4d655004431f20c5ab",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -111,11 +43,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1695864092,
|
"lastModified": 1740485968,
|
||||||
"narHash": "sha256-Hu1SkFPqO7ND95AOzBkZE2jGXSYhfZ965C03O72Kbu8=",
|
"narHash": "sha256-WK+PZHbfDjLyveXAxpnrfagiFgZWaTJglewBWniTn2Y=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "19b62324663b6b9859caf7f335d232cf4f1f6a32",
|
"rev": "19c1140419c4f1cdf88ad4c1cfb6605597628940",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -124,34 +56,31 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"firefox-darwin": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1696034364,
|
|
||||||
"narHash": "sha256-7giewUYqKhhfhKRxe2EPHCpSM0oMLuByW4RTRZl6Jfc=",
|
|
||||||
"owner": "bandithedoge",
|
|
||||||
"repo": "nixpkgs-firefox-darwin",
|
|
||||||
"rev": "b1e4d451a15c34d45bfefb05137a20469399a2df",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "bandithedoge",
|
|
||||||
"repo": "nixpkgs-firefox-darwin",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673956053,
|
"lastModified": 1730663653,
|
||||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
"narHash": "sha256-kFCUWettiFHDIqxCWWQ9qY8pVh+Lj+XL0Giyy/kdomg=",
|
||||||
|
"owner": "hraban",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "e5b16676185cb7548581c852f51ce7f3a49bba5e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hraban",
|
||||||
|
"ref": "fixed-output",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat_2": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733328505,
|
||||||
|
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -160,22 +89,45 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems"
|
"nixpkgs-lib": [
|
||||||
|
"nur",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687709756,
|
"lastModified": 1733312601,
|
||||||
"narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
|
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||||
"owner": "numtide",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-parts",
|
||||||
"rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
|
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": [
|
||||||
|
"mac-app-util",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "flake-utils",
|
||||||
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_2": {
|
"flake-utils_2": {
|
||||||
@ -183,11 +135,11 @@
|
|||||||
"systems": "systems_2"
|
"systems": "systems_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685518550,
|
"lastModified": 1705309234,
|
||||||
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -196,40 +148,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_3": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems_3"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1694529238,
|
|
||||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hmts-nvim-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1693226725,
|
|
||||||
"narHash": "sha256-jUuztOqNBltC3axa7s3CPJz9Cmukfwkf846+Z/gAxCU=",
|
|
||||||
"owner": "calops",
|
|
||||||
"repo": "hmts.nvim",
|
|
||||||
"rev": "14fd941d7ec2bb98314a1aacaa2573d97f1629ab",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "calops",
|
|
||||||
"repo": "hmts.nvim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@ -237,11 +155,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696063111,
|
"lastModified": 1741378606,
|
||||||
"narHash": "sha256-F2IJEbyH3xG0eqyAYn9JoV+niqNz+xb4HICYNkkviNI=",
|
"narHash": "sha256-ytDmwV93lZ1f6jswJkxEQz5cBlwje/2rH/yUZDADZNs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "ae896c810f501bf0c3a2fd7fc2de094dd0addf01",
|
"rev": "95711f926676018d279ba09fe7530d03b5d5b3e2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -251,63 +169,80 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"mac-app-util": {
|
||||||
|
"inputs": {
|
||||||
|
"cl-nix-lite": "cl-nix-lite",
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1739821351,
|
||||||
|
"narHash": "sha256-QlVtMzAhECs9Esq3txqVW7/vM78ipB5IcI8uyCbTP7A=",
|
||||||
|
"owner": "hraban",
|
||||||
|
"repo": "mac-app-util",
|
||||||
|
"rev": "c00d5b21ca1fdab8acef65e696795f0f15ec1158",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hraban",
|
||||||
|
"repo": "mac-app-util",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nextcloud-cookbook": {
|
"nextcloud-cookbook": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"narHash": "sha256-XgBwUr26qW6wvqhrnhhhhcN4wkI+eXDHnNSm1HDbP6M=",
|
"lastModified": 1726214817,
|
||||||
|
"narHash": "sha256-Pfa+Xbopg20os+pnGgg+wpEX1MI5fz5JMb0K4a8rBhs=",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/nextcloud/cookbook/releases/download/v0.10.2/Cookbook-0.10.2.tar.gz"
|
"url": "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.2/cookbook-0.11.2.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/nextcloud/cookbook/releases/download/v0.10.2/Cookbook-0.10.2.tar.gz"
|
"url": "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.2/cookbook-0.11.2.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nextcloud-external": {
|
"nextcloud-external": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"narHash": "sha256-X7eC8T8wSZGVwCQp6U/WxjMC7aIj39osgHotaUoRNSQ=",
|
"lastModified": 1729501365,
|
||||||
|
"narHash": "sha256-OV6HhFBzmnQBO5btGEnqmKlaUMY7/t2Qm3XebclpBlM=",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/nextcloud-releases/external/releases/download/v5.2.1/external-v5.2.1.tar.gz"
|
"url": "https://github.com/nextcloud-releases/external/releases/download/v5.5.2/external-v5.5.2.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/nextcloud-releases/external/releases/download/v5.2.1/external-v5.2.1.tar.gz"
|
"url": "https://github.com/nextcloud-releases/external/releases/download/v5.5.2/external-v5.5.2.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nextcloud-news": {
|
"nextcloud-news": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"narHash": "sha256-cfJkKRNSz15L4E3w1tnEb+t4MrVwVzb8lb6vCOA4cK4=",
|
"lastModified": 1729667622,
|
||||||
|
"narHash": "sha256-pnvyMZQ+NYMgH0Unfh5S19HdZSjnghgoUDAoi2KIXNI=",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/nextcloud/news/releases/download/24.0.0/news.tar.gz"
|
"url": "https://github.com/nextcloud/news/releases/download/25.0.0-alpha12/news.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/nextcloud/news/releases/download/24.0.0/news.tar.gz"
|
"url": "https://github.com/nextcloud/news/releases/download/25.0.0-alpha12/news.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nil": {
|
"nextcloud-snappymail": {
|
||||||
"inputs": {
|
"flake": false,
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"rust-overlay": "rust-overlay"
|
|
||||||
},
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1691372739,
|
"lastModified": 1728502660,
|
||||||
"narHash": "sha256-fZ8KfBMcIFO/R7xaWtB85SFeuUjb9SCH8fxYBnY8068=",
|
"narHash": "sha256-oCw6Brs85rINBHvz3UJXheyLVqvA3RgPXG03b30Fx7E=",
|
||||||
"owner": "oxalica",
|
"type": "tarball",
|
||||||
"repo": "nil",
|
"url": "https://snappymail.eu/repository/nextcloud/snappymail-2.38.2-nextcloud.tar.gz"
|
||||||
"rev": "97abe7d3d48721d4e0fcc1876eea83bb4247825b",
|
|
||||||
"type": "github"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "oxalica",
|
"type": "tarball",
|
||||||
"ref": "2023-08-09",
|
"url": "https://snappymail.eu/repository/nextcloud/snappymail-2.38.2-nextcloud.tar.gz"
|
||||||
"repo": "nil",
|
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix2vim": {
|
"nix2vim": {
|
||||||
@ -318,11 +253,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685980282,
|
"lastModified": 1740943170,
|
||||||
"narHash": "sha256-uQyVaoqkiocA8bXKMfrgizuKmz0hUzHye5owFoUd2AQ=",
|
"narHash": "sha256-A0F7T/euSMen004cVQN/ZkMpLkgLXDs+mq/merhd+0Y=",
|
||||||
"owner": "gytis-ivaskevicius",
|
"owner": "gytis-ivaskevicius",
|
||||||
"repo": "nix2vim",
|
"repo": "nix2vim",
|
||||||
"rev": "3836a348503ae27340c7f83f0bc7bcb907f3781d",
|
"rev": "a562f32ff2393d0ed198103c65a3035bcdf83d4d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -333,11 +268,11 @@
|
|||||||
},
|
},
|
||||||
"nixlib": {
|
"nixlib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1693701915,
|
"lastModified": 1736643958,
|
||||||
"narHash": "sha256-waHPLdDYUOHSEtMKKabcKIMhlUOHPOOPQ9UyFeEoovs=",
|
"narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "f5af57d3ef9947a70ac86e42695231ac1ad00c25",
|
"rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -354,11 +289,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696058303,
|
"lastModified": 1740947705,
|
||||||
"narHash": "sha256-eNqKWpF5zG0SrgbbtljFOrRgFgRzCc4++TMFADBMLnc=",
|
"narHash": "sha256-Co2kAD2SZalOm+5zoxmzEVZNvZ17TyafuFsD46BwSdY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixos-generators",
|
"repo": "nixos-generators",
|
||||||
"rev": "150f38bd1e09e20987feacb1b0d5991357532fb5",
|
"rev": "507911df8c35939050ae324caccc7cf4ffb76565",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -369,11 +304,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1695830400,
|
"lastModified": 1741246872,
|
||||||
"narHash": "sha256-gToZXQVr0G/1WriO83olnqrLSHF2Jb8BPcmCt497ro0=",
|
"narHash": "sha256-Q6pMP4a9ed636qilcYX8XUguvKl/0/LGXhHcRI91p0U=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "8a86b98f0ba1c405358f1b71ff8b5e1d317f5db2",
|
"rev": "10069ef4cf863633f57238f179a0297de84bd8d3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -383,61 +318,36 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-keyd": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1690363189,
|
"lastModified": 1735563628,
|
||||||
"narHash": "sha256-Zs0VkngOtQz7nIEO7Wi8AwGB4TBSex2KZAw784aOm2M=",
|
"narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=",
|
||||||
"owner": "JohnAZoidberg",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6591d332f93422e388ef6337f6b362b4ff8d0724",
|
"rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "JohnAZoidberg",
|
"owner": "nixos",
|
||||||
"ref": "keyd-2.4.3",
|
"ref": "nixos-24.05",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1695825837,
|
|
||||||
"narHash": "sha256-4Ne11kNRnQsmSJCRSSNkFRSnHC4Y5gPDBIQGjjPfJiU=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "5cfafa12d57374f48bcc36fda3274ada276cf69e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-23.05",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"null-ls-nvim-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1691810493,
|
|
||||||
"narHash": "sha256-cWA0rzkOp/ekVKaFee7iea1lhnqKtWUIU+fW5M950wI=",
|
|
||||||
"owner": "jose-elias-alvarez",
|
|
||||||
"repo": "null-ls.nvim",
|
|
||||||
"rev": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "jose-elias-alvarez",
|
|
||||||
"repo": "null-ls.nvim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nur": {
|
"nur": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"treefmt-nix": "treefmt-nix"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696080597,
|
"lastModified": 1741383898,
|
||||||
"narHash": "sha256-fhf7+NT/xMwPZ/sRT30lnI04AHgf7tLPU4ClMux1nWA=",
|
"narHash": "sha256-hIiLfvj0qZjBLhk5eBhIv8SZJ+bI8d06Hxp480mJ1aI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "8783c360abc69f58d46a2929534ddd91eb41f3c6",
|
"rev": "54352c3c3110f34e71a2ae9a0210aa6955555760",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -446,146 +356,44 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nvim-lspconfig-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1675639052,
|
|
||||||
"narHash": "sha256-B8IgpypxzCACZ5VcqM6KiWyClaN+KrmemtkwMznmj5Y=",
|
|
||||||
"owner": "neovim",
|
|
||||||
"repo": "nvim-lspconfig",
|
|
||||||
"rev": "255e07ce2a05627d482d2de77308bba51b90470c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "neovim",
|
|
||||||
"ref": "v0.1.6",
|
|
||||||
"repo": "nvim-lspconfig",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nvim-tree-lua-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1695716495,
|
|
||||||
"narHash": "sha256-Fkchn7UuIHPmVFFrx1kzsE2lviJrAFAe9tHu73HnS/w=",
|
|
||||||
"owner": "kyazdani42",
|
|
||||||
"repo": "nvim-tree.lua",
|
|
||||||
"rev": "934469b9b6df369e198fb3016969e56393b0dc07",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "kyazdani42",
|
|
||||||
"repo": "nvim-tree.lua",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nvim-treesitter-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1696061053,
|
|
||||||
"narHash": "sha256-KR+VMYTVM2qsLPx412gySAKiGObhs+awbDJhWX72/wY=",
|
|
||||||
"owner": "nvim-treesitter",
|
|
||||||
"repo": "nvim-treesitter",
|
|
||||||
"rev": "dd4e2dbc002dfce109d621e8bdcd9d89438b0a32",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nvim-treesitter",
|
|
||||||
"ref": "master",
|
|
||||||
"repo": "nvim-treesitter",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"proton-ge": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"narHash": "sha256-75A0VCVdYkiMQ1duE9r2+DLBJzV02vUozoVLeo/TIWQ=",
|
|
||||||
"type": "tarball",
|
|
||||||
"url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-16/GE-Proton8-16.tar.gz"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"type": "tarball",
|
|
||||||
"url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-16/GE-Proton8-16.tar.gz"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"Comment-nvim-src": "Comment-nvim-src",
|
|
||||||
"age": "age",
|
|
||||||
"baleia-nvim-src": "baleia-nvim-src",
|
|
||||||
"bufferline-nvim-src": "bufferline-nvim-src",
|
|
||||||
"cmp-nvim-lsp-src": "cmp-nvim-lsp-src",
|
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"firefox-darwin": "firefox-darwin",
|
|
||||||
"hmts-nvim-src": "hmts-nvim-src",
|
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"mac-app-util": "mac-app-util",
|
||||||
"nextcloud-cookbook": "nextcloud-cookbook",
|
"nextcloud-cookbook": "nextcloud-cookbook",
|
||||||
"nextcloud-external": "nextcloud-external",
|
"nextcloud-external": "nextcloud-external",
|
||||||
"nextcloud-news": "nextcloud-news",
|
"nextcloud-news": "nextcloud-news",
|
||||||
"nil": "nil",
|
"nextcloud-snappymail": "nextcloud-snappymail",
|
||||||
"nix2vim": "nix2vim",
|
"nix2vim": "nix2vim",
|
||||||
"nixos-generators": "nixos-generators",
|
"nixos-generators": "nixos-generators",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-keyd": "nixpkgs-keyd",
|
"nixpkgs-stable": "nixpkgs-stable",
|
||||||
"null-ls-nvim-src": "null-ls-nvim-src",
|
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"nvim-lspconfig-src": "nvim-lspconfig-src",
|
|
||||||
"nvim-tree-lua-src": "nvim-tree-lua-src",
|
|
||||||
"nvim-treesitter-src": "nvim-treesitter-src",
|
|
||||||
"proton-ge": "proton-ge",
|
|
||||||
"telescope-nvim-src": "telescope-nvim-src",
|
|
||||||
"telescope-project-nvim-src": "telescope-project-nvim-src",
|
|
||||||
"toggleterm-nvim-src": "toggleterm-nvim-src",
|
|
||||||
"tree-sitter-bash": "tree-sitter-bash",
|
"tree-sitter-bash": "tree-sitter-bash",
|
||||||
"tree-sitter-ini": "tree-sitter-ini",
|
"tree-sitter-ini": "tree-sitter-ini",
|
||||||
"tree-sitter-lua": "tree-sitter-lua",
|
"tree-sitter-lua": "tree-sitter-lua",
|
||||||
"tree-sitter-puppet": "tree-sitter-puppet",
|
"tree-sitter-puppet": "tree-sitter-puppet",
|
||||||
"tree-sitter-python": "tree-sitter-python",
|
"tree-sitter-python": "tree-sitter-python",
|
||||||
"tree-sitter-rasi": "tree-sitter-rasi",
|
"tree-sitter-rasi": "tree-sitter-rasi",
|
||||||
"vscode-terraform-snippets": "vscode-terraform-snippets",
|
"tree-sitter-vimdoc": "tree-sitter-vimdoc",
|
||||||
"wallpapers": "wallpapers",
|
|
||||||
"wsl": "wsl",
|
"wsl": "wsl",
|
||||||
"zenyd-mpv-scripts": "zenyd-mpv-scripts"
|
"zenyd-mpv-scripts": "zenyd-mpv-scripts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": [
|
|
||||||
"nil",
|
|
||||||
"flake-utils"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"nil",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1688783586,
|
|
||||||
"narHash": "sha256-HHaM2hk2azslv1kH8zmQxXo2e7i5cKgzNIuK4yftzB0=",
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"rev": "7a29283cc242c2486fc67f60b431ef708046d176",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1689347925,
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
"narHash": "sha256-ozenz5bFe1UUqOn7f60HRmgc01BgTGIKZ4Xl+HbocGQ=",
|
||||||
"owner": "nix-systems",
|
"owner": "nix-systems",
|
||||||
"repo": "default",
|
"repo": "default-darwin",
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
"rev": "2235d7e6cc29ae99878133c95e9fe5e157661ffb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-systems",
|
"owner": "nix-systems",
|
||||||
"repo": "default",
|
"repo": "default-darwin",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -604,79 +412,14 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems_3": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"telescope-nvim-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1686302912,
|
|
||||||
"narHash": "sha256-fV3LLRwAPykVGc4ImOnUSP+WTrPp9Ad9OTfBJ6wqTMk=",
|
|
||||||
"owner": "nvim-telescope",
|
|
||||||
"repo": "telescope.nvim",
|
|
||||||
"rev": "776b509f80dd49d8205b9b0d94485568236d1192",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nvim-telescope",
|
|
||||||
"ref": "0.1.2",
|
|
||||||
"repo": "telescope.nvim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"telescope-project-nvim-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1682606566,
|
|
||||||
"narHash": "sha256-H6lrPjpOUVleKHB0ziI+6dthg9ymitHhEWtcgYJTrKo=",
|
|
||||||
"owner": "nvim-telescope",
|
|
||||||
"repo": "telescope-project.nvim",
|
|
||||||
"rev": "7c64b181dd4e72deddcf6f319e3bf1e95b2a2f30",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nvim-telescope",
|
|
||||||
"repo": "telescope-project.nvim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"toggleterm-nvim-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1685434104,
|
|
||||||
"narHash": "sha256-oiCnBrvft6XxiQtQH8E4F842xhh348SaTpHzaeb+iDY=",
|
|
||||||
"owner": "akinsho",
|
|
||||||
"repo": "toggleterm.nvim",
|
|
||||||
"rev": "95204ece0f2a54c89c4395295432f9aeedca7b5f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "akinsho",
|
|
||||||
"ref": "v2.7.0",
|
|
||||||
"repo": "toggleterm.nvim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tree-sitter-bash": {
|
"tree-sitter-bash": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1695263734,
|
"lastModified": 1738310128,
|
||||||
"narHash": "sha256-dJUJGrpBWBLjcqiqxCnJ/MENwa2+uxAmQD71aYloxsw=",
|
"narHash": "sha256-ODWgFpCLLPgzNYXFhfAVvDXPr5bW8/49ezsaS9MOWMk=",
|
||||||
"owner": "tree-sitter",
|
"owner": "tree-sitter",
|
||||||
"repo": "tree-sitter-bash",
|
"repo": "tree-sitter-bash",
|
||||||
"rev": "fd4e40dab883d6456da4d847de8321aee9c80805",
|
"rev": "0c46d792d54c536be5ff7eb18eb95c70fccdb232",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -689,11 +432,11 @@
|
|||||||
"tree-sitter-ini": {
|
"tree-sitter-ini": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1690815608,
|
"lastModified": 1725233451,
|
||||||
"narHash": "sha256-IIpKzpA4q1jpYVZ75VZaxWHaqNt8TA427eMOui2s71M=",
|
"narHash": "sha256-G11Aynq2rnkRwdkhspjYqtBD/h5k4aD+NvuE0QfploU=",
|
||||||
"owner": "justinmk",
|
"owner": "justinmk",
|
||||||
"repo": "tree-sitter-ini",
|
"repo": "tree-sitter-ini",
|
||||||
"rev": "7f11a02fb8891482068e0fe419965d7bade81a68",
|
"rev": "962568c9efa71d25720ab42c5d36e222626ef3a6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -705,11 +448,11 @@
|
|||||||
"tree-sitter-lua": {
|
"tree-sitter-lua": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694072484,
|
"lastModified": 1738303275,
|
||||||
"narHash": "sha256-5t5w8KqbefInNbA12/jpNzmky/uOUhsLjKdEqpl1GEc=",
|
"narHash": "sha256-mE84uI5AKbLvX5CM7NvA59Z8Ux+QFdqVjZf4hi06NAM=",
|
||||||
"owner": "MunifTanjim",
|
"owner": "MunifTanjim",
|
||||||
"repo": "tree-sitter-lua",
|
"repo": "tree-sitter-lua",
|
||||||
"rev": "9668709211b2e683f27f414454a8b51bf0a6bda1",
|
"rev": "68d29aa745b68ae22cbbdb5dcb68c20232521ff6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -722,11 +465,11 @@
|
|||||||
"tree-sitter-puppet": {
|
"tree-sitter-puppet": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1690231696,
|
"lastModified": 1734835631,
|
||||||
"narHash": "sha256-YEjjy9WLwITERYqoeSVrRYnwVBIAwdc4o0lvAK9wizw=",
|
"narHash": "sha256-bO5g5AdhzpB13yHklpAndUHIX7Rvd7OMjH0Ds2ATA6Q=",
|
||||||
"owner": "amaanq",
|
"owner": "amaanq",
|
||||||
"repo": "tree-sitter-puppet",
|
"repo": "tree-sitter-puppet",
|
||||||
"rev": "9ce9a5f7d64528572aaa8d59459ba869e634086b",
|
"rev": "15f192929b7d317f5914de2b4accd37b349182a6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -738,11 +481,11 @@
|
|||||||
"tree-sitter-python": {
|
"tree-sitter-python": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1695282953,
|
"lastModified": 1738275152,
|
||||||
"narHash": "sha256-gRhD3M1DkmwYQDDnyRq6QMTWUJUY0vbetGnN+pBTd84=",
|
"narHash": "sha256-t9etfZcrliF7f9hfiomh2U9P+3ufAm8iSK1y9rOhP7s=",
|
||||||
"owner": "tree-sitter",
|
"owner": "tree-sitter",
|
||||||
"repo": "tree-sitter-python",
|
"repo": "tree-sitter-python",
|
||||||
"rev": "a901729099257aac932d79c60adb5e8a53fa7e6c",
|
"rev": "710796b8b877a970297106e5bbc8e2afa47f86ec",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -755,11 +498,11 @@
|
|||||||
"tree-sitter-rasi": {
|
"tree-sitter-rasi": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1678701563,
|
"lastModified": 1716296585,
|
||||||
"narHash": "sha256-2nYZoLcrxxxiOJEySwHUm93lzMg8mU+V7LIP63ntFdA=",
|
"narHash": "sha256-sPrIVgGGaBaXeqHNxjcdJ/S2FvxyV6rD9UPKU/tpspw=",
|
||||||
"owner": "Fymyte",
|
"owner": "Fymyte",
|
||||||
"repo": "tree-sitter-rasi",
|
"repo": "tree-sitter-rasi",
|
||||||
"rev": "371dac6bcce0df5566c1cfebde69d90ecbeefd2d",
|
"rev": "6c9bbcfdf5f0f553d9ebc01750a3aa247a37b8aa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -768,50 +511,56 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vscode-terraform-snippets": {
|
"tree-sitter-vimdoc": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1614849738,
|
"lastModified": 1729686839,
|
||||||
"narHash": "sha256-v392tyzXV+zyBNt5OCB2NBCK7JcByrTa5Ne/nFtSCJI=",
|
"narHash": "sha256-Vrl4/cZL+TWlUMEeWZoHCAWhvlefcl3ajGcwyTNKOhI=",
|
||||||
"owner": "run-at-scale",
|
"owner": "neovim",
|
||||||
"repo": "vscode-terraform-doc-snippets",
|
"repo": "tree-sitter-vimdoc",
|
||||||
"rev": "6ab3e44b566e660f38922cf908e6e547eaa5d4b4",
|
"rev": "d2e4b5c172a109966c2ce0378f73df6cede39400",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "run-at-scale",
|
"owner": "neovim",
|
||||||
"repo": "vscode-terraform-doc-snippets",
|
"repo": "tree-sitter-vimdoc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"wallpapers": {
|
"treefmt-nix": {
|
||||||
"flake": false,
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nur",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1657544922,
|
"lastModified": 1733222881,
|
||||||
"narHash": "sha256-1c1uDz37MhksWC75myv6jao5q2mIzD8X8I+TykXXmWg=",
|
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
|
||||||
"owner": "exorcist365",
|
"owner": "numtide",
|
||||||
"repo": "wallpapers",
|
"repo": "treefmt-nix",
|
||||||
"rev": "8d2860ac6c05cec0f78d5c9d07510f4ff5da90dc",
|
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
|
||||||
"type": "gitlab"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "exorcist365",
|
"owner": "numtide",
|
||||||
"repo": "wallpapers",
|
"repo": "treefmt-nix",
|
||||||
"type": "gitlab"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"wsl": {
|
"wsl": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat_2",
|
||||||
"flake-utils": "flake-utils_3",
|
"nixpkgs": [
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696053802,
|
"lastModified": 1741192150,
|
||||||
"narHash": "sha256-8TTbJbtGDz1MstExrVQe56eXZpovvZv6G6L6q/4NOKg=",
|
"narHash": "sha256-wB140alXVla1Rw/kENerUoma2qO1Jy5IYWbmiSqmJu0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"rev": "cadde47d123d1a534c272b04a7582f1d11474c48",
|
"rev": "0e4ccdb8181da2c6193c047b50ffee5f1a3b6dc1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -823,11 +572,11 @@
|
|||||||
"zenyd-mpv-scripts": {
|
"zenyd-mpv-scripts": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1650625438,
|
"lastModified": 1707704915,
|
||||||
"narHash": "sha256-OBCuzCtgfSwj0i/rBNranuu4LRc47jObwQIJgQQoerg=",
|
"narHash": "sha256-9P/8q/OZXfaJMS08acQP4h3/zUA5mKRQee0JmkXcz1w=",
|
||||||
"owner": "zenyd",
|
"owner": "zenyd",
|
||||||
"repo": "mpv-scripts",
|
"repo": "mpv-scripts",
|
||||||
"rev": "19ea069abcb794d1bf8fac2f59b50d71ab992130",
|
"rev": "9bdce0050144cb24f92475f7bdd77180e0e4c26b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
582
flake.nix
582
flake.nix
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
description = "My system";
|
description = "An opinionated flake containing the NixOS, nix-darwin, and home-manager configurations for multiple systems.";
|
||||||
|
|
||||||
# Other flakes that we want to pull from
|
# Other flakes that we want to pull from
|
||||||
inputs = {
|
inputs = {
|
||||||
@ -7,46 +7,56 @@
|
|||||||
# Used for system packages
|
# Used for system packages
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
# Update to keyd 2.4.3 not yet in nixpkgs-unstable
|
# Used for specific stable packages
|
||||||
# https://github.com/NixOS/nixpkgs/pull/245327
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||||
nixpkgs-keyd.url = "github:JohnAZoidberg/nixpkgs/keyd-2.4.3";
|
|
||||||
|
|
||||||
# Used for MacOS system config
|
# Used for MacOS system config
|
||||||
darwin = {
|
darwin = {
|
||||||
url = "github:/lnl7/nix-darwin/master";
|
url = "github:lnl7/nix-darwin/master";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Used for Windows Subsystem for Linux compatibility
|
# Used for Windows Subsystem for Linux compatibility
|
||||||
wsl.url = "github:nix-community/NixOS-WSL";
|
wsl = {
|
||||||
|
url = "github:nix-community/NixOS-WSL";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
# Used for user packages and dotfiles
|
# Used for user packages and dotfiles
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/master";
|
url = "github:nix-community/home-manager/master";
|
||||||
inputs.nixpkgs.follows =
|
inputs.nixpkgs.follows = "nixpkgs"; # Use system packages list for their inputs
|
||||||
"nixpkgs"; # Use system packages list for their inputs
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Community packages; used for Firefox extensions
|
# Community packages; used for Firefox extensions
|
||||||
nur.url = "github:nix-community/nur";
|
nur = {
|
||||||
|
url = "github:nix-community/nur";
|
||||||
# Use official Firefox binary for macOS
|
|
||||||
firefox-darwin = {
|
|
||||||
url = "github:bandithedoge/nixpkgs-firefox-darwin";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# # Use official Firefox binary for macOS
|
||||||
|
# firefox-darwin = {
|
||||||
|
# url = "github:bandithedoge/nixpkgs-firefox-darwin";
|
||||||
|
# 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
|
# Manage disk format and partitioning
|
||||||
disko = {
|
disko = {
|
||||||
url = "github:nix-community/disko";
|
url = "github:nix-community/disko";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Wallpapers
|
# # Wallpapers
|
||||||
wallpapers = {
|
# wallpapers = {
|
||||||
url = "gitlab:exorcist365/wallpapers";
|
# url = "gitlab:exorcist365/wallpapers";
|
||||||
flake = false;
|
# flake = false;
|
||||||
};
|
# };
|
||||||
|
|
||||||
# Used to generate NixOS images for other platforms
|
# Used to generate NixOS images for other platforms
|
||||||
nixos-generators = {
|
nixos-generators = {
|
||||||
@ -60,67 +70,74 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Nix language server
|
# # Neovim plugins
|
||||||
nil = {
|
# base16-nvim-src = {
|
||||||
url = "github:oxalica/nil/2023-08-09";
|
# url = "github:RRethy/base16-nvim";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
# flake = false;
|
||||||
};
|
# };
|
||||||
|
# nvim-lspconfig-src = {
|
||||||
# Neovim plugins
|
# # https://github.com/neovim/nvim-lspconfig/tags
|
||||||
nvim-lspconfig-src = {
|
# url = "github:neovim/nvim-lspconfig/v0.1.8";
|
||||||
# https://github.com/neovim/nvim-lspconfig/tags
|
# flake = false;
|
||||||
url = "github:neovim/nvim-lspconfig/v0.1.6";
|
# };
|
||||||
flake = false;
|
# cmp-nvim-lsp-src = {
|
||||||
};
|
# url = "github:hrsh7th/cmp-nvim-lsp";
|
||||||
cmp-nvim-lsp-src = {
|
# flake = false;
|
||||||
url = "github:hrsh7th/cmp-nvim-lsp";
|
# };
|
||||||
flake = false;
|
# baleia-nvim-src = {
|
||||||
};
|
# # https://github.com/m00qek/baleia.nvim/tags
|
||||||
null-ls-nvim-src = {
|
# url = "github:m00qek/baleia.nvim";
|
||||||
url = "github:jose-elias-alvarez/null-ls.nvim";
|
# flake = false;
|
||||||
flake = false;
|
# };
|
||||||
};
|
# nvim-treesitter-src = {
|
||||||
baleia-nvim-src = {
|
# # https://github.com/nvim-treesitter/nvim-treesitter/tags
|
||||||
url = "github:m00qek/baleia.nvim";
|
# url = "github:nvim-treesitter/nvim-treesitter/v0.9.2";
|
||||||
flake = false;
|
# flake = false;
|
||||||
};
|
# };
|
||||||
Comment-nvim-src = {
|
# telescope-nvim-src = {
|
||||||
url = "github:numToStr/Comment.nvim/v0.8.0";
|
# # https://github.com/nvim-telescope/telescope.nvim/releases
|
||||||
flake = false;
|
# url = "github:nvim-telescope/telescope.nvim/0.1.8";
|
||||||
};
|
# flake = false;
|
||||||
nvim-treesitter-src = {
|
# };
|
||||||
# https://github.com/nvim-treesitter/nvim-treesitter/tags
|
# telescope-project-nvim-src = {
|
||||||
url = "github:nvim-treesitter/nvim-treesitter/master";
|
# url = "github:nvim-telescope/telescope-project.nvim";
|
||||||
flake = false;
|
# flake = false;
|
||||||
};
|
# };
|
||||||
telescope-nvim-src = {
|
# toggleterm-nvim-src = {
|
||||||
url = "github:nvim-telescope/telescope.nvim/0.1.2";
|
# # https://github.com/akinsho/toggleterm.nvim/tags
|
||||||
flake = false;
|
# url = "github:akinsho/toggleterm.nvim/v2.12.0";
|
||||||
};
|
# flake = false;
|
||||||
telescope-project-nvim-src = {
|
# };
|
||||||
url = "github:nvim-telescope/telescope-project.nvim";
|
# bufferline-nvim-src = {
|
||||||
flake = false;
|
# # https://github.com/akinsho/bufferline.nvim/releases
|
||||||
};
|
# url = "github:akinsho/bufferline.nvim/v4.6.1";
|
||||||
toggleterm-nvim-src = {
|
# flake = false;
|
||||||
url = "github:akinsho/toggleterm.nvim/v2.7.0";
|
# };
|
||||||
flake = false;
|
# nvim-tree-lua-src = {
|
||||||
};
|
# url = "github:kyazdani42/nvim-tree.lua";
|
||||||
bufferline-nvim-src = {
|
# flake = false;
|
||||||
url = "github:akinsho/bufferline.nvim/v4.2.0";
|
# };
|
||||||
flake = false;
|
# hmts-nvim-src = {
|
||||||
};
|
# url = "github:calops/hmts.nvim";
|
||||||
nvim-tree-lua-src = {
|
# flake = false;
|
||||||
url = "github:kyazdani42/nvim-tree.lua";
|
# };
|
||||||
flake = false;
|
# fidget-nvim-src = {
|
||||||
};
|
# # https://github.com/j-hui/fidget.nvim/tags
|
||||||
vscode-terraform-snippets = {
|
# url = "github:j-hui/fidget.nvim/v1.4.5";
|
||||||
url = "github:run-at-scale/vscode-terraform-doc-snippets";
|
# flake = false;
|
||||||
flake = false;
|
# };
|
||||||
};
|
# nvim-lint-src = {
|
||||||
hmts-nvim-src = {
|
# url = "github:mfussenegger/nvim-lint";
|
||||||
url = "github:calops/hmts.nvim";
|
# flake = false;
|
||||||
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 Grammars
|
||||||
tree-sitter-bash = {
|
tree-sitter-bash = {
|
||||||
@ -147,6 +164,10 @@
|
|||||||
url = "github:Fymyte/tree-sitter-rasi";
|
url = "github:Fymyte/tree-sitter-rasi";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
tree-sitter-vimdoc = {
|
||||||
|
url = "github:neovim/tree-sitter-vimdoc";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
# MPV Scripts
|
# MPV Scripts
|
||||||
zenyd-mpv-scripts = {
|
zenyd-mpv-scripts = {
|
||||||
@ -154,201 +175,312 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Age encryption (pin because of failed builds)
|
# # Git alternative
|
||||||
age = {
|
# # Fixes: https://github.com/martinvonz/jj/issues/4784
|
||||||
url = "github:FiloSottile/age/v1.1.1";
|
# jujutsu = {
|
||||||
flake = false;
|
# url = "github:martinvonz/jj";
|
||||||
};
|
# inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
# };
|
||||||
# GE version of Proton for game compatibility
|
|
||||||
# Alternatively, could consider using https://github.com/fufexan/nix-gaming
|
|
||||||
proton-ge = {
|
|
||||||
# https://github.com/GloriousEggroll/proton-ge-custom/releases
|
|
||||||
url =
|
|
||||||
"https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-16/GE-Proton8-16.tar.gz";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Nextcloud Apps
|
# Nextcloud Apps
|
||||||
nextcloud-news = {
|
nextcloud-news = {
|
||||||
# https://github.com/nextcloud/news/releases
|
# https://github.com/nextcloud/news/releases
|
||||||
url =
|
url = "https://github.com/nextcloud/news/releases/download/25.0.0-alpha12/news.tar.gz";
|
||||||
"https://github.com/nextcloud/news/releases/download/24.0.0/news.tar.gz";
|
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
nextcloud-external = {
|
nextcloud-external = {
|
||||||
# https://github.com/nextcloud-releases/external/releases
|
# https://github.com/nextcloud-releases/external/releases
|
||||||
url =
|
url = "https://github.com/nextcloud-releases/external/releases/download/v5.5.2/external-v5.5.2.tar.gz";
|
||||||
"https://github.com/nextcloud-releases/external/releases/download/v5.2.1/external-v5.2.1.tar.gz";
|
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
nextcloud-cookbook = {
|
nextcloud-cookbook = {
|
||||||
# https://github.com/nextcloud/cookbook/releases
|
# https://github.com/christianlupus-nextcloud/cookbook-releases/releases/
|
||||||
url =
|
url = "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.2/cookbook-0.11.2.tar.gz";
|
||||||
"https://github.com/nextcloud/cookbook/releases/download/v0.10.2/Cookbook-0.10.2.tar.gz";
|
flake = false;
|
||||||
|
};
|
||||||
|
nextcloud-snappymail = {
|
||||||
|
# https://github.com/the-djmaze/snappymail/releases
|
||||||
|
# https://snappymail.eu/repository/nextcloud
|
||||||
|
url = "https://snappymail.eu/repository/nextcloud/snappymail-2.38.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;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { nixpkgs, ... }@inputs:
|
outputs =
|
||||||
|
{ nixpkgs, ... }@inputs:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
# Global configuration for my systems
|
# Global configuration for my systems
|
||||||
globals = let baseName = "masu.rs";
|
globals =
|
||||||
in rec {
|
let
|
||||||
user = "noah";
|
baseName = "masu.rs";
|
||||||
fullName = "Noah Masur";
|
in
|
||||||
gitName = fullName;
|
rec {
|
||||||
gitEmail = "7386960+nmasur@users.noreply.github.com";
|
user = "noah";
|
||||||
mail.server = "noahmasur.com";
|
fullName = "Noah Masur";
|
||||||
mail.imapHost = "imap.purelymail.com";
|
gitName = fullName;
|
||||||
mail.smtpHost = "smtp.purelymail.com";
|
gitEmail = "7386960+nmasur@users.noreply.github.com";
|
||||||
dotfilesRepo = "https://github.com/nmasur/dotfiles";
|
mail.server = "noahmasur.com";
|
||||||
hostnames = {
|
mail.imapHost = "imap.purelymail.com";
|
||||||
git = "git.${baseName}";
|
mail.smtpHost = "smtp.purelymail.com";
|
||||||
metrics = "metrics.${baseName}";
|
dotfilesRepo = "https://github.com/nmasur/dotfiles";
|
||||||
prometheus = "prom.${baseName}";
|
hostnames = {
|
||||||
secrets = "vault.${baseName}";
|
audiobooks = "read.${baseName}";
|
||||||
stream = "stream.${baseName}";
|
books = "books.${baseName}";
|
||||||
content = "cloud.${baseName}";
|
budget = "money.${baseName}";
|
||||||
books = "books.${baseName}";
|
content = "cloud.${baseName}";
|
||||||
download = "download.${baseName}";
|
download = "download.${baseName}";
|
||||||
|
files = "files.${baseName}";
|
||||||
|
git = "git.${baseName}";
|
||||||
|
imap = "imap.purelymail.com";
|
||||||
|
influxdb = "influxdb.${baseName}";
|
||||||
|
irc = "irc.${baseName}";
|
||||||
|
mail = "noahmasur.com";
|
||||||
|
metrics = "metrics.${baseName}";
|
||||||
|
minecraft = "minecraft.${baseName}";
|
||||||
|
n8n = "n8n.${baseName}";
|
||||||
|
notifications = "ntfy.${baseName}";
|
||||||
|
paperless = "paper.${baseName}";
|
||||||
|
photos = "photos.${baseName}";
|
||||||
|
prometheus = "prom.${baseName}";
|
||||||
|
secrets = "vault.${baseName}";
|
||||||
|
smtp = "smtp.purelymail.com";
|
||||||
|
status = "status.${baseName}";
|
||||||
|
stream = "stream.${baseName}";
|
||||||
|
transmission = "transmission.${baseName}";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
# Common overlays to always use
|
# Common overlays to always use
|
||||||
overlays = [
|
overlays = [
|
||||||
inputs.nur.overlay
|
inputs.nur.overlays.default
|
||||||
inputs.nix2vim.overlay
|
inputs.nix2vim.overlay
|
||||||
(import ./overlays/neovim-plugins.nix inputs)
|
# inputs.jujutsu.overlays.default # Fix: https://github.com/martinvonz/jj/issues/4784
|
||||||
(import ./overlays/calibre-web.nix)
|
# (import ./overlays/neovim-plugins.nix inputs)
|
||||||
(import ./overlays/disko.nix inputs)
|
# (import ./overlays/tree-sitter.nix inputs)
|
||||||
(import ./overlays/tree-sitter.nix inputs)
|
# (import ./overlays/mpv-scripts.nix inputs)
|
||||||
(import ./overlays/caddy.nix inputs)
|
# (import ./overlays/nextcloud-apps.nix inputs)
|
||||||
(import ./overlays/mpv-scripts.nix inputs)
|
# (import ./overlays/pkgs.nix)
|
||||||
(import ./overlays/nextcloud-apps.nix inputs)
|
] ++ (import ./overlays inputs);
|
||||||
(import ./overlays/betterlockscreen.nix)
|
|
||||||
(import ./overlays/age.nix inputs)
|
|
||||||
(import ./overlays/proton-ge.nix inputs)
|
|
||||||
(import ./overlays/keyd.nix inputs)
|
|
||||||
];
|
|
||||||
|
|
||||||
# System types to support.
|
# System types to support.
|
||||||
supportedSystems =
|
supportedSystems = [
|
||||||
[ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
"x86_64-linux"
|
||||||
|
"x86_64-darwin"
|
||||||
|
"aarch64-linux"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
|
||||||
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
|
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
|
||||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
|
||||||
in rec {
|
# { system -> pkgs }
|
||||||
|
pkgsBySystem = forAllSystems (
|
||||||
|
system:
|
||||||
|
import nixpkgs {
|
||||||
|
inherit system overlays;
|
||||||
|
config.permittedInsecurePackages = [ "litestream-0.3.13" ];
|
||||||
|
config.allowUnfree = true;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
# stablePkgsBySystem = forAllSystems (system: import nixpkgs { inherit system overlays; });
|
||||||
|
|
||||||
|
buildHome =
|
||||||
|
{ pkgs, modules }:
|
||||||
|
inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit pkgs;
|
||||||
|
modules = modules ++ [
|
||||||
|
./platforms/home-manager
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
buildNixos =
|
||||||
|
{ pkgs, modules }:
|
||||||
|
nixpkgs.lib.nixosSystem {
|
||||||
|
inherit pkgs;
|
||||||
|
modules = modules ++ [
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
inputs.disko.nixosModules.disko
|
||||||
|
inputs.wsl.nixosModules.wsl
|
||||||
|
./platforms/nixos
|
||||||
|
{
|
||||||
|
home-manager.extraSpecialArgs = {
|
||||||
|
hostnames = globals.hostnames;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
specialArgs = {
|
||||||
|
hostnames = globals.hostnames;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
buildDarwin =
|
||||||
|
{ pkgs, modules }:
|
||||||
|
inputs.darwin.lib.darwinSystem {
|
||||||
|
inherit pkgs;
|
||||||
|
modules = modules ++ [
|
||||||
|
inputs.home-manager.darwinModules.home-manager
|
||||||
|
inputs.mac-app-util.darwinModules.default
|
||||||
|
./platforms/nix-darwin
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
x86_64-linux-hosts = (import ./hosts nixpkgs).x86_64-linux-hosts;
|
||||||
|
aarch64-linux-hosts = (import ./hosts nixpkgs).aarch64-linux-hosts;
|
||||||
|
aarch64-darwin-hosts = (import ./hosts nixpkgs).aarch64-darwin-hosts;
|
||||||
|
|
||||||
|
in
|
||||||
|
rec {
|
||||||
|
|
||||||
|
# The plan
|
||||||
|
# Import all the host configurations as modules
|
||||||
|
# Setup the modules as nixosModules, homeModules, darwinModules
|
||||||
|
# Create nixosConfigurations using the different pkgs for each system
|
||||||
|
# What to do with home config?
|
||||||
|
|
||||||
|
nixosModules = x86_64-linux-hosts // aarch64-linux-hosts;
|
||||||
|
darwinModules = aarch64-darwin-hosts;
|
||||||
|
|
||||||
|
inherit buildDarwin pkgsBySystem;
|
||||||
|
|
||||||
# Contains my full system builds, including home-manager
|
# Contains my full system builds, including home-manager
|
||||||
# nixos-rebuild switch --flake .#tempest
|
# nixos-rebuild switch --flake .#tempest
|
||||||
nixosConfigurations = {
|
nixosConfigurations =
|
||||||
tempest = import ./hosts/tempest { inherit inputs globals overlays; };
|
(builtins.mapAttrs (
|
||||||
hydra = import ./hosts/hydra { inherit inputs globals overlays; };
|
name: module:
|
||||||
flame = import ./hosts/flame { inherit inputs globals overlays; };
|
buildNixos {
|
||||||
swan = import ./hosts/swan { inherit inputs globals overlays; };
|
pkgs = pkgsBySystem.x86_64-linux;
|
||||||
};
|
modules = [ module ];
|
||||||
|
}
|
||||||
|
) x86_64-linux-hosts)
|
||||||
|
// (builtins.mapAttrs (
|
||||||
|
name: module:
|
||||||
|
buildNixos {
|
||||||
|
pkgs = pkgsBySystem.aarch64-linux;
|
||||||
|
modules = [ module ];
|
||||||
|
}
|
||||||
|
) aarch64-linux-hosts);
|
||||||
|
|
||||||
# Contains my full Mac system builds, including home-manager
|
# Contains my full Mac system builds, including home-manager
|
||||||
# darwin-rebuild switch --flake .#lookingglass
|
# darwin-rebuild switch --flake .#lookingglass
|
||||||
darwinConfigurations = {
|
darwinConfigurations = builtins.mapAttrs (
|
||||||
lookingglass =
|
name: module:
|
||||||
import ./hosts/lookingglass { inherit inputs globals overlays; };
|
buildDarwin {
|
||||||
};
|
pkgs = pkgsBySystem.aarch64-darwin;
|
||||||
|
modules = [ module ];
|
||||||
|
}
|
||||||
|
) aarch64-darwin-hosts;
|
||||||
|
|
||||||
# For quickly applying home-manager settings with:
|
# For quickly applying home-manager settings with:
|
||||||
# home-manager switch --flake .#tempest
|
# home-manager switch --flake .#tempest
|
||||||
homeConfigurations = {
|
homeConfigurations = builtins.mapAttrs (
|
||||||
tempest =
|
name: module:
|
||||||
nixosConfigurations.tempest.config.home-manager.users.${globals.user}.home;
|
buildHome {
|
||||||
lookingglass =
|
pkgs = pkgsBySystem.x86_64-linux;
|
||||||
darwinConfigurations.lookingglass.config.home-manager.users."Noah.Masur".home;
|
module = [ module ];
|
||||||
};
|
}
|
||||||
|
) nixosModules;
|
||||||
|
|
||||||
# Disk formatting, only used once
|
# Disk formatting, only used once
|
||||||
diskoConfigurations = { root = import ./disks/root.nix; };
|
diskoConfigurations = {
|
||||||
|
root = import ./disks/root.nix;
|
||||||
packages = let
|
|
||||||
aws = system:
|
|
||||||
import ./hosts/aws { inherit inputs globals overlays system; };
|
|
||||||
staff = system:
|
|
||||||
import ./hosts/staff { inherit inputs globals overlays system; };
|
|
||||||
neovim = system:
|
|
||||||
let pkgs = import nixpkgs { inherit system overlays; };
|
|
||||||
in import ./modules/common/neovim/package {
|
|
||||||
inherit pkgs;
|
|
||||||
colors = (import ./colorscheme/gruvbox-dark).dark;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
x86_64-linux.aws = aws "x86_64-linux";
|
|
||||||
x86_64-linux.staff = staff "x86_64-linux";
|
|
||||||
|
|
||||||
# Package Neovim config into standalone package
|
|
||||||
x86_64-linux.neovim = neovim "x86_64-linux";
|
|
||||||
x86_64-darwin.neovim = neovim "x86_64-darwin";
|
|
||||||
aarch64-linux.neovim = neovim "aarch64-linux";
|
|
||||||
aarch64-darwin.neovim = neovim "aarch64-darwin";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Programs that can be run by calling this flake
|
# packages =
|
||||||
apps = forAllSystems (system:
|
# let
|
||||||
let pkgs = import nixpkgs { inherit system overlays; };
|
# staff =
|
||||||
in import ./apps { inherit pkgs; });
|
# system:
|
||||||
|
# import ./hosts/staff {
|
||||||
|
# inherit
|
||||||
|
# inputs
|
||||||
|
# globals
|
||||||
|
# overlays
|
||||||
|
# system
|
||||||
|
# ;
|
||||||
|
# };
|
||||||
|
# neovim =
|
||||||
|
# system:
|
||||||
|
# let
|
||||||
|
# pkgs = import nixpkgs { inherit system overlays; };
|
||||||
|
# in
|
||||||
|
# import ./modules/common/neovim/package {
|
||||||
|
# inherit pkgs;
|
||||||
|
# colors = (import ./colorscheme/gruvbox-dark).dark;
|
||||||
|
# };
|
||||||
|
# in
|
||||||
|
# {
|
||||||
|
# x86_64-linux.staff = staff "x86_64-linux";
|
||||||
|
# x86_64-linux.arrow = inputs.nixos-generators.nixosGenerate rec {
|
||||||
|
# system = "x86_64-linux";
|
||||||
|
# format = "iso";
|
||||||
|
# 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";
|
||||||
|
# modules = import ./hosts/arrow/modules.nix { inherit inputs globals overlays; } ++ [
|
||||||
|
# (
|
||||||
|
# { ... }:
|
||||||
|
# {
|
||||||
|
# boot.kernelPackages = inputs.nixpkgs.legacyPackages.x86_64-linux.linuxKernel.packages.linux_6_6;
|
||||||
|
# amazonImage.sizeMB = 16 * 1024;
|
||||||
|
# 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" ];
|
||||||
|
# }
|
||||||
|
# )
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
|
||||||
|
# # Package Neovim config into standalone package
|
||||||
|
# x86_64-linux.neovim = neovim "x86_64-linux";
|
||||||
|
# x86_64-darwin.neovim = neovim "x86_64-darwin";
|
||||||
|
# aarch64-linux.neovim = neovim "aarch64-linux";
|
||||||
|
# aarch64-darwin.neovim = neovim "aarch64-darwin";
|
||||||
|
# };
|
||||||
|
|
||||||
|
packages = forAllSystems (system: pkgsBySystem.${system}.nmasur);
|
||||||
|
|
||||||
# Development environments
|
# Development environments
|
||||||
devShells = forAllSystems (system:
|
devShells = forAllSystems (system: {
|
||||||
let pkgs = import nixpkgs { inherit system overlays; };
|
default = pkgsBySystem.${system}.nmasur.dotfiles-devshell;
|
||||||
in {
|
});
|
||||||
|
|
||||||
# Used to run commands and edit files in this repo
|
checks = forAllSystems (
|
||||||
default = pkgs.mkShell {
|
system:
|
||||||
buildInputs = with pkgs; [ git stylua nixfmt shfmt shellcheck ];
|
let
|
||||||
};
|
pkgs = import nixpkgs { inherit system overlays; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
neovim =
|
||||||
|
pkgs.runCommand "neovim-check-health" { buildInputs = [ inputs.self.packages.${system}.neovim ]; }
|
||||||
|
''
|
||||||
|
mkdir -p $out
|
||||||
|
export HOME=$TMPDIR
|
||||||
|
nvim -c "checkhealth" -c "write $out/health.log" -c "quitall"
|
||||||
|
|
||||||
});
|
# Check for errors inside the health log
|
||||||
|
if $(grep "ERROR" $out/health.log); then
|
||||||
|
cat $out/health.log
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
checks = forAllSystems (system:
|
formatter = forAllSystems (
|
||||||
let pkgs = import nixpkgs { inherit system overlays; };
|
system:
|
||||||
in {
|
let
|
||||||
neovim = pkgs.runCommand "neovim-check-health" {
|
pkgs = import nixpkgs { inherit system overlays; };
|
||||||
buildInputs = [ inputs.self.packages.${system}.neovim ];
|
in
|
||||||
} ''
|
pkgs.nixfmt-rfc-style
|
||||||
mkdir -p $out
|
);
|
||||||
export HOME=$TMPDIR
|
|
||||||
nvim -c "checkhealth" -c "write $out/health.log" -c "quitall"
|
|
||||||
|
|
||||||
# Check for errors inside the health log
|
|
||||||
if $(grep "ERROR" $out/health.log); then
|
|
||||||
cat $out/health.log
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
|
|
||||||
# Templates for starting other projects quickly
|
# Templates for starting other projects quickly
|
||||||
templates = rec {
|
templates = (import ./templates nixpkgs.lib);
|
||||||
default = basic;
|
|
||||||
basic = {
|
|
||||||
path = ./templates/basic;
|
|
||||||
description = "Basic program template";
|
|
||||||
};
|
|
||||||
poetry = {
|
|
||||||
path = ./templates/poetry;
|
|
||||||
description = "Poetry template";
|
|
||||||
};
|
|
||||||
python = {
|
|
||||||
path = ./templates/python;
|
|
||||||
description = "Legacy Python template";
|
|
||||||
};
|
|
||||||
haskell = {
|
|
||||||
path = ./templates/haskell;
|
|
||||||
description = "Haskell template";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
# Hosts
|
|
||||||
|
|
||||||
These are the individual machines managed by this flake.
|
|
||||||
|
|
||||||
| Host | Purpose |
|
|
||||||
| --- | --- |
|
|
||||||
| [aws](./aws/default.nix) | AWS AMI |
|
|
||||||
| [staff](./staff/default.nix) | Live USB stick |
|
|
||||||
| [flame](./flame/default.nix) | Oracle cloud server |
|
|
||||||
| [hydra](./hydra/default.nix) | WSL config |
|
|
||||||
| [lookingglass](./lookingglass/default.nix) | Work MacBook |
|
|
||||||
| [swan](./swan/default.nix) | Home server |
|
|
||||||
| [tempest](./tempest/default.nix) | Linux desktop |
|
|
||||||
|
|
37
hosts/aarch64-darwin/lookingglass/default.nix
Normal file
37
hosts/aarch64-darwin/lookingglass/default.nix
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# The Looking Glass
|
||||||
|
# System configuration for my work Macbook
|
||||||
|
|
||||||
|
rec {
|
||||||
|
networking.hostName = "NYCM-NMASUR2";
|
||||||
|
networking.computerName = "NYCM-NMASUR2";
|
||||||
|
|
||||||
|
nmasur.settings = {
|
||||||
|
username = "Noah.Masur";
|
||||||
|
fullName = "Noah Masur";
|
||||||
|
};
|
||||||
|
|
||||||
|
nmasur.profiles = {
|
||||||
|
base.enable = true;
|
||||||
|
work.enable = true;
|
||||||
|
extra.enable = true;
|
||||||
|
gaming.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users."Noah.Masur" = {
|
||||||
|
nmasur.settings = {
|
||||||
|
username = nmasur.settings.username;
|
||||||
|
fullName = nmasur.settings.fullName;
|
||||||
|
};
|
||||||
|
nmasur.profiles = {
|
||||||
|
common.enable = true;
|
||||||
|
darwin-base.enable = true;
|
||||||
|
power-user.enable = true;
|
||||||
|
work.enable = true;
|
||||||
|
experimental.enable = true;
|
||||||
|
};
|
||||||
|
nmasur.presets.programs.git = {
|
||||||
|
name = "Noah-Masur_1701";
|
||||||
|
email = "${nmasur.settings.username}@take2games.com";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
22
hosts/aarch64-linux/default.nix
Normal file
22
hosts/aarch64-linux/default.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Return a list of all NixOS hosts
|
||||||
|
|
||||||
|
{ nixpkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (nixpkgs) lib;
|
||||||
|
in
|
||||||
|
|
||||||
|
lib.pipe (lib.filesystem.listFilesRecursive ./.) [
|
||||||
|
# Get only files ending in default.nix
|
||||||
|
(builtins.filter (name: lib.hasSuffix "default.nix" name))
|
||||||
|
# Remove this file
|
||||||
|
(builtins.filter (name: name != ./default.nix))
|
||||||
|
# Import each host function
|
||||||
|
map
|
||||||
|
(file: {
|
||||||
|
name = builtins.baseNameOf (builtins.dirOf file);
|
||||||
|
value = import file;
|
||||||
|
})
|
||||||
|
# Convert to an attrset of hostname -> host function
|
||||||
|
(builtins.listToAttrs)
|
||||||
|
]
|
19
hosts/aarch64-linux/flame/cloudflared-flame.age
Normal file
19
hosts/aarch64-linux/flame/cloudflared-flame.age
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IE1nSGFPdyBYY0c1
|
||||||
|
bldPMVdwRGhia0xzNm1mSGQ0eVVZZzFLMWVUdFhYVW1KY3QwTERJCm1UUDBqN1Jr
|
||||||
|
VjRlSjROTFZEQ3UrME81Y2FyRkxjZHFvUFN1eEZNa2cwWkUKLT4gc3NoLWVkMjU1
|
||||||
|
MTkgWXlTVU1RIFM4ZURETk0yQ1NKN3owaDB5S3djeThtWkphS0xUaVd2MnBlS244
|
||||||
|
d0V5bUUKKzE5UzZYUlpwTy9ydFQ3L2NmWFZBMEZCWWppYlFZQzhTVFhUc3BBRlpR
|
||||||
|
dwotPiBzc2gtZWQyNTUxOSBuanZYNUEgbS9HaVFFRjU4VzMvSVZ1SlExZ1BBNWxK
|
||||||
|
RVRESEVmeWxyMW5Pclk5UU4xOApaZ0hHMnlsb1BuMThsTG82d1k1Rm94VEFMcTBH
|
||||||
|
TFoxRWpRSXJWQUJVWGN3Ci0+IHNzaC1lZDI1NTE5IENxSU9VQSBOK1AvRW5nNUlK
|
||||||
|
NnB1UDhKdmFibTEwV2JhOGxKRGg1SnlMdytXaVQ1eW1NCnVIcjNnclVMSEJ3eDVk
|
||||||
|
eExnY1EvbWg1OW4xR3FydDlzeUdLQW11UGRmclkKLT4gc3NoLWVkMjU1MTkgejFP
|
||||||
|
Y1p3IHNxbDlpSkpPdEZVRGhwV3NKdTNJV0NTeUZoVVg3b0ZlRWdqelNaTDRWamMK
|
||||||
|
N1czMXlEcWZzQ1g0dkxBTnNUQjdTdnZMUE9VRGphTjB4SjJyemJiU2w5NAotLS0g
|
||||||
|
VlgyN24vMGl3a2N6ZGs1SjhOZmttWEl3WEFOK29EOUlkZ0N3blBBcHZQOArP/uJx
|
||||||
|
SBFvBV0rLzRbo/8nhhizuT2TtKsJSJDIsFJxAOtF8ZwIbYwauBt1tJudtJaXgbv5
|
||||||
|
JIk53sS3lelOwH11yx0aGcBNCR2UwpuYn1IwoW0qrt3ugi8rmQPRG8c8gSyNn2u7
|
||||||
|
PnAj/NdAjieLGGLltwdq2wJhkbv800WmKx5sGgPNT1AdBS1b84h5ipQFnFf3Fi0N
|
||||||
|
FJa9/j5qc7JtWEy4ecU6D03zcZD+CTCoN8SIW4+fldos1u7N2v2X5/YUw7T6jQ==
|
||||||
|
-----END AGE ENCRYPTED FILE-----
|
59
hosts/aarch64-linux/flame/default.nix
Normal file
59
hosts/aarch64-linux/flame/default.nix
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
# The Flame
|
||||||
|
# System configuration for an Oracle free server
|
||||||
|
|
||||||
|
# How to install:
|
||||||
|
# https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/
|
||||||
|
# These days, probably use nixos-anywhere instead.
|
||||||
|
|
||||||
|
rec {
|
||||||
|
networking.hostName = "flame";
|
||||||
|
|
||||||
|
nmasur.settings = {
|
||||||
|
username = "noah";
|
||||||
|
fullName = "Noah Masur";
|
||||||
|
};
|
||||||
|
|
||||||
|
nmasur.profiles = {
|
||||||
|
base.enable = true;
|
||||||
|
server.enable = true;
|
||||||
|
communications.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users."noah" = {
|
||||||
|
nmasur.settings = {
|
||||||
|
username = nmasur.settings.username;
|
||||||
|
fullName = nmasur.settings.fullName;
|
||||||
|
};
|
||||||
|
nmasur.profiles = {
|
||||||
|
common.enable = true;
|
||||||
|
linux-base.enable = true;
|
||||||
|
power-user.enable = true;
|
||||||
|
};
|
||||||
|
home.stateVersion = "23.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "23.05";
|
||||||
|
# File systems must be declared in order to boot
|
||||||
|
|
||||||
|
# This is the root filesystem containing NixOS
|
||||||
|
# I forgot to set a clean label for it
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/e1b6bd50-306d-429a-9f45-78f57bc597c3";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
# This is the boot filesystem for systemd-boot
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/D5CA-237A";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Allows private remote access over the internet
|
||||||
|
nmasur.presets.services.cloudflared = {
|
||||||
|
tunnel = {
|
||||||
|
id = "bd250ee1-ed2e-42d2-b627-039f1eb5a4d2";
|
||||||
|
credentialsFile = ./cloudflared-flame.age;
|
||||||
|
ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK/6oyVqjFGX3Uvrc3VS8J9sphxzAnRzKC85xgkHfYgR3TK6qBGXzHrknEj21xeZrr3G2y1UsGzphWJd9ZfIcdA= open-ssh-ca@cloudflareaccess.org";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -1,27 +0,0 @@
|
|||||||
{ inputs, system, globals, overlays, ... }:
|
|
||||||
|
|
||||||
inputs.nixos-generators.nixosGenerate {
|
|
||||||
inherit system;
|
|
||||||
format = "amazon";
|
|
||||||
modules = [
|
|
||||||
globals
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
nixpkgs.overlays = overlays;
|
|
||||||
networking.hostName = "sheep";
|
|
||||||
gui.enable = false;
|
|
||||||
theme.colors = (import ../../colorscheme/gruvbox).dark;
|
|
||||||
passwordHash = null;
|
|
||||||
publicKey =
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
|
||||||
# AWS settings require this
|
|
||||||
permitRootLogin = "prohibit-password";
|
|
||||||
}
|
|
||||||
../../modules/common
|
|
||||||
../../modules/nixos
|
|
||||||
../../modules/nixos/services/sshd.nix
|
|
||||||
] ++ [
|
|
||||||
# Required to fix diskSize errors during build
|
|
||||||
({ ... }: { amazonImage.sizeMB = 16 * 1024; })
|
|
||||||
];
|
|
||||||
}
|
|
@ -1,280 +0,0 @@
|
|||||||
name: 'Terraform'
|
|
||||||
env:
|
|
||||||
|
|
||||||
AWS_ACCOUNT_NUMBER: ''
|
|
||||||
AWS_PLAN_ROLE_NAME: github_actions_plan
|
|
||||||
AWS_APPLY_ROLE_NAME: github_actions_admin
|
|
||||||
|
|
||||||
# Always required. Used for authenticating to AWS, but can also act as your
|
|
||||||
# default region if you don't want to specify in the provider configuration.
|
|
||||||
AWS_REGION: us-east-1
|
|
||||||
|
|
||||||
# You must change these to fit your project.
|
|
||||||
TF_VAR_project: change-me
|
|
||||||
TF_VAR_label: change-me
|
|
||||||
TF_VAR_owner: Your Name Here
|
|
||||||
|
|
||||||
# If storing Terraform in a subdirectory, specify it here.
|
|
||||||
TERRAFORM_DIRECTORY: .
|
|
||||||
|
|
||||||
# Pinned versions of tools to use.
|
|
||||||
# Check for new releases:
|
|
||||||
# - https://github.com/hashicorp/terraform/releases
|
|
||||||
# - https://github.com/fugue/regula/releases
|
|
||||||
# - https://github.com/terraform-linters/tflint/releases
|
|
||||||
TERRAFORM_VERSION: 1.2.6
|
|
||||||
REGULA_VERSION: 2.9.0
|
|
||||||
TFLINT_VERSION: 0.39.1
|
|
||||||
|
|
||||||
# Terraform configuration options
|
|
||||||
TERRAFORM_PARALLELISM: 10
|
|
||||||
|
|
||||||
# These variables are passed to Terraform based on GitHub information.
|
|
||||||
TF_VAR_repo: ${{ github.repository }}
|
|
||||||
|
|
||||||
# This workflow is triggered in the following ways.
|
|
||||||
on:
|
|
||||||
|
|
||||||
# Any push or merge to these branches.
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- dev
|
|
||||||
- prod
|
|
||||||
|
|
||||||
# Any pull request targeting these branches (plan only).
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- dev
|
|
||||||
- prod
|
|
||||||
|
|
||||||
|
|
||||||
# Any manual trigger on these branches.
|
|
||||||
workflow_dispatch:
|
|
||||||
branches:
|
|
||||||
- dev
|
|
||||||
- prod
|
|
||||||
|
|
||||||
# -------------------------------------------------------------------
|
|
||||||
# The rest of this workflow can operate without adjustments. Edit the
|
|
||||||
# below content at your own risk!
|
|
||||||
# -------------------------------------------------------------------
|
|
||||||
|
|
||||||
# Used to connect to AWS IAM
|
|
||||||
permissions:
|
|
||||||
id-token: write
|
|
||||||
contents: read
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
# Only run one workflow at a time for each Terraform state. This prevents
|
|
||||||
# lockfile conflicts, especially during PR vs push.
|
|
||||||
concurrency: terraform-${{ github.base_ref || github.ref }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
terraform:
|
|
||||||
|
|
||||||
name: 'Terraform'
|
|
||||||
|
|
||||||
# Change this if you need to run your deployment on-prem.
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
|
|
||||||
# Downloads the current repo code to the runner.
|
|
||||||
- name: Checkout Repo Code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
# Enable access to KVM, required to build an image
|
|
||||||
- name: Enable KVM group perms
|
|
||||||
run: |
|
|
||||||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
|
||||||
sudo udevadm control --reload-rules
|
|
||||||
sudo udevadm trigger --name-match=kvm
|
|
||||||
|
|
||||||
# Login to AWS
|
|
||||||
- name: AWS Assume Role
|
|
||||||
uses: aws-actions/configure-aws-credentials@v1.6.1
|
|
||||||
with:
|
|
||||||
role-to-assume: ${{ env.AWS_ROLE_ARN }}
|
|
||||||
aws-region: ${{ env.AWS_REGION }}
|
|
||||||
|
|
||||||
# Install Nix
|
|
||||||
- name: Install Nix
|
|
||||||
uses: cachix/install-nix-action@v17
|
|
||||||
with:
|
|
||||||
extra_nix_config: |
|
|
||||||
substituters = s3://insert-cache-bucket https://cache.nixos.org/
|
|
||||||
trusted-public-keys = insert-cache-bucket:M6PsZjHXcLvbQyPUBLICKEYGVoNwI84g1FBQzouRU= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
|
|
||||||
|
|
||||||
# Build the image
|
|
||||||
- name: Build Image
|
|
||||||
run: nix build .#aws
|
|
||||||
|
|
||||||
# Copy the image to S3
|
|
||||||
- name: Upload Image to Cache
|
|
||||||
env:
|
|
||||||
NIX_CACHE_PRIVATE_KEY: ${{ secrets.NIX_CACHE_PRIVATE_KEY }}
|
|
||||||
run: |
|
|
||||||
echo "$NIX_CACHE_PRIVATE_KEY" > cache.key
|
|
||||||
nix store sign --key-file cache.key $(readlink result)
|
|
||||||
nix copy --to s3://t2-aws-nixos-test $(readlink result)
|
|
||||||
rm cache.key
|
|
||||||
|
|
||||||
# Exports all GitHub Secrets as environment variables prefixed by
|
|
||||||
# "TF_VAR_", which exposes them to Terraform. The name of each GitHub
|
|
||||||
# Secret must match its Terraform variable name exactly.
|
|
||||||
- name: Export Secrets to Terraform Variables
|
|
||||||
env:
|
|
||||||
ALL_SECRETS: ${{ toJson(secrets) }}
|
|
||||||
run: |
|
|
||||||
echo "$ALL_SECRETS" \
|
|
||||||
| jq "to_entries | .[] | \"TF_VAR_\" + ( .key | ascii_downcase ) + \"=\" + .value" \
|
|
||||||
| tr -d \" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
# Installs the Terraform binary and some other accessory functions.
|
|
||||||
- name: Setup Terraform
|
|
||||||
uses: hashicorp/setup-terraform@v2
|
|
||||||
with:
|
|
||||||
terraform_version: ${{ env.TERRAFORM_VERSION }}
|
|
||||||
|
|
||||||
# Checks whether Terraform is formatted properly. If this fails, you
|
|
||||||
# should install the pre-commit hook.
|
|
||||||
- name: Check Formatting
|
|
||||||
run: |
|
|
||||||
terraform fmt -no-color -check -diff -recursive
|
|
||||||
|
|
||||||
# Downloads a Terraform code lint test.
|
|
||||||
- uses: terraform-linters/setup-tflint@v1
|
|
||||||
name: Setup TFLint
|
|
||||||
with:
|
|
||||||
tflint_version: v${{ env.TFLINT_VERSION }}
|
|
||||||
|
|
||||||
# Sets up linting with this codebase.
|
|
||||||
- name: Init TFLint
|
|
||||||
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
|
|
||||||
run: tflint --init
|
|
||||||
|
|
||||||
# Lints the current code.
|
|
||||||
- name: Run TFLint
|
|
||||||
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
|
|
||||||
run: |
|
|
||||||
tflint -f compact
|
|
||||||
find ./modules/* -type d -maxdepth 0 | xargs -I __ tflint -f compact --disable-rule=terraform_required_providers --disable-rule=terraform_required_version __
|
|
||||||
|
|
||||||
# Connects to remote state backend and download providers.
|
|
||||||
- name: Terraform Init
|
|
||||||
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
|
|
||||||
run: |
|
|
||||||
terraform init \
|
|
||||||
-backend-config="role_arn=${{ env.AWS_STATE_ROLE_ARN }}" \
|
|
||||||
-backend-config="region=us-east-1" \
|
|
||||||
-backend-config="workspace_key_prefix=accounts/${{ env.AWS_ACCOUNT_NUMBER }}/${{ github.repository }}" \
|
|
||||||
-backend-config="key=state.tfstate" \
|
|
||||||
-backend-config="dynamodb_table=global-tf-state-lock"
|
|
||||||
|
|
||||||
# Set the Terraform Workspace to the current branch name.
|
|
||||||
- name: Set Terraform Workspace
|
|
||||||
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
export WORKSPACE=${{ github.base_ref || github.ref_name }}
|
|
||||||
terraform workspace select ${WORKSPACE} || terraform workspace new $WORKSPACE
|
|
||||||
echo "TF_WORKSPACE=$(echo ${WORKSPACE} | sed 's/\//_/g')" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
# Checks differences between current code and infrastructure state.
|
|
||||||
- name: Terraform Plan
|
|
||||||
id: plan
|
|
||||||
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
|
|
||||||
run: |
|
|
||||||
terraform plan \
|
|
||||||
-input=false \
|
|
||||||
-no-color \
|
|
||||||
-out=tfplan \
|
|
||||||
-parallelism=${TERRAFORM_PARALLELISM} \
|
|
||||||
-var-file=variables-${TF_WORKSPACE}.tfvars
|
|
||||||
|
|
||||||
# Gets the results of the plan for pull requests.
|
|
||||||
- name: Terraform Show Plan
|
|
||||||
id: show
|
|
||||||
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
|
|
||||||
run: terraform show -no-color tfplan
|
|
||||||
|
|
||||||
# Adds the results of the plan to the pull request.
|
|
||||||
- name: Comment Plan
|
|
||||||
uses: actions/github-script@v6
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
env:
|
|
||||||
STDOUT: "```terraform\n${{ steps.show.outputs.stdout }}```"
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
script: |
|
|
||||||
// 1. Retrieve existing bot comments for the PR
|
|
||||||
const { data: comments } = await github.rest.issues.listComments({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
issue_number: context.issue.number,
|
|
||||||
})
|
|
||||||
const botComment = comments.find(comment => {
|
|
||||||
return comment.user.type === 'Bot' && comment.body.includes('Terraform Format and Style')
|
|
||||||
})
|
|
||||||
|
|
||||||
// 2. Prepare format of the comment
|
|
||||||
const output = `#### Terraform Format and Style 🖌\`${{ steps.fmt.outcome }}\`
|
|
||||||
#### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\`
|
|
||||||
#### Terraform Validation 🤖\`${{ steps.validate.outcome }}\`
|
|
||||||
<details><summary>Validation Output</summary>
|
|
||||||
|
|
||||||
\`\`\`\n
|
|
||||||
${{ steps.validate.outputs.stdout }}
|
|
||||||
\`\`\`
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
#### Terraform Plan 📖\`${{ steps.plan.outcome }}\`
|
|
||||||
|
|
||||||
<details><summary>Show Plan</summary>
|
|
||||||
|
|
||||||
\`\`\`\n
|
|
||||||
${process.env.PLAN}
|
|
||||||
\`\`\`
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`, Working Directory: \`${{ env.tf_actions_working_dir }}\`, Workflow: \`${{ github.workflow }}\`*`;
|
|
||||||
|
|
||||||
// 3. If we have a comment, update it, otherwise create a new one
|
|
||||||
if (botComment) {
|
|
||||||
github.rest.issues.updateComment({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
comment_id: botComment.id,
|
|
||||||
body: output
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
github.rest.issues.createComment({
|
|
||||||
issue_number: context.issue.number,
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
body: output
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
# Downloads Regula and checks whether the plan meets compliance requirements.
|
|
||||||
- name: Regula Compliance Check
|
|
||||||
shell: bash
|
|
||||||
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
|
|
||||||
run: |
|
|
||||||
REGULA_URL="https://github.com/fugue/regula/releases/download/v${REGULA_VERSION}/regula_${REGULA_VERSION}_Linux_x86_64.tar.gz"
|
|
||||||
curl -sL "$REGULA_URL" -o regula.tar.gz
|
|
||||||
tar xzf regula.tar.gz
|
|
||||||
terraform show -json tfplan | ./regula run
|
|
||||||
|
|
||||||
# Deploys infrastructure or changes to infrastructure.
|
|
||||||
- name: Terraform Apply
|
|
||||||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
|
||||||
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
|
|
||||||
run: |
|
|
||||||
terraform apply \
|
|
||||||
-auto-approve \
|
|
||||||
-input=false \
|
|
||||||
-parallelism=${TERRAFORM_PARALLELISM} \
|
|
||||||
tfplan
|
|
47
hosts/default.nix
Normal file
47
hosts/default.nix
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
# Return a list of all hosts
|
||||||
|
|
||||||
|
nixpkgs:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (nixpkgs) lib;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
# darwin-hosts = import ./darwin;
|
||||||
|
aarch64-darwin-hosts = lib.pipe (lib.filesystem.listFilesRecursive ./aarch64-darwin) [
|
||||||
|
# Get only files ending in default.nix
|
||||||
|
(builtins.filter (name: lib.hasSuffix "default.nix" name))
|
||||||
|
# Import each host function
|
||||||
|
(map (file: {
|
||||||
|
name = builtins.baseNameOf (builtins.dirOf file);
|
||||||
|
value = import file;
|
||||||
|
}))
|
||||||
|
# Convert to an attrset of hostname -> host function
|
||||||
|
(builtins.listToAttrs)
|
||||||
|
];
|
||||||
|
aarch64-linux-hosts = lib.pipe (lib.filesystem.listFilesRecursive ./aarch64-linux) [
|
||||||
|
# Get only files ending in default.nix
|
||||||
|
(builtins.filter (name: lib.hasSuffix "default.nix" name))
|
||||||
|
# Remove the first file
|
||||||
|
(builtins.filter (name: name != ./aarch64-linux/default.nix))
|
||||||
|
# Import each host function
|
||||||
|
(map (file: {
|
||||||
|
name = builtins.baseNameOf (builtins.dirOf file);
|
||||||
|
value = import file;
|
||||||
|
}))
|
||||||
|
# Convert to an attrset of hostname -> host function
|
||||||
|
(builtins.listToAttrs)
|
||||||
|
];
|
||||||
|
x86_64-linux-hosts = lib.pipe (lib.filesystem.listFilesRecursive ./x86_64-linux) [
|
||||||
|
# Get only files ending in default.nix
|
||||||
|
(builtins.filter (name: lib.hasSuffix "default.nix" name))
|
||||||
|
# Import each host function
|
||||||
|
(map (file: {
|
||||||
|
# name = lib.removeSuffix ".nix" (builtins.baseNameOf file);
|
||||||
|
name = builtins.baseNameOf (builtins.dirOf file);
|
||||||
|
value = import file;
|
||||||
|
}))
|
||||||
|
# Convert to an attrset of hostname -> host function
|
||||||
|
(builtins.listToAttrs)
|
||||||
|
];
|
||||||
|
}
|
@ -1,116 +0,0 @@
|
|||||||
# The Flame
|
|
||||||
# System configuration for an Oracle free server
|
|
||||||
|
|
||||||
# How to install:
|
|
||||||
# https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/
|
|
||||||
# These days, probably use nixos-anywhere instead.
|
|
||||||
|
|
||||||
{ inputs, globals, overlays, ... }:
|
|
||||||
|
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
|
||||||
system = "aarch64-linux";
|
|
||||||
specialArgs = { };
|
|
||||||
modules = [
|
|
||||||
globals
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
../../modules/common
|
|
||||||
../../modules/nixos
|
|
||||||
{
|
|
||||||
nixpkgs.overlays = overlays;
|
|
||||||
|
|
||||||
# Hardware
|
|
||||||
server = true;
|
|
||||||
networking.hostName = "flame";
|
|
||||||
|
|
||||||
# Not sure what's necessary but too afraid to remove anything
|
|
||||||
imports = [ (inputs.nixpkgs + "/nixos/modules/profiles/qemu-guest.nix") ];
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" ];
|
|
||||||
|
|
||||||
# File systems must be declared in order to boot
|
|
||||||
|
|
||||||
# This is the root filesystem containing NixOS
|
|
||||||
# I forgot to set a clean label for it
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-uuid/e1b6bd50-306d-429a-9f45-78f57bc597c3";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
# This is the boot filesystem for systemd-boot
|
|
||||||
fileSystems."/boot" = {
|
|
||||||
device = "/dev/disk/by-uuid/D5CA-237A";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Theming
|
|
||||||
|
|
||||||
# Server doesn't require GUI
|
|
||||||
gui.enable = false;
|
|
||||||
|
|
||||||
# Still require colors for programs like Neovim, K9S
|
|
||||||
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
|
||||||
|
|
||||||
# Programs and services
|
|
||||||
cloudflare.enable = true; # Proxy traffic with Cloudflare
|
|
||||||
dotfiles.enable = true; # Clone dotfiles
|
|
||||||
neovim.enable = true;
|
|
||||||
giteaRunner.enable = true;
|
|
||||||
services.caddy.enable = true;
|
|
||||||
services.grafana.enable = true;
|
|
||||||
services.openssh.enable = true;
|
|
||||||
services.victoriametrics.enable = true;
|
|
||||||
services.gitea.enable = true;
|
|
||||||
services.vaultwarden.enable = true;
|
|
||||||
services.minecraft-server.enable = true; # Setup Minecraft server
|
|
||||||
|
|
||||||
# Allows private remote access over the internet
|
|
||||||
cloudflareTunnel = {
|
|
||||||
enable = true;
|
|
||||||
id = "bd250ee1-ed2e-42d2-b627-039f1eb5a4d2";
|
|
||||||
credentialsFile = ../../private/cloudflared-flame.age;
|
|
||||||
ca =
|
|
||||||
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK/6oyVqjFGX3Uvrc3VS8J9sphxzAnRzKC85xgkHfYgR3TK6qBGXzHrknEj21xeZrr3G2y1UsGzphWJd9ZfIcdA= open-ssh-ca@cloudflareaccess.org";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Nextcloud backup config
|
|
||||||
backup.s3 = {
|
|
||||||
endpoint = "s3.us-west-002.backblazeb2.com";
|
|
||||||
bucket = "noahmasur-backup";
|
|
||||||
accessKeyId = "0026b0e73b2e2c80000000005";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Disable passwords, only use SSH key
|
|
||||||
publicKey =
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
|
||||||
|
|
||||||
# # Wireguard config for Transmission
|
|
||||||
# wireguard.enable = true;
|
|
||||||
# networking.wireguard.interfaces.wg0 = {
|
|
||||||
#
|
|
||||||
# # The local IPs for this machine within the Wireguard network
|
|
||||||
# # Any inbound traffic bound for these IPs should be kept on localhost
|
|
||||||
# ips = [ "10.66.13.200/32" "fc00:bbbb:bbbb:bb01::3:dc7/128" ];
|
|
||||||
#
|
|
||||||
# peers = [{
|
|
||||||
#
|
|
||||||
# # Identity of Wireguard target peer (VPN)
|
|
||||||
# publicKey = "bOOP5lIjqCdDx5t+mP/kEcSbHS4cZqE0rMlBI178lyY=";
|
|
||||||
#
|
|
||||||
# # The public internet address of the target peer
|
|
||||||
# endpoint = "86.106.143.132:51820";
|
|
||||||
#
|
|
||||||
# # Which outgoing IP ranges should be sent through Wireguard
|
|
||||||
# allowedIPs = [ "0.0.0.0/0" "::0/0" ];
|
|
||||||
#
|
|
||||||
# # Send heartbeat signal within the network
|
|
||||||
# persistentKeepalive = 25;
|
|
||||||
#
|
|
||||||
# }];
|
|
||||||
#
|
|
||||||
# };
|
|
||||||
|
|
||||||
# # VPN port forwarding
|
|
||||||
# services.transmission.settings.peer-port = 57599;
|
|
||||||
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
# The Hydra
|
|
||||||
# System configuration for WSL
|
|
||||||
|
|
||||||
{ inputs, globals, overlays, ... }:
|
|
||||||
|
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = { };
|
|
||||||
modules = [
|
|
||||||
../../modules/common
|
|
||||||
../../modules/nixos
|
|
||||||
../../modules/wsl
|
|
||||||
globals
|
|
||||||
inputs.wsl.nixosModules.wsl
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
networking.hostName = "hydra";
|
|
||||||
nixpkgs.overlays = overlays;
|
|
||||||
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
|
|
||||||
gui.enable = false;
|
|
||||||
theme = {
|
|
||||||
colors = (import ../../colorscheme/gruvbox).dark;
|
|
||||||
dark = true;
|
|
||||||
};
|
|
||||||
passwordHash = inputs.nixpkgs.lib.fileContents ../../misc/password.sha512;
|
|
||||||
wsl = {
|
|
||||||
enable = true;
|
|
||||||
wslConf.automount.root = "/mnt";
|
|
||||||
defaultUser = globals.user;
|
|
||||||
startMenuLaunchers = true;
|
|
||||||
nativeSystemd = true;
|
|
||||||
wslConf.network.generateResolvConf = true; # Turn off if it breaks VPN
|
|
||||||
interop.includePath =
|
|
||||||
false; # Including Windows PATH will slow down Neovim command mode
|
|
||||||
};
|
|
||||||
|
|
||||||
neovim.enable = true;
|
|
||||||
mail.enable = true;
|
|
||||||
mail.aerc.enable = true;
|
|
||||||
mail.himalaya.enable = true;
|
|
||||||
dotfiles.enable = true;
|
|
||||||
nixlang.enable = true;
|
|
||||||
lua.enable = true;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
# The Looking Glass
|
|
||||||
# System configuration for my work Macbook
|
|
||||||
|
|
||||||
{ inputs, globals, overlays, ... }:
|
|
||||||
|
|
||||||
inputs.darwin.lib.darwinSystem {
|
|
||||||
system = "x86_64-darwin";
|
|
||||||
specialArgs = { };
|
|
||||||
modules = [
|
|
||||||
../../modules/common
|
|
||||||
../../modules/darwin
|
|
||||||
(globals // rec {
|
|
||||||
user = "Noah.Masur";
|
|
||||||
gitName = "Noah-Masur_1701";
|
|
||||||
gitEmail = "${user}@take2games.com";
|
|
||||||
})
|
|
||||||
inputs.home-manager.darwinModules.home-manager
|
|
||||||
{
|
|
||||||
nixpkgs.overlays = [ inputs.firefox-darwin.overlay ] ++ overlays;
|
|
||||||
networking.hostName = "lookingglass";
|
|
||||||
identityFile = "/Users/Noah.Masur/.ssh/id_ed25519";
|
|
||||||
gui.enable = true;
|
|
||||||
theme = {
|
|
||||||
colors = (import ../../colorscheme/gruvbox-dark).dark;
|
|
||||||
dark = true;
|
|
||||||
};
|
|
||||||
mail.user = globals.user;
|
|
||||||
charm.enable = true;
|
|
||||||
neovim.enable = true;
|
|
||||||
mail.enable = true;
|
|
||||||
mail.aerc.enable = true;
|
|
||||||
mail.himalaya.enable = false;
|
|
||||||
kitty.enable = true;
|
|
||||||
discord.enable = true;
|
|
||||||
firefox.enable = true;
|
|
||||||
dotfiles.enable = true;
|
|
||||||
nixlang.enable = true;
|
|
||||||
terraform.enable = true;
|
|
||||||
python.enable = true;
|
|
||||||
lua.enable = true;
|
|
||||||
kubernetes.enable = true;
|
|
||||||
_1password.enable = true;
|
|
||||||
slack.enable = true;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
@ -1,43 +0,0 @@
|
|||||||
# The Staff
|
|
||||||
# ISO configuration for my USB drive
|
|
||||||
|
|
||||||
{ inputs, system, overlays, ... }:
|
|
||||||
|
|
||||||
inputs.nixos-generators.nixosGenerate {
|
|
||||||
inherit system;
|
|
||||||
format = "install-iso";
|
|
||||||
modules = [{
|
|
||||||
nixpkgs.overlays = overlays;
|
|
||||||
networking.hostName = "staff";
|
|
||||||
users.extraUsers.root.openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s"
|
|
||||||
];
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
ports = [ 22 ];
|
|
||||||
allowSFTP = true;
|
|
||||||
settings = {
|
|
||||||
GatewayPorts = "no";
|
|
||||||
X11Forwarding = false;
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
PermitRootLogin = "yes";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
environment.systemPackages =
|
|
||||||
let pkgs = import inputs.nixpkgs { inherit system overlays; };
|
|
||||||
in with pkgs; [
|
|
||||||
git
|
|
||||||
vim
|
|
||||||
wget
|
|
||||||
curl
|
|
||||||
(import ../../modules/common/neovim/package {
|
|
||||||
inherit pkgs;
|
|
||||||
colors = (import ../../colorscheme/gruvbox).dark;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
nix.extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
warn-dirty = false
|
|
||||||
'';
|
|
||||||
}];
|
|
||||||
}
|
|
@ -1,104 +0,0 @@
|
|||||||
# The Swan
|
|
||||||
# System configuration for my home NAS server
|
|
||||||
|
|
||||||
{ inputs, globals, overlays, ... }:
|
|
||||||
|
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = { };
|
|
||||||
modules = [
|
|
||||||
globals
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
inputs.disko.nixosModules.disko
|
|
||||||
../../modules/common
|
|
||||||
../../modules/nixos
|
|
||||||
{
|
|
||||||
nixpkgs.overlays = overlays;
|
|
||||||
|
|
||||||
# Hardware
|
|
||||||
server = true;
|
|
||||||
physical = true;
|
|
||||||
networking.hostName = "swan";
|
|
||||||
|
|
||||||
# Not sure what's necessary but too afraid to remove anything
|
|
||||||
boot.initrd.availableKernelModules =
|
|
||||||
[ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
|
||||||
|
|
||||||
# Required for transcoding
|
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
|
||||||
boot.kernelParams = [
|
|
||||||
"radeon.si_support=0"
|
|
||||||
"amdgpu.si_support=1"
|
|
||||||
"radeon.cik_support=0"
|
|
||||||
"amdgpu.cik_support=1"
|
|
||||||
"amdgpu.dc=1"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Required binary blobs to boot on this machine
|
|
||||||
hardware.enableRedistributableFirmware = true;
|
|
||||||
|
|
||||||
# Prioritize efficiency over performance
|
|
||||||
powerManagement.cpuFreqGovernor = "powersave";
|
|
||||||
|
|
||||||
# Allow firmware updates
|
|
||||||
hardware.cpu.intel.updateMicrocode = true;
|
|
||||||
|
|
||||||
# ZFS
|
|
||||||
zfs.enable = true;
|
|
||||||
# Generated with: head -c 8 /etc/machine-id
|
|
||||||
networking.hostId = "600279f4"; # Random ID required for ZFS
|
|
||||||
|
|
||||||
# Sets root ext4 filesystem instead of declaring it manually
|
|
||||||
disko = {
|
|
||||||
enableConfig = true;
|
|
||||||
devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; });
|
|
||||||
};
|
|
||||||
|
|
||||||
# Automatically load the ZFS pool on boot
|
|
||||||
boot.zfs.extraPools = [ "tank" ];
|
|
||||||
|
|
||||||
# Theming
|
|
||||||
|
|
||||||
# Server doesn't require GUI
|
|
||||||
gui.enable = false;
|
|
||||||
|
|
||||||
# Still require colors for programs like Neovim, K9S
|
|
||||||
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
|
||||||
|
|
||||||
# Programs and services
|
|
||||||
neovim.enable = true;
|
|
||||||
cloudflare.enable = true;
|
|
||||||
dotfiles.enable = true;
|
|
||||||
arrs.enable = true;
|
|
||||||
services.bind.enable = true;
|
|
||||||
services.caddy.enable = true;
|
|
||||||
services.jellyfin.enable = true;
|
|
||||||
services.nextcloud.enable = true;
|
|
||||||
services.calibre-web.enable = true;
|
|
||||||
services.openssh.enable = true;
|
|
||||||
services.prometheus.enable = false;
|
|
||||||
services.vmagent.enable = true;
|
|
||||||
services.samba.enable = true;
|
|
||||||
|
|
||||||
# Allows private remote access over the internet
|
|
||||||
cloudflareTunnel = {
|
|
||||||
enable = true;
|
|
||||||
id = "646754ac-2149-4a58-b51a-e1d0a1f3ade2";
|
|
||||||
credentialsFile = ../../private/cloudflared-swan.age;
|
|
||||||
ca =
|
|
||||||
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCHF/UMtJqPFrf6f6GRY0ZFnkCW7b6sYgUTjTtNfRj1RdmNic1NoJZql7y6BrqQinZvy7nsr1UFDNWoHn6ah3tg= open-ssh-ca@cloudflareaccess.org";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Send regular backups and litestream for DBs to an S3-like bucket
|
|
||||||
backup.s3 = {
|
|
||||||
endpoint = "s3.us-west-002.backblazeb2.com";
|
|
||||||
bucket = "noahmasur-backup";
|
|
||||||
accessKeyId = "0026b0e73b2e2c80000000005";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Disable passwords, only use SSH key
|
|
||||||
publicKey =
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
@ -1,132 +0,0 @@
|
|||||||
# The Tempest
|
|
||||||
# System configuration for my desktop
|
|
||||||
|
|
||||||
{ inputs, globals, overlays, ... }:
|
|
||||||
|
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = [
|
|
||||||
globals
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
../../modules/common
|
|
||||||
../../modules/nixos
|
|
||||||
{
|
|
||||||
nixpkgs.overlays = overlays;
|
|
||||||
|
|
||||||
# Hardware
|
|
||||||
physical = true;
|
|
||||||
networking.hostName = "tempest";
|
|
||||||
|
|
||||||
# Not sure what's necessary but too afraid to remove anything
|
|
||||||
boot.initrd.availableKernelModules =
|
|
||||||
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
|
||||||
|
|
||||||
# Graphics and VMs
|
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
|
||||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
|
||||||
|
|
||||||
# Required binary blobs to boot on this machine
|
|
||||||
hardware.enableRedistributableFirmware = true;
|
|
||||||
|
|
||||||
# Prioritize performance over efficiency
|
|
||||||
powerManagement.cpuFreqGovernor = "performance";
|
|
||||||
|
|
||||||
# Allow firmware updates
|
|
||||||
hardware.cpu.amd.updateMicrocode = true;
|
|
||||||
|
|
||||||
# Helps reduce GPU fan noise under idle loads
|
|
||||||
hardware.fancontrol.enable = true;
|
|
||||||
hardware.fancontrol.config = ''
|
|
||||||
# Configuration file generated by pwmconfig, changes will be lost
|
|
||||||
INTERVAL=10
|
|
||||||
DEVPATH=hwmon0=devices/pci0000:00/0000:00:03.1/0000:06:00.0/0000:07:00.0/0000:08:00.0
|
|
||||||
DEVNAME=hwmon0=amdgpu
|
|
||||||
FCTEMPS=hwmon0/pwm1=hwmon0/temp1_input
|
|
||||||
FCFANS= hwmon0/pwm1=hwmon0/fan1_input
|
|
||||||
MINTEMP=hwmon0/pwm1=50
|
|
||||||
MAXTEMP=hwmon0/pwm1=70
|
|
||||||
MINSTART=hwmon0/pwm1=100
|
|
||||||
MINSTOP=hwmon0/pwm1=10
|
|
||||||
MINPWM=hwmon0/pwm1=10
|
|
||||||
MAXPWM=hwmon0/pwm1=240
|
|
||||||
'';
|
|
||||||
|
|
||||||
# File systems must be declared in order to boot
|
|
||||||
|
|
||||||
# This is the root filesystem containing NixOS
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-label/nixos";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
# This is the boot filesystem for Grub
|
|
||||||
fileSystems."/boot" = {
|
|
||||||
device = "/dev/disk/by-label/boot";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Secrets must be prepared ahead before deploying
|
|
||||||
passwordHash = inputs.nixpkgs.lib.fileContents ../../misc/password.sha512;
|
|
||||||
|
|
||||||
# Theming
|
|
||||||
|
|
||||||
# Turn on all features related to desktop and graphical applications
|
|
||||||
gui.enable = true;
|
|
||||||
|
|
||||||
# Set the system-wide theme, also used for non-graphical programs
|
|
||||||
theme = {
|
|
||||||
colors = (import ../../colorscheme/gruvbox-dark).dark;
|
|
||||||
dark = true;
|
|
||||||
};
|
|
||||||
wallpaper = "${inputs.wallpapers}/gruvbox/road.jpg";
|
|
||||||
gtk.theme.name = inputs.nixpkgs.lib.mkDefault "Adwaita-dark";
|
|
||||||
|
|
||||||
# Programs and services
|
|
||||||
charm.enable = true;
|
|
||||||
neovim.enable = true;
|
|
||||||
media.enable = true;
|
|
||||||
dotfiles.enable = true;
|
|
||||||
firefox.enable = true;
|
|
||||||
kitty.enable = true;
|
|
||||||
_1password.enable = true;
|
|
||||||
discord.enable = true;
|
|
||||||
nautilus.enable = true;
|
|
||||||
obsidian.enable = true;
|
|
||||||
mail.enable = true;
|
|
||||||
mail.aerc.enable = true;
|
|
||||||
mail.himalaya.enable = true;
|
|
||||||
keybase.enable = true;
|
|
||||||
mullvad.enable = false;
|
|
||||||
nixlang.enable = true;
|
|
||||||
yt-dlp.enable = true;
|
|
||||||
gaming = {
|
|
||||||
dwarf-fortress.enable = true;
|
|
||||||
enable = true;
|
|
||||||
steam.enable = true;
|
|
||||||
legendary.enable = true;
|
|
||||||
lutris.enable = true;
|
|
||||||
leagueoflegends.enable = true;
|
|
||||||
ryujinx.enable = true;
|
|
||||||
};
|
|
||||||
services.vmagent.enable = true; # Enables Prometheus metrics
|
|
||||||
services.openssh.enable =
|
|
||||||
true; # Required for Cloudflare tunnel and identity file
|
|
||||||
|
|
||||||
# Allows private remote access over the internet
|
|
||||||
cloudflareTunnel = {
|
|
||||||
enable = true;
|
|
||||||
id = "ac133a82-31fb-480c-942a-cdbcd4c58173";
|
|
||||||
credentialsFile = ../../private/cloudflared-tempest.age;
|
|
||||||
ca =
|
|
||||||
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPY6C0HmdFCaxYtJxFr3qV4/1X4Q8KrYQ1hlme3u1hJXK+xW+lc9Y9glWHrhiTKilB7carYTB80US0O47gI5yU4= open-ssh-ca@cloudflareaccess.org";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Allows requests to force machine to wake up
|
|
||||||
# This network interface might change, needs to be set specifically for each machine.
|
|
||||||
# Or set usePredictableInterfaceNames = false
|
|
||||||
networking.interfaces.enp5s0.wakeOnLan.enable = true;
|
|
||||||
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
32
hosts/x86_64-linux/arrow/default.nix
Normal file
32
hosts/x86_64-linux/arrow/default.nix
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# The Arrow
|
||||||
|
# System configuration for temporary VM
|
||||||
|
|
||||||
|
rec {
|
||||||
|
# Hardware
|
||||||
|
networking.hostName = "arrow";
|
||||||
|
|
||||||
|
nmasur.settings = {
|
||||||
|
username = "noah";
|
||||||
|
fullName = "Noah Masur";
|
||||||
|
};
|
||||||
|
|
||||||
|
nmasur.profiles = {
|
||||||
|
base.enable = true;
|
||||||
|
server.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users."noah" = {
|
||||||
|
nmasur.settings = {
|
||||||
|
username = nmasur.settings.username;
|
||||||
|
fullName = nmasur.settings.fullName;
|
||||||
|
};
|
||||||
|
nmasur.profiles = {
|
||||||
|
common.enable = true;
|
||||||
|
linux-base.enable = true;
|
||||||
|
};
|
||||||
|
home.stateVersion = "23.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "23.05";
|
||||||
|
|
||||||
|
}
|
33
hosts/x86_64-linux/hydra/default.nix
Normal file
33
hosts/x86_64-linux/hydra/default.nix
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# The Hydra
|
||||||
|
# System configuration for WSL
|
||||||
|
|
||||||
|
rec {
|
||||||
|
# Hardware
|
||||||
|
networking.hostName = "hydra";
|
||||||
|
|
||||||
|
nmasur.settings = {
|
||||||
|
username = "noah";
|
||||||
|
fullName = "Noah Masur";
|
||||||
|
};
|
||||||
|
|
||||||
|
nmasur.profiles = {
|
||||||
|
base.enable = true;
|
||||||
|
wsl.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users."noah" = {
|
||||||
|
nmasur.settings = {
|
||||||
|
username = nmasur.settings.username;
|
||||||
|
fullName = nmasur.settings.fullName;
|
||||||
|
};
|
||||||
|
nmasur.profiles = {
|
||||||
|
common.enable = true;
|
||||||
|
linux-base.enable = true;
|
||||||
|
power-user.enable = true;
|
||||||
|
};
|
||||||
|
home.stateVersion = "23.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "23.05";
|
||||||
|
|
||||||
|
}
|
64
hosts/x86_64-linux/staff/default.nix
Normal file
64
hosts/x86_64-linux/staff/default.nix
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
# The Staff
|
||||||
|
# System configuration test
|
||||||
|
|
||||||
|
rec {
|
||||||
|
# Hardware
|
||||||
|
networking.hostName = "staff";
|
||||||
|
|
||||||
|
nmasur.settings = {
|
||||||
|
username = "noah";
|
||||||
|
fullName = "Noah Masur";
|
||||||
|
};
|
||||||
|
|
||||||
|
nmasur.profiles = {
|
||||||
|
base.enable = true;
|
||||||
|
home.enable = true;
|
||||||
|
gui.enable = true;
|
||||||
|
};
|
||||||
|
nmasur.presets.services.cloudflared.enable = false;
|
||||||
|
nmasur.presets.services.kanata.enable = false;
|
||||||
|
nmasur.presets.services.openssh.enable = true;
|
||||||
|
|
||||||
|
home-manager.users."noah" = {
|
||||||
|
nmasur.settings = {
|
||||||
|
username = nmasur.settings.username;
|
||||||
|
fullName = nmasur.settings.fullName;
|
||||||
|
};
|
||||||
|
nmasur.profiles = {
|
||||||
|
common.enable = true;
|
||||||
|
linux-base.enable = true;
|
||||||
|
linux-gui.enable = true;
|
||||||
|
power-user.enable = true;
|
||||||
|
};
|
||||||
|
nmasur.presets.services.mbsync = {
|
||||||
|
user = nmasur.settings.username;
|
||||||
|
server = "noahmasur.com";
|
||||||
|
};
|
||||||
|
home.stateVersion = "23.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "23.05";
|
||||||
|
# Not sure what's necessary but too afraid to remove anything
|
||||||
|
# File systems must be declared in order to boot
|
||||||
|
|
||||||
|
# This is the root filesystem containing NixOS
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-label/nixos";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
# This is the boot filesystem for Grub
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-label/boot";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Allows private remote access over the internet
|
||||||
|
# nmasur.presets.services.cloudflared = {
|
||||||
|
# tunnel = {
|
||||||
|
# id = "ac133a82-31fb-480c-942a-cdbcd4c58173";
|
||||||
|
# credentialsFile = ../../private/cloudflared-tempest.age;
|
||||||
|
# ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPY6C0HmdFCaxYtJxFr3qV4/1X4Q8KrYQ1hlme3u1hJXK+xW+lc9Y9glWHrhiTKilB7carYTB80US0O47gI5yU4= open-ssh-ca@cloudflareaccess.org";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
}
|
19
hosts/x86_64-linux/swan/cloudflared-swan.age
Normal file
19
hosts/x86_64-linux/swan/cloudflared-swan.age
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IE1nSGFPdyBuU1BO
|
||||||
|
ZGdOVFRTekN3SFRhQWYwcWt6OHpLZXM0aENsQ3d1VWpxYUhXN3k4CnNwNWpQcU90
|
||||||
|
elR0eWVyMWFUUkhORFRQeVdsdTErWUgzNW9mN1BWS2szbUUKLT4gc3NoLWVkMjU1
|
||||||
|
MTkgWXlTVU1RIDRRS0VESG5NNWpxbm1DTjBkY2ExR3I3aE1PUTNVTXBFZ2wwVC9j
|
||||||
|
WDIrMTgKaXkwWk1xRWp6Z3c3NFZZS0cybHFqcUVRczNMZ05tSmxPNjBlVmRHK2h3
|
||||||
|
SQotPiBzc2gtZWQyNTUxOSBuanZYNUEgYWI1SkhBZ0Jrb3hzbDRwcnRMeHhGSlpB
|
||||||
|
aWt5ZmRxaGhmbXFDQWdNamxRbwpXMWo0TjZhbHM3ejFYNVU5WlkxWTJSbVBPOEhr
|
||||||
|
MUt3akxMU3QzN3Z4M0lFCi0+IHNzaC1lZDI1NTE5IENxSU9VQSA1dmdFRE1QSU55
|
||||||
|
WUVuOU9OTHJjM0RxVWhmTlEvdk1mNU1iUEwyNlFqRFZvCldleVNGQ1RZdU1tU2J2
|
||||||
|
dWxGZlVkaDBWNEZRUFNBcEIvTEdkODdDS25GdGsKLT4gc3NoLWVkMjU1MTkgejFP
|
||||||
|
Y1p3IG5SbVpVZldPSkJXYm9BZ3B6OXZXMlB4T2Z5RHptR1pqbVRVUS9LVEZyUzgK
|
||||||
|
ZlVTZWlUQ2VoWVNuOGE5Wk5vZGdVVldzbUZKRERyUFN0eVJ4TWpmL2gwcwotLS0g
|
||||||
|
MlJmTlVkdHhHQ25JWm0xVmdjVDFYM1lHaE9WdnJSVkVMMnNwV0c4eXc0QQpYTchD
|
||||||
|
DCiEm4rOav4/IwK26gSgi2B4qq4RETyAbF4oa87cvFM8zVXo7W8nF+eWzeWGNZrc
|
||||||
|
yRFfOYf4gtlNCVLc+UAapvM1rKuw1IOQeJLAwGCHygXKWY7zSXdT2ERACXESvCCz
|
||||||
|
b7W62NVx0Pc4mAAQB3QU995HFVFuHLa939PPPlkgxqepNWCKrmUFl/qjRpOoVrV6
|
||||||
|
GwRgIo36PhcfZVCswyVXgcc4M3CCG5ZuWInuuljqTB70OzBVkKCaUeiRaRIZJg==
|
||||||
|
-----END AGE ENCRYPTED FILE-----
|
77
hosts/x86_64-linux/swan/default.nix
Normal file
77
hosts/x86_64-linux/swan/default.nix
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
# The Swan
|
||||||
|
# System configuration for my home NAS server
|
||||||
|
|
||||||
|
rec {
|
||||||
|
networking.hostName = "swan";
|
||||||
|
|
||||||
|
nmasur.settings = {
|
||||||
|
username = "noah";
|
||||||
|
fullName = "Noah Masur";
|
||||||
|
};
|
||||||
|
|
||||||
|
nmasur.profiles = {
|
||||||
|
base.enable = true;
|
||||||
|
server.enable = true;
|
||||||
|
home.enable = true;
|
||||||
|
nas.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users."noah" = {
|
||||||
|
nmasur.settings = {
|
||||||
|
username = nmasur.settings.username;
|
||||||
|
fullName = nmasur.settings.fullName;
|
||||||
|
};
|
||||||
|
nmasur.profiles = {
|
||||||
|
common.enable = true;
|
||||||
|
linux-base.enable = true;
|
||||||
|
};
|
||||||
|
home.stateVersion = "23.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Not sure what's necessary but too afraid to remove anything
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"nvme"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Required for transcoding
|
||||||
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
|
boot.kernelParams = [
|
||||||
|
"radeon.si_support=0"
|
||||||
|
"amdgpu.si_support=1"
|
||||||
|
"radeon.cik_support=0"
|
||||||
|
"amdgpu.cik_support=1"
|
||||||
|
"amdgpu.dc=1"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Required binary blobs to boot on this machine
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
|
# Prioritize efficiency over performance
|
||||||
|
powerManagement.cpuFreqGovernor = "powersave";
|
||||||
|
|
||||||
|
# Allow firmware updates
|
||||||
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
|
|
||||||
|
# ZFS
|
||||||
|
# Generated with: head -c 8 /etc/machine-id
|
||||||
|
networking.hostId = "600279f4"; # Random ID required for ZFS
|
||||||
|
|
||||||
|
# Sets root ext4 filesystem instead of declaring it manually
|
||||||
|
disko = {
|
||||||
|
enableConfig = true;
|
||||||
|
devices = (import ../../../disks/root.nix { disk = "/dev/nvme0n1"; });
|
||||||
|
};
|
||||||
|
|
||||||
|
# Allows private remote access over the internet
|
||||||
|
nmasur.presets.services.cloudflared = {
|
||||||
|
tunnel = {
|
||||||
|
id = "646754ac-2149-4a58-b51a-e1d0a1f3ade2";
|
||||||
|
credentialsFile = ./cloudflared-swan.age;
|
||||||
|
ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCHF/UMtJqPFrf6f6GRY0ZFnkCW7b6sYgUTjTtNfRj1RdmNic1NoJZql7y6BrqQinZvy7nsr1UFDNWoHn6ah3tg= open-ssh-ca@cloudflareaccess.org";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
39
hosts/x86_64-linux/swan/root.nix
Normal file
39
hosts/x86_64-linux/swan/root.nix
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{ disk, ... }:
|
||||||
|
{
|
||||||
|
disk = {
|
||||||
|
boot = {
|
||||||
|
type = "disk";
|
||||||
|
device = disk;
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
# Boot partition
|
||||||
|
ESP = rec {
|
||||||
|
size = "512MiB";
|
||||||
|
type = "EF00";
|
||||||
|
label = "boot";
|
||||||
|
device = "/dev/disk/by-label/${label}";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
extraArgs = [ "-n ${label}" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# Root partition ext4
|
||||||
|
root = rec {
|
||||||
|
size = "100%";
|
||||||
|
label = "nixos";
|
||||||
|
device = "/dev/disk/by-label/${label}";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/";
|
||||||
|
extraArgs = [ "-L ${label}" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
19
hosts/x86_64-linux/tempest/cloudflared-tempest.age
Normal file
19
hosts/x86_64-linux/tempest/cloudflared-tempest.age
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IE1nSGFPdyBMMDZj
|
||||||
|
dkdOSTc1bHgybjAwcUVHUXFhY0I0NE45K1B5SEh4NGN4T0tpREhjCnViQzVXTVk3
|
||||||
|
dzB5ZEY5d1hvcHVDSXVubElOdEVQQ0Fja2dnL0ZnVG4wNEUKLT4gc3NoLWVkMjU1
|
||||||
|
MTkgWXlTVU1RIHRiVkNzRCs4V3EvL2szNG8zSlRYSVloRlVsSTk3a0hnSFMyUzRN
|
||||||
|
K0lyMzQKWDhIOTVzMGJkaGpVQmNtS0pPQnNTSjRmK1dYck1SUFd5VnVvYnJSWkhs
|
||||||
|
YwotPiBzc2gtZWQyNTUxOSBuanZYNUEgUy9kWmxsc0p2L0pFWDlPMGlzeVBHNjJ2
|
||||||
|
a05ycmZtbUJrOXRBVVgxVjVtZwo4RVM3Sms2M2krdjU0K1ZHREhhRkdMcENTbTJr
|
||||||
|
UEh6cWcvOGNIRUNJZUFvCi0+IHNzaC1lZDI1NTE5IENxSU9VQSA5d0FwTWJzZEpJ
|
||||||
|
UEJaZi91YXZOOFhGVlVVekEvSVRnK3Y2VFdhL216SVZrCkRURE9OYnIvSGVtMWNl
|
||||||
|
MWFGSTEwUVBITTlnaWVXc1hpMFpqdFdMcFY2NHMKLT4gc3NoLWVkMjU1MTkgejFP
|
||||||
|
Y1p3IDhkUk9KTE1UMysvajY3WEx5MFdLeEdlVnBmSUx6TTlnYWdqaWorYm0rRGMK
|
||||||
|
SlhaRFNLaTZHVkpRR3U5eE5JOTBPWWM3OTFka1ZWSHJMaFFhZG1CSzNVTQotLS0g
|
||||||
|
THNSTmNzK3JvbVN5S3RaVlQwdDRiOWFkVGZ3WUtyT2IyMWtPSVNtajF5YwoCUWHU
|
||||||
|
KSe09W6BaVEW2x0ieBXN6KkL4FNPAP8zCom8fNVjyjAZpxd2t0kisJjJ45xg8eG4
|
||||||
|
x9sj+hG9EsWIFvVpnF7LUIEXcRMjvRlNXED8HmYR0qzUhc89VQ9N4EoQPJYN1dME
|
||||||
|
kxAzH8p5HBidxfJLpACaG5QHGb97chJXTDrT+ZKt+hPfZ16OhsKBj2s0gvHbcCQH
|
||||||
|
sdqQT4+FlJshDiRiauTmqF/umnCnzl4+H4Xe8kLVrZxDOAv1iwuTX8zcaNOFNw==
|
||||||
|
-----END AGE ENCRYPTED FILE-----
|
110
hosts/x86_64-linux/tempest/default.nix
Normal file
110
hosts/x86_64-linux/tempest/default.nix
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
# The Tempest
|
||||||
|
# System configuration for my desktop
|
||||||
|
|
||||||
|
rec {
|
||||||
|
# Hardware
|
||||||
|
networking.hostName = "tempest";
|
||||||
|
|
||||||
|
nmasur.settings = {
|
||||||
|
username = "noah";
|
||||||
|
fullName = "Noah Masur";
|
||||||
|
};
|
||||||
|
|
||||||
|
nmasur.profiles = {
|
||||||
|
base.enable = true;
|
||||||
|
home.enable = true;
|
||||||
|
gui.enable = true;
|
||||||
|
gaming.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users."noah" = {
|
||||||
|
nmasur.settings = {
|
||||||
|
username = nmasur.settings.username;
|
||||||
|
fullName = nmasur.settings.fullName;
|
||||||
|
};
|
||||||
|
nmasur.profiles = {
|
||||||
|
common.enable = true;
|
||||||
|
linux-base.enable = true;
|
||||||
|
linux-gui.enable = true;
|
||||||
|
linux-gaming.enable = true;
|
||||||
|
power-user.enable = true;
|
||||||
|
developer.enable = true;
|
||||||
|
experimental.enable = true;
|
||||||
|
};
|
||||||
|
nmasur.presets.services.mbsync = {
|
||||||
|
user = nmasur.settings.username;
|
||||||
|
server = "noahmasur.com";
|
||||||
|
};
|
||||||
|
home.stateVersion = "23.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "23.05";
|
||||||
|
# Not sure what's necessary but too afraid to remove anything
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usb_storage"
|
||||||
|
"usbhid"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Graphics and VMs
|
||||||
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||||
|
|
||||||
|
# Required binary blobs to boot on this machine
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
|
# Prioritize performance over efficiency
|
||||||
|
powerManagement.cpuFreqGovernor = "performance";
|
||||||
|
|
||||||
|
# Allow firmware updates
|
||||||
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
|
|
||||||
|
# Helps reduce GPU fan noise under idle loads
|
||||||
|
hardware.fancontrol.enable = true;
|
||||||
|
hardware.fancontrol.config = ''
|
||||||
|
# Configuration file generated by pwmconfig, changes will be lost
|
||||||
|
INTERVAL=10
|
||||||
|
DEVPATH=hwmon0=devices/pci0000:00/0000:00:03.1/0000:06:00.0/0000:07:00.0/0000:08:00.0
|
||||||
|
DEVNAME=hwmon0=amdgpu
|
||||||
|
FCTEMPS=hwmon0/pwm1=hwmon0/temp1_input
|
||||||
|
FCFANS= hwmon0/pwm1=hwmon0/fan1_input
|
||||||
|
MINTEMP=hwmon0/pwm1=50
|
||||||
|
MAXTEMP=hwmon0/pwm1=70
|
||||||
|
MINSTART=hwmon0/pwm1=100
|
||||||
|
MINSTOP=hwmon0/pwm1=10
|
||||||
|
MINPWM=hwmon0/pwm1=10
|
||||||
|
MAXPWM=hwmon0/pwm1=240
|
||||||
|
'';
|
||||||
|
|
||||||
|
# File systems must be declared in order to boot
|
||||||
|
|
||||||
|
# This is the root filesystem containing NixOS
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-label/nixos";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
# This is the boot filesystem for Grub
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-label/boot";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Allows private remote access over the internet
|
||||||
|
nmasur.presets.services.cloudflared = {
|
||||||
|
tunnel = {
|
||||||
|
id = "ac133a82-31fb-480c-942a-cdbcd4c58173";
|
||||||
|
credentialsFile = ./cloudflared-tempest.age;
|
||||||
|
ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPY6C0HmdFCaxYtJxFr3qV4/1X4Q8KrYQ1hlme3u1hJXK+xW+lc9Y9glWHrhiTKilB7carYTB80US0O47gI5yU4= open-ssh-ca@cloudflareaccess.org";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Allows requests to force machine to wake up
|
||||||
|
# This network interface might change, needs to be set specifically for each machine.
|
||||||
|
# Or set usePredictableInterfaceNames = false
|
||||||
|
networking.interfaces.enp5s0.wakeOnLan.enable = true;
|
||||||
|
}
|
@ -4,3 +4,4 @@ ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s
|
|||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHVknmPi7sG6ES0G0jcsvebzKGWWaMfJTYgvOue6EULI flame
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHVknmPi7sG6ES0G0jcsvebzKGWWaMfJTYgvOue6EULI flame
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ9mwXlZnIALt9SnH3FOZvdgHLM5ZqwYUERXBbM7Rwh6 swan
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ9mwXlZnIALt9SnH3FOZvdgHLM5ZqwYUERXBbM7Rwh6 swan
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3yHivgEXr2ecwe58h9bkhwTYivf3GwL8xenQKMeiUb tempest
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3yHivgEXr2ecwe58h9bkhwTYivf3GwL8xenQKMeiUb tempest
|
||||||
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICmGHIWBZzRx35/yFgnPJSHN2+35WJ30G9c5tDhPsCrl arrow
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
# Modules
|
|
||||||
|
|
||||||
| Module | Purpose |
|
|
||||||
| --- | --- |
|
|
||||||
| [common](./common/default.nix) | User programs and OS-agnostic configuration |
|
|
||||||
| [darwin](./darwin/default.nix) | macOS-specific configuration |
|
|
||||||
| [nixos](./nixos/default.nix) | NixOS-specific configuration |
|
|
||||||
| [wsl](./wsl/default.nix) | WSL-specific configuration |
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
options = {
|
|
||||||
_1password = {
|
|
||||||
enable = lib.mkEnableOption {
|
|
||||||
description = "Enable 1Password.";
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf
|
|
||||||
(config.gui.enable && config._1password.enable && pkgs.stdenv.isLinux) {
|
|
||||||
unfreePackages = [ "1password" "_1password-gui" ];
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
home.packages = with pkgs; [ _1password-gui ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,99 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
options = {
|
|
||||||
alacritty = {
|
|
||||||
enable = lib.mkEnableOption {
|
|
||||||
description = "Enable Alacritty.";
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.gui.enable && config.alacritty.enable) {
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
xsession.windowManager.i3.config.terminal = "alacritty";
|
|
||||||
programs.rofi.terminal = "${pkgs.alacritty}/bin/alacritty";
|
|
||||||
programs.alacritty = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
window = {
|
|
||||||
dimensions = {
|
|
||||||
columns = 85;
|
|
||||||
lines = 30;
|
|
||||||
};
|
|
||||||
padding = {
|
|
||||||
x = 20;
|
|
||||||
y = 20;
|
|
||||||
};
|
|
||||||
opacity = 1.0;
|
|
||||||
};
|
|
||||||
scrolling.history = 10000;
|
|
||||||
font = { size = 14.0; };
|
|
||||||
key_bindings = [
|
|
||||||
# Used for word completion in fish_user_key_bindings
|
|
||||||
{
|
|
||||||
key = "Return";
|
|
||||||
mods = "Shift";
|
|
||||||
chars = "\\x1F";
|
|
||||||
}
|
|
||||||
# Used for searching nixpkgs in fish_user_key_bindings
|
|
||||||
{
|
|
||||||
key = "N";
|
|
||||||
mods = "Control|Shift";
|
|
||||||
chars = "\\x11F";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "H";
|
|
||||||
mods = "Control|Shift";
|
|
||||||
mode = "~Vi";
|
|
||||||
action = "ToggleViMode";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Return";
|
|
||||||
mode = "Vi";
|
|
||||||
action = "ToggleViMode";
|
|
||||||
}
|
|
||||||
# Used to enable $ keybind in Vi mode
|
|
||||||
{
|
|
||||||
key = 5; # Scancode for key4
|
|
||||||
mods = "Shift";
|
|
||||||
mode = "Vi|~Search";
|
|
||||||
action = "Last";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
colors = {
|
|
||||||
primary = {
|
|
||||||
background = config.theme.colors.base00;
|
|
||||||
foreground = config.theme.colors.base05;
|
|
||||||
};
|
|
||||||
cursor = {
|
|
||||||
text = "#1d2021";
|
|
||||||
cursor = config.theme.colors.base05;
|
|
||||||
};
|
|
||||||
normal = {
|
|
||||||
black = "#1d2021";
|
|
||||||
red = config.theme.colors.base08;
|
|
||||||
green = config.theme.colors.base0B;
|
|
||||||
yellow = config.theme.colors.base0A;
|
|
||||||
blue = config.theme.colors.base0D;
|
|
||||||
magenta = config.theme.colors.base0E;
|
|
||||||
cyan = config.theme.colors.base0C;
|
|
||||||
white = config.theme.colors.base05;
|
|
||||||
};
|
|
||||||
bright = {
|
|
||||||
black = config.theme.colors.base03;
|
|
||||||
red = config.theme.colors.base09;
|
|
||||||
green = config.theme.colors.base01;
|
|
||||||
yellow = config.theme.colors.base02;
|
|
||||||
blue = config.theme.colors.base04;
|
|
||||||
magenta = config.theme.colors.base06;
|
|
||||||
cyan = config.theme.colors.base0F;
|
|
||||||
white = config.theme.colors.base07;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
draw_bold_text_with_bright_colors = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
{ ... }: {
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
./1password.nix
|
|
||||||
./alacritty.nix
|
|
||||||
./discord.nix
|
|
||||||
./firefox.nix
|
|
||||||
./kitty.nix
|
|
||||||
./media.nix
|
|
||||||
./obsidian.nix
|
|
||||||
./qbittorrent.nix
|
|
||||||
./slack.nix
|
|
||||||
./yt-dlp.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
@ -1,28 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
options = {
|
|
||||||
discord = {
|
|
||||||
enable = lib.mkEnableOption {
|
|
||||||
description = "Enable Discord.";
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.gui.enable && config.discord.enable) {
|
|
||||||
unfreePackages = [ "discord" ];
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
home.packages = with pkgs; [ discord ];
|
|
||||||
xdg.configFile."discord/settings.json".text = ''
|
|
||||||
{
|
|
||||||
"BACKGROUND_COLOR": "#202225",
|
|
||||||
"IS_MAXIMIZED": false,
|
|
||||||
"IS_MINIMIZED": false,
|
|
||||||
"OPEN_ON_STARTUP": false,
|
|
||||||
"MINIMIZE_TO_TRAY": false,
|
|
||||||
"SKIP_HOST_UPDATE": true
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,186 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
options = {
|
|
||||||
firefox = {
|
|
||||||
enable = lib.mkEnableOption {
|
|
||||||
description = "Enable Firefox.";
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.gui.enable && config.firefox.enable) {
|
|
||||||
|
|
||||||
unfreePackages = [
|
|
||||||
(lib.mkIf config._1password.enable "onepassword-password-manager")
|
|
||||||
"okta-browser-plugin"
|
|
||||||
"wappalyzer"
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
|
|
||||||
programs.firefox = {
|
|
||||||
enable = true;
|
|
||||||
package =
|
|
||||||
if pkgs.stdenv.isDarwin then pkgs.firefox-bin else pkgs.firefox;
|
|
||||||
profiles.default = {
|
|
||||||
id = 0;
|
|
||||||
name = "default";
|
|
||||||
isDefault = true;
|
|
||||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
|
||||||
ublock-origin
|
|
||||||
vimium
|
|
||||||
multi-account-containers
|
|
||||||
facebook-container
|
|
||||||
(lib.mkIf config._1password.enable onepassword-password-manager)
|
|
||||||
okta-browser-plugin
|
|
||||||
sponsorblock
|
|
||||||
reddit-enhancement-suite
|
|
||||||
return-youtube-dislikes
|
|
||||||
markdownload
|
|
||||||
darkreader
|
|
||||||
snowflake
|
|
||||||
don-t-fuck-with-paste
|
|
||||||
i-dont-care-about-cookies
|
|
||||||
wappalyzer
|
|
||||||
];
|
|
||||||
settings = {
|
|
||||||
"app.update.auto" = false;
|
|
||||||
"browser.aboutConfig.showWarning" = false;
|
|
||||||
"browser.warnOnQuit" = false;
|
|
||||||
"browser.quitShortcut.disabled" =
|
|
||||||
if pkgs.stdenv.isLinux then true else false;
|
|
||||||
"browser.theme.dark-private-windows" = true;
|
|
||||||
"browser.toolbars.bookmarks.visibility" = false;
|
|
||||||
"browser.startup.page" = 3; # Restore previous session
|
|
||||||
"browser.newtabpage.enabled" = false; # Make new tabs blank
|
|
||||||
"trailhead.firstrun.didSeeAboutWelcome" =
|
|
||||||
true; # Disable welcome splash
|
|
||||||
"dom.forms.autocomplete.formautofill" = false; # Disable autofill
|
|
||||||
"extensions.formautofill.creditCards.enabled" =
|
|
||||||
false; # Disable credit cards
|
|
||||||
"dom.payments.defaults.saveAddress" = false; # Disable address save
|
|
||||||
"general.autoScroll" = true; # Drag middle-mouse to scroll
|
|
||||||
"services.sync.prefs.sync.general.autoScroll" =
|
|
||||||
false; # Prevent disabling autoscroll
|
|
||||||
"extensions.pocket.enabled" = false;
|
|
||||||
"toolkit.legacyUserProfileCustomizations.stylesheets" =
|
|
||||||
true; # Allow userChrome.css
|
|
||||||
"layout.css.color-mix.enabled" = true;
|
|
||||||
"ui.systemUsesDarkTheme" =
|
|
||||||
if config.theme.dark == true then 1 else 0;
|
|
||||||
"media.ffmpeg.vaapi.enabled" =
|
|
||||||
true; # Enable hardware video acceleration
|
|
||||||
"cookiebanners.ui.desktop.enabled" = true; # Reject cookie popups
|
|
||||||
"svg.context-properties.content.enabled" = true; # Sidebery styling
|
|
||||||
};
|
|
||||||
userChrome = ''
|
|
||||||
:root {
|
|
||||||
--focus-outline-color: ${config.theme.colors.base04} !important;
|
|
||||||
--toolbar-color: ${config.theme.colors.base07} !important;
|
|
||||||
--tab-min-height: 30px !important;
|
|
||||||
}
|
|
||||||
/* Background of tab bar */
|
|
||||||
.toolbar-items {
|
|
||||||
background-color: ${config.theme.colors.base00} !important;
|
|
||||||
}
|
|
||||||
/* Extra tab bar sides on macOS */
|
|
||||||
.titlebar-spacer {
|
|
||||||
background-color: ${config.theme.colors.base00} !important;
|
|
||||||
}
|
|
||||||
.titlebar-buttonbox-container {
|
|
||||||
background-color: ${config.theme.colors.base00} !important;
|
|
||||||
}
|
|
||||||
#tabbrowser-tabs {
|
|
||||||
border-inline-start: 0 !important;
|
|
||||||
}
|
|
||||||
/* Private Browsing indicator on macOS */
|
|
||||||
#private-browsing-indicator-with-label {
|
|
||||||
background-color: ${config.theme.colors.base00} !important;
|
|
||||||
margin-inline: 0 !important;
|
|
||||||
padding-inline: 7px;
|
|
||||||
}
|
|
||||||
/* Tabs themselves */
|
|
||||||
.tabbrowser-tab .tab-stack {
|
|
||||||
border-radius: 5px 5px 0 0;
|
|
||||||
overflow: hidden;
|
|
||||||
background-color: ${config.theme.colors.base00};
|
|
||||||
color: ${config.theme.colors.base06} !important;
|
|
||||||
}
|
|
||||||
.tab-content {
|
|
||||||
border-bottom: 2px solid color-mix(in srgb, var(--identity-tab-color) 40%, transparent);
|
|
||||||
border-radius: 5px 5px 0 0;
|
|
||||||
background-color: ${config.theme.colors.base00};
|
|
||||||
color: ${config.theme.colors.base06} !important;
|
|
||||||
}
|
|
||||||
.tab-content[selected=true] {
|
|
||||||
border-bottom: 2px solid color-mix(in srgb, var(--identity-tab-color) 25%, transparent);
|
|
||||||
background-color: ${config.theme.colors.base01} !important;
|
|
||||||
color: ${config.theme.colors.base07} !important;
|
|
||||||
}
|
|
||||||
/* Below tab bar */
|
|
||||||
#nav-bar {
|
|
||||||
background: ${config.theme.colors.base01} !important;
|
|
||||||
}
|
|
||||||
/* URL bar in nav bar */
|
|
||||||
#urlbar[focused=true] {
|
|
||||||
color: ${config.theme.colors.base07} !important;
|
|
||||||
background: ${config.theme.colors.base02} !important;
|
|
||||||
caret-color: ${config.theme.colors.base05} !important;
|
|
||||||
}
|
|
||||||
#urlbar:not([focused=true]) {
|
|
||||||
color: ${config.theme.colors.base04} !important;
|
|
||||||
background: ${config.theme.colors.base02} !important;
|
|
||||||
}
|
|
||||||
#urlbar ::-moz-selection {
|
|
||||||
color: ${config.theme.colors.base07} !important;
|
|
||||||
background: ${config.theme.colors.base02} !important;
|
|
||||||
}
|
|
||||||
#urlbar-input-container {
|
|
||||||
border: 1px solid ${config.theme.colors.base01} !important;
|
|
||||||
}
|
|
||||||
#urlbar-background {
|
|
||||||
background: ${config.theme.colors.base01} !important;
|
|
||||||
}
|
|
||||||
/* Text in URL bar */
|
|
||||||
#urlbar-input, #urlbar-scheme, .searchbar-textbox {
|
|
||||||
color: ${config.theme.colors.base07} !important;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
userContent = ''
|
|
||||||
@-moz-document url-prefix(about:blank) {
|
|
||||||
* {
|
|
||||||
background-color:${config.theme.colors.base01} !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
|
|
||||||
extraConfig = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
xsession.windowManager.i3.config.keybindings =
|
|
||||||
lib.mkIf pkgs.stdenv.isLinux {
|
|
||||||
"${
|
|
||||||
config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier
|
|
||||||
}+Shift+b" = "exec ${
|
|
||||||
# Don't name the script `firefox` or it will affect grep
|
|
||||||
builtins.toString (pkgs.writeShellScript "focus-ff.sh" ''
|
|
||||||
count=$(ps aux | grep -c firefox)
|
|
||||||
if [ "$count" -eq 1 ]; then
|
|
||||||
i3-msg "exec --no-startup-id firefox"
|
|
||||||
sleep 0.5
|
|
||||||
fi
|
|
||||||
i3-msg "[class=firefox] focus"
|
|
||||||
'')
|
|
||||||
}";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,110 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
options = {
|
|
||||||
kitty = {
|
|
||||||
enable = lib.mkEnableOption {
|
|
||||||
description = "Enable Kitty.";
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.gui.enable && config.kitty.enable) {
|
|
||||||
|
|
||||||
# Set the Rofi-Systemd terminal for viewing logs
|
|
||||||
# Using optionalAttrs because only available in NixOS
|
|
||||||
environment = { } // lib.attrsets.optionalAttrs
|
|
||||||
(builtins.hasAttr "sessionVariables" config.environment) {
|
|
||||||
sessionVariables.ROFI_SYSTEMD_TERM = "${pkgs.kitty}/bin/kitty";
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
|
|
||||||
# Set the i3 terminal
|
|
||||||
xsession.windowManager.i3.config.terminal =
|
|
||||||
lib.mkIf pkgs.stdenv.isLinux "kitty";
|
|
||||||
|
|
||||||
# Set the Rofi terminal for running programs
|
|
||||||
programs.rofi.terminal =
|
|
||||||
lib.mkIf pkgs.stdenv.isLinux "${pkgs.kitty}/bin/kitty";
|
|
||||||
|
|
||||||
# Display images in the terminal
|
|
||||||
programs.fish.shellAliases = {
|
|
||||||
icat = "kitty +kitten icat";
|
|
||||||
ssh = "kitty +kitten ssh";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.kitty = {
|
|
||||||
enable = true;
|
|
||||||
environment = { };
|
|
||||||
extraConfig = "";
|
|
||||||
font.size = 14;
|
|
||||||
keybindings = {
|
|
||||||
# Use shift+enter to complete text suggestions in fish
|
|
||||||
"shift+enter" = "send_text all \\x1F";
|
|
||||||
|
|
||||||
# Easy fullscreen toggle (for macOS)
|
|
||||||
"super+f" = "toggle_fullscreen";
|
|
||||||
};
|
|
||||||
settings = {
|
|
||||||
|
|
||||||
# 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;
|
|
||||||
selection_background = config.theme.colors.base05;
|
|
||||||
selection_foreground = config.theme.colors.base00;
|
|
||||||
url_color = config.theme.colors.base04;
|
|
||||||
cursor = config.theme.colors.base05;
|
|
||||||
active_border_color = config.theme.colors.base03;
|
|
||||||
inactive_border_color = config.theme.colors.base01;
|
|
||||||
active_tab_background = config.theme.colors.base00;
|
|
||||||
active_tab_foreground = config.theme.colors.base05;
|
|
||||||
inactive_tab_background = config.theme.colors.base01;
|
|
||||||
inactive_tab_foreground = config.theme.colors.base04;
|
|
||||||
tab_bar_background = config.theme.colors.base01;
|
|
||||||
|
|
||||||
# normal
|
|
||||||
color0 = config.theme.colors.base00;
|
|
||||||
color1 = config.theme.colors.base08;
|
|
||||||
color2 = config.theme.colors.base0B;
|
|
||||||
color3 = config.theme.colors.base0A;
|
|
||||||
color4 = config.theme.colors.base0D;
|
|
||||||
color5 = config.theme.colors.base0E;
|
|
||||||
color6 = config.theme.colors.base0C;
|
|
||||||
color7 = config.theme.colors.base05;
|
|
||||||
|
|
||||||
# bright
|
|
||||||
color8 = config.theme.colors.base03;
|
|
||||||
color9 = config.theme.colors.base08;
|
|
||||||
color10 = config.theme.colors.base0B;
|
|
||||||
color11 = config.theme.colors.base0A;
|
|
||||||
color12 = config.theme.colors.base0D;
|
|
||||||
color13 = config.theme.colors.base0E;
|
|
||||||
color14 = config.theme.colors.base0C;
|
|
||||||
color15 = config.theme.colors.base07;
|
|
||||||
|
|
||||||
# extended base16 colors
|
|
||||||
color16 = config.theme.colors.base09;
|
|
||||||
color17 = config.theme.colors.base0F;
|
|
||||||
color18 = config.theme.colors.base01;
|
|
||||||
color19 = config.theme.colors.base02;
|
|
||||||
color20 = config.theme.colors.base04;
|
|
||||||
color21 = config.theme.colors.base06;
|
|
||||||
|
|
||||||
# Scrollback
|
|
||||||
scrolling_lines = 10000;
|
|
||||||
scrollback_pager_history_size = 10; # MB
|
|
||||||
|
|
||||||
# Window
|
|
||||||
window_padding_width = 6;
|
|
||||||
|
|
||||||
tab_bar_edge = "top";
|
|
||||||
tab_bar_style = "slant";
|
|
||||||
|
|
||||||
# Disable audio
|
|
||||||
enable_audio_bell = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,59 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
options = {
|
|
||||||
media = {
|
|
||||||
enable = lib.mkEnableOption {
|
|
||||||
description = "Enable media programs.";
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.gui.enable && config.media.enable) {
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
nsxiv # Image viewer
|
|
||||||
mupdf # PDF viewer
|
|
||||||
zathura # PDF viewer
|
|
||||||
];
|
|
||||||
|
|
||||||
# Video player
|
|
||||||
programs.mpv = {
|
|
||||||
enable = true;
|
|
||||||
bindings = { };
|
|
||||||
config = {
|
|
||||||
image-display-duration = 2; # For cycling through images
|
|
||||||
hwdec = "auto-safe"; # Attempt to use GPU decoding for video
|
|
||||||
};
|
|
||||||
scripts = [
|
|
||||||
|
|
||||||
# Automatically load playlist entries before and after current file
|
|
||||||
pkgs.mpvScripts.autoload
|
|
||||||
|
|
||||||
# Delete current file after quitting
|
|
||||||
pkgs.mpvScripts.mpv-delete-file
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Set default programs for opening PDFs and other media
|
|
||||||
xdg.mimeApps = {
|
|
||||||
associations.added = {
|
|
||||||
"application/pdf" = [ "pwmt.zathura-cb.desktop" ];
|
|
||||||
"image/jpeg" = [ "nsxiv.desktop" ];
|
|
||||||
"image/*" = [ "nsxiv.desktop" ];
|
|
||||||
};
|
|
||||||
associations.removed = {
|
|
||||||
"application/pdf" = [ "mupdf.desktop" "wine-extension-pdf.desktop" ];
|
|
||||||
};
|
|
||||||
defaultApplications = {
|
|
||||||
"application/pdf" = [ "pwmt.zathura-cb.desktop" ];
|
|
||||||
"image/jpeg" = [ "nsxiv.desktop" ];
|
|
||||||
"image/*" = [ "nsxiv.desktop" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
options = {
|
|
||||||
obsidian = {
|
|
||||||
enable = lib.mkEnableOption {
|
|
||||||
description = "Enable Obsidian.";
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.gui.enable && config.obsidian.enable) {
|
|
||||||
unfreePackages = [ "obsidian" ];
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
home.packages = with pkgs; [ obsidian ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Broken on 2023-04-16
|
|
||||||
nixpkgs.config.permittedInsecurePackages = [ "electron-21.4.0" ];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
options = {
|
|
||||||
qbittorrent = {
|
|
||||||
enable = lib.mkEnableOption {
|
|
||||||
description = "Enable qBittorrent.";
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.gui.enable && config.qbittorrent.enable) {
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
|
|
||||||
home.packages = with pkgs; [ qbittorrent ];
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
options = {
|
|
||||||
slack = {
|
|
||||||
enable = lib.mkEnableOption {
|
|
||||||
description = "Enable Slack.";
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.gui.enable && config.slack.enable) {
|
|
||||||
unfreePackages = [ "slack" ];
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
home.packages = with pkgs; [ slack ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
options = {
|
|
||||||
yt-dlp = {
|
|
||||||
enable = lib.mkEnableOption {
|
|
||||||
description = "Enable YouTube downloader.";
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.yt-dlp.enable) {
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
programs.yt-dlp = {
|
|
||||||
enable = true;
|
|
||||||
extraConfig = "";
|
|
||||||
settings = {
|
|
||||||
no-continue = true; # Always re-download each fragment
|
|
||||||
no-overwrites = true; # Don't overwrite existing files
|
|
||||||
download-archive = "archive.log"; # Log of archives
|
|
||||||
embed-metadata = true;
|
|
||||||
embed-thumbnail = true;
|
|
||||||
embed-subs = true;
|
|
||||||
sub-langs = "en.*";
|
|
||||||
concurrent-fragments = 4; # Parallel download chunks
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.fish.shellAbbrs.yt = "yt-dlp";
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,161 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }: {
|
|
||||||
|
|
||||||
imports =
|
|
||||||
[ ./applications ./mail ./neovim ./programming ./repositories ./shell ];
|
|
||||||
|
|
||||||
options = {
|
|
||||||
user = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Primary user of the system";
|
|
||||||
};
|
|
||||||
fullName = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Human readable name of the user";
|
|
||||||
};
|
|
||||||
userDirs = {
|
|
||||||
# Required to prevent infinite recursion when referenced by himalaya
|
|
||||||
download = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "XDG directory for downloads";
|
|
||||||
default =
|
|
||||||
if pkgs.stdenv.isDarwin then "$HOME/Downloads" else "$HOME/downloads";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
identityFile = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Path to existing private key file.";
|
|
||||||
default = "/etc/ssh/ssh_host_ed25519_key";
|
|
||||||
};
|
|
||||||
gui = {
|
|
||||||
enable = lib.mkEnableOption {
|
|
||||||
description = "Enable graphics.";
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
theme = {
|
|
||||||
colors = lib.mkOption {
|
|
||||||
type = lib.types.attrs;
|
|
||||||
description = "Base16 color scheme.";
|
|
||||||
default = (import ../colorscheme/gruvbox).dark;
|
|
||||||
};
|
|
||||||
dark = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
description = "Enable dark mode.";
|
|
||||||
default = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
homePath = lib.mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
description = "Path of user's home directory.";
|
|
||||||
default = builtins.toPath (if pkgs.stdenv.isDarwin then
|
|
||||||
"/Users/${config.user}"
|
|
||||||
else
|
|
||||||
"/home/${config.user}");
|
|
||||||
};
|
|
||||||
dotfilesPath = lib.mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
description = "Path of dotfiles repository.";
|
|
||||||
default = config.homePath + "/dev/personal/dotfiles";
|
|
||||||
};
|
|
||||||
dotfilesRepo = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Link to dotfiles repository HTTPS URL.";
|
|
||||||
};
|
|
||||||
unfreePackages = lib.mkOption {
|
|
||||||
type = lib.types.listOf lib.types.str;
|
|
||||||
description = "List of unfree packages to allow.";
|
|
||||||
default = [ ];
|
|
||||||
};
|
|
||||||
hostnames = {
|
|
||||||
git = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Hostname for git server (Gitea).";
|
|
||||||
};
|
|
||||||
metrics = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Hostname for metrics server.";
|
|
||||||
};
|
|
||||||
prometheus = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Hostname for Prometheus server.";
|
|
||||||
};
|
|
||||||
secrets = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Hostname for passwords and secrets (Vaultwarden).";
|
|
||||||
};
|
|
||||||
stream = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Hostname for video/media library (Jellyfin).";
|
|
||||||
};
|
|
||||||
content = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Hostname for personal content system (Nextcloud).";
|
|
||||||
};
|
|
||||||
books = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Hostname for books library (Calibre-Web).";
|
|
||||||
};
|
|
||||||
download = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Hostname for download services.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = let stateVersion = "23.05";
|
|
||||||
in {
|
|
||||||
|
|
||||||
nix = {
|
|
||||||
|
|
||||||
# Enable features in Nix commands
|
|
||||||
extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
warn-dirty = false
|
|
||||||
'';
|
|
||||||
|
|
||||||
gc = {
|
|
||||||
automatic = true;
|
|
||||||
options = "--delete-older-than 7d";
|
|
||||||
};
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
|
|
||||||
# Add community Cachix to binary cache
|
|
||||||
# Don't use with macOS because blocked by corporate firewall
|
|
||||||
builders-use-substitutes = true;
|
|
||||||
substituters = lib.mkIf (!pkgs.stdenv.isDarwin)
|
|
||||||
[ "https://nix-community.cachix.org" ];
|
|
||||||
trusted-public-keys = lib.mkIf (!pkgs.stdenv.isDarwin) [
|
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
||||||
];
|
|
||||||
|
|
||||||
# Scans and hard links identical files in the store
|
|
||||||
# Not working with macOS: https://github.com/NixOS/nix/issues/7273
|
|
||||||
auto-optimise-store = lib.mkIf (!pkgs.stdenv.isDarwin) true;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
# Basic common system packages for all devices
|
|
||||||
environment.systemPackages = with pkgs; [ git vim wget curl ];
|
|
||||||
|
|
||||||
# Use the system-level nixpkgs instead of Home Manager's
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
|
|
||||||
# Install packages to /etc/profiles instead of ~/.nix-profile, useful when
|
|
||||||
# using multiple profiles for one user
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
|
|
||||||
# Allow specified unfree packages (identified elsewhere)
|
|
||||||
# Retrieves package object based on string name
|
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
|
||||||
builtins.elem (lib.getName pkg) config.unfreePackages;
|
|
||||||
|
|
||||||
# Pin a state version to prevent warnings
|
|
||||||
home-manager.users.${config.user}.home.stateVersion = stateVersion;
|
|
||||||
home-manager.users.root.home.stateVersion = stateVersion;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,208 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
options.mail.aerc.enable = lib.mkEnableOption "Aerc email.";
|
|
||||||
|
|
||||||
config = lib.mkIf config.mail.aerc.enable {
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
w3m # Render HTML
|
|
||||||
dante # Socksify for rendering HTML
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.aerc = {
|
|
||||||
enable = true;
|
|
||||||
extraBinds = {
|
|
||||||
# Binds are of the form <key sequence> = <command to run>
|
|
||||||
# To use '=' in a key sequence, substitute it with "Eq": "<Ctrl+Eq>"
|
|
||||||
# If you wish to bind #, you can wrap the key sequence in quotes: "#" = quit
|
|
||||||
global = {
|
|
||||||
"<C-p>" = ":prev-tab<Enter>";
|
|
||||||
"<C-n>" = ":next-tab <Enter>";
|
|
||||||
"<C-t>" = ":term<Enter>";
|
|
||||||
"?" = ":help keys<Enter>";
|
|
||||||
};
|
|
||||||
|
|
||||||
messages = {
|
|
||||||
q = ":quit<Enter>";
|
|
||||||
|
|
||||||
j = ":next <Enter>";
|
|
||||||
"<Down>" = ":next<Enter>";
|
|
||||||
"<C-d>" = ":next 50%<Enter>";
|
|
||||||
"<C-f>" = ":next 100%<Enter>";
|
|
||||||
"<PgDn>" = ":next 100%<Enter>";
|
|
||||||
|
|
||||||
k = ":prev <Enter>";
|
|
||||||
"<Up>" = ":prev<Enter>";
|
|
||||||
"<C-u>" = ":prev 50%<Enter>";
|
|
||||||
"<C-b>" = ":prev 100%<Enter>";
|
|
||||||
"<PgUp>" = ":prev 100%<Enter>";
|
|
||||||
g = ":select 0 <Enter>";
|
|
||||||
G = ":select -1<Enter>";
|
|
||||||
|
|
||||||
J = ":next-folder <Enter>";
|
|
||||||
K = ":prev-folder<Enter>";
|
|
||||||
H = ":collapse-folder<Enter>";
|
|
||||||
L = ":expand-folder<Enter>";
|
|
||||||
|
|
||||||
v = ":mark -t<Enter>";
|
|
||||||
V = ":mark -v<Enter>";
|
|
||||||
|
|
||||||
T = ":toggle-threads<Enter>";
|
|
||||||
|
|
||||||
"<Enter>" = ":view<Enter>";
|
|
||||||
d = ":prompt 'Really delete this message?' 'delete-message'<Enter>";
|
|
||||||
D = ":move Trash<Enter>";
|
|
||||||
A = ":archive flat<Enter>";
|
|
||||||
|
|
||||||
C = ":compose<Enter>";
|
|
||||||
|
|
||||||
rr = ":reply -a<Enter>";
|
|
||||||
rq = ":reply -aq<Enter>";
|
|
||||||
Rr = ":reply<Enter>";
|
|
||||||
Rq = ":reply -q<Enter>";
|
|
||||||
|
|
||||||
c = ":cf<space>";
|
|
||||||
"$" = ":term<space>";
|
|
||||||
"!" = ":term<space>";
|
|
||||||
"|" = ":pipe<space>";
|
|
||||||
|
|
||||||
"/" = ":search<space>";
|
|
||||||
"\\" = ":filter <space>";
|
|
||||||
n = ":next-result<Enter>";
|
|
||||||
N = ":prev-result<Enter>";
|
|
||||||
"<Esc>" = ":clear<Enter>";
|
|
||||||
};
|
|
||||||
|
|
||||||
"messages:folder=Drafts" = { "<Enter>" = ":recall<Enter>"; };
|
|
||||||
|
|
||||||
view = {
|
|
||||||
"/" = ":toggle-key-passthrough <Enter> /";
|
|
||||||
q = ":close<Enter>";
|
|
||||||
O = ":open<Enter>";
|
|
||||||
S = ":save<space>";
|
|
||||||
"|" = ":pipe<space>";
|
|
||||||
D = ":move Trash<Enter>";
|
|
||||||
A = ":archive flat<Enter>";
|
|
||||||
|
|
||||||
"<C-l>" = ":open-link <space>";
|
|
||||||
|
|
||||||
f = ":forward <Enter>";
|
|
||||||
rr = ":reply -a<Enter>";
|
|
||||||
rq = ":reply -aq<Enter>";
|
|
||||||
Rr = ":reply<Enter>";
|
|
||||||
Rq = ":reply -q<Enter>";
|
|
||||||
|
|
||||||
H = ":toggle-headers<Enter>";
|
|
||||||
"<C-k>" = ":prev-part<Enter>";
|
|
||||||
"<C-j>" = ":next-part<Enter>";
|
|
||||||
J = ":next <Enter>";
|
|
||||||
K = ":prev<Enter>";
|
|
||||||
};
|
|
||||||
|
|
||||||
"view::passthrough" = {
|
|
||||||
"$noinherit" = "true";
|
|
||||||
"$ex" = "<C-x>";
|
|
||||||
"<Esc>" = ":toggle-key-passthrough<Enter>";
|
|
||||||
};
|
|
||||||
|
|
||||||
compose = {
|
|
||||||
# Keybindings used when the embedded terminal is not selected in the compose
|
|
||||||
# view
|
|
||||||
"$noinherit" = "true";
|
|
||||||
"$ex" = "<C-x>";
|
|
||||||
"<C-k>" = ":prev-field<Enter>";
|
|
||||||
"<C-j>" = ":next-field<Enter>";
|
|
||||||
"<A-p>" = ":switch-account -p<Enter>";
|
|
||||||
"<A-n>" = ":switch-account -n<Enter>";
|
|
||||||
"<tab>" = ":next-field<Enter>";
|
|
||||||
"<C-p>" = ":prev-tab<Enter>";
|
|
||||||
"<C-n>" = ":next-tab<Enter>";
|
|
||||||
};
|
|
||||||
|
|
||||||
"compose::editor" = {
|
|
||||||
# Keybindings used when the embedded terminal is selected in the compose view
|
|
||||||
"$noinherit" = "true";
|
|
||||||
"$ex" = "<C-x>";
|
|
||||||
"<C-k>" = ":prev-field<Enter>";
|
|
||||||
"<C-j>" = ":next-field<Enter>";
|
|
||||||
"<C-p>" = ":prev-tab<Enter>";
|
|
||||||
"<C-n>" = ":next-tab<Enter>";
|
|
||||||
};
|
|
||||||
|
|
||||||
"compose::review" = {
|
|
||||||
# Keybindings used when reviewing a message to be sent
|
|
||||||
y = ":send <Enter>";
|
|
||||||
n = ":abort<Enter>";
|
|
||||||
p = ":postpone<Enter>";
|
|
||||||
q = ":choose -o d discard abort -o p postpone postpone<Enter>";
|
|
||||||
e = ":edit<Enter>";
|
|
||||||
a = ":attach<space>";
|
|
||||||
d = ":detach<space>";
|
|
||||||
};
|
|
||||||
|
|
||||||
terminal = {
|
|
||||||
"$noinherit" = "true";
|
|
||||||
"$ex" = "<C-x>";
|
|
||||||
"<C-p>" = ":prev-tab<Enter>";
|
|
||||||
"<C-n>" = ":next-tab<Enter>";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
extraConfig = {
|
|
||||||
general.unsafe-accounts-conf = true;
|
|
||||||
viewer = { pager = "${pkgs.less}/bin/less -R"; };
|
|
||||||
filters = {
|
|
||||||
"text/plain" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
|
|
||||||
"text/calendar" =
|
|
||||||
"${pkgs.gawk}/bin/awk -f ${pkgs.aerc}/libexec/aerc/filters/calendar";
|
|
||||||
"text/html" =
|
|
||||||
"${pkgs.aerc}/libexec/aerc/filters/html | ${pkgs.aerc}/libexec/aerc/filters/colorize"; # Requires w3m, dante
|
|
||||||
# "text/*" =
|
|
||||||
# ''${pkgs.bat}/bin/bat -fP --file-name="$AERC_FILENAME "'';
|
|
||||||
"message/delivery-status" =
|
|
||||||
"${pkgs.aerc}/libexec/aerc/filters/colorize";
|
|
||||||
"message/rfc822" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
|
|
||||||
"application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh";
|
|
||||||
"application/pdf" = "${pkgs.zathura}/bin/zathura -";
|
|
||||||
"audio/*" = "${pkgs.mpv}/bin/mpv -";
|
|
||||||
"image/*" = "${pkgs.feh}/bin/feh -";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
accounts.email.accounts.home.aerc = {
|
|
||||||
enable = true;
|
|
||||||
extraAccounts = {
|
|
||||||
check-mail = "5m";
|
|
||||||
check-mail-cmd = "${pkgs.isync}/bin/mbsync -a";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.desktopEntries.aerc = lib.mkIf pkgs.stdenv.isLinux {
|
|
||||||
name = "aerc";
|
|
||||||
exec = "kitty aerc %u";
|
|
||||||
};
|
|
||||||
xsession.windowManager.i3.config.keybindings =
|
|
||||||
lib.mkIf pkgs.stdenv.isLinux {
|
|
||||||
"${
|
|
||||||
config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier
|
|
||||||
}+Shift+e" = "exec ${
|
|
||||||
# Don't name the script `aerc` or it will affect grep
|
|
||||||
builtins.toString (pkgs.writeShellScript "focus-mail.sh" ''
|
|
||||||
count=$(ps aux | grep -c aerc)
|
|
||||||
if [ "$count" -eq 1 ]; then
|
|
||||||
i3-msg "exec --no-startup-id kitty --class aerc aerc"
|
|
||||||
sleep 0.25
|
|
||||||
fi
|
|
||||||
i3-msg "[class=aerc] focus"
|
|
||||||
'')
|
|
||||||
}";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.fish.shellAbbrs = { ae = "aerc"; };
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,125 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
imports = [ ./himalaya.nix ./aerc.nix ./system.nix ];
|
|
||||||
|
|
||||||
options = {
|
|
||||||
mail.enable = lib.mkEnableOption "Mail service.";
|
|
||||||
mail.user = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "User name for the email address.";
|
|
||||||
default = config.user;
|
|
||||||
};
|
|
||||||
mail.server = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.str;
|
|
||||||
description = "Server name for the email address.";
|
|
||||||
};
|
|
||||||
mail.imapHost = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.str;
|
|
||||||
description = "Server host for IMAP (reading mail).";
|
|
||||||
};
|
|
||||||
mail.smtpHost = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.str;
|
|
||||||
description = "Server host for SMTP (sending mail).";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.mail.enable {
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
programs.mbsync = { enable = true; };
|
|
||||||
|
|
||||||
# Automatically check for mail and keep files synced locally
|
|
||||||
services.mbsync = lib.mkIf pkgs.stdenv.isLinux {
|
|
||||||
enable = true;
|
|
||||||
frequency = "*:0/5";
|
|
||||||
postExec = "${pkgs.notmuch}/bin/notmuch new";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Used to watch for new mail and trigger sync
|
|
||||||
services.imapnotify.enable = pkgs.stdenv.isLinux;
|
|
||||||
|
|
||||||
# Allows sending email from CLI/sendmail
|
|
||||||
programs.msmtp.enable = true;
|
|
||||||
|
|
||||||
# Better local mail search
|
|
||||||
programs.notmuch = {
|
|
||||||
enable = true;
|
|
||||||
new.ignore =
|
|
||||||
[ ".mbsyncstate.lock" ".mbsyncstate.journal" ".mbsyncstate.new" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
accounts.email = {
|
|
||||||
|
|
||||||
# Where email files are stored
|
|
||||||
maildirBasePath = "${config.homePath}/mail";
|
|
||||||
|
|
||||||
accounts = {
|
|
||||||
home = let address = "${config.mail.user}@${config.mail.server}";
|
|
||||||
in {
|
|
||||||
userName = address;
|
|
||||||
realName = config.fullName;
|
|
||||||
primary = true;
|
|
||||||
inherit address;
|
|
||||||
aliases = map (user: "${user}@${config.mail.server}") [
|
|
||||||
"me"
|
|
||||||
"hey"
|
|
||||||
"admin"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Options for contact completion
|
|
||||||
alot = { };
|
|
||||||
|
|
||||||
imap = {
|
|
||||||
host = config.mail.imapHost;
|
|
||||||
port = 993;
|
|
||||||
tls.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Watch for mail and run notifications or sync
|
|
||||||
imapnotify = {
|
|
||||||
enable = true;
|
|
||||||
boxes = [ "Inbox" ];
|
|
||||||
onNotify = "${pkgs.isync}/bin/mbsync -a";
|
|
||||||
onNotifyPost = lib.mkIf
|
|
||||||
config.home-manager.users.${config.user}.services.dunst.enable
|
|
||||||
"${pkgs.libnotify}/bin/notify-send 'New mail arrived'";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Name of the directory in maildir for this account
|
|
||||||
maildir = { path = "main"; };
|
|
||||||
|
|
||||||
# Bi-directional syncing options for local files
|
|
||||||
mbsync = {
|
|
||||||
enable = true;
|
|
||||||
create = "both";
|
|
||||||
expunge = "both";
|
|
||||||
remove = "both";
|
|
||||||
patterns = [ "*" ];
|
|
||||||
extraConfig.channel = {
|
|
||||||
CopyArrivalDate = "yes"; # Sync time of original message
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable indexing
|
|
||||||
notmuch.enable = true;
|
|
||||||
|
|
||||||
# Used to login and send and receive emails
|
|
||||||
passwordCommand =
|
|
||||||
"${pkgs.age}/bin/age --decrypt --identity ~/.ssh/id_ed25519 ${
|
|
||||||
pkgs.writeText "mailpass.age"
|
|
||||||
(builtins.readFile ../../../private/mailpass.age)
|
|
||||||
}";
|
|
||||||
|
|
||||||
smtp = {
|
|
||||||
host = config.mail.smtpHost;
|
|
||||||
port = 465;
|
|
||||||
tls.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
{ config, lib, ... }: {
|
|
||||||
|
|
||||||
options.mail.himalaya.enable = lib.mkEnableOption "Himalaya email.";
|
|
||||||
|
|
||||||
config = lib.mkIf config.mail.himalaya.enable {
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
|
|
||||||
programs.himalaya = { enable = true; };
|
|
||||||
accounts.email.accounts.home.himalaya = {
|
|
||||||
enable = true;
|
|
||||||
backend = "imap";
|
|
||||||
sender = "smtp";
|
|
||||||
settings = {
|
|
||||||
downloads-dir = config.userDirs.download;
|
|
||||||
smtp-insecure = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.fish.shellAbbrs = { hi = "himalaya"; };
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,34 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
config = lib.mkIf (config.mail.enable || config.server) {
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
|
|
||||||
programs.msmtp.enable = true;
|
|
||||||
|
|
||||||
# The system user for sending automatic notifications
|
|
||||||
accounts.email.accounts.system =
|
|
||||||
let address = "system@${config.mail.server}";
|
|
||||||
in {
|
|
||||||
userName = address;
|
|
||||||
realName = "NixOS System";
|
|
||||||
primary = !config.mail.enable; # Only primary if mail not enabled
|
|
||||||
inherit address;
|
|
||||||
passwordCommand =
|
|
||||||
"${pkgs.age}/bin/age --decrypt --identity ${config.identityFile} ${
|
|
||||||
pkgs.writeText "mailpass-system.age"
|
|
||||||
(builtins.readFile ../../../private/mailpass-system.age)
|
|
||||||
}";
|
|
||||||
msmtp.enable = true;
|
|
||||||
smtp = {
|
|
||||||
host = config.mail.smtpHost;
|
|
||||||
port = 465;
|
|
||||||
tls.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,76 +0,0 @@
|
|||||||
{ pkgs, dsl, ... }: {
|
|
||||||
|
|
||||||
plugins = [
|
|
||||||
pkgs.vimPlugins.nvim-lspconfig
|
|
||||||
pkgs.vimPlugins.lsp-colors-nvim
|
|
||||||
pkgs.vimPlugins.null-ls-nvim
|
|
||||||
];
|
|
||||||
|
|
||||||
use.lspconfig.lua_ls.setup = dsl.callWith {
|
|
||||||
settings = { Lua = { diagnostics = { globals = [ "vim" "hs" ]; }; }; };
|
|
||||||
capabilities = dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
|
||||||
cmd = [ "${pkgs.lua-language-server}/bin/lua-language-server" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
use.lspconfig.nil_ls.setup = dsl.callWith {
|
|
||||||
cmd = [ "${pkgs.nil}/bin/nil" ];
|
|
||||||
capabilities = dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
|
||||||
};
|
|
||||||
|
|
||||||
use.lspconfig.pyright.setup = dsl.callWith {
|
|
||||||
cmd = [ "${pkgs.pyright}/bin/pyright-langserver" "--stdio" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
use.lspconfig.terraformls.setup =
|
|
||||||
dsl.callWith { cmd = [ "${pkgs.terraform-ls}/bin/terraform-ls" "serve" ]; };
|
|
||||||
|
|
||||||
vim.api.nvim_create_augroup = dsl.callWith [ "LspFormatting" { } ];
|
|
||||||
|
|
||||||
lua = ''
|
|
||||||
${builtins.readFile ./lsp.lua}
|
|
||||||
|
|
||||||
-- Prevent infinite log size (change this when debugging)
|
|
||||||
vim.lsp.set_log_level("off")
|
|
||||||
|
|
||||||
require("null-ls").setup({
|
|
||||||
sources = {
|
|
||||||
require("null-ls").builtins.formatting.stylua.with({ command = "${pkgs.stylua}/bin/stylua" }),
|
|
||||||
require("null-ls").builtins.formatting.black.with({ command = "${pkgs.black}/bin/black" }),
|
|
||||||
require("null-ls").builtins.diagnostics.ruff.with({ command = "${pkgs.ruff}/bin/ruff" }),
|
|
||||||
require("null-ls").builtins.formatting.fish_indent.with({ command = "${pkgs.fish}/bin/fish_indent" }),
|
|
||||||
require("null-ls").builtins.formatting.nixfmt.with({ command = "${pkgs.nixfmt}/bin/nixfmt" }),
|
|
||||||
require("null-ls").builtins.formatting.rustfmt.with({ command = "${pkgs.rustfmt}/bin/rustfmt" }),
|
|
||||||
require("null-ls").builtins.diagnostics.shellcheck.with({ command = "${pkgs.shellcheck}/bin/shellcheck" }),
|
|
||||||
require("null-ls").builtins.formatting.shfmt.with({
|
|
||||||
command = "${pkgs.shfmt}/bin/shfmt",
|
|
||||||
extra_args = { "-i", "4", "-ci" },
|
|
||||||
}),
|
|
||||||
require("null-ls").builtins.formatting.terraform_fmt.with({
|
|
||||||
command = "${pkgs.terraform}/bin/terraform",
|
|
||||||
extra_filetypes = { "hcl" },
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
|
|
||||||
on_attach = function(client, bufnr)
|
|
||||||
if client.supports_method("textDocument/formatting") then
|
|
||||||
-- Auto-format on save
|
|
||||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
|
||||||
group = augroup,
|
|
||||||
buffer = bufnr,
|
|
||||||
callback = function()
|
|
||||||
vim.lsp.buf.format({ bufnr = bufnr })
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
-- Use internal formatting for bindings like gq.
|
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
|
||||||
callback = function(args)
|
|
||||||
vim.bo[args.buf].formatexpr = nil
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
'';
|
|
||||||
|
|
||||||
}
|
|
@ -1,64 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
neovim = import ./package {
|
|
||||||
inherit pkgs;
|
|
||||||
colors = config.theme.colors;
|
|
||||||
};
|
|
||||||
|
|
||||||
in {
|
|
||||||
|
|
||||||
options.neovim.enable = lib.mkEnableOption "Neovim.";
|
|
||||||
|
|
||||||
config = lib.mkIf config.neovim.enable {
|
|
||||||
home-manager.users.${config.user} =
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
home.packages = [ neovim ];
|
|
||||||
|
|
||||||
# Use Neovim as the editor for git commit messages
|
|
||||||
programs.git.extraConfig.core.editor = "nvim";
|
|
||||||
programs.jujutsu.settings.ui.editor = "nvim";
|
|
||||||
|
|
||||||
# Set Neovim as the default app for text editing and manual pages
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "nvim";
|
|
||||||
MANPAGER = "nvim +Man!";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Create quick aliases for launching Neovim
|
|
||||||
programs.fish = {
|
|
||||||
shellAliases = { vim = "nvim"; };
|
|
||||||
shellAbbrs = {
|
|
||||||
v = lib.mkForce "nvim";
|
|
||||||
vl = lib.mkForce "nvim -c 'normal! `0' -c 'bdelete 1'";
|
|
||||||
vll = "nvim -c 'Telescope oldfiles'";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# 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 = ''
|
|
||||||
$SHELL -c 'sed -r "s/[[:cntrl:]]\]133;[AC]..//g" | ${neovim}/bin/nvim -c "setlocal nonumber norelativenumber nolist laststatus=0" -c "lua baleia = require(\"baleia\").setup({}); baleia.once(0)" -c "map <silent> q :qa!<CR>" -c "autocmd VimEnter * normal G"' '';
|
|
||||||
|
|
||||||
# Create a desktop option for launching Neovim from a file manager
|
|
||||||
# (Requires launching the terminal and then executing Neovim)
|
|
||||||
xdg.desktopEntries.nvim = lib.mkIf pkgs.stdenv.isLinux {
|
|
||||||
name = "Neovim wrapper";
|
|
||||||
exec = "kitty nvim %F";
|
|
||||||
mimeType = [ "text/plain" "text/markdown" ];
|
|
||||||
};
|
|
||||||
xdg.mimeApps.defaultApplications = lib.mkIf pkgs.stdenv.isLinux {
|
|
||||||
"text/plain" = [ "nvim.desktop" ];
|
|
||||||
"text/markdown" = [ "nvim.desktop" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
{ ... }: {
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
./haskell.nix
|
|
||||||
./kubernetes.nix
|
|
||||||
./lua.nix
|
|
||||||
./nix.nix
|
|
||||||
./python.nix
|
|
||||||
./terraform.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
{ config, lib, ... }: {
|
|
||||||
|
|
||||||
options.haskell.enable = lib.mkEnableOption "Haskell programming language.";
|
|
||||||
|
|
||||||
config = lib.mkIf config.haskell.enable {
|
|
||||||
|
|
||||||
# Binary Cache for Haskell.nix
|
|
||||||
nix.settings.trusted-public-keys =
|
|
||||||
[ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ];
|
|
||||||
nix.settings.substituters = [ "https://cache.iog.io" ];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
options.lua.enable = lib.mkEnableOption "Lua programming language.";
|
|
||||||
|
|
||||||
config = lib.mkIf config.lua.enable {
|
|
||||||
home-manager.users.${config.user}.home.packages = with pkgs; [
|
|
||||||
stylua # Lua formatter
|
|
||||||
sumneko-lua-language-server # Lua LSP
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
options.nixlang.enable = lib.mkEnableOption "Nix programming language.";
|
|
||||||
|
|
||||||
config = lib.mkIf config.nixlang.enable {
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
nixfmt # Nix file formatter
|
|
||||||
nil # Nix language server
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
options.python.enable = lib.mkEnableOption "Python programming language.";
|
|
||||||
|
|
||||||
config = lib.mkIf config.python.enable {
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
# python310 # Standard Python interpreter
|
|
||||||
nodePackages.pyright # Python language server
|
|
||||||
black # Python formatter
|
|
||||||
python310Packages.flake8 # Python linter
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.fish.shellAbbrs = { py = "python3"; };
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
options.terraform.enable = lib.mkEnableOption "Terraform tools.";
|
|
||||||
|
|
||||||
config = lib.mkIf config.terraform.enable {
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
programs.fish.shellAbbrs = {
|
|
||||||
# Terraform
|
|
||||||
te = "terraform";
|
|
||||||
};
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
terraform # Terraform executable
|
|
||||||
terraform-ls # Language server
|
|
||||||
tflint # Linter
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
{ ... }: {
|
|
||||||
|
|
||||||
imports = [ ./dotfiles.nix ./notes.nix ];
|
|
||||||
|
|
||||||
}
|
|
@ -1,33 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
# Allows me to make sure I can work on my dotfiles locally
|
|
||||||
|
|
||||||
options.dotfiles.enable = lib.mkEnableOption "Clone dotfiles.";
|
|
||||||
|
|
||||||
config = lib.mkIf config.dotfiles.enable {
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
|
|
||||||
home.activation = {
|
|
||||||
|
|
||||||
# Always clone dotfiles repository if it doesn't exist
|
|
||||||
cloneDotfiles =
|
|
||||||
config.home-manager.users.${config.user}.lib.dag.entryAfter
|
|
||||||
[ "writeBoundary" ] ''
|
|
||||||
if [ ! -d "${config.dotfilesPath}" ]; then
|
|
||||||
$DRY_RUN_CMD mkdir --parents $VERBOSE_ARG $(dirname "${config.dotfilesPath}")
|
|
||||||
$DRY_RUN_CMD ${pkgs.git}/bin/git \
|
|
||||||
clone ${config.dotfilesRepo} "${config.dotfilesPath}"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
# Set a variable for dotfiles repo, not necessary but convenient
|
|
||||||
home.sessionVariables.DOTS = config.dotfilesPath;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
{ config, ... }: {
|
|
||||||
|
|
||||||
# This is just a placeholder as I expect to interact with my notes in a
|
|
||||||
# certain location
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
|
||||||
NOTES_PATH = "${config.homePath}/dev/personal/notes/content";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
config = {
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
|
|
||||||
programs.bash = {
|
|
||||||
enable = true;
|
|
||||||
shellAliases =
|
|
||||||
config.home-manager.users.${config.user}.programs.fish.shellAliases;
|
|
||||||
initExtra = "";
|
|
||||||
profileExtra = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.starship.enableBashIntegration = false;
|
|
||||||
programs.zoxide.enableBashIntegration = true;
|
|
||||||
programs.fzf.enableBashIntegration = true;
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
# Convenience utilities from charm.sh
|
|
||||||
|
|
||||||
options.charm.enable = lib.mkEnableOption "Charm utilities.";
|
|
||||||
|
|
||||||
config.home-manager.users.${config.user} = lib.mkIf config.charm.enable {
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
glow # Markdown previews
|
|
||||||
skate # Key-value store
|
|
||||||
charm # Manage account and filesystem
|
|
||||||
pop # Send emails from a TUI
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
{ ... }: {
|
|
||||||
imports = [
|
|
||||||
./bash
|
|
||||||
./charm.nix
|
|
||||||
./direnv.nix
|
|
||||||
./fish
|
|
||||||
./fzf.nix
|
|
||||||
./git.nix
|
|
||||||
./github.nix
|
|
||||||
./jujutsu.nix
|
|
||||||
./nixpkgs.nix
|
|
||||||
./starship.nix
|
|
||||||
./utilities.nix
|
|
||||||
];
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
{ config, ... }: {
|
|
||||||
|
|
||||||
# Enables quickly entering Nix shells when changing directories
|
|
||||||
home-manager.users.${config.user}.programs.direnv = {
|
|
||||||
enable = true;
|
|
||||||
nix-direnv.enable = true;
|
|
||||||
config = { whitelist = { prefix = [ config.dotfilesPath ]; }; };
|
|
||||||
};
|
|
||||||
|
|
||||||
# Prevent garbage collection
|
|
||||||
nix.extraOptions = ''
|
|
||||||
keep-outputs = true
|
|
||||||
keep-derivations = true
|
|
||||||
'';
|
|
||||||
|
|
||||||
}
|
|
@ -1,140 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
users.users.${config.user}.shell = pkgs.fish;
|
|
||||||
programs.fish.enable = true; # Needed for LightDM to remember username
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
|
|
||||||
# Packages used in abbreviations and aliases
|
|
||||||
home.packages = with pkgs; [ curl ];
|
|
||||||
|
|
||||||
programs.fish = {
|
|
||||||
enable = true;
|
|
||||||
shellAliases = {
|
|
||||||
|
|
||||||
# Version of bash which works much better on the terminal
|
|
||||||
bash = "${pkgs.bashInteractive}/bin/bash";
|
|
||||||
|
|
||||||
# Use eza (exa) instead of ls for fancier output
|
|
||||||
ls = "${pkgs.eza}/bin/eza --group";
|
|
||||||
|
|
||||||
# Move files to XDG trash on the commandline
|
|
||||||
trash = lib.mkIf pkgs.stdenv.isLinux "${pkgs.trash-cli}/bin/trash-put";
|
|
||||||
};
|
|
||||||
functions = {
|
|
||||||
commandline-git-commits = {
|
|
||||||
description = "Insert commit into commandline";
|
|
||||||
body = builtins.readFile ./functions/commandline-git-commits.fish;
|
|
||||||
};
|
|
||||||
copy = {
|
|
||||||
description = "Copy file contents into clipboard";
|
|
||||||
body = "cat $argv | pbcopy"; # Need to fix for non-macOS
|
|
||||||
};
|
|
||||||
edit = {
|
|
||||||
description = "Open a file in Vim";
|
|
||||||
body = builtins.readFile ./functions/edit.fish;
|
|
||||||
};
|
|
||||||
envs = {
|
|
||||||
description = "Evaluate a bash-like environment variables file";
|
|
||||||
body = ''set -gx (cat $argv | tr "=" " " | string split ' ')'';
|
|
||||||
};
|
|
||||||
fcd = {
|
|
||||||
description = "Jump to directory";
|
|
||||||
argumentNames = "directory";
|
|
||||||
body = builtins.readFile ./functions/fcd.fish;
|
|
||||||
};
|
|
||||||
fish_user_key_bindings = {
|
|
||||||
body = builtins.readFile ./functions/fish_user_key_bindings.fish;
|
|
||||||
};
|
|
||||||
ip = { body = builtins.readFile ./functions/ip.fish; };
|
|
||||||
json = {
|
|
||||||
description = "Tidy up JSON using jq";
|
|
||||||
body = "pbpaste | jq '.' | pbcopy"; # Need to fix for non-macOS
|
|
||||||
};
|
|
||||||
note = {
|
|
||||||
description = "Edit or create a note";
|
|
||||||
argumentNames = "filename";
|
|
||||||
body = builtins.readFile ./functions/note.fish;
|
|
||||||
};
|
|
||||||
recent = {
|
|
||||||
description = "Open a recent file in Vim";
|
|
||||||
body = builtins.readFile ./functions/recent.fish;
|
|
||||||
};
|
|
||||||
search-and-edit = {
|
|
||||||
description = "Search and open the relevant file in Vim";
|
|
||||||
body = builtins.readFile ./functions/search-and-edit.fish;
|
|
||||||
};
|
|
||||||
syncnotes = {
|
|
||||||
description = "Full git commit on notes";
|
|
||||||
body = builtins.readFile ./functions/syncnotes.fish;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
interactiveShellInit = ''
|
|
||||||
fish_vi_key_bindings
|
|
||||||
bind yy fish_clipboard_copy
|
|
||||||
bind Y fish_clipboard_copy
|
|
||||||
bind -M visual y fish_clipboard_copy
|
|
||||||
bind -M default p fish_clipboard_paste
|
|
||||||
set -g fish_vi_force_cursor
|
|
||||||
set -g fish_cursor_default block
|
|
||||||
set -g fish_cursor_insert line
|
|
||||||
set -g fish_cursor_visual block
|
|
||||||
set -g fish_cursor_replace_one underscore
|
|
||||||
'';
|
|
||||||
loginShellInit = "";
|
|
||||||
shellAbbrs = {
|
|
||||||
|
|
||||||
# Directory aliases
|
|
||||||
l = "ls -lh";
|
|
||||||
lh = "ls -lh";
|
|
||||||
ll = "ls -alhF";
|
|
||||||
la = "ls -a";
|
|
||||||
c = "cd";
|
|
||||||
"-" = "cd -";
|
|
||||||
mkd = "mkdir -pv";
|
|
||||||
|
|
||||||
# System
|
|
||||||
s = "sudo";
|
|
||||||
sc = "systemctl";
|
|
||||||
scs = "systemctl status";
|
|
||||||
m = "make";
|
|
||||||
t = "trash";
|
|
||||||
|
|
||||||
# Vim (overwritten by Neovim)
|
|
||||||
v = "vim";
|
|
||||||
vl = "vim -c 'normal! `0'";
|
|
||||||
|
|
||||||
# Notes
|
|
||||||
sn = "syncnotes";
|
|
||||||
|
|
||||||
# Fun CLI Tools
|
|
||||||
weather = "curl wttr.in/$WEATHER_CITY";
|
|
||||||
moon = "curl wttr.in/Moon";
|
|
||||||
|
|
||||||
# Cheat Sheets
|
|
||||||
ssl =
|
|
||||||
"openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr";
|
|
||||||
fingerprint = "ssh-keyscan myhost.com | ssh-keygen -lf -";
|
|
||||||
publickey = "ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub";
|
|
||||||
forloop = "for i in (seq 1 100)";
|
|
||||||
|
|
||||||
# Docker
|
|
||||||
dc = "$DOTS/bin/docker_cleanup";
|
|
||||||
dr = "docker run --rm -it";
|
|
||||||
db = "docker build . -t";
|
|
||||||
|
|
||||||
# Rust
|
|
||||||
ca = "cargo";
|
|
||||||
|
|
||||||
};
|
|
||||||
shellInit = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
home.sessionVariables.fish_greeting = "";
|
|
||||||
|
|
||||||
programs.starship.enableFishIntegration = true;
|
|
||||||
programs.zoxide.enableFishIntegration = true;
|
|
||||||
programs.fzf.enableFishIntegration = true;
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
bind -M insert \co edit
|
|
||||||
bind -M default \co edit
|
|
||||||
bind -M insert \cs search-and-edit
|
|
||||||
bind -M default \cs search-and-edit
|
|
||||||
bind -M insert \ca 'cd ~; and edit; and commandline -a "; cd -"; commandline -f execute'
|
|
||||||
bind -M default \ca 'cd ~; and edit; and commandline -a "; cd -"; commandline -f execute'
|
|
||||||
bind -M insert \ce recent
|
|
||||||
bind -M default \ce recent
|
|
||||||
bind -M default \cg commandline-git-commits
|
|
||||||
bind -M insert \cg 'commandline -i (git rev-parse --show-toplevel 2>/dev/null || echo ".")'
|
|
||||||
bind -M insert \cf fcd
|
|
||||||
bind -M default \cf fcd
|
|
||||||
bind -M insert \cp projects
|
|
||||||
bind -M default \cp projects
|
|
||||||
bind -M insert \x1F accept-autosuggestion
|
|
||||||
bind -M default \x1F accept-autosuggestion
|
|
||||||
bind -M insert \cn 'commandline -r "nix shell nixpkgs#"'
|
|
||||||
bind -M default \cn 'commandline -r "nix shell nixpkgs#"'
|
|
||||||
bind -M insert \x11F nix-fzf
|
|
||||||
bind -M default \x11F nix-fzf
|
|
@ -1,122 +0,0 @@
|
|||||||
#!/usr/local/bin/fish
|
|
||||||
|
|
||||||
function fish_vi_cursor -d 'Set cursor shape for different vi modes'
|
|
||||||
# If we're not interactive, there is effectively no bind mode.
|
|
||||||
if not status is-interactive
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
# This is hard to test in expect, since the exact sequences depend on the environment.
|
|
||||||
# Instead disable it.
|
|
||||||
if set -q FISH_UNIT_TESTS_RUNNING
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
# If this variable is set, skip all checks
|
|
||||||
if not set -q fish_vi_force_cursor
|
|
||||||
|
|
||||||
# Emacs Makes All Cursors Suck
|
|
||||||
if set -q INSIDE_EMACS
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
# vte-based terms set $TERM = xterm*, but only gained support in 2015.
|
|
||||||
# From https://bugzilla.gnome.org/show_bug.cgi?id=720821, it appears it was version 0.40.0
|
|
||||||
if set -q VTE_VERSION
|
|
||||||
and test "$VTE_VERSION" -lt 4000 2>/dev/null
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
# Similarly, genuine XTerm can do it since v280.
|
|
||||||
if set -q XTERM_VERSION
|
|
||||||
and not test (string replace -r "XTerm\((\d+)\)" '$1' -- "$XTERM_VERSION") -ge 280 2>/dev/null
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
# We need one of these terms.
|
|
||||||
# It would be lovely if we could rely on terminfo, but:
|
|
||||||
# - The "Ss" entry isn't a thing in macOS' old and crusty terminfo
|
|
||||||
# - It is set for xterm, and everyone and their dog claims to be xterm
|
|
||||||
#
|
|
||||||
# So we just don't care about $TERM, unless it is one of the few terminals that actually have their own entry.
|
|
||||||
#
|
|
||||||
# Note: Previous versions also checked $TMUX, and made sure that then $TERM was screen* or tmux*.
|
|
||||||
# We don't care, since we *cannot* handle term-in-a-terms 100% correctly.
|
|
||||||
if not set -q KONSOLE_PROFILE_NAME
|
|
||||||
and not test -n "$KONSOLE_VERSION" -a "$KONSOLE_VERSION" -ge 200400 # konsole, but new.
|
|
||||||
and not set -q ITERM_PROFILE
|
|
||||||
and not set -q VTE_VERSION # which version is already checked above
|
|
||||||
and not set -q WT_PROFILE_ID
|
|
||||||
and not set -q XTERM_VERSION
|
|
||||||
and not string match -rq '^st(-.*)$' -- $TERM
|
|
||||||
and not string match -q 'xterm-kitty*' -- $TERM
|
|
||||||
and not string match -q 'rxvt*' -- $TERM
|
|
||||||
and not string match -q 'alacritty*' -- $TERM
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
# HACK: Explicitly disable on ITERM because of #3696, which is weirdness with multi-line prompts.
|
|
||||||
# --force-iterm is now deprecated; set $fish_vi_force_cursor instead
|
|
||||||
if contains -- $argv[1] --force-iterm
|
|
||||||
set -e argv[1]
|
|
||||||
else if set -q ITERM_PROFILE
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
set -l terminal $argv[1]
|
|
||||||
set -q terminal[1]
|
|
||||||
or set terminal auto
|
|
||||||
|
|
||||||
set -l function
|
|
||||||
switch "$terminal"
|
|
||||||
case auto
|
|
||||||
# Nowadays, konsole does not set $KONSOLE_PROFILE_NAME anymore,
|
|
||||||
# and it uses the xterm sequences.
|
|
||||||
if set -q KONSOLE_PROFILE_NAME
|
|
||||||
set function __fish_cursor_konsole
|
|
||||||
else if set -q ITERM_PROFILE
|
|
||||||
set function __fish_cursor_1337
|
|
||||||
else
|
|
||||||
set function __fish_cursor_xterm
|
|
||||||
end
|
|
||||||
case konsole
|
|
||||||
set function __fish_cursor_konsole
|
|
||||||
case xterm
|
|
||||||
set function __fish_cursor_xterm
|
|
||||||
end
|
|
||||||
|
|
||||||
set -l tmux_prefix
|
|
||||||
set -l tmux_postfix
|
|
||||||
if set -q TMUX
|
|
||||||
set tmux_prefix echo -ne "'\ePtmux;\e'"
|
|
||||||
set tmux_postfix echo -ne "'\e\\\\'"
|
|
||||||
end
|
|
||||||
|
|
||||||
set -q fish_cursor_unknown
|
|
||||||
or set -g fish_cursor_unknown block blink
|
|
||||||
|
|
||||||
echo "
|
|
||||||
function fish_vi_cursor_handle --on-variable fish_bind_mode --on-event fish_postexec --on-event fish_focus_in
|
|
||||||
set -l varname fish_cursor_\$fish_bind_mode
|
|
||||||
if not set -q \$varname
|
|
||||||
set varname fish_cursor_unknown
|
|
||||||
end
|
|
||||||
$tmux_prefix
|
|
||||||
$function \$\$varname
|
|
||||||
$tmux_postfix
|
|
||||||
end
|
|
||||||
" | source
|
|
||||||
|
|
||||||
echo "
|
|
||||||
function fish_vi_cursor_handle_preexec --on-event fish_preexec
|
|
||||||
set -l varname fish_cursor_default
|
|
||||||
if not set -q \$varname
|
|
||||||
set varname fish_cursor_unknown
|
|
||||||
end
|
|
||||||
$tmux_prefix
|
|
||||||
$function \$\$varname
|
|
||||||
$tmux_postfix
|
|
||||||
end
|
|
||||||
" | source
|
|
||||||
end
|
|
@ -1,42 +0,0 @@
|
|||||||
{ config, ... }: {
|
|
||||||
|
|
||||||
# FZF is a fuzzy-finder for the terminal
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
|
|
||||||
programs.fzf.enable = true;
|
|
||||||
|
|
||||||
programs.fish = {
|
|
||||||
functions = {
|
|
||||||
projects = {
|
|
||||||
description = "Jump to a project";
|
|
||||||
body = ''
|
|
||||||
set projdir ( \
|
|
||||||
fd \
|
|
||||||
--search-path $HOME/dev \
|
|
||||||
--type directory \
|
|
||||||
--exact-depth 2 \
|
|
||||||
| sed 's/\\/$//' \
|
|
||||||
| fzf \
|
|
||||||
--delimiter '/' \
|
|
||||||
--with-nth 6.. \
|
|
||||||
)
|
|
||||||
and cd $projdir
|
|
||||||
and commandline -f execute
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
shellAbbrs = { lsf = "ls -lh | fzf"; };
|
|
||||||
};
|
|
||||||
|
|
||||||
# Global fzf configuration
|
|
||||||
home.sessionVariables = let fzfCommand = "fd --type file";
|
|
||||||
in {
|
|
||||||
FZF_DEFAULT_COMMAND = fzfCommand;
|
|
||||||
FZF_CTRL_T_COMMAND = fzfCommand;
|
|
||||||
FZF_DEFAULT_OPTS = "-m --height 50% --border";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,125 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
let home-packages = config.home-manager.users.${config.user}.home.packages;
|
|
||||||
|
|
||||||
in {
|
|
||||||
|
|
||||||
options = {
|
|
||||||
gitName = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Name to use for git commits";
|
|
||||||
};
|
|
||||||
gitEmail = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Email to use for git commits";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
|
|
||||||
home-manager.users.root.programs.git = {
|
|
||||||
enable = true;
|
|
||||||
extraConfig.safe.directory = config.dotfilesPath;
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
programs.git = {
|
|
||||||
enable = true;
|
|
||||||
userName = config.gitName;
|
|
||||||
userEmail = config.gitEmail;
|
|
||||||
extraConfig = {
|
|
||||||
pager = { branch = "false"; };
|
|
||||||
safe = { directory = config.dotfilesPath; };
|
|
||||||
pull = { ff = "only"; };
|
|
||||||
push = { autoSetupRemote = "true"; };
|
|
||||||
init = { defaultBranch = "master"; };
|
|
||||||
};
|
|
||||||
ignores = [ ".direnv/**" "result" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.fish.shellAbbrs = {
|
|
||||||
g = "git";
|
|
||||||
gs = "git status";
|
|
||||||
gd = "git diff";
|
|
||||||
gds = "git diff --staged";
|
|
||||||
gdp = "git diff HEAD^";
|
|
||||||
ga = "git add";
|
|
||||||
gaa = "git add -A";
|
|
||||||
gac = "git commit -am";
|
|
||||||
gc = "git commit -m";
|
|
||||||
gca = "git commit --amend --no-edit";
|
|
||||||
gcae = "git commit --amend";
|
|
||||||
gu = "git pull";
|
|
||||||
gp = "git push";
|
|
||||||
gl = "git log --graph --decorate --oneline -20";
|
|
||||||
gll = "git log --graph --decorate --oneline";
|
|
||||||
gco = "git checkout";
|
|
||||||
gcom = ''
|
|
||||||
git switch (git symbolic-ref refs/remotes/origin/HEAD | cut -d"/" -f4)'';
|
|
||||||
gcob = "git switch -c";
|
|
||||||
gb = "git branch";
|
|
||||||
gbd = "git branch -d";
|
|
||||||
gbD = "git branch -D";
|
|
||||||
gr = "git reset";
|
|
||||||
grh = "git reset --hard";
|
|
||||||
gm = "git merge";
|
|
||||||
gcp = "git cherry-pick";
|
|
||||||
cdg = "cd (git rev-parse --show-toplevel)";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Required for fish commands
|
|
||||||
home.packages = with pkgs; [ fish fzf bat ];
|
|
||||||
|
|
||||||
programs.fish.functions = lib.mkIf (builtins.elem pkgs.fzf home-packages
|
|
||||||
&& builtins.elem pkgs.bat home-packages) {
|
|
||||||
git = { body = builtins.readFile ./fish/functions/git.fish; };
|
|
||||||
git-add-fuzzy = {
|
|
||||||
body = builtins.readFile ./fish/functions/git-add-fuzzy.fish;
|
|
||||||
};
|
|
||||||
git-fuzzy-branch = {
|
|
||||||
argumentNames = "header";
|
|
||||||
body = builtins.readFile ./fish/functions/git-fuzzy-branch.fish;
|
|
||||||
};
|
|
||||||
git-checkout-fuzzy = {
|
|
||||||
body = ''
|
|
||||||
set branch (git-fuzzy-branch "checkout branch...")
|
|
||||||
and git checkout $branch
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
git-delete-fuzzy = {
|
|
||||||
body = ''
|
|
||||||
set branch (git-fuzzy-branch "delete branch...")
|
|
||||||
and git branch -d $branch
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
git-force-delete-fuzzy = {
|
|
||||||
body = ''
|
|
||||||
set branch (git-fuzzy-branch "force delete branch...")
|
|
||||||
and git branch -D $branch
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
git-merge-fuzzy = {
|
|
||||||
body = ''
|
|
||||||
set branch (git-fuzzy-branch "merge from...")
|
|
||||||
and git merge $branch
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
git-show-fuzzy = {
|
|
||||||
body = builtins.readFile ./fish/functions/git-show-fuzzy.fish;
|
|
||||||
};
|
|
||||||
git-commits = {
|
|
||||||
body = builtins.readFile ./fish/functions/git-commits.fish;
|
|
||||||
};
|
|
||||||
git-history = {
|
|
||||||
body = builtins.readFile ./fish/functions/git-history.fish;
|
|
||||||
};
|
|
||||||
uncommitted = {
|
|
||||||
description = "Find uncommitted git repos";
|
|
||||||
body = builtins.readFile ./fish/functions/uncommitted.fish;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
{ config, ... }: {
|
|
||||||
|
|
||||||
config = {
|
|
||||||
|
|
||||||
home-manager.users.${config.user}.programs.jujutsu = {
|
|
||||||
enable = true;
|
|
||||||
enableFishIntegration = true;
|
|
||||||
|
|
||||||
# https://github.com/martinvonz/jj/blob/main/docs/config.md
|
|
||||||
settings = {
|
|
||||||
user = {
|
|
||||||
name = config.home-manager.users.${config.user}.programs.git.userName;
|
|
||||||
email =
|
|
||||||
config.home-manager.users.${config.user}.programs.git.userEmail;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,81 +0,0 @@
|
|||||||
{ config, pkgs, ... }: {
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
|
|
||||||
programs.fish = {
|
|
||||||
shellAbbrs = {
|
|
||||||
n = "nix";
|
|
||||||
ns = "nix-shell -p";
|
|
||||||
nsf = "nix-shell --run fish -p";
|
|
||||||
nsr = "nix-shell-run";
|
|
||||||
nps = "nix repl '<nixpkgs>'";
|
|
||||||
nixo = "man configuration.nix";
|
|
||||||
nixh = "man home-configuration.nix";
|
|
||||||
nr = "rebuild-nixos";
|
|
||||||
nro = "rebuild-nixos offline";
|
|
||||||
hm = "rebuild-home";
|
|
||||||
};
|
|
||||||
functions = {
|
|
||||||
nix-shell-run = {
|
|
||||||
body = ''
|
|
||||||
set program $argv[1]
|
|
||||||
if test (count $argv) -ge 2
|
|
||||||
commandline -r "nix run nixpkgs#$program -- $argv[2..-1]"
|
|
||||||
else
|
|
||||||
commandline -r "nix run nixpkgs#$program"
|
|
||||||
end
|
|
||||||
commandline -f execute
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
nix-fzf = {
|
|
||||||
body = ''
|
|
||||||
commandline -i (nix-instantiate --eval --json \
|
|
||||||
-E 'builtins.attrNames (import <nixpkgs> {})' \
|
|
||||||
| jq '.[]' -r | fzf)
|
|
||||||
commandline -f repaint
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
rebuild-nixos = {
|
|
||||||
body = ''
|
|
||||||
if test "$argv[1]" = "offline"
|
|
||||||
set option "--option substitute false"
|
|
||||||
end
|
|
||||||
git -C ${config.dotfilesPath} add --intent-to-add --all
|
|
||||||
commandline -r "doas nixos-rebuild switch $option --flake ${config.dotfilesPath}#${config.networking.hostName}"
|
|
||||||
commandline --function execute
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
rebuild-home = {
|
|
||||||
body = ''
|
|
||||||
git -C ${config.dotfilesPath} add --intent-to-add --all
|
|
||||||
commandline -r "${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#${config.networking.hostName}";
|
|
||||||
commandline --function execute
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Provides "command-not-found" options
|
|
||||||
programs.nix-index = {
|
|
||||||
enable = true;
|
|
||||||
enableFishIntegration = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
nix = {
|
|
||||||
|
|
||||||
# Set channel to flake packages, used for nix-shell commands
|
|
||||||
nixPath = [ "nixpkgs=${pkgs.path}" ];
|
|
||||||
|
|
||||||
# Set registry to this flake's packages, used for nix X commands
|
|
||||||
registry.nixpkgs.to = {
|
|
||||||
type = "path";
|
|
||||||
path = builtins.toString pkgs.path;
|
|
||||||
};
|
|
||||||
|
|
||||||
# For security, only allow specific users
|
|
||||||
settings.allowed-users = [ "@wheel" config.user ];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,63 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
home-manager.users.${config.user}.programs.starship = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
add_newline = false; # Don't print new line at the start of the prompt
|
|
||||||
format = lib.concatStrings [
|
|
||||||
"$directory"
|
|
||||||
"$git_branch"
|
|
||||||
"$git_commit"
|
|
||||||
"$git_status"
|
|
||||||
"$hostname"
|
|
||||||
"$cmd_duration"
|
|
||||||
"$character"
|
|
||||||
];
|
|
||||||
right_format = "$nix_shell";
|
|
||||||
character = {
|
|
||||||
success_symbol = "[❯](bold green)";
|
|
||||||
error_symbol = "[❯](bold red)";
|
|
||||||
vicmd_symbol = "[❮](bold green)";
|
|
||||||
};
|
|
||||||
cmd_duration = {
|
|
||||||
min_time = 5000;
|
|
||||||
show_notifications = if pkgs.stdenv.isLinux then false else true;
|
|
||||||
min_time_to_notify = 30000;
|
|
||||||
format = "[$duration]($style) ";
|
|
||||||
};
|
|
||||||
directory = {
|
|
||||||
truncate_to_repo = true;
|
|
||||||
truncation_length = 100;
|
|
||||||
};
|
|
||||||
git_branch = { format = "[$symbol$branch]($style)"; };
|
|
||||||
git_commit = {
|
|
||||||
format = "( @ [$hash]($style) )";
|
|
||||||
only_detached = false;
|
|
||||||
};
|
|
||||||
git_status = {
|
|
||||||
format = "([$all_status$ahead_behind]($style) )";
|
|
||||||
conflicted = "=";
|
|
||||||
ahead = "⇡";
|
|
||||||
behind = "⇣";
|
|
||||||
diverged = "⇕";
|
|
||||||
untracked = "⋄";
|
|
||||||
stashed = "⩮";
|
|
||||||
modified = "∽";
|
|
||||||
staged = "+";
|
|
||||||
renamed = "»";
|
|
||||||
deleted = "✘";
|
|
||||||
style = "red";
|
|
||||||
};
|
|
||||||
hostname = {
|
|
||||||
ssh_only = true;
|
|
||||||
format = "on [$hostname](bold red) ";
|
|
||||||
};
|
|
||||||
nix_shell = {
|
|
||||||
format = "[$symbol $name]($style)";
|
|
||||||
symbol = "❄️";
|
|
||||||
};
|
|
||||||
python = { format = "[\${version}\\(\${virtualenv}\\)]($style)"; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,71 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
ignorePatterns = ''
|
|
||||||
!.env*
|
|
||||||
!.github/
|
|
||||||
!.gitignore
|
|
||||||
!*.tfvars
|
|
||||||
.terraform/
|
|
||||||
.target/
|
|
||||||
/Library/'';
|
|
||||||
|
|
||||||
in {
|
|
||||||
|
|
||||||
config = {
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
age # Encryption
|
|
||||||
bc # Calculator
|
|
||||||
dig # DNS lookup
|
|
||||||
fd # find
|
|
||||||
htop # Show system processes
|
|
||||||
killall # Force quit
|
|
||||||
inetutils # Includes telnet, whois
|
|
||||||
jq # JSON manipulation
|
|
||||||
lf # File viewer
|
|
||||||
qrencode # Generate qr codes
|
|
||||||
rsync # Copy folders
|
|
||||||
ripgrep # grep
|
|
||||||
sd # sed
|
|
||||||
tealdeer # Cheatsheets
|
|
||||||
tree # View directory hierarchy
|
|
||||||
vimv-rs # Batch rename files
|
|
||||||
unzip # Extract zips
|
|
||||||
dua # File sizes (du)
|
|
||||||
du-dust # Disk usage tree (ncdu)
|
|
||||||
duf # Basic disk information (df)
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.zoxide.enable = true; # Shortcut jump command
|
|
||||||
|
|
||||||
home.file = {
|
|
||||||
".rgignore".text = ignorePatterns;
|
|
||||||
".fdignore".text = ignorePatterns;
|
|
||||||
".digrc".text = "+noall +answer"; # Cleaner dig commands
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.bat = {
|
|
||||||
enable = true; # cat replacement
|
|
||||||
config = {
|
|
||||||
theme = config.theme.colors.batTheme;
|
|
||||||
pager = "less -R"; # Don't auto-exit if one screen
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.fish.functions = {
|
|
||||||
ping = {
|
|
||||||
description = "Improved ping";
|
|
||||||
argumentNames = "target";
|
|
||||||
body = "${pkgs.prettyping}/bin/prettyping --nolegend $target";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,651 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
# MacOS-specific settings for Alacritty
|
|
||||||
home-manager.users.${config.user} = lib.mkIf pkgs.stdenv.isDarwin {
|
|
||||||
programs.alacritty.settings = {
|
|
||||||
font.size = lib.mkForce 20.0;
|
|
||||||
shell.program = "${pkgs.fish}/bin/fish";
|
|
||||||
window.startup_mode = "SimpleFullScreen";
|
|
||||||
key_bindings = [
|
|
||||||
{
|
|
||||||
key = "F";
|
|
||||||
mods = "Super";
|
|
||||||
action = "ToggleSimpleFullscreen";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "F";
|
|
||||||
mods = "Control|Shift";
|
|
||||||
action = "SearchForward";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "L";
|
|
||||||
mods = "Super";
|
|
||||||
chars = "\\x1F";
|
|
||||||
}
|
|
||||||
# Some Mac key combinations need to be manually added
|
|
||||||
{
|
|
||||||
key = "Return";
|
|
||||||
mods = "Shift";
|
|
||||||
chars = "\\x1b[13;2u";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Return";
|
|
||||||
mods = "Control";
|
|
||||||
chars = "\\x1b[13;5u";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Return";
|
|
||||||
mods = "Control|Shift";
|
|
||||||
chars = "\\x1b[13;6u";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
key = "N";
|
|
||||||
mods = "Command";
|
|
||||||
action = "SpawnNewInstance";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "PageUp";
|
|
||||||
action = "ScrollPageUp";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "PageUp";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B[5~";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "PageUp";
|
|
||||||
mods = "Shift";
|
|
||||||
chars = "\\x1B[5~";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "PageDown";
|
|
||||||
action = "ScrollPageDown";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "PageDown";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B[6~";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "PageDown";
|
|
||||||
mods = "Shift";
|
|
||||||
chars = "\\x1B[6~";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Home";
|
|
||||||
action = "ScrollToTop";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Home";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1BOH";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Home";
|
|
||||||
mods = "Shift";
|
|
||||||
chars = "\\x1B[H";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "End";
|
|
||||||
action = "ScrollToBottom";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "End";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1BOF";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "End";
|
|
||||||
mods = "Shift";
|
|
||||||
chars = "\\x1B[F";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Tab";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B ";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Tab";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1Bx1B[Z";
|
|
||||||
}
|
|
||||||
# {
|
|
||||||
# key = "Back";
|
|
||||||
# chars = "\\x7F";
|
|
||||||
# }
|
|
||||||
{
|
|
||||||
key = "Back";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bx7F";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Back";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1Bx08";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Space";
|
|
||||||
mods = "Control";
|
|
||||||
chars = "\\x00";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Space";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x20";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Left";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bb";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Left";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1Bx1B[D";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Right";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bf";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Right";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1Bx1B[C";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Down";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bx1B[B";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Down";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1Bx1B[B";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Up";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bx1B[A";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Up";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1Bx1B[A";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "A";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Ba";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "A";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BA";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "B";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bb";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "B";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BB";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "C";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bc";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "C";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BC";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "D";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bd";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "D";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BD";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "E";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Be";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "E";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BE";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "F";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bf";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "F";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BF";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "G";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bg";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "G";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BG";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "H";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bh";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "H";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BH";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "I";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bi";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "I";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BI";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "J";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bj";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "J";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BJ";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "K";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bk";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "K";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BK";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "L";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bl";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "L";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BL";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "M";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bm";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "M";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BM";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "N";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bn";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "N";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BN";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "O";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bo";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "O";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BO";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "P";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bp";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "P";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BP";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Q";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bq";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Q";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BQ";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "R";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Br";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "R";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BR";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "S";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bs";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "S";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BS";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "T";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bt";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "T";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BT";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "U";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bu";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "U";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BU";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "V";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bv";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "V";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BV";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "W";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bw";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "W";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BW";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "X";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bx";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "X";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BX";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Y";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1By";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Y";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BY";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Z";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1Bz";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Z";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1BZ";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key1";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B1";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key1";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B!";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key2";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B2";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key2";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B#";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key3";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B3";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key3";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B#";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key4";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B4";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key4";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B$";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key5";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B5";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key5";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B%";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key6";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B6";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key6";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B^";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key7";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B7";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key7";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B&";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key8";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B8";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key8";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B*";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key9";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B9";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key9";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B(";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key0";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B0";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key0";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B)";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Minus";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B-";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Minus";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B_";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Equals";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B=";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Equals";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B+";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "LBracket";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B[";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "LBracket";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B{";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "RBracket";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B]";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "RBracket";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B}";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Backslash";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B\\\\";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Backslash";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B|";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Semicolon";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B;";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Semicolon";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B =";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Apostrophe";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B'";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Apostrophe";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = ''\x1B"'';
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Comma";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B;";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Comma";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B<";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Period";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B.";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Period";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Slash";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B/";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Slash";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B?";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Grave";
|
|
||||||
mods = "Alt";
|
|
||||||
chars = "\\x1B`";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Grave";
|
|
||||||
mods = "Alt|Shift";
|
|
||||||
chars = "\\x1B~";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
{ ... }: {
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
./alacritty.nix
|
|
||||||
./fish.nix
|
|
||||||
./fonts.nix
|
|
||||||
./hammerspoon.nix
|
|
||||||
./homebrew.nix
|
|
||||||
./kitty.nix
|
|
||||||
./networking.nix
|
|
||||||
./nixpkgs.nix
|
|
||||||
./system.nix
|
|
||||||
./tmux.nix
|
|
||||||
./user.nix
|
|
||||||
./utilities.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user