mirror of
				https://github.com/nmasur/dotfiles
				synced 2025-11-03 22:53:16 +00:00 
			
		
		
		
	Compare commits
	
		
			224 Commits
		
	
	
		
			language-c
			...
			b4470727e5
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					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 | 
							
								
								
									
										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
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
      - name: Install Nix
 | 
			
		||||
        uses: DeterminateSystems/nix-installer-action@v4
 | 
			
		||||
        uses: DeterminateSystems/nix-installer-action@v11
 | 
			
		||||
      - name: Check Nixpkgs Inputs
 | 
			
		||||
        uses: DeterminateSystems/flake-checker-action@v5
 | 
			
		||||
        uses: DeterminateSystems/flake-checker-action@v7
 | 
			
		||||
      - name: Add Nix Cache
 | 
			
		||||
        uses: DeterminateSystems/magic-nix-cache-action@v2
 | 
			
		||||
        uses: DeterminateSystems/magic-nix-cache-action@v6
 | 
			
		||||
      - name: Check the Flake
 | 
			
		||||
        run: nix flake check
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								.github/workflows/update.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								.github/workflows/update.yml
									
									
									
									
										vendored
									
									
								
							@@ -18,13 +18,13 @@ jobs:
 | 
			
		||||
      - name: Checkout Repository
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
      - name: Install Nix
 | 
			
		||||
        uses: DeterminateSystems/nix-installer-action@v4
 | 
			
		||||
        uses: DeterminateSystems/nix-installer-action@v11
 | 
			
		||||
      - name: Check Nixpkgs Inputs
 | 
			
		||||
        uses: DeterminateSystems/flake-checker-action@v5
 | 
			
		||||
        uses: DeterminateSystems/flake-checker-action@v7
 | 
			
		||||
      - name: Add Nix Cache
 | 
			
		||||
        uses: DeterminateSystems/magic-nix-cache-action@v2
 | 
			
		||||
        uses: DeterminateSystems/magic-nix-cache-action@v6
 | 
			
		||||
      - name: Update flake.lock
 | 
			
		||||
        uses: DeterminateSystems/update-flake-lock@v19
 | 
			
		||||
        uses: DeterminateSystems/update-flake-lock@v21
 | 
			
		||||
        id: update
 | 
			
		||||
        with:
 | 
			
		||||
          pr-title: "Update flake.lock" # Title of PR to be created
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -1,6 +1,7 @@
 | 
			
		||||
.DS_Store
 | 
			
		||||
*.bak
 | 
			
		||||
*.db
 | 
			
		||||
*.qcow2
 | 
			
		||||
**/.direnv/**
 | 
			
		||||
result
 | 
			
		||||
private/**
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										14
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								README.md
									
									
									
									
									
								
							@@ -9,7 +9,7 @@ configuration may be difficult to translate to a non-Nix system.
 | 
			
		||||
## System Features
 | 
			
		||||
 | 
			
		||||
| Feature        | Program                                             | Configuration                                 |
 | 
			
		||||
| ---            | ---                                                 | ---                                           |
 | 
			
		||||
|----------------|-----------------------------------------------------|-----------------------------------------------|
 | 
			
		||||
| OS             | [NixOS](https://nixos.org)                          | [Link](./modules/nixos)                       |
 | 
			
		||||
| Display Server | [X11](https://www.x.org/wiki/)                      | [Link](./modules/nixos/graphical/xorg.nix)    |
 | 
			
		||||
| Compositor     | [Picom](https://github.com/yshui/picom)             | [Link](./modules/nixos/graphical/picom.nix)   |
 | 
			
		||||
@@ -21,11 +21,11 @@ configuration may be difficult to translate to a non-Nix system.
 | 
			
		||||
## User Features
 | 
			
		||||
 | 
			
		||||
| Feature      | Program                                                                          | Configuration                                      |
 | 
			
		||||
| ---          | ---                                                                              | ---                                                |
 | 
			
		||||
|--------------|----------------------------------------------------------------------------------|----------------------------------------------------|
 | 
			
		||||
| Dotfiles     | [Home-Manager](https://github.com/nix-community/home-manager)                    | [Link](./modules/common)                           |
 | 
			
		||||
| Terminal     | [Kitty](https://sw.kovidgoyal.net/kitty/)                                        | [Link](./modules/common/applications/kitty.nix)    |
 | 
			
		||||
| Shell        | [Fish](https://fishshell.com/)                                                   | [Link](./modules/common/shell/fish)                |
 | 
			
		||||
| Shell Prompt | [Starship](https://starship.rs/)                                                 | [Link](./modules/common/shell/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)          |
 | 
			
		||||
| Wallpaper    | [Road](https://gitlab.com/exorcist365/wallpapers/-/blob/master/gruvbox/road.jpg) | [Link](./hosts/tempest/default.nix)                |
 | 
			
		||||
| Text Editor  | [Neovim](https://neovim.io/)                                                     | [Link](./modules/common/neovim/config)             |
 | 
			
		||||
@@ -38,16 +38,12 @@ configuration may be difficult to translate to a non-Nix system.
 | 
			
		||||
## macOS Features
 | 
			
		||||
 | 
			
		||||
| Feature  | Program                                     | Configuration                        |
 | 
			
		||||
| ---      | ---                                         | ---                                  |
 | 
			
		||||
|----------|---------------------------------------------|--------------------------------------|
 | 
			
		||||
| Keybinds | [Hammerspoon](https://www.hammerspoon.org/) | [Link](./modules/darwin/hammerspoon) |
 | 
			
		||||
 | 
			
		||||
# Diagram
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
- [flake.nix](./flake.nix)
 | 
			
		||||
- [hosts](./hosts/)
 | 
			
		||||
- [modules](./modules/)
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
{ pkgs, ... }: rec {
 | 
			
		||||
{ pkgs, ... }:
 | 
			
		||||
rec {
 | 
			
		||||
 | 
			
		||||
  # Show quick helper
 | 
			
		||||
  default = import ./help.nix { inherit pkgs; };
 | 
			
		||||
@@ -30,5 +31,4 @@
 | 
			
		||||
  # Run neovim as an app
 | 
			
		||||
  neovim = import ./neovim.nix { inherit pkgs; };
 | 
			
		||||
  nvim = neovim;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,19 +1,19 @@
 | 
			
		||||
{ pkgs, ... }: {
 | 
			
		||||
{ pkgs, ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  # nix run github:nmasur/dotfiles#encrypt-secret > private/mysecret.age
 | 
			
		||||
 | 
			
		||||
  type = "app";
 | 
			
		||||
 | 
			
		||||
  program = builtins.toString (pkgs.writeShellScript "encrypt-secret" ''
 | 
			
		||||
  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
 | 
			
		||||
      ${pkgs.age}/bin/age --encrypt --armor --recipients-file ${builtins.toString ../misc/public-keys} $tmpfile
 | 
			
		||||
      rm $tmpfile
 | 
			
		||||
  '');
 | 
			
		||||
 | 
			
		||||
    ''
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,12 @@
 | 
			
		||||
{ pkgs, ... }: {
 | 
			
		||||
{ pkgs, ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  # This script will partition and format drives; use at your own risk!
 | 
			
		||||
 | 
			
		||||
  type = "app";
 | 
			
		||||
 | 
			
		||||
  program = builtins.toString (pkgs.writeShellScript "format-root" ''
 | 
			
		||||
  program = builtins.toString (
 | 
			
		||||
    pkgs.writeShellScript "format-root" ''
 | 
			
		||||
      set -e
 | 
			
		||||
 | 
			
		||||
      DISK=$1
 | 
			
		||||
@@ -34,6 +36,6 @@
 | 
			
		||||
          --flake "path:$(pwd)#root" \
 | 
			
		||||
          --arg disk "/dev/''${DISK}"
 | 
			
		||||
 | 
			
		||||
  '');
 | 
			
		||||
 | 
			
		||||
    ''
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,10 @@
 | 
			
		||||
{ pkgs, ... }: {
 | 
			
		||||
{ pkgs, ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  type = "app";
 | 
			
		||||
 | 
			
		||||
  program = builtins.toString (pkgs.writeShellScript "default" ''
 | 
			
		||||
  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 ""
 | 
			
		||||
@@ -18,6 +20,6 @@
 | 
			
		||||
          '  • {{ Color "15" "57" " netdata " }} {{ Italic "Connect a machine to Netdata cloud." }}'
 | 
			
		||||
      echo ""
 | 
			
		||||
      echo ""
 | 
			
		||||
  '');
 | 
			
		||||
 | 
			
		||||
    ''
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,13 @@
 | 
			
		||||
{ pkgs, ... }: {
 | 
			
		||||
{ 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" ''
 | 
			
		||||
  program = builtins.toString (
 | 
			
		||||
    pkgs.writeShellScript "installer" ''
 | 
			
		||||
      set -e
 | 
			
		||||
 | 
			
		||||
      DISK=$1
 | 
			
		||||
@@ -43,6 +45,6 @@
 | 
			
		||||
      mount /dev/disk/by-label/boot /mnt/boot
 | 
			
		||||
 | 
			
		||||
      ${pkgs.nixos-install-tools}/bin/nixos-install --flake github:nmasur/dotfiles#''${FLAKE}
 | 
			
		||||
  '');
 | 
			
		||||
 | 
			
		||||
    ''
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,13 +1,15 @@
 | 
			
		||||
{ pkgs, ... }: {
 | 
			
		||||
{ pkgs, ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  type = "app";
 | 
			
		||||
 | 
			
		||||
  program = builtins.toString (pkgs.writeShellScript "loadkey" ''
 | 
			
		||||
  program = builtins.toString (
 | 
			
		||||
    pkgs.writeShellScript "loadkey" ''
 | 
			
		||||
      printf "\nEnter the seed phrase for your SSH key...\n"
 | 
			
		||||
      printf "\nThen press ^D when complete.\n\n"
 | 
			
		||||
      mkdir -p ~/.ssh/
 | 
			
		||||
      ${pkgs.melt}/bin/melt restore ~/.ssh/id_ed25519
 | 
			
		||||
      printf "\n\nContinuing activation.\n\n"
 | 
			
		||||
  '');
 | 
			
		||||
 | 
			
		||||
    ''
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
{ pkgs, ... }: {
 | 
			
		||||
{ pkgs, ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  type = "app";
 | 
			
		||||
 | 
			
		||||
@@ -8,5 +9,4 @@
 | 
			
		||||
      colors = (import ../colorscheme/nord).dark;
 | 
			
		||||
    })
 | 
			
		||||
  }/bin/nvim";
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,10 @@
 | 
			
		||||
{ pkgs, ... }: {
 | 
			
		||||
{ pkgs, ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  type = "app";
 | 
			
		||||
 | 
			
		||||
  program = builtins.toString (pkgs.writeShellScript "netdata-cloud" ''
 | 
			
		||||
  program = builtins.toString (
 | 
			
		||||
    pkgs.writeShellScript "netdata-cloud" ''
 | 
			
		||||
      if [ "$EUID" -ne 0 ]; then
 | 
			
		||||
        echo "Please run as root"
 | 
			
		||||
        exit 1
 | 
			
		||||
@@ -14,6 +16,6 @@
 | 
			
		||||
      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 +1,11 @@
 | 
			
		||||
{ pkgs, ... }: {
 | 
			
		||||
{ pkgs, ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  type = "app";
 | 
			
		||||
 | 
			
		||||
  program = builtins.toString (pkgs.writeShellScript "readme" ''
 | 
			
		||||
  program = builtins.toString (
 | 
			
		||||
    pkgs.writeShellScript "readme" ''
 | 
			
		||||
      ${pkgs.glow}/bin/glow --pager ${builtins.toString ../README.md}
 | 
			
		||||
  '');
 | 
			
		||||
 | 
			
		||||
    ''
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,10 @@
 | 
			
		||||
{ pkgs, ... }: {
 | 
			
		||||
{ pkgs, ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  type = "app";
 | 
			
		||||
 | 
			
		||||
  program = builtins.toString (pkgs.writeShellScript "rebuild" ''
 | 
			
		||||
  program = builtins.toString (
 | 
			
		||||
    pkgs.writeShellScript "rebuild" ''
 | 
			
		||||
      echo ${pkgs.system}
 | 
			
		||||
      SYSTEM=${if pkgs.stdenv.isDarwin then "darwin" else "linux"}
 | 
			
		||||
      if [ "$SYSTEM" == "darwin" ]; then
 | 
			
		||||
@@ -10,6 +12,6 @@
 | 
			
		||||
      else
 | 
			
		||||
          doas nixos-rebuild switch --flake ${builtins.toString ../.}
 | 
			
		||||
      fi
 | 
			
		||||
  '');
 | 
			
		||||
 | 
			
		||||
    ''
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,12 @@
 | 
			
		||||
{ pkgs, ... }: {
 | 
			
		||||
{ pkgs, ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  # nix run github:nmasur/dotfiles#reencrypt-secrets ./private
 | 
			
		||||
 | 
			
		||||
  type = "app";
 | 
			
		||||
 | 
			
		||||
  program = builtins.toString (pkgs.writeShellScript "reencrypt-secrets" ''
 | 
			
		||||
  program = builtins.toString (
 | 
			
		||||
    pkgs.writeShellScript "reencrypt-secrets" ''
 | 
			
		||||
      if [ $# -eq 0 ]; then
 | 
			
		||||
        echo "Must provide directory to reencrypt."
 | 
			
		||||
        exit 1
 | 
			
		||||
@@ -16,12 +18,10 @@
 | 
			
		||||
        ${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
 | 
			
		||||
        ${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
 | 
			
		||||
    base0C = "#e69875"; # Support, Regular Expressions, Escape Characters, ...
 | 
			
		||||
    base0D = "#a7c080"; # Functions, Methods, Attribute IDs, Headings
 | 
			
		||||
    base0E =
 | 
			
		||||
      "#e67e80"; # Keywords, Storage, Selector, Markup Italic, Diff Changed
 | 
			
		||||
    base0F =
 | 
			
		||||
      "#d699b6"; # Deprecated, Opening/Closing Embedded Language Tags, ...
 | 
			
		||||
    base0E = "#e67e80"; # Keywords, Storage, Selector, Markup Italic, Diff Changed
 | 
			
		||||
    base0F = "#d699b6"; # Deprecated, Opening/Closing Embedded Language Tags, ...
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -2,8 +2,7 @@
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  name = "gruvbox-dark"; # Dark, Medium
 | 
			
		||||
  author =
 | 
			
		||||
    "Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox), ElRastaOk (https://www.reddit.com/user/ElRastaOk)";
 | 
			
		||||
  author = "Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox), ElRastaOk (https://www.reddit.com/user/ElRastaOk)";
 | 
			
		||||
  dark = {
 | 
			
		||||
    base00 = "#1D2122"; # ---- This is the change from normal gruvbox
 | 
			
		||||
    base01 = "#3c3836"; # ---
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  name = "gruvbox"; # Dark, Medium
 | 
			
		||||
  author =
 | 
			
		||||
    "Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)";
 | 
			
		||||
  author = "Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)";
 | 
			
		||||
  dark = {
 | 
			
		||||
    base00 = "#282828"; # ----
 | 
			
		||||
    base01 = "#3c3836"; # ---
 | 
			
		||||
 
 | 
			
		||||
@@ -1,41 +1,38 @@
 | 
			
		||||
{ disk, ... }: {
 | 
			
		||||
{ disk, ... }:
 | 
			
		||||
{
 | 
			
		||||
  disk = {
 | 
			
		||||
    boot = {
 | 
			
		||||
      type = "disk";
 | 
			
		||||
      device = disk;
 | 
			
		||||
      content = {
 | 
			
		||||
        type = "table";
 | 
			
		||||
        format = "gpt";
 | 
			
		||||
        partitions = [
 | 
			
		||||
        type = "gpt";
 | 
			
		||||
        partitions = {
 | 
			
		||||
          # Boot partition
 | 
			
		||||
          {
 | 
			
		||||
            name = "ESP";
 | 
			
		||||
            start = "0";
 | 
			
		||||
            end = "512MiB";
 | 
			
		||||
            fs-type = "fat32";
 | 
			
		||||
            bootable = true;
 | 
			
		||||
          ESP = rec {
 | 
			
		||||
            size = "512MiB";
 | 
			
		||||
            type = "EF00";
 | 
			
		||||
            label = "boot";
 | 
			
		||||
            device = "/dev/disk/by-label/${label}";
 | 
			
		||||
            content = {
 | 
			
		||||
              type = "filesystem";
 | 
			
		||||
              format = "vfat";
 | 
			
		||||
              mountpoint = "/boot";
 | 
			
		||||
              extraArgs = [ "-n boot" ];
 | 
			
		||||
              extraArgs = [ "-n ${label}" ];
 | 
			
		||||
            };
 | 
			
		||||
          };
 | 
			
		||||
          }
 | 
			
		||||
          # Root partition ext4
 | 
			
		||||
          {
 | 
			
		||||
            name = "root";
 | 
			
		||||
            start = "512MiB";
 | 
			
		||||
            end = "100%";
 | 
			
		||||
            part-type = "primary";
 | 
			
		||||
            bootable = true;
 | 
			
		||||
          root = rec {
 | 
			
		||||
            size = "100%";
 | 
			
		||||
            label = "nixos";
 | 
			
		||||
            device = "/dev/disk/by-label/${label}";
 | 
			
		||||
            content = {
 | 
			
		||||
              type = "filesystem";
 | 
			
		||||
              format = "ext4";
 | 
			
		||||
              mountpoint = "/";
 | 
			
		||||
              extraArgs = [ "-L nixos" ];
 | 
			
		||||
              extraArgs = [ "-L ${label}" ];
 | 
			
		||||
            };
 | 
			
		||||
          };
 | 
			
		||||
        };
 | 
			
		||||
          }
 | 
			
		||||
        ];
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
{ pool, disks, ... }: {
 | 
			
		||||
{ pool, disks, ... }:
 | 
			
		||||
{
 | 
			
		||||
  disk = lib.genAttrs disks (disk: {
 | 
			
		||||
    "${disk}" = {
 | 
			
		||||
      type = "disk";
 | 
			
		||||
@@ -6,7 +7,8 @@
 | 
			
		||||
      content = {
 | 
			
		||||
        type = "table";
 | 
			
		||||
        format = "gpt";
 | 
			
		||||
        partitions = [{
 | 
			
		||||
        partitions = [
 | 
			
		||||
          {
 | 
			
		||||
            type = "partition";
 | 
			
		||||
            name = "zfs";
 | 
			
		||||
            start = "128MiB";
 | 
			
		||||
@@ -15,7 +17,8 @@
 | 
			
		||||
              type = "zfs";
 | 
			
		||||
              pool = pool;
 | 
			
		||||
            };
 | 
			
		||||
        }];
 | 
			
		||||
          }
 | 
			
		||||
        ];
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
  });
 | 
			
		||||
 
 | 
			
		||||
@@ -57,6 +57,7 @@ Launch a new shell. Then use Nix to switch to the macOS configuration:
 | 
			
		||||
```bash
 | 
			
		||||
sudo rm /etc/bashrc
 | 
			
		||||
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 \
 | 
			
		||||
 
 | 
			
		||||
@@ -63,3 +63,20 @@ Use this mysqldump command:
 | 
			
		||||
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
 | 
			
		||||
```
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										521
									
								
								flake.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										521
									
								
								flake.lock
									
									
									
										generated
									
									
									
								
							@@ -1,30 +1,13 @@
 | 
			
		||||
{
 | 
			
		||||
  "nodes": {
 | 
			
		||||
    "Comment-nvim-src": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1681214440,
 | 
			
		||||
        "narHash": "sha256-48hy+hiaDJLlgWqC7IeZI3dT+VwWkRo4atQbyPxu/ys=",
 | 
			
		||||
        "owner": "numToStr",
 | 
			
		||||
        "repo": "Comment.nvim",
 | 
			
		||||
        "rev": "e51f2b142d88bb666dcaa77d93a07f4b419aca70",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "numToStr",
 | 
			
		||||
        "ref": "v0.8.0",
 | 
			
		||||
        "repo": "Comment.nvim",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "baleia-nvim-src": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1704551058,
 | 
			
		||||
        "narHash": "sha256-0NmiGzMFvL1awYOVtiaSd+O4sAR524x68xwWLgArlqs=",
 | 
			
		||||
        "lastModified": 1717182435,
 | 
			
		||||
        "narHash": "sha256-duI3myrJSvmtjF9n7NVrVOsuSo1O3JEypA5ghBHsULc=",
 | 
			
		||||
        "owner": "m00qek",
 | 
			
		||||
        "repo": "baleia.nvim",
 | 
			
		||||
        "rev": "6d9cbdaca3a428bc7296f838fdfce3ad01ee7495",
 | 
			
		||||
        "rev": "4d3b27dbec65a44ceecd9306f605a980bcf4e9b1",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -33,47 +16,62 @@
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "base16-nvim-src": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1716483968,
 | 
			
		||||
        "narHash": "sha256-GRF/6AobXHamw8TZ3FjL7SI6ulcpwpcohsIuZeCSh2A=",
 | 
			
		||||
        "owner": "RRethy",
 | 
			
		||||
        "repo": "base16-nvim",
 | 
			
		||||
        "rev": "6ac181b5733518040a33017dde654059cd771b7c",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "RRethy",
 | 
			
		||||
        "repo": "base16-nvim",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "bufferline-nvim-src": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1706180994,
 | 
			
		||||
        "narHash": "sha256-/iGzUDJaodkUyWpwim8UtwaRuarfu/Nk6wxVApk+QxY=",
 | 
			
		||||
        "lastModified": 1716555412,
 | 
			
		||||
        "narHash": "sha256-8PCkY1zrlMrPGnQOb7MjqDXNlkeX46jrT4ScIL+MOwM=",
 | 
			
		||||
        "owner": "akinsho",
 | 
			
		||||
        "repo": "bufferline.nvim",
 | 
			
		||||
        "rev": "d6cb9b7cac52887bcac65f8698e67479553c0748",
 | 
			
		||||
        "rev": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "akinsho",
 | 
			
		||||
        "ref": "v4.5.0",
 | 
			
		||||
        "ref": "v4.6.1",
 | 
			
		||||
        "repo": "bufferline.nvim",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "bypass-paywalls-clean": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
    "cl-nix-lite": {
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1706880406,
 | 
			
		||||
        "narHash": "sha256-8z2Gc3ITluXXbDij4Ltahpkxs7zdnMITvIAjotab/QU=",
 | 
			
		||||
        "owner": "magnolia1234",
 | 
			
		||||
        "repo": "bpc-uploads",
 | 
			
		||||
        "rev": "c91cfd510390ab5a138f412ad2890b2cb2a2eafd",
 | 
			
		||||
        "type": "gitlab"
 | 
			
		||||
        "lastModified": 1717972076,
 | 
			
		||||
        "narHash": "sha256-hnZEsDInTcsVSL5LBGDAZegAxVLBus/wiJh+sNM15zU=",
 | 
			
		||||
        "owner": "hraban",
 | 
			
		||||
        "repo": "cl-nix-lite",
 | 
			
		||||
        "rev": "cc920bfb0a6402d3871f470c98d65266126973e4",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "magnolia1234",
 | 
			
		||||
        "repo": "bpc-uploads",
 | 
			
		||||
        "type": "gitlab"
 | 
			
		||||
        "owner": "hraban",
 | 
			
		||||
        "repo": "cl-nix-lite",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "cmp-nvim-lsp-src": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1702205473,
 | 
			
		||||
        "narHash": "sha256-/0sh9vJBD9pUuD7q3tNSQ1YLvxFMNykdg5eG+LjZAA8=",
 | 
			
		||||
        "lastModified": 1715931395,
 | 
			
		||||
        "narHash": "sha256-CT1+Z4XJBVsl/RqvJeGmyitD6x7So0ylXvvef5jh7I8=",
 | 
			
		||||
        "owner": "hrsh7th",
 | 
			
		||||
        "repo": "cmp-nvim-lsp",
 | 
			
		||||
        "rev": "5af77f54de1b16c34b23cba810150689a3a90312",
 | 
			
		||||
        "rev": "39e2eda76828d88b773cc27a3f61d2ad782c922d",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -89,11 +87,11 @@
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1706833576,
 | 
			
		||||
        "narHash": "sha256-w7BL0EWRts+nD1lbLECIuz6fRzmmV+z8oWwoY7womR0=",
 | 
			
		||||
        "lastModified": 1718662658,
 | 
			
		||||
        "narHash": "sha256-AKG7BsqtVWDlefgzyKz7vjaKTLi4+bmTSBhowbQoZtM=",
 | 
			
		||||
        "owner": "lnl7",
 | 
			
		||||
        "repo": "nix-darwin",
 | 
			
		||||
        "rev": "bdbae6ecff8fcc322bf6b9053c0b984912378af7",
 | 
			
		||||
        "rev": "29b3096a6e283d7e6779187244cb2a3942239fdf",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -110,11 +108,11 @@
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1706491084,
 | 
			
		||||
        "narHash": "sha256-eaEv+orTmr2arXpoE4aFZQMVPOYXCBEbLgK22kOtkhs=",
 | 
			
		||||
        "lastModified": 1718846788,
 | 
			
		||||
        "narHash": "sha256-9dtXYtEkmXoUJV+PGLqscqF7qTn4AIhAKpFWRFU2NYs=",
 | 
			
		||||
        "owner": "nix-community",
 | 
			
		||||
        "repo": "disko",
 | 
			
		||||
        "rev": "f67ba6552845ea5d7f596a24d57c33a8a9dc8de9",
 | 
			
		||||
        "rev": "e1174d991944a01eaaa04bc59c6281edca4c0e6e",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -126,16 +124,16 @@
 | 
			
		||||
    "fidget-nvim-src": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1704696337,
 | 
			
		||||
        "narHash": "sha256-uAX/RGfOmsUIUaDepNwUpK8MBaTMBJ4rLZ69y0MwpNE=",
 | 
			
		||||
        "lastModified": 1716093309,
 | 
			
		||||
        "narHash": "sha256-Gpk/G0ByOAIE8uX4Xr94CvAjJBSJMEOwBuvrhmYYGsg=",
 | 
			
		||||
        "owner": "j-hui",
 | 
			
		||||
        "repo": "fidget.nvim",
 | 
			
		||||
        "rev": "3a93300c076109d86c7ce35ec67a8034ae6ba9db",
 | 
			
		||||
        "rev": "ef99df04a1c53a453602421bc0f756997edc8289",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "j-hui",
 | 
			
		||||
        "ref": "v1.2.0",
 | 
			
		||||
        "ref": "v1.4.5",
 | 
			
		||||
        "repo": "fidget.nvim",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
@@ -147,11 +145,11 @@
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1707007453,
 | 
			
		||||
        "narHash": "sha256-vs7uACn2/8GOApZJv52gAVsLfpjQWFgkHN2QJ7aVkl8=",
 | 
			
		||||
        "lastModified": 1718930737,
 | 
			
		||||
        "narHash": "sha256-+nKJ/VP6X+hirXqRry3GzdNn4OJvOdB4nRnJY22ixFw=",
 | 
			
		||||
        "owner": "bandithedoge",
 | 
			
		||||
        "repo": "nixpkgs-firefox-darwin",
 | 
			
		||||
        "rev": "d839feb516758ad28bc1cef43008d55e749c1d6a",
 | 
			
		||||
        "rev": "087919070dffc9798a8cb753e97babe287f06c25",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -161,6 +159,23 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "flake-compat": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1697816753,
 | 
			
		||||
        "narHash": "sha256-40to80AEIyKCQI0xMKCeF5ePoIKTYgjVVCZeu4CnTxM=",
 | 
			
		||||
        "owner": "hraban",
 | 
			
		||||
        "repo": "flake-compat",
 | 
			
		||||
        "rev": "6025bade1336a36014639bc3f67eacc853dab78f",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "hraban",
 | 
			
		||||
        "ref": "fixed-output",
 | 
			
		||||
        "repo": "flake-compat",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "flake-compat_2": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1696426674,
 | 
			
		||||
@@ -181,17 +196,16 @@
 | 
			
		||||
        "systems": "systems"
 | 
			
		||||
      },
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1705309234,
 | 
			
		||||
        "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
 | 
			
		||||
        "lastModified": 1710146030,
 | 
			
		||||
        "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
 | 
			
		||||
        "owner": "numtide",
 | 
			
		||||
        "repo": "flake-utils",
 | 
			
		||||
        "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
 | 
			
		||||
        "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "numtide",
 | 
			
		||||
        "repo": "flake-utils",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
        "id": "flake-utils",
 | 
			
		||||
        "type": "indirect"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "flake-utils_2": {
 | 
			
		||||
@@ -212,14 +226,32 @@
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "flake-utils_3": {
 | 
			
		||||
      "inputs": {
 | 
			
		||||
        "systems": "systems_3"
 | 
			
		||||
      },
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1710146030,
 | 
			
		||||
        "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
 | 
			
		||||
        "owner": "numtide",
 | 
			
		||||
        "repo": "flake-utils",
 | 
			
		||||
        "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "numtide",
 | 
			
		||||
        "repo": "flake-utils",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "hmts-nvim-src": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1706900289,
 | 
			
		||||
        "narHash": "sha256-kw3YJ21nhs/x9Jp7kvnL+9FuiSgLB1hO/ON3QeeZx9g=",
 | 
			
		||||
        "lastModified": 1715076655,
 | 
			
		||||
        "narHash": "sha256-vDTqJQzLyg0nmlC+CrLnPkYti1rPxmvRW8eQq/9Zg+M=",
 | 
			
		||||
        "owner": "calops",
 | 
			
		||||
        "repo": "hmts.nvim",
 | 
			
		||||
        "rev": "ba1239972a1f56b94252d4f85a43e777ac419662",
 | 
			
		||||
        "rev": "19a91816c123173a4551a6a04f2882338f20db1d",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -235,11 +267,11 @@
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1706985585,
 | 
			
		||||
        "narHash": "sha256-ptshv4qXiC6V0GCfpABz88UGGPNwqs5tAxaRUKbk1Qo=",
 | 
			
		||||
        "lastModified": 1718983978,
 | 
			
		||||
        "narHash": "sha256-lp6stESwTLBZUQ5GBivxwNehShmBp4jqeX/1xahM61w=",
 | 
			
		||||
        "owner": "nix-community",
 | 
			
		||||
        "repo": "home-manager",
 | 
			
		||||
        "rev": "1ca210648a6ca9b957efde5da957f3de6b1f0c45",
 | 
			
		||||
        "rev": "c559542f0aa87971a7f4c1b3478fe33cc904b902",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -249,87 +281,110 @@
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "kitty-scrollback-nvim-src": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1706891759,
 | 
			
		||||
        "narHash": "sha256-p7RPqLHO6D5CCTDQzUrEqTu9+jg+V7wtYfGbY4qjE9A=",
 | 
			
		||||
        "owner": "mikesmithgh",
 | 
			
		||||
        "repo": "kitty-scrollback.nvim",
 | 
			
		||||
        "rev": "12f7687ac049d46a987c39b2b4f657fdf540fa4e",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "mikesmithgh",
 | 
			
		||||
        "repo": "kitty-scrollback.nvim",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nextcloud-cookbook": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1702545935,
 | 
			
		||||
        "narHash": "sha256-19LN1nYJJ0RMWj6DrYPvHzocTyhMfYdpdhBFch3fpHE=",
 | 
			
		||||
        "type": "tarball",
 | 
			
		||||
        "url": "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.0/cookbook-0.11.0.tar.gz"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "type": "tarball",
 | 
			
		||||
        "url": "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.0/cookbook-0.11.0.tar.gz"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nextcloud-external": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1699624334,
 | 
			
		||||
        "narHash": "sha256-RCL2RP5twRDLxI/KfAX6QLYQOzqZmSWsfrC5ZQIwTD4=",
 | 
			
		||||
        "type": "tarball",
 | 
			
		||||
        "url": "https://github.com/nextcloud-releases/external/releases/download/v5.3.1/external-v5.3.1.tar.gz"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "type": "tarball",
 | 
			
		||||
        "url": "https://github.com/nextcloud-releases/external/releases/download/v5.3.1/external-v5.3.1.tar.gz"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nextcloud-news": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1703426420,
 | 
			
		||||
        "narHash": "sha256-AENBJH/bEob5JQvw4WEi864mdLYJ5Mqe78HJH6ceCpI=",
 | 
			
		||||
        "type": "tarball",
 | 
			
		||||
        "url": "https://github.com/nextcloud/news/releases/download/25.0.0-alpha3/news.tar.gz"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "type": "tarball",
 | 
			
		||||
        "url": "https://github.com/nextcloud/news/releases/download/25.0.0-alpha3/news.tar.gz"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nextcloud-snappymail": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1707018069,
 | 
			
		||||
        "narHash": "sha256-UeZXoZFEPJj7zEVNTXJ3IYNt/wI7VFq3Pjh1ubMHCBo=",
 | 
			
		||||
        "type": "tarball",
 | 
			
		||||
        "url": "https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "type": "tarball",
 | 
			
		||||
        "url": "https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nix2vim": {
 | 
			
		||||
    "mac-app-util": {
 | 
			
		||||
      "inputs": {
 | 
			
		||||
        "cl-nix-lite": "cl-nix-lite",
 | 
			
		||||
        "flake-compat": "flake-compat",
 | 
			
		||||
        "flake-utils": "flake-utils",
 | 
			
		||||
        "nixpkgs": [
 | 
			
		||||
          "nixpkgs"
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1706886721,
 | 
			
		||||
        "narHash": "sha256-iDYxsE5xYoK8Ww2TYZDmgRQNIZl+QHJfChOxWh45g0k=",
 | 
			
		||||
        "lastModified": 1718893255,
 | 
			
		||||
        "narHash": "sha256-NdSDGdz5eU/EcnGn8ECP1V+mn5hyGOZQ4ybv2bWTpuk=",
 | 
			
		||||
        "owner": "hraban",
 | 
			
		||||
        "repo": "mac-app-util",
 | 
			
		||||
        "rev": "1857b26aceaf64c2b6a357eb83cf34139b6365cc",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "hraban",
 | 
			
		||||
        "repo": "mac-app-util",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "markview-nvim-src": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1719592662,
 | 
			
		||||
        "narHash": "sha256-E1lHSjbnOOIeieaFJ+INvxJHCbfVS3mwbQ6wrlKeGSQ=",
 | 
			
		||||
        "owner": "OXY2DEV",
 | 
			
		||||
        "repo": "markview.nvim",
 | 
			
		||||
        "rev": "f60219dce7283192d549f21847fcf8537bf6d260",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "OXY2DEV",
 | 
			
		||||
        "repo": "markview.nvim",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nextcloud-cookbook": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1719431638,
 | 
			
		||||
        "narHash": "sha256-a8ekMnEzudHGiqHF53jPtgsVTOTc2QLuPg6YtTw5h68=",
 | 
			
		||||
        "type": "tarball",
 | 
			
		||||
        "url": "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.1/cookbook-0.11.1.tar.gz"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "type": "tarball",
 | 
			
		||||
        "url": "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.1/cookbook-0.11.1.tar.gz"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nextcloud-external": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1710338675,
 | 
			
		||||
        "narHash": "sha256-bJJ/dVmE1o04QCyrxD0sko0okRsnxJmT6sOTOmBiifs=",
 | 
			
		||||
        "type": "tarball",
 | 
			
		||||
        "url": "https://github.com/nextcloud-releases/external/releases/download/v5.4.0/external-v5.4.0.tar.gz"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "type": "tarball",
 | 
			
		||||
        "url": "https://github.com/nextcloud-releases/external/releases/download/v5.4.0/external-v5.4.0.tar.gz"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nextcloud-news": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1718102703,
 | 
			
		||||
        "narHash": "sha256-XNGjf7SWgJYFdVNOh3ED0jxSG0GJwWImVQq4cJT1Lo4=",
 | 
			
		||||
        "type": "tarball",
 | 
			
		||||
        "url": "https://github.com/nextcloud/news/releases/download/25.0.0-alpha7/news.tar.gz"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "type": "tarball",
 | 
			
		||||
        "url": "https://github.com/nextcloud/news/releases/download/25.0.0-alpha7/news.tar.gz"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nextcloud-snappymail": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1719799046,
 | 
			
		||||
        "narHash": "sha256-1bPStkTKgVCc/puq0G7EiEZy/xrNlNXaO/tiOaZ/Ovw=",
 | 
			
		||||
        "type": "tarball",
 | 
			
		||||
        "url": "https://github.com/nmasur/snappymail-nextcloud/releases/download/v2.36.3/snappymail-2.36.3-nextcloud.tar.gz"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "type": "tarball",
 | 
			
		||||
        "url": "https://github.com/nmasur/snappymail-nextcloud/releases/download/v2.36.3/snappymail-2.36.3-nextcloud.tar.gz"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nix2vim": {
 | 
			
		||||
      "inputs": {
 | 
			
		||||
        "flake-utils": "flake-utils_2",
 | 
			
		||||
        "nixpkgs": [
 | 
			
		||||
          "nixpkgs"
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1718621825,
 | 
			
		||||
        "narHash": "sha256-bSfjwRgKKpLyjEDPRAF1hlJKc7QDoqopalHwNCB/eAA=",
 | 
			
		||||
        "owner": "gytis-ivaskevicius",
 | 
			
		||||
        "repo": "nix2vim",
 | 
			
		||||
        "rev": "29253dcf0f645a44847006d436b096369ef42fd8",
 | 
			
		||||
        "rev": "1db11dbf8a4d124e02244fa5c4ff219b672a8e5b",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -340,11 +395,11 @@
 | 
			
		||||
    },
 | 
			
		||||
    "nixlib": {
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1693701915,
 | 
			
		||||
        "narHash": "sha256-waHPLdDYUOHSEtMKKabcKIMhlUOHPOOPQ9UyFeEoovs=",
 | 
			
		||||
        "lastModified": 1712450863,
 | 
			
		||||
        "narHash": "sha256-K6IkdtMtq9xktmYPj0uaYc8NsIqHuaAoRBaMgu9Fvrw=",
 | 
			
		||||
        "owner": "nix-community",
 | 
			
		||||
        "repo": "nixpkgs.lib",
 | 
			
		||||
        "rev": "f5af57d3ef9947a70ac86e42695231ac1ad00c25",
 | 
			
		||||
        "rev": "3c62b6a12571c9a7f65ab037173ee153d539905f",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -361,11 +416,11 @@
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1706085261,
 | 
			
		||||
        "narHash": "sha256-7PgpHRHyShINcqgevPP1fJ6N8kM5ZSOJnk3QZBrOCQ0=",
 | 
			
		||||
        "lastModified": 1718025593,
 | 
			
		||||
        "narHash": "sha256-WZ1gdKq/9u1Ns/oXuNsDm+W0salonVA0VY1amw8urJ4=",
 | 
			
		||||
        "owner": "nix-community",
 | 
			
		||||
        "repo": "nixos-generators",
 | 
			
		||||
        "rev": "896f6589db5b25023b812bbb6c1f5d3a499b1132",
 | 
			
		||||
        "rev": "35c20ba421dfa5059e20e0ef2343c875372bdcf3",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -376,11 +431,11 @@
 | 
			
		||||
    },
 | 
			
		||||
    "nixpkgs": {
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1706732774,
 | 
			
		||||
        "narHash": "sha256-hqJlyJk4MRpcItGYMF+3uHe8HvxNETWvlGtLuVpqLU0=",
 | 
			
		||||
        "lastModified": 1718895438,
 | 
			
		||||
        "narHash": "sha256-k3JqJrkdoYwE3fHE6xGDY676AYmyh4U2Zw+0Bwe5DLU=",
 | 
			
		||||
        "owner": "nixos",
 | 
			
		||||
        "repo": "nixpkgs",
 | 
			
		||||
        "rev": "b8b232ae7b8b144397fdb12d20f592e5e7c1a64d",
 | 
			
		||||
        "rev": "d603719ec6e294f034936c0d0dc06f689d91b6c3",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -390,29 +445,29 @@
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "null-ls-nvim-src": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
    "nixpkgs-caddy": {
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1691810493,
 | 
			
		||||
        "narHash": "sha256-cWA0rzkOp/ekVKaFee7iea1lhnqKtWUIU+fW5M950wI=",
 | 
			
		||||
        "owner": "jose-elias-alvarez",
 | 
			
		||||
        "repo": "null-ls.nvim",
 | 
			
		||||
        "rev": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7",
 | 
			
		||||
        "lastModified": 1699107987,
 | 
			
		||||
        "narHash": "sha256-nWXETr4Oqy/vOfzgWyMY04qzEN2iREFJc5ycQ3XNu0A=",
 | 
			
		||||
        "owner": "jpds",
 | 
			
		||||
        "repo": "nixpkgs",
 | 
			
		||||
        "rev": "a33b02fa9d664f31dadc8a874eb1a5dbaa9f4ecf",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "jose-elias-alvarez",
 | 
			
		||||
        "repo": "null-ls.nvim",
 | 
			
		||||
        "owner": "jpds",
 | 
			
		||||
        "ref": "caddy-external-plugins",
 | 
			
		||||
        "repo": "nixpkgs",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nur": {
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1707013032,
 | 
			
		||||
        "narHash": "sha256-9kEY/D0Q6sF+p6vJRefVXDK4QQdwK4Q0lSQdsYICad0=",
 | 
			
		||||
        "lastModified": 1719001822,
 | 
			
		||||
        "narHash": "sha256-rbEP1CTzYvdSAKf1a729De9t8GMIrZ5GmD+PdYCnrgg=",
 | 
			
		||||
        "owner": "nix-community",
 | 
			
		||||
        "repo": "nur",
 | 
			
		||||
        "rev": "ab432acea15134873882610c0e936a882319bc8a",
 | 
			
		||||
        "rev": "e7edcaeae9db01224266febe88eb7d3411055636",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -421,19 +476,35 @@
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nvim-lint-src": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1717789608,
 | 
			
		||||
        "narHash": "sha256-LNYFxAM9lQNNOIOc+IgKgbSRp2U09B/9HivSCwMyUpQ=",
 | 
			
		||||
        "owner": "mfussenegger",
 | 
			
		||||
        "repo": "nvim-lint",
 | 
			
		||||
        "rev": "941fa1220a61797a51f3af9ec6b7d74c8c7367ce",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "mfussenegger",
 | 
			
		||||
        "repo": "nvim-lint",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nvim-lspconfig-src": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1701687137,
 | 
			
		||||
        "narHash": "sha256-qFjFofA2LoD4yRfx4KGfSCpR3mDkpFaagcm+TVNPqco=",
 | 
			
		||||
        "lastModified": 1716281382,
 | 
			
		||||
        "narHash": "sha256-foJ7a59N0a3QaBW24PtwbyYDQVlIsFxiatADLO/hQvc=",
 | 
			
		||||
        "owner": "neovim",
 | 
			
		||||
        "repo": "nvim-lspconfig",
 | 
			
		||||
        "rev": "cf3dd4a290084a868fac0e2e876039321d57111c",
 | 
			
		||||
        "rev": "0b8165cf95806bc4bb8f745bb0c92021b2ed4b98",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "neovim",
 | 
			
		||||
        "ref": "v0.1.7",
 | 
			
		||||
        "ref": "v0.1.8",
 | 
			
		||||
        "repo": "nvim-lspconfig",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
@@ -441,11 +512,11 @@
 | 
			
		||||
    "nvim-tree-lua-src": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1706571452,
 | 
			
		||||
        "narHash": "sha256-b0LIqLC8cCRX1NyJx4eH5c4v5Fqqw5mMleAnQ2VRctM=",
 | 
			
		||||
        "lastModified": 1717900986,
 | 
			
		||||
        "narHash": "sha256-7KO3wPW65IH4m0jEoyFScNiAVwrlNHU+p0H55AuwlWk=",
 | 
			
		||||
        "owner": "kyazdani42",
 | 
			
		||||
        "repo": "nvim-tree.lua",
 | 
			
		||||
        "rev": "f39f7b6fcd3865ac2146de4cb4045286308f2935",
 | 
			
		||||
        "rev": "2086e564c4d23fea714e8a6d63b881e551af2f41",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -457,11 +528,11 @@
 | 
			
		||||
    "nvim-treesitter-src": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1706952848,
 | 
			
		||||
        "narHash": "sha256-pNjEODR+QJPDL58O4NM7SjzZEN8D3bXDHbKLNOS3fL8=",
 | 
			
		||||
        "lastModified": 1718957498,
 | 
			
		||||
        "narHash": "sha256-GEuKEAZxLGMkyjdJGzrIKNR1X10RHlACC6s1lNOq7aw=",
 | 
			
		||||
        "owner": "nvim-treesitter",
 | 
			
		||||
        "repo": "nvim-treesitter",
 | 
			
		||||
        "rev": "4fbf150a1621d52f17b099506e1a32f107079210",
 | 
			
		||||
        "rev": "b967bbc27b564001c3d3b8ea93444cf6d0b21d23",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -471,19 +542,6 @@
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "proton-ge": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1700610476,
 | 
			
		||||
        "narHash": "sha256-IoClZ6hl2lsz9OGfFgnz7vEAGlSY2+1K2lDEEsJQOfU=",
 | 
			
		||||
        "type": "tarball",
 | 
			
		||||
        "url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-25/GE-Proton8-25.tar.gz"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "type": "tarball",
 | 
			
		||||
        "url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-25/GE-Proton8-25.tar.gz"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "ren": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
@@ -503,11 +561,11 @@
 | 
			
		||||
    "rep": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1705833236,
 | 
			
		||||
        "narHash": "sha256-hm+v+b97z1HnY/7QHZxc0GygCq9W0mJauyjnz48ddaM=",
 | 
			
		||||
        "lastModified": 1707216692,
 | 
			
		||||
        "narHash": "sha256-/dH+mNtNHaYFndVhoqmz4Sc3HeemoQt1HGD98mb9Qhw=",
 | 
			
		||||
        "owner": "robenkleene",
 | 
			
		||||
        "repo": "rep-grep",
 | 
			
		||||
        "rev": "365acc5d599934e94dc066eb85b7ddd684ba508b",
 | 
			
		||||
        "rev": "10510d47e392cb9d30a861c69f702fd194b3fa88",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -518,10 +576,9 @@
 | 
			
		||||
    },
 | 
			
		||||
    "root": {
 | 
			
		||||
      "inputs": {
 | 
			
		||||
        "Comment-nvim-src": "Comment-nvim-src",
 | 
			
		||||
        "baleia-nvim-src": "baleia-nvim-src",
 | 
			
		||||
        "base16-nvim-src": "base16-nvim-src",
 | 
			
		||||
        "bufferline-nvim-src": "bufferline-nvim-src",
 | 
			
		||||
        "bypass-paywalls-clean": "bypass-paywalls-clean",
 | 
			
		||||
        "cmp-nvim-lsp-src": "cmp-nvim-lsp-src",
 | 
			
		||||
        "darwin": "darwin",
 | 
			
		||||
        "disko": "disko",
 | 
			
		||||
@@ -529,7 +586,8 @@
 | 
			
		||||
        "firefox-darwin": "firefox-darwin",
 | 
			
		||||
        "hmts-nvim-src": "hmts-nvim-src",
 | 
			
		||||
        "home-manager": "home-manager",
 | 
			
		||||
        "kitty-scrollback-nvim-src": "kitty-scrollback-nvim-src",
 | 
			
		||||
        "mac-app-util": "mac-app-util",
 | 
			
		||||
        "markview-nvim-src": "markview-nvim-src",
 | 
			
		||||
        "nextcloud-cookbook": "nextcloud-cookbook",
 | 
			
		||||
        "nextcloud-external": "nextcloud-external",
 | 
			
		||||
        "nextcloud-news": "nextcloud-news",
 | 
			
		||||
@@ -537,12 +595,12 @@
 | 
			
		||||
        "nix2vim": "nix2vim",
 | 
			
		||||
        "nixos-generators": "nixos-generators",
 | 
			
		||||
        "nixpkgs": "nixpkgs",
 | 
			
		||||
        "null-ls-nvim-src": "null-ls-nvim-src",
 | 
			
		||||
        "nixpkgs-caddy": "nixpkgs-caddy",
 | 
			
		||||
        "nur": "nur",
 | 
			
		||||
        "nvim-lint-src": "nvim-lint-src",
 | 
			
		||||
        "nvim-lspconfig-src": "nvim-lspconfig-src",
 | 
			
		||||
        "nvim-tree-lua-src": "nvim-tree-lua-src",
 | 
			
		||||
        "nvim-treesitter-src": "nvim-treesitter-src",
 | 
			
		||||
        "proton-ge": "proton-ge",
 | 
			
		||||
        "ren": "ren",
 | 
			
		||||
        "rep": "rep",
 | 
			
		||||
        "telescope-nvim-src": "telescope-nvim-src",
 | 
			
		||||
@@ -590,19 +648,34 @@
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "systems_3": {
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1681028828,
 | 
			
		||||
        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
 | 
			
		||||
        "owner": "nix-systems",
 | 
			
		||||
        "repo": "default",
 | 
			
		||||
        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "nix-systems",
 | 
			
		||||
        "repo": "default",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "telescope-nvim-src": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1701167040,
 | 
			
		||||
        "narHash": "sha256-H5RpyWMluE+Yxg7xFX43AZTVW+Yg70DF3FmEGXBUSNg=",
 | 
			
		||||
        "lastModified": 1716532947,
 | 
			
		||||
        "narHash": "sha256-e1ulhc4IIvUgpjKQrSqPY4WpXuez6wlxL6Min9U0o5Q=",
 | 
			
		||||
        "owner": "nvim-telescope",
 | 
			
		||||
        "repo": "telescope.nvim",
 | 
			
		||||
        "rev": "d90956833d7c27e73c621a61f20b29fdb7122709",
 | 
			
		||||
        "rev": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "nvim-telescope",
 | 
			
		||||
        "ref": "0.1.5",
 | 
			
		||||
        "ref": "0.1.8",
 | 
			
		||||
        "repo": "telescope.nvim",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
@@ -626,16 +699,16 @@
 | 
			
		||||
    "toggleterm-nvim-src": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1701858874,
 | 
			
		||||
        "narHash": "sha256-vJApw7XY2wOX9InfWcah+hkNxBfS1+kQUWr4ITxRmgA=",
 | 
			
		||||
        "lastModified": 1713792255,
 | 
			
		||||
        "narHash": "sha256-mM5bGgAemsRJD9U6U5K6ia5qb8NaTusM99x6xrtEBfw=",
 | 
			
		||||
        "owner": "akinsho",
 | 
			
		||||
        "repo": "toggleterm.nvim",
 | 
			
		||||
        "rev": "cbd041d91b90cd3c02df03fe6133208888f8e008",
 | 
			
		||||
        "rev": "066cccf48a43553a80a210eb3be89a15d789d6e6",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "akinsho",
 | 
			
		||||
        "ref": "v2.9.0",
 | 
			
		||||
        "ref": "v2.11.0",
 | 
			
		||||
        "repo": "toggleterm.nvim",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
@@ -643,11 +716,11 @@
 | 
			
		||||
    "tree-sitter-bash": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1705686017,
 | 
			
		||||
        "narHash": "sha256-+Mpks0FyQLl26TX63J6WhaAl/QDUR1k9wSUY5SFwL+w=",
 | 
			
		||||
        "lastModified": 1715005250,
 | 
			
		||||
        "narHash": "sha256-rCuQbnQAOnQWKYreNH80nlL+0A1qbWbjMvtczcoWPrY=",
 | 
			
		||||
        "owner": "tree-sitter",
 | 
			
		||||
        "repo": "tree-sitter-bash",
 | 
			
		||||
        "rev": "f7239f638d3dc16762563a9027faeee518ce1bd9",
 | 
			
		||||
        "rev": "2fbd860f802802ca76a6661ce025b3a3bca2d3ed",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -660,11 +733,11 @@
 | 
			
		||||
    "tree-sitter-ini": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1699877527,
 | 
			
		||||
        "narHash": "sha256-dYPeVTNWO4apY5dsjsKViavU7YtLeGTp6BzEemXhsEU=",
 | 
			
		||||
        "lastModified": 1716889525,
 | 
			
		||||
        "narHash": "sha256-IyHrIxcmuzs60zUiJv4E3nSkhSkgbcaLDUdeDx5mlHk=",
 | 
			
		||||
        "owner": "justinmk",
 | 
			
		||||
        "repo": "tree-sitter-ini",
 | 
			
		||||
        "rev": "bcb84a2d4bcd6f55b911c42deade75c8f90cb0c5",
 | 
			
		||||
        "rev": "87176e524f0a98f5be75fa44f4f0ff5c6eac069c",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -676,11 +749,11 @@
 | 
			
		||||
    "tree-sitter-lua": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1694072484,
 | 
			
		||||
        "narHash": "sha256-5t5w8KqbefInNbA12/jpNzmky/uOUhsLjKdEqpl1GEc=",
 | 
			
		||||
        "lastModified": 1710150044,
 | 
			
		||||
        "narHash": "sha256-uFaEptW4wPrqgHfB1mYmVltf+4no61L2cPgpsr5qBIU=",
 | 
			
		||||
        "owner": "MunifTanjim",
 | 
			
		||||
        "repo": "tree-sitter-lua",
 | 
			
		||||
        "rev": "9668709211b2e683f27f414454a8b51bf0a6bda1",
 | 
			
		||||
        "rev": "a24dab177e58c9c6832f96b9a73102a0cfbced4a",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -693,11 +766,11 @@
 | 
			
		||||
    "tree-sitter-puppet": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1690231696,
 | 
			
		||||
        "narHash": "sha256-YEjjy9WLwITERYqoeSVrRYnwVBIAwdc4o0lvAK9wizw=",
 | 
			
		||||
        "lastModified": 1713617121,
 | 
			
		||||
        "narHash": "sha256-+zMgzyuGerJ8l+i5ZtWnmGr3i4fFiSLD5FssyKESsmI=",
 | 
			
		||||
        "owner": "amaanq",
 | 
			
		||||
        "repo": "tree-sitter-puppet",
 | 
			
		||||
        "rev": "9ce9a5f7d64528572aaa8d59459ba869e634086b",
 | 
			
		||||
        "rev": "584522f32495d648b18a53ccb52d988e60de127d",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -709,11 +782,11 @@
 | 
			
		||||
    "tree-sitter-python": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1700218345,
 | 
			
		||||
        "narHash": "sha256-hXNxa895SyNOG7PH2vAIkWbcMjZDjWYDsCafBZuvnT0=",
 | 
			
		||||
        "lastModified": 1714528221,
 | 
			
		||||
        "narHash": "sha256-hHQ5gK4dTRSdp0fLKarytU9vFhsBeQp7Ka61vFoIr7Y=",
 | 
			
		||||
        "owner": "tree-sitter",
 | 
			
		||||
        "repo": "tree-sitter-python",
 | 
			
		||||
        "rev": "4bfdd9033a2225cc95032ce77066b7aeca9e2efc",
 | 
			
		||||
        "rev": "71778c2a472ed00a64abf4219544edbf8e4b86d7",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -726,11 +799,11 @@
 | 
			
		||||
    "tree-sitter-rasi": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1678701563,
 | 
			
		||||
        "narHash": "sha256-2nYZoLcrxxxiOJEySwHUm93lzMg8mU+V7LIP63ntFdA=",
 | 
			
		||||
        "lastModified": 1716296585,
 | 
			
		||||
        "narHash": "sha256-sPrIVgGGaBaXeqHNxjcdJ/S2FvxyV6rD9UPKU/tpspw=",
 | 
			
		||||
        "owner": "Fymyte",
 | 
			
		||||
        "repo": "tree-sitter-rasi",
 | 
			
		||||
        "rev": "371dac6bcce0df5566c1cfebde69d90ecbeefd2d",
 | 
			
		||||
        "rev": "6c9bbcfdf5f0f553d9ebc01750a3aa247a37b8aa",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -742,11 +815,11 @@
 | 
			
		||||
    "tree-sitter-vimdoc": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1705491128,
 | 
			
		||||
        "narHash": "sha256-q5Ln8WPFrtKBfZnaAAlMh3Q/eczEt6wCMZAtx+ISCKg=",
 | 
			
		||||
        "lastModified": 1717834376,
 | 
			
		||||
        "narHash": "sha256-v+XSWGm2Wdn9/rxNFMqXYACkGn6AvxZdxkClLuKnWGU=",
 | 
			
		||||
        "owner": "neovim",
 | 
			
		||||
        "repo": "tree-sitter-vimdoc",
 | 
			
		||||
        "rev": "ed8695ad8de39c3f073da130156f00b1148e2891",
 | 
			
		||||
        "rev": "2249c44ecd3f5cf22da3dcccfb74f816ddb29245",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -773,18 +846,18 @@
 | 
			
		||||
    },
 | 
			
		||||
    "wsl": {
 | 
			
		||||
      "inputs": {
 | 
			
		||||
        "flake-compat": "flake-compat",
 | 
			
		||||
        "flake-utils": "flake-utils_2",
 | 
			
		||||
        "flake-compat": "flake-compat_2",
 | 
			
		||||
        "flake-utils": "flake-utils_3",
 | 
			
		||||
        "nixpkgs": [
 | 
			
		||||
          "nixpkgs"
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1706867893,
 | 
			
		||||
        "narHash": "sha256-c5bADvtL35S3vsJaXR5YWTXe08W0gSwOrTOXfpJB4Ac=",
 | 
			
		||||
        "lastModified": 1718710563,
 | 
			
		||||
        "narHash": "sha256-O4rrM0Bkh3IRe8D600iniQ52QTmlnuTSp2KyXV7C2jE=",
 | 
			
		||||
        "owner": "nix-community",
 | 
			
		||||
        "repo": "NixOS-WSL",
 | 
			
		||||
        "rev": "bcae8dc73b931b7f0fc65f1f1ef93dc379dfd66b",
 | 
			
		||||
        "rev": "2fb93bea657ad99a7005ef601c67cb2820560a41",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
@@ -796,11 +869,11 @@
 | 
			
		||||
    "zenyd-mpv-scripts": {
 | 
			
		||||
      "flake": false,
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1706283438,
 | 
			
		||||
        "narHash": "sha256-hpLZDtt5q18aZ8d9LHfT852wtBosKUTJ7Bx+cbjBLcg=",
 | 
			
		||||
        "lastModified": 1707704915,
 | 
			
		||||
        "narHash": "sha256-9P/8q/OZXfaJMS08acQP4h3/zUA5mKRQee0JmkXcz1w=",
 | 
			
		||||
        "owner": "zenyd",
 | 
			
		||||
        "repo": "mpv-scripts",
 | 
			
		||||
        "rev": "7100d19d18d111ce77fc9e6e8947c0d542a86397",
 | 
			
		||||
        "rev": "9bdce0050144cb24f92475f7bdd77180e0e4c26b",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										238
									
								
								flake.nix
									
									
									
									
									
								
							
							
						
						
									
										238
									
								
								flake.nix
									
									
									
									
									
								
							@@ -7,6 +7,9 @@
 | 
			
		||||
    # Used for system packages
 | 
			
		||||
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
 | 
			
		||||
 | 
			
		||||
    # Used for caddy plugins
 | 
			
		||||
    nixpkgs-caddy.url = "github:jpds/nixpkgs/caddy-external-plugins";
 | 
			
		||||
 | 
			
		||||
    # Used for MacOS system config
 | 
			
		||||
    darwin = {
 | 
			
		||||
      url = "github:lnl7/nix-darwin/master";
 | 
			
		||||
@@ -22,8 +25,7 @@
 | 
			
		||||
    # Used for user packages and dotfiles
 | 
			
		||||
    home-manager = {
 | 
			
		||||
      url = "github:nix-community/home-manager/master";
 | 
			
		||||
      inputs.nixpkgs.follows =
 | 
			
		||||
        "nixpkgs"; # Use system packages list for their inputs
 | 
			
		||||
      inputs.nixpkgs.follows = "nixpkgs"; # Use system packages list for their inputs
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    # Community packages; used for Firefox extensions
 | 
			
		||||
@@ -35,6 +37,12 @@
 | 
			
		||||
      inputs.nixpkgs.follows = "nixpkgs";
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    # Better App install management in macOS
 | 
			
		||||
    mac-app-util = {
 | 
			
		||||
      url = "github:hraban/mac-app-util";
 | 
			
		||||
      inputs.nixpkgs.follows = "nixpkgs"; # Use system packages list for their inputs
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    # Manage disk format and partitioning
 | 
			
		||||
    disko = {
 | 
			
		||||
      url = "github:nix-community/disko";
 | 
			
		||||
@@ -60,29 +68,24 @@
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    # Neovim plugins
 | 
			
		||||
    base16-nvim-src = {
 | 
			
		||||
      url = "github:RRethy/base16-nvim";
 | 
			
		||||
      flake = false;
 | 
			
		||||
    };
 | 
			
		||||
    nvim-lspconfig-src = {
 | 
			
		||||
      # https://github.com/neovim/nvim-lspconfig/tags
 | 
			
		||||
      url = "github:neovim/nvim-lspconfig/v0.1.7";
 | 
			
		||||
      url = "github:neovim/nvim-lspconfig/v0.1.8";
 | 
			
		||||
      flake = false;
 | 
			
		||||
    };
 | 
			
		||||
    cmp-nvim-lsp-src = {
 | 
			
		||||
      url = "github:hrsh7th/cmp-nvim-lsp";
 | 
			
		||||
      flake = false;
 | 
			
		||||
    };
 | 
			
		||||
    null-ls-nvim-src = {
 | 
			
		||||
      url = "github:jose-elias-alvarez/null-ls.nvim";
 | 
			
		||||
      flake = false;
 | 
			
		||||
    };
 | 
			
		||||
    baleia-nvim-src = {
 | 
			
		||||
      # https://github.com/m00qek/baleia.nvim/tags
 | 
			
		||||
      url = "github:m00qek/baleia.nvim";
 | 
			
		||||
      flake = false;
 | 
			
		||||
    };
 | 
			
		||||
    Comment-nvim-src = {
 | 
			
		||||
      # https://github.com/numToStr/Comment.nvim/releases
 | 
			
		||||
      url = "github:numToStr/Comment.nvim/v0.8.0";
 | 
			
		||||
      flake = false;
 | 
			
		||||
    };
 | 
			
		||||
    nvim-treesitter-src = {
 | 
			
		||||
      # https://github.com/nvim-treesitter/nvim-treesitter/tags
 | 
			
		||||
      url = "github:nvim-treesitter/nvim-treesitter/master";
 | 
			
		||||
@@ -90,7 +93,7 @@
 | 
			
		||||
    };
 | 
			
		||||
    telescope-nvim-src = {
 | 
			
		||||
      # https://github.com/nvim-telescope/telescope.nvim/releases
 | 
			
		||||
      url = "github:nvim-telescope/telescope.nvim/0.1.5";
 | 
			
		||||
      url = "github:nvim-telescope/telescope.nvim/0.1.8";
 | 
			
		||||
      flake = false;
 | 
			
		||||
    };
 | 
			
		||||
    telescope-project-nvim-src = {
 | 
			
		||||
@@ -99,12 +102,12 @@
 | 
			
		||||
    };
 | 
			
		||||
    toggleterm-nvim-src = {
 | 
			
		||||
      # https://github.com/akinsho/toggleterm.nvim/tags
 | 
			
		||||
      url = "github:akinsho/toggleterm.nvim/v2.9.0";
 | 
			
		||||
      url = "github:akinsho/toggleterm.nvim/v2.11.0";
 | 
			
		||||
      flake = false;
 | 
			
		||||
    };
 | 
			
		||||
    bufferline-nvim-src = {
 | 
			
		||||
      # https://github.com/akinsho/bufferline.nvim/releases
 | 
			
		||||
      url = "github:akinsho/bufferline.nvim/v4.5.0";
 | 
			
		||||
      url = "github:akinsho/bufferline.nvim/v4.6.1";
 | 
			
		||||
      flake = false;
 | 
			
		||||
    };
 | 
			
		||||
    nvim-tree-lua-src = {
 | 
			
		||||
@@ -117,11 +120,15 @@
 | 
			
		||||
    };
 | 
			
		||||
    fidget-nvim-src = {
 | 
			
		||||
      # https://github.com/j-hui/fidget.nvim/tags
 | 
			
		||||
      url = "github:j-hui/fidget.nvim/v1.2.0";
 | 
			
		||||
      url = "github:j-hui/fidget.nvim/v1.4.5";
 | 
			
		||||
      flake = false;
 | 
			
		||||
    };
 | 
			
		||||
    kitty-scrollback-nvim-src = {
 | 
			
		||||
      url = "github:mikesmithgh/kitty-scrollback.nvim";
 | 
			
		||||
    nvim-lint-src = {
 | 
			
		||||
      url = "github:mfussenegger/nvim-lint";
 | 
			
		||||
      flake = false;
 | 
			
		||||
    };
 | 
			
		||||
    markview-nvim-src = {
 | 
			
		||||
      url = "github:OXY2DEV/markview.nvim";
 | 
			
		||||
      flake = false;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
@@ -171,57 +178,42 @@
 | 
			
		||||
      flake = false;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    # GE version of Proton for game compatibility
 | 
			
		||||
    # Alternatively, could consider using https://github.com/fufexan/nix-gaming
 | 
			
		||||
    proton-ge = {
 | 
			
		||||
      # https://github.com/GloriousEggroll/proton-ge-custom/releases
 | 
			
		||||
      url =
 | 
			
		||||
        "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-25/GE-Proton8-25.tar.gz";
 | 
			
		||||
      flake = false;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    # Firefox addon from outside the extension store
 | 
			
		||||
    bypass-paywalls-clean = {
 | 
			
		||||
      # https://gitlab.com/magnolia1234/bpc-uploads/-/commits/master/?ref_type=HEADS
 | 
			
		||||
      url = "gitlab:magnolia1234/bpc-uploads";
 | 
			
		||||
      flake = false;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    # Nextcloud Apps
 | 
			
		||||
    nextcloud-news = {
 | 
			
		||||
      # https://github.com/nextcloud/news/releases
 | 
			
		||||
      url =
 | 
			
		||||
        "https://github.com/nextcloud/news/releases/download/25.0.0-alpha3/news.tar.gz";
 | 
			
		||||
      url = "https://github.com/nextcloud/news/releases/download/25.0.0-alpha7/news.tar.gz";
 | 
			
		||||
      flake = false;
 | 
			
		||||
    };
 | 
			
		||||
    nextcloud-external = {
 | 
			
		||||
      # https://github.com/nextcloud-releases/external/releases
 | 
			
		||||
      url =
 | 
			
		||||
        "https://github.com/nextcloud-releases/external/releases/download/v5.3.1/external-v5.3.1.tar.gz";
 | 
			
		||||
      url = "https://github.com/nextcloud-releases/external/releases/download/v5.4.0/external-v5.4.0.tar.gz";
 | 
			
		||||
      flake = false;
 | 
			
		||||
    };
 | 
			
		||||
    nextcloud-cookbook = {
 | 
			
		||||
      # https://github.com/christianlupus-nextcloud/cookbook-releases/releases/
 | 
			
		||||
      url =
 | 
			
		||||
        "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.0/cookbook-0.11.0.tar.gz";
 | 
			
		||||
      url = "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.1/cookbook-0.11.1.tar.gz";
 | 
			
		||||
      flake = false;
 | 
			
		||||
    };
 | 
			
		||||
    nextcloud-snappymail = {
 | 
			
		||||
      # https://github.com/the-djmaze/snappymail/releases
 | 
			
		||||
      url =
 | 
			
		||||
        "https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz";
 | 
			
		||||
      # https://snappymail.eu/repository/nextcloud
 | 
			
		||||
      # url = "https://snappymail.eu/repository/nextcloud/snappymail-2.36.3-nextcloud.tar.gz";
 | 
			
		||||
      url = "https://github.com/nmasur/snappymail-nextcloud/releases/download/v2.36.3/snappymail-2.36.3-nextcloud.tar.gz";
 | 
			
		||||
      flake = false;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  outputs = { nixpkgs, ... }@inputs:
 | 
			
		||||
  outputs =
 | 
			
		||||
    { nixpkgs, ... }@inputs:
 | 
			
		||||
 | 
			
		||||
    let
 | 
			
		||||
 | 
			
		||||
      # Global configuration for my systems
 | 
			
		||||
      globals = let baseName = "masu.rs";
 | 
			
		||||
      in rec {
 | 
			
		||||
      globals =
 | 
			
		||||
        let
 | 
			
		||||
          baseName = "masu.rs";
 | 
			
		||||
        in
 | 
			
		||||
        rec {
 | 
			
		||||
          user = "noah";
 | 
			
		||||
          fullName = "Noah Masur";
 | 
			
		||||
          gitName = fullName;
 | 
			
		||||
@@ -233,7 +225,10 @@
 | 
			
		||||
          hostnames = {
 | 
			
		||||
            git = "git.${baseName}";
 | 
			
		||||
            influxdb = "influxdb.${baseName}";
 | 
			
		||||
            irc = "irc.${baseName}";
 | 
			
		||||
            metrics = "metrics.${baseName}";
 | 
			
		||||
            minecraft = "minecraft.${baseName}";
 | 
			
		||||
            n8n = "n8n2.${baseName}";
 | 
			
		||||
            prometheus = "prom.${baseName}";
 | 
			
		||||
            paperless = "paper.${baseName}";
 | 
			
		||||
            secrets = "vault.${baseName}";
 | 
			
		||||
@@ -241,6 +236,7 @@
 | 
			
		||||
            content = "cloud.${baseName}";
 | 
			
		||||
            books = "books.${baseName}";
 | 
			
		||||
            download = "download.${baseName}";
 | 
			
		||||
            transmission = "transmission.${baseName}";
 | 
			
		||||
          };
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
@@ -252,28 +248,30 @@
 | 
			
		||||
        (import ./overlays/calibre-web.nix)
 | 
			
		||||
        (import ./overlays/disko.nix inputs)
 | 
			
		||||
        (import ./overlays/tree-sitter.nix inputs)
 | 
			
		||||
        (import ./overlays/caddy.nix inputs)
 | 
			
		||||
        (import ./overlays/mpv-scripts.nix inputs)
 | 
			
		||||
        (import ./overlays/nextcloud-apps.nix inputs)
 | 
			
		||||
        (import ./overlays/betterlockscreen.nix)
 | 
			
		||||
        (import ./overlays/proton-ge.nix inputs)
 | 
			
		||||
        (import ./overlays/gh-collaborators.nix)
 | 
			
		||||
        (import ./overlays/bypass-paywalls-clean.nix inputs)
 | 
			
		||||
        (import ./overlays/ren-rep.nix inputs)
 | 
			
		||||
      ];
 | 
			
		||||
 | 
			
		||||
      # System types to support.
 | 
			
		||||
      supportedSystems =
 | 
			
		||||
        [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
 | 
			
		||||
      supportedSystems = [
 | 
			
		||||
        "x86_64-linux"
 | 
			
		||||
        "x86_64-darwin"
 | 
			
		||||
        "aarch64-linux"
 | 
			
		||||
        "aarch64-darwin"
 | 
			
		||||
      ];
 | 
			
		||||
 | 
			
		||||
      # Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
 | 
			
		||||
      forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
 | 
			
		||||
 | 
			
		||||
    in rec {
 | 
			
		||||
    in
 | 
			
		||||
    rec {
 | 
			
		||||
 | 
			
		||||
      # Contains my full system builds, including home-manager
 | 
			
		||||
      # nixos-rebuild switch --flake .#tempest
 | 
			
		||||
      nixosConfigurations = {
 | 
			
		||||
        arrow = import ./hosts/arrow { inherit inputs globals overlays; };
 | 
			
		||||
        tempest = import ./hosts/tempest { inherit inputs globals overlays; };
 | 
			
		||||
        hydra = import ./hosts/hydra { inherit inputs globals overlays; };
 | 
			
		||||
        flame = import ./hosts/flame { inherit inputs globals overlays; };
 | 
			
		||||
@@ -283,36 +281,74 @@
 | 
			
		||||
      # Contains my full Mac system builds, including home-manager
 | 
			
		||||
      # darwin-rebuild switch --flake .#lookingglass
 | 
			
		||||
      darwinConfigurations = {
 | 
			
		||||
        lookingglass =
 | 
			
		||||
          import ./hosts/lookingglass { inherit inputs globals overlays; };
 | 
			
		||||
        lookingglass = import ./hosts/lookingglass { inherit inputs globals overlays; };
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      # For quickly applying home-manager settings with:
 | 
			
		||||
      # home-manager switch --flake .#tempest
 | 
			
		||||
      homeConfigurations = {
 | 
			
		||||
        tempest =
 | 
			
		||||
          nixosConfigurations.tempest.config.home-manager.users.${globals.user}.home;
 | 
			
		||||
        lookingglass =
 | 
			
		||||
          darwinConfigurations.lookingglass.config.home-manager.users."Noah.Masur".home;
 | 
			
		||||
        tempest = nixosConfigurations.tempest.config.home-manager.users.${globals.user}.home;
 | 
			
		||||
        lookingglass = darwinConfigurations.lookingglass.config.home-manager.users."Noah.Masur".home;
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      # 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 {
 | 
			
		||||
      packages =
 | 
			
		||||
        let
 | 
			
		||||
          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";
 | 
			
		||||
        in
 | 
			
		||||
        {
 | 
			
		||||
          x86_64-linux.staff = staff "x86_64-linux";
 | 
			
		||||
          x86_64-linux.arrow = inputs.nixos-generators.nixosGenerate rec {
 | 
			
		||||
            system = "x86_64-linux";
 | 
			
		||||
            format = "iso";
 | 
			
		||||
            specialArgs = {
 | 
			
		||||
              pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
 | 
			
		||||
            };
 | 
			
		||||
            modules = import ./hosts/arrow/modules.nix { inherit inputs globals overlays; };
 | 
			
		||||
          };
 | 
			
		||||
          x86_64-linux.arrow-aws = inputs.nixos-generators.nixosGenerate rec {
 | 
			
		||||
            system = "x86_64-linux";
 | 
			
		||||
            format = "amazon";
 | 
			
		||||
            specialArgs = {
 | 
			
		||||
              pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
 | 
			
		||||
            };
 | 
			
		||||
            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";
 | 
			
		||||
@@ -322,28 +358,44 @@
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
      # Programs that can be run by calling this flake
 | 
			
		||||
      apps = forAllSystems (system:
 | 
			
		||||
        let pkgs = import nixpkgs { inherit system overlays; };
 | 
			
		||||
        in import ./apps { inherit pkgs; });
 | 
			
		||||
      apps = forAllSystems (
 | 
			
		||||
        system:
 | 
			
		||||
        let
 | 
			
		||||
          pkgs = import nixpkgs { inherit system overlays; };
 | 
			
		||||
        in
 | 
			
		||||
        import ./apps { inherit pkgs; }
 | 
			
		||||
      );
 | 
			
		||||
 | 
			
		||||
      # Development environments
 | 
			
		||||
      devShells = forAllSystems (system:
 | 
			
		||||
        let pkgs = import nixpkgs { inherit system overlays; };
 | 
			
		||||
        in {
 | 
			
		||||
      devShells = forAllSystems (
 | 
			
		||||
        system:
 | 
			
		||||
        let
 | 
			
		||||
          pkgs = import nixpkgs { inherit system overlays; };
 | 
			
		||||
        in
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
          # Used to run commands and edit files in this repo
 | 
			
		||||
          default = pkgs.mkShell {
 | 
			
		||||
            buildInputs = with pkgs; [ git stylua nixfmt shfmt shellcheck ];
 | 
			
		||||
            buildInputs = with pkgs; [
 | 
			
		||||
              git
 | 
			
		||||
              stylua
 | 
			
		||||
              nixfmt-rfc-style
 | 
			
		||||
              shfmt
 | 
			
		||||
              shellcheck
 | 
			
		||||
            ];
 | 
			
		||||
          };
 | 
			
		||||
        }
 | 
			
		||||
      );
 | 
			
		||||
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
      checks = forAllSystems (system:
 | 
			
		||||
        let pkgs = import nixpkgs { inherit system overlays; };
 | 
			
		||||
        in {
 | 
			
		||||
          neovim = pkgs.runCommand "neovim-check-health" {
 | 
			
		||||
            buildInputs = [ inputs.self.packages.${system}.neovim ];
 | 
			
		||||
          } ''
 | 
			
		||||
      checks = forAllSystems (
 | 
			
		||||
        system:
 | 
			
		||||
        let
 | 
			
		||||
          pkgs = import nixpkgs { inherit system overlays; };
 | 
			
		||||
        in
 | 
			
		||||
        {
 | 
			
		||||
          neovim =
 | 
			
		||||
            pkgs.runCommand "neovim-check-health" { buildInputs = [ inputs.self.packages.${system}.neovim ]; }
 | 
			
		||||
              ''
 | 
			
		||||
                mkdir -p $out
 | 
			
		||||
                export HOME=$TMPDIR
 | 
			
		||||
                nvim -c "checkhealth" -c "write $out/health.log" -c "quitall"
 | 
			
		||||
@@ -354,7 +406,16 @@
 | 
			
		||||
                  exit 1
 | 
			
		||||
                fi
 | 
			
		||||
              '';
 | 
			
		||||
        });
 | 
			
		||||
        }
 | 
			
		||||
      );
 | 
			
		||||
 | 
			
		||||
      formatter = forAllSystems (
 | 
			
		||||
        system:
 | 
			
		||||
        let
 | 
			
		||||
          pkgs = import nixpkgs { inherit system overlays; };
 | 
			
		||||
        in
 | 
			
		||||
        pkgs.nixfmt-rfc-style
 | 
			
		||||
      );
 | 
			
		||||
 | 
			
		||||
      # Templates for starting other projects quickly
 | 
			
		||||
      templates = rec {
 | 
			
		||||
@@ -375,7 +436,10 @@
 | 
			
		||||
          path = ./templates/haskell;
 | 
			
		||||
          description = "Haskell template";
 | 
			
		||||
        };
 | 
			
		||||
        rust = {
 | 
			
		||||
          path = ./templates/rust;
 | 
			
		||||
          description = "Rust template";
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
    };
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										98
									
								
								hosts/arrow/aws/ec2.tf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										98
									
								
								hosts/arrow/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 {
 | 
			
		||||
  image_file = one(fileset(path.root, "result/nixos-amazon-image-*.vhd"))
 | 
			
		||||
# locals {
 | 
			
		||||
#   image_file = one(fileset(path.root, "../../../result/nixos-amazon-image-*.vhd"))
 | 
			
		||||
# }
 | 
			
		||||
#
 | 
			
		||||
# # Upload image to S3
 | 
			
		||||
# resource "aws_s3_object" "image" {
 | 
			
		||||
#   bucket = var.images_bucket
 | 
			
		||||
#   key    = basename(local.image_file)
 | 
			
		||||
#   source = local.image_file
 | 
			
		||||
#   etag   = filemd5(local.image_file)
 | 
			
		||||
# }
 | 
			
		||||
 | 
			
		||||
# Use existing image in S3
 | 
			
		||||
data "aws_s3_object" "image" {
 | 
			
		||||
  bucket = var.images_bucket
 | 
			
		||||
  key    = "arrow.vhd"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Upload to S3
 | 
			
		||||
resource "aws_s3_object" "image" {
 | 
			
		||||
  bucket = "your_bucket_name"
 | 
			
		||||
  key    = basename(local.image_file)
 | 
			
		||||
  source = local.image_file
 | 
			
		||||
  etag   = filemd5(local.image_file)
 | 
			
		||||
resource "terraform_data" "image_replacement" {
 | 
			
		||||
  input = data.aws_s3_object.image.etag
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Setup IAM access for the VM Importer
 | 
			
		||||
@@ -29,8 +39,8 @@ data "aws_iam_policy_document" "vmimport" {
 | 
			
		||||
      "s3:ListBucket",
 | 
			
		||||
    ]
 | 
			
		||||
    resources = [
 | 
			
		||||
      "arn:aws:s3:::${aws_s3_object.image.bucket}",
 | 
			
		||||
      "arn:aws:s3:::${aws_s3_object.image.bucket}/*",
 | 
			
		||||
      "arn:aws:s3:::${data.aws_s3_object.image.bucket}",
 | 
			
		||||
      "arn:aws:s3:::${data.aws_s3_object.image.bucket}/*",
 | 
			
		||||
    ]
 | 
			
		||||
  }
 | 
			
		||||
  statement {
 | 
			
		||||
@@ -58,23 +68,28 @@ resource "aws_ebs_snapshot_import" "image" {
 | 
			
		||||
  disk_container {
 | 
			
		||||
    format = "VHD"
 | 
			
		||||
    user_bucket {
 | 
			
		||||
      s3_bucket = aws_s3_object.image.bucket
 | 
			
		||||
      s3_key    = aws_s3_object.image.key
 | 
			
		||||
      s3_bucket = data.aws_s3_object.image.bucket
 | 
			
		||||
      s3_key    = data.aws_s3_object.image.key
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  role_name = aws_iam_role.vmimport.name
 | 
			
		||||
  lifecycle {
 | 
			
		||||
    replace_triggered_by = [terraform_data.image_replacement]
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Convert to AMI
 | 
			
		||||
resource "aws_ami" "image" {
 | 
			
		||||
  description         = "Created with NixOS."
 | 
			
		||||
  name                = replace(basename(local.image_file), "/\\.vhd$/", "")
 | 
			
		||||
  name                = replace(basename(data.aws_s3_object.image.key), "/\\.vhd$/", "")
 | 
			
		||||
  virtualization_type = "hvm"
 | 
			
		||||
  root_device_name    = "/dev/xvda"
 | 
			
		||||
  ena_support         = true
 | 
			
		||||
 | 
			
		||||
  ebs_block_device {
 | 
			
		||||
    device_name = "/dev/xvda"
 | 
			
		||||
    snapshot_id = aws_ebs_snapshot_import.image.id
 | 
			
		||||
    volume_size = 8
 | 
			
		||||
    volume_size = 17
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										13
									
								
								hosts/arrow/aws/main.tf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								hosts/arrow/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
									
								
								hosts/arrow/aws/outputs.tf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								hosts/arrow/aws/outputs.tf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
output "host_ip" {
 | 
			
		||||
  value = aws_instance.instance.public_ip
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										10
									
								
								hosts/arrow/aws/variables.tf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								hosts/arrow/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
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										41
									
								
								hosts/arrow/default.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								hosts/arrow/default.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
# The Arrow
 | 
			
		||||
# System configuration for temporary VM
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  inputs,
 | 
			
		||||
  globals,
 | 
			
		||||
  overlays,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
 | 
			
		||||
inputs.nixpkgs.lib.nixosSystem rec {
 | 
			
		||||
  system = "x86_64-linux";
 | 
			
		||||
  specialArgs = {
 | 
			
		||||
    pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
 | 
			
		||||
  };
 | 
			
		||||
  modules = import ./modules.nix { inherit inputs globals overlays; } ++ [
 | 
			
		||||
    {
 | 
			
		||||
      # 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";
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      virtualisation.vmVariant = {
 | 
			
		||||
        virtualisation.forwardPorts = [
 | 
			
		||||
          {
 | 
			
		||||
            from = "host";
 | 
			
		||||
            host.port = 2222;
 | 
			
		||||
            guest.port = 22;
 | 
			
		||||
          }
 | 
			
		||||
        ];
 | 
			
		||||
      };
 | 
			
		||||
    }
 | 
			
		||||
  ];
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										32
									
								
								hosts/arrow/modules.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								hosts/arrow/modules.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,32 @@
 | 
			
		||||
{
 | 
			
		||||
  inputs,
 | 
			
		||||
  globals,
 | 
			
		||||
  overlays,
 | 
			
		||||
}:
 | 
			
		||||
 | 
			
		||||
[
 | 
			
		||||
  globals
 | 
			
		||||
  inputs.home-manager.nixosModules.home-manager
 | 
			
		||||
  {
 | 
			
		||||
    nixpkgs.overlays = overlays;
 | 
			
		||||
    networking.hostName = "arrow";
 | 
			
		||||
    physical = false;
 | 
			
		||||
    server = true;
 | 
			
		||||
    gui.enable = false;
 | 
			
		||||
    theme.colors = (import ../../colorscheme/gruvbox).dark;
 | 
			
		||||
    publicKeys = [
 | 
			
		||||
      "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s personal"
 | 
			
		||||
      "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKpPU2G9rSF8Q6waH62IJexDCQ6lY+8ZyVufGE3xMDGw deploy"
 | 
			
		||||
    ];
 | 
			
		||||
    identityFile = "/home/${globals.user}/.ssh/id_ed25519";
 | 
			
		||||
    cloudflare.enable = true;
 | 
			
		||||
    services.openssh.enable = true;
 | 
			
		||||
    services.caddy.enable = true;
 | 
			
		||||
    services.n8n.enable = true;
 | 
			
		||||
 | 
			
		||||
    # nix-index seems to eat up too much memory for Vultr
 | 
			
		||||
    home-manager.users.${globals.user}.programs.nix-index.enable = inputs.nixpkgs.lib.mkForce false;
 | 
			
		||||
  }
 | 
			
		||||
  ../../modules/common
 | 
			
		||||
  ../../modules/nixos
 | 
			
		||||
]
 | 
			
		||||
							
								
								
									
										78
									
								
								hosts/arrow/vultr/main.tf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										78
									
								
								hosts/arrow/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,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
 | 
			
		||||
@@ -7,11 +7,18 @@
 | 
			
		||||
# https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/
 | 
			
		||||
# These days, probably use nixos-anywhere instead.
 | 
			
		||||
 | 
			
		||||
{ inputs, globals, overlays, ... }:
 | 
			
		||||
{
 | 
			
		||||
  inputs,
 | 
			
		||||
  globals,
 | 
			
		||||
  overlays,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
 | 
			
		||||
inputs.nixpkgs.lib.nixosSystem {
 | 
			
		||||
inputs.nixpkgs.lib.nixosSystem rec {
 | 
			
		||||
  system = "aarch64-linux";
 | 
			
		||||
  specialArgs = { };
 | 
			
		||||
  specialArgs = {
 | 
			
		||||
    pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
 | 
			
		||||
  };
 | 
			
		||||
  modules = [
 | 
			
		||||
    globals
 | 
			
		||||
    inputs.home-manager.nixosModules.home-manager
 | 
			
		||||
@@ -26,7 +33,11 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
			
		||||
 | 
			
		||||
      # 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" ];
 | 
			
		||||
      boot.initrd.availableKernelModules = [
 | 
			
		||||
        "xhci_pci"
 | 
			
		||||
        "virtio_pci"
 | 
			
		||||
        "usbhid"
 | 
			
		||||
      ];
 | 
			
		||||
 | 
			
		||||
      # File systems must be declared in order to boot
 | 
			
		||||
 | 
			
		||||
@@ -49,7 +60,9 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
			
		||||
      gui.enable = false;
 | 
			
		||||
 | 
			
		||||
      # Still require colors for programs like Neovim, K9S
 | 
			
		||||
      theme = { colors = (import ../../colorscheme/gruvbox).dark; };
 | 
			
		||||
      theme = {
 | 
			
		||||
        colors = (import ../../colorscheme/gruvbox).dark;
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      # Programs and services
 | 
			
		||||
      atuin.enable = true;
 | 
			
		||||
@@ -59,20 +72,21 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
			
		||||
      giteaRunner.enable = true;
 | 
			
		||||
      services.caddy.enable = true;
 | 
			
		||||
      services.grafana.enable = true;
 | 
			
		||||
      services.thelounge.enable = true;
 | 
			
		||||
      services.openssh.enable = true;
 | 
			
		||||
      services.victoriametrics.enable = true;
 | 
			
		||||
      services.influxdb2.enable = true;
 | 
			
		||||
      services.gitea.enable = true;
 | 
			
		||||
      services.vaultwarden.enable = true;
 | 
			
		||||
      services.minecraft-server.enable = true; # Setup Minecraft server
 | 
			
		||||
      system.autoUpgrade.enable = true;
 | 
			
		||||
 | 
			
		||||
      # 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";
 | 
			
		||||
        ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK/6oyVqjFGX3Uvrc3VS8J9sphxzAnRzKC85xgkHfYgR3TK6qBGXzHrknEj21xeZrr3G2y1UsGzphWJd9ZfIcdA= open-ssh-ca@cloudflareaccess.org";
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      # Nextcloud backup config
 | 
			
		||||
@@ -83,8 +97,9 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      # Disable passwords, only use SSH key
 | 
			
		||||
      publicKey =
 | 
			
		||||
        "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
 | 
			
		||||
      publicKeys = [
 | 
			
		||||
        "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s personal"
 | 
			
		||||
      ];
 | 
			
		||||
 | 
			
		||||
      # # Wireguard config for Transmission
 | 
			
		||||
      # wireguard.enable = true;
 | 
			
		||||
@@ -114,7 +129,6 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
			
		||||
 | 
			
		||||
      # # VPN port forwarding
 | 
			
		||||
      # services.transmission.settings.peer-port = 57599;
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
  ];
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -3,7 +3,12 @@
 | 
			
		||||
 | 
			
		||||
# See [readme](../README.md) to explain how this file works.
 | 
			
		||||
 | 
			
		||||
{ inputs, globals, overlays, ... }:
 | 
			
		||||
{
 | 
			
		||||
  inputs,
 | 
			
		||||
  globals,
 | 
			
		||||
  overlays,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
 | 
			
		||||
inputs.nixpkgs.lib.nixosSystem {
 | 
			
		||||
  system = "x86_64-linux";
 | 
			
		||||
@@ -32,8 +37,7 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
			
		||||
        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
 | 
			
		||||
        interop.includePath = false; # Including Windows PATH will slow down Neovim command mode
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      neovim.enable = true;
 | 
			
		||||
@@ -41,7 +45,6 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
			
		||||
      mail.aerc.enable = true;
 | 
			
		||||
      mail.himalaya.enable = true;
 | 
			
		||||
      dotfiles.enable = true;
 | 
			
		||||
      nixlang.enable = true;
 | 
			
		||||
      lua.enable = true;
 | 
			
		||||
    }
 | 
			
		||||
  ];
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,12 @@
 | 
			
		||||
# The Looking Glass
 | 
			
		||||
# System configuration for my work Macbook
 | 
			
		||||
 | 
			
		||||
{ inputs, globals, overlays, ... }:
 | 
			
		||||
{
 | 
			
		||||
  inputs,
 | 
			
		||||
  globals,
 | 
			
		||||
  overlays,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
 | 
			
		||||
inputs.darwin.lib.darwinSystem {
 | 
			
		||||
  system = "aarch64-darwin";
 | 
			
		||||
@@ -9,12 +14,16 @@ inputs.darwin.lib.darwinSystem {
 | 
			
		||||
  modules = [
 | 
			
		||||
    ../../modules/common
 | 
			
		||||
    ../../modules/darwin
 | 
			
		||||
    (globals // rec {
 | 
			
		||||
    (
 | 
			
		||||
      globals
 | 
			
		||||
      // rec {
 | 
			
		||||
        user = "Noah.Masur";
 | 
			
		||||
        gitName = "Noah-Masur_1701";
 | 
			
		||||
        gitEmail = "${user}@take2games.com";
 | 
			
		||||
    })
 | 
			
		||||
      }
 | 
			
		||||
    )
 | 
			
		||||
    inputs.home-manager.darwinModules.home-manager
 | 
			
		||||
    inputs.mac-app-util.darwinModules.default
 | 
			
		||||
    {
 | 
			
		||||
      nixpkgs.overlays = [ inputs.firefox-darwin.overlay ] ++ overlays;
 | 
			
		||||
      networking.hostName = "lookingglass";
 | 
			
		||||
@@ -35,7 +44,6 @@ inputs.darwin.lib.darwinSystem {
 | 
			
		||||
      discord.enable = true;
 | 
			
		||||
      firefox.enable = true;
 | 
			
		||||
      dotfiles.enable = true;
 | 
			
		||||
      nixlang.enable = true;
 | 
			
		||||
      terraform.enable = true;
 | 
			
		||||
      python.enable = true;
 | 
			
		||||
      rust.enable = true;
 | 
			
		||||
@@ -44,6 +52,7 @@ inputs.darwin.lib.darwinSystem {
 | 
			
		||||
      kubernetes.enable = true;
 | 
			
		||||
      _1password.enable = true;
 | 
			
		||||
      slack.enable = true;
 | 
			
		||||
      wezterm.enable = true;
 | 
			
		||||
    }
 | 
			
		||||
  ];
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,12 +1,18 @@
 | 
			
		||||
# The Staff
 | 
			
		||||
# ISO configuration for my USB drive
 | 
			
		||||
 | 
			
		||||
{ inputs, system, overlays, ... }:
 | 
			
		||||
{
 | 
			
		||||
  inputs,
 | 
			
		||||
  system,
 | 
			
		||||
  overlays,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
 | 
			
		||||
inputs.nixos-generators.nixosGenerate {
 | 
			
		||||
  inherit system;
 | 
			
		||||
  format = "install-iso";
 | 
			
		||||
  modules = [{
 | 
			
		||||
  modules = [
 | 
			
		||||
    {
 | 
			
		||||
      nixpkgs.overlays = overlays;
 | 
			
		||||
      networking.hostName = "staff";
 | 
			
		||||
      users.extraUsers.root.openssh.authorizedKeys.keys = [
 | 
			
		||||
@@ -24,8 +30,11 @@ inputs.nixos-generators.nixosGenerate {
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
      environment.systemPackages =
 | 
			
		||||
      let pkgs = import inputs.nixpkgs { inherit system overlays; };
 | 
			
		||||
      in with pkgs; [
 | 
			
		||||
        let
 | 
			
		||||
          pkgs = import inputs.nixpkgs { inherit system overlays; };
 | 
			
		||||
        in
 | 
			
		||||
        with pkgs;
 | 
			
		||||
        [
 | 
			
		||||
          git
 | 
			
		||||
          vim
 | 
			
		||||
          wget
 | 
			
		||||
@@ -39,5 +48,6 @@ inputs.nixos-generators.nixosGenerate {
 | 
			
		||||
        experimental-features = nix-command flakes
 | 
			
		||||
        warn-dirty = false
 | 
			
		||||
      '';
 | 
			
		||||
  }];
 | 
			
		||||
    }
 | 
			
		||||
  ];
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,13 +1,18 @@
 | 
			
		||||
# The Swan
 | 
			
		||||
# System configuration for my home NAS server
 | 
			
		||||
 | 
			
		||||
# See [readme](../README.md) to explain how this file works.
 | 
			
		||||
{
 | 
			
		||||
  inputs,
 | 
			
		||||
  globals,
 | 
			
		||||
  overlays,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
 | 
			
		||||
{ inputs, globals, overlays, ... }:
 | 
			
		||||
 | 
			
		||||
inputs.nixpkgs.lib.nixosSystem {
 | 
			
		||||
inputs.nixpkgs.lib.nixosSystem rec {
 | 
			
		||||
  system = "x86_64-linux";
 | 
			
		||||
  specialArgs = { };
 | 
			
		||||
  specialArgs = {
 | 
			
		||||
    pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
 | 
			
		||||
  };
 | 
			
		||||
  modules = [
 | 
			
		||||
    globals
 | 
			
		||||
    inputs.home-manager.nixosModules.home-manager
 | 
			
		||||
@@ -23,8 +28,13 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
			
		||||
      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" ];
 | 
			
		||||
      boot.initrd.availableKernelModules = [
 | 
			
		||||
        "xhci_pci"
 | 
			
		||||
        "ahci"
 | 
			
		||||
        "nvme"
 | 
			
		||||
        "usb_storage"
 | 
			
		||||
        "sd_mod"
 | 
			
		||||
      ];
 | 
			
		||||
 | 
			
		||||
      # Required for transcoding
 | 
			
		||||
      boot.initrd.kernelModules = [ "amdgpu" ];
 | 
			
		||||
@@ -56,8 +66,19 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
			
		||||
        devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; });
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      boot.zfs = {
 | 
			
		||||
        # Automatically load the ZFS pool on boot
 | 
			
		||||
      boot.zfs.extraPools = [ "tank" ];
 | 
			
		||||
        extraPools = [ "tank" ];
 | 
			
		||||
        # Only try to decrypt datasets with keyfiles
 | 
			
		||||
        requestEncryptionCredentials = [
 | 
			
		||||
          "tank/archive"
 | 
			
		||||
          "tank/generic"
 | 
			
		||||
          "tank/nextcloud"
 | 
			
		||||
          "tank/generic/git"
 | 
			
		||||
        ];
 | 
			
		||||
        # If password is requested and fails, continue to boot eventually
 | 
			
		||||
        passwordTimeout = 300;
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      # Theming
 | 
			
		||||
 | 
			
		||||
@@ -65,7 +86,9 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
			
		||||
      gui.enable = false;
 | 
			
		||||
 | 
			
		||||
      # Still require colors for programs like Neovim, K9S
 | 
			
		||||
      theme = { colors = (import ../../colorscheme/gruvbox).dark; };
 | 
			
		||||
      theme = {
 | 
			
		||||
        colors = (import ../../colorscheme/gruvbox-dark).dark;
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      # Programs and services
 | 
			
		||||
      atuin.enable = true;
 | 
			
		||||
@@ -84,14 +107,14 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
			
		||||
      services.samba.enable = true;
 | 
			
		||||
      services.paperless.enable = true;
 | 
			
		||||
      services.postgresql.enable = true;
 | 
			
		||||
      system.autoUpgrade.enable = false;
 | 
			
		||||
 | 
			
		||||
      # Allows private remote access over the internet
 | 
			
		||||
      cloudflareTunnel = {
 | 
			
		||||
        enable = true;
 | 
			
		||||
        id = "646754ac-2149-4a58-b51a-e1d0a1f3ade2";
 | 
			
		||||
        credentialsFile = ../../private/cloudflared-swan.age;
 | 
			
		||||
        ca =
 | 
			
		||||
          "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCHF/UMtJqPFrf6f6GRY0ZFnkCW7b6sYgUTjTtNfRj1RdmNic1NoJZql7y6BrqQinZvy7nsr1UFDNWoHn6ah3tg= open-ssh-ca@cloudflareaccess.org";
 | 
			
		||||
        ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCHF/UMtJqPFrf6f6GRY0ZFnkCW7b6sYgUTjTtNfRj1RdmNic1NoJZql7y6BrqQinZvy7nsr1UFDNWoHn6ah3tg= open-ssh-ca@cloudflareaccess.org";
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      # Send regular backups and litestream for DBs to an S3-like bucket
 | 
			
		||||
@@ -102,8 +125,9 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      # Disable passwords, only use SSH key
 | 
			
		||||
      publicKey =
 | 
			
		||||
        "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
 | 
			
		||||
      publicKeys = [
 | 
			
		||||
        "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s personal"
 | 
			
		||||
      ];
 | 
			
		||||
    }
 | 
			
		||||
  ];
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,12 @@
 | 
			
		||||
# The Tempest
 | 
			
		||||
# System configuration for my desktop
 | 
			
		||||
 | 
			
		||||
# See [readme](../README.md) to explain how this file works.
 | 
			
		||||
 | 
			
		||||
{ inputs, globals, overlays, ... }:
 | 
			
		||||
{
 | 
			
		||||
  inputs,
 | 
			
		||||
  globals,
 | 
			
		||||
  overlays,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
 | 
			
		||||
inputs.nixpkgs.lib.nixosSystem {
 | 
			
		||||
  system = "x86_64-linux";
 | 
			
		||||
@@ -20,8 +23,14 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
			
		||||
      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" ];
 | 
			
		||||
      boot.initrd.availableKernelModules = [
 | 
			
		||||
        "nvme"
 | 
			
		||||
        "xhci_pci"
 | 
			
		||||
        "ahci"
 | 
			
		||||
        "usb_storage"
 | 
			
		||||
        "usbhid"
 | 
			
		||||
        "sd_mod"
 | 
			
		||||
      ];
 | 
			
		||||
 | 
			
		||||
      # Graphics and VMs
 | 
			
		||||
      boot.initrd.kernelModules = [ "amdgpu" ];
 | 
			
		||||
@@ -101,8 +110,9 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
			
		||||
      mail.himalaya.enable = true;
 | 
			
		||||
      keybase.enable = true;
 | 
			
		||||
      mullvad.enable = false;
 | 
			
		||||
      nixlang.enable = true;
 | 
			
		||||
      rust.enable = true;
 | 
			
		||||
      terraform.enable = true;
 | 
			
		||||
      wezterm.enable = true;
 | 
			
		||||
      yt-dlp.enable = true;
 | 
			
		||||
      gaming = {
 | 
			
		||||
        dwarf-fortress.enable = true;
 | 
			
		||||
@@ -110,27 +120,23 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
			
		||||
        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
 | 
			
		||||
      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";
 | 
			
		||||
        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 AAAAC3NzaC1lZDI1NTE5AAAAIJ9mwXlZnIALt9SnH3FOZvdgHLM5ZqwYUERXBbM7Rwh6 swan
 | 
			
		||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3yHivgEXr2ecwe58h9bkhwTYivf3GwL8xenQKMeiUb tempest
 | 
			
		||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICmGHIWBZzRx35/yFgnPJSHN2+35WJ30G9c5tDhPsCrl arrow
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								modules/aws/default.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								modules/aws/default.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
{ ... }:
 | 
			
		||||
{
 | 
			
		||||
  # AWS settings require this
 | 
			
		||||
  permitRootLogin = "prohibit-password";
 | 
			
		||||
 | 
			
		||||
  # Make sure disk size is large enough
 | 
			
		||||
  # https://github.com/nix-community/nixos-generators/issues/150
 | 
			
		||||
  amazonImage.sizeMB = 16 * 1024;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,4 +1,10 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  options = {
 | 
			
		||||
    _1password = {
 | 
			
		||||
@@ -10,9 +16,16 @@
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  config = lib.mkIf (config.gui.enable && config._1password.enable) {
 | 
			
		||||
    unfreePackages = [ "1password" "_1password-gui" "1password-cli" ];
 | 
			
		||||
    unfreePackages = [
 | 
			
		||||
      "1password"
 | 
			
		||||
      "_1password-gui"
 | 
			
		||||
      "1password-cli"
 | 
			
		||||
    ];
 | 
			
		||||
    home-manager.users.${config.user} = {
 | 
			
		||||
      home.packages = with pkgs; [ _1password-gui _1password ];
 | 
			
		||||
      home.packages = with pkgs; [
 | 
			
		||||
        _1password-gui
 | 
			
		||||
        _1password
 | 
			
		||||
      ];
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    # https://1password.community/discussion/135462/firefox-extension-does-not-connect-to-linux-app
 | 
			
		||||
@@ -26,5 +39,4 @@
 | 
			
		||||
      firefox
 | 
			
		||||
    '';
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,10 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  options = {
 | 
			
		||||
    alacritty = {
 | 
			
		||||
@@ -28,7 +34,9 @@
 | 
			
		||||
            opacity = 1.0;
 | 
			
		||||
          };
 | 
			
		||||
          scrolling.history = 10000;
 | 
			
		||||
          font = { size = 14.0; };
 | 
			
		||||
          font = {
 | 
			
		||||
            size = 14.0;
 | 
			
		||||
          };
 | 
			
		||||
          key_bindings = [
 | 
			
		||||
            # Used for word completion in fish_user_key_bindings
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
{ ... }: {
 | 
			
		||||
{ ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  imports = [
 | 
			
		||||
    ./1password.nix
 | 
			
		||||
@@ -10,7 +11,7 @@
 | 
			
		||||
    ./obsidian.nix
 | 
			
		||||
    ./qbittorrent.nix
 | 
			
		||||
    ./slack.nix
 | 
			
		||||
    ./wezterm.nix
 | 
			
		||||
    ./yt-dlp.nix
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,10 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  options = {
 | 
			
		||||
    discord = {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,9 @@
 | 
			
		||||
{ config, pkgs, lib, ... }:
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
@@ -16,15 +21,13 @@
 | 
			
		||||
    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;
 | 
			
		||||
        package = if pkgs.stdenv.isDarwin then pkgs.firefox-bin else pkgs.firefox;
 | 
			
		||||
        profiles.default = {
 | 
			
		||||
          id = 0;
 | 
			
		||||
          name = "default";
 | 
			
		||||
@@ -32,7 +35,6 @@
 | 
			
		||||
          # https://nur.nix-community.org/repos/rycee/
 | 
			
		||||
          extensions = with pkgs.nur.repos.rycee.firefox-addons; [
 | 
			
		||||
            (lib.mkIf config._1password.enable onepassword-password-manager)
 | 
			
		||||
            pkgs.bypass-paywalls-clean
 | 
			
		||||
            darkreader
 | 
			
		||||
            don-t-fuck-with-paste
 | 
			
		||||
            facebook-container
 | 
			
		||||
@@ -41,43 +43,33 @@
 | 
			
		||||
            okta-browser-plugin
 | 
			
		||||
            reddit-enhancement-suite
 | 
			
		||||
            return-youtube-dislikes
 | 
			
		||||
            snowflake
 | 
			
		||||
            sponsorblock
 | 
			
		||||
            ublock-origin
 | 
			
		||||
            ublacklist
 | 
			
		||||
            vimium
 | 
			
		||||
            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.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
 | 
			
		||||
            "trailhead.firstrun.didSeeAboutWelcome" = true; # Disable welcome splash
 | 
			
		||||
            "dom.forms.autocomplete.formautofill" = false; # Disable autofill
 | 
			
		||||
            "extensions.formautofill.creditCards.enabled" =
 | 
			
		||||
              false; # Disable credit cards
 | 
			
		||||
            "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
 | 
			
		||||
            "services.sync.prefs.sync.general.autoScroll" = false; # Prevent disabling autoscroll
 | 
			
		||||
            "extensions.pocket.enabled" = false;
 | 
			
		||||
            "toolkit.legacyUserProfileCustomizations.stylesheets" =
 | 
			
		||||
              true; # Allow userChrome.css
 | 
			
		||||
            "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
 | 
			
		||||
            "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
 | 
			
		||||
            "devtools.command-button-screenshot.enabled" =
 | 
			
		||||
              true; # Scrolling screenshot of entire page
 | 
			
		||||
            "devtools.command-button-screenshot.enabled" = true; # Scrolling screenshot of entire page
 | 
			
		||||
            "svg.context-properties.content.enabled" = true; # Sidebery styling
 | 
			
		||||
          };
 | 
			
		||||
          userChrome = ''
 | 
			
		||||
@@ -163,28 +155,38 @@
 | 
			
		||||
 | 
			
		||||
          extraConfig = "";
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      xdg.mimeApps = {
 | 
			
		||||
        associations.added = {
 | 
			
		||||
          "text/html" = [ "firefox.desktop" ];
 | 
			
		||||
        };
 | 
			
		||||
        defaultApplications = {
 | 
			
		||||
          "text/html" = [ "firefox.desktop" ];
 | 
			
		||||
        };
 | 
			
		||||
        associations.removed = {
 | 
			
		||||
          "text/html" = [ "wine-extension-htm.desktop" ];
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      xsession.windowManager.i3.config.keybindings =
 | 
			
		||||
        lib.mkIf pkgs.stdenv.isLinux {
 | 
			
		||||
      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" ''
 | 
			
		||||
          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,4 +1,10 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  options = {
 | 
			
		||||
    kitty = {
 | 
			
		||||
@@ -13,26 +19,28 @@
 | 
			
		||||
 | 
			
		||||
    # 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";
 | 
			
		||||
    environment =
 | 
			
		||||
      { }
 | 
			
		||||
      // lib.attrsets.optionalAttrs (builtins.hasAttr "sessionVariables" config.environment) {
 | 
			
		||||
        sessionVariables.ROFI_SYSTEMD_TERM = lib.mkDefault "${pkgs.kitty}/bin/kitty";
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
    home-manager.users.${config.user} = {
 | 
			
		||||
 | 
			
		||||
      # Set the i3 terminal
 | 
			
		||||
      xsession.windowManager.i3.config.terminal =
 | 
			
		||||
        lib.mkIf pkgs.stdenv.isLinux "kitty";
 | 
			
		||||
      xsession.windowManager.i3.config.terminal = lib.mkIf pkgs.stdenv.isLinux "kitty";
 | 
			
		||||
 | 
			
		||||
      # Set the Rofi terminal for running programs
 | 
			
		||||
      programs.rofi.terminal =
 | 
			
		||||
        lib.mkIf pkgs.stdenv.isLinux "${pkgs.kitty}/bin/kitty";
 | 
			
		||||
      programs.rofi.terminal = lib.mkIf pkgs.stdenv.isLinux (lib.mkDefault "${pkgs.kitty}/bin/kitty");
 | 
			
		||||
 | 
			
		||||
      # Display images in the terminal
 | 
			
		||||
      programs.fish.shellAliases = {
 | 
			
		||||
        icat = "kitty +kitten icat";
 | 
			
		||||
        ssh = "kitty +kitten ssh";
 | 
			
		||||
      };
 | 
			
		||||
      programs.fish.interactiveShellInit = # fish
 | 
			
		||||
        ''
 | 
			
		||||
          if test "$TERM" = "xterm-kitty"
 | 
			
		||||
              alias icat="kitty +kitten icat"
 | 
			
		||||
              alias ssh="kitty +kitten ssh"
 | 
			
		||||
          end
 | 
			
		||||
        '';
 | 
			
		||||
 | 
			
		||||
      programs.kitty = {
 | 
			
		||||
        enable = true;
 | 
			
		||||
@@ -45,20 +53,9 @@
 | 
			
		||||
 | 
			
		||||
          # Easy fullscreen toggle (for macOS)
 | 
			
		||||
          "super+f" = "toggle_fullscreen";
 | 
			
		||||
 | 
			
		||||
          # Kitty scrollback nvim
 | 
			
		||||
          "kitty_mod+h" = "kitty_scrollback_nvim";
 | 
			
		||||
          "kitty_mod+g" =
 | 
			
		||||
            "kitty_scrollback_nvim --config ksb_builtin_last_cmd_output";
 | 
			
		||||
        };
 | 
			
		||||
        settings = {
 | 
			
		||||
 | 
			
		||||
          # Required for kitty-scrollback.nvim
 | 
			
		||||
          allow_remote_control = "socket-only";
 | 
			
		||||
          listen_on = "unix:/tmp/kitty";
 | 
			
		||||
          action_alias =
 | 
			
		||||
            "kitty_scrollback_nvim kitten ${pkgs.kitty-scrollback-nvim}/python/kitty_scrollback_nvim.py";
 | 
			
		||||
 | 
			
		||||
          # Colors (adapted from: https://github.com/kdrag0n/base16-kitty/blob/master/templates/default-256.mustache)
 | 
			
		||||
          background = config.theme.colors.base00;
 | 
			
		||||
          foreground = config.theme.colors.base05;
 | 
			
		||||
@@ -103,8 +100,8 @@
 | 
			
		||||
          color21 = config.theme.colors.base06;
 | 
			
		||||
 | 
			
		||||
          # Scrollback
 | 
			
		||||
          scrolling_lines = 10000;
 | 
			
		||||
          scrollback_pager_history_size = 10; # MB
 | 
			
		||||
          scrollback_lines = 10000;
 | 
			
		||||
          scrollback_pager_history_size = 300; # MB
 | 
			
		||||
 | 
			
		||||
          # Window
 | 
			
		||||
          window_padding_width = 6;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,10 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  options = {
 | 
			
		||||
    media = {
 | 
			
		||||
@@ -44,7 +50,10 @@
 | 
			
		||||
          "image/*" = [ "nsxiv.desktop" ];
 | 
			
		||||
        };
 | 
			
		||||
        associations.removed = {
 | 
			
		||||
          "application/pdf" = [ "mupdf.desktop" "wine-extension-pdf.desktop" ];
 | 
			
		||||
          "application/pdf" = [
 | 
			
		||||
            "mupdf.desktop"
 | 
			
		||||
            "wine-extension-pdf.desktop"
 | 
			
		||||
          ];
 | 
			
		||||
        };
 | 
			
		||||
        defaultApplications = {
 | 
			
		||||
          "application/pdf" = [ "pwmt.zathura-cb.desktop" ];
 | 
			
		||||
@@ -53,9 +62,6 @@
 | 
			
		||||
          "image/*" = [ "nsxiv.desktop" ];
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,10 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  options = {
 | 
			
		||||
    obsidian = {
 | 
			
		||||
@@ -18,7 +24,5 @@
 | 
			
		||||
    # Broken on 2023-12-11
 | 
			
		||||
    # https://forum.obsidian.md/t/electron-25-is-now-eol-please-upgrade-to-a-newer-version/72878/8
 | 
			
		||||
    nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" ];
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,10 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  options = {
 | 
			
		||||
    qbittorrent = {
 | 
			
		||||
@@ -14,8 +20,6 @@
 | 
			
		||||
    home-manager.users.${config.user} = {
 | 
			
		||||
 | 
			
		||||
      home.packages = with pkgs; [ qbittorrent ];
 | 
			
		||||
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,10 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  options = {
 | 
			
		||||
    slack = {
 | 
			
		||||
@@ -15,5 +21,4 @@
 | 
			
		||||
      home.packages = with pkgs; [ slack ];
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										235
									
								
								modules/common/applications/wezterm.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										235
									
								
								modules/common/applications/wezterm.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,235 @@
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  options = {
 | 
			
		||||
    wezterm = {
 | 
			
		||||
      enable = lib.mkEnableOption {
 | 
			
		||||
        description = "Enable WezTerm terminal.";
 | 
			
		||||
        default = false;
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  config =
 | 
			
		||||
    let
 | 
			
		||||
      font = config.home-manager.users.${config.user}.programs.kitty.font.name;
 | 
			
		||||
    in
 | 
			
		||||
    lib.mkIf (config.gui.enable && config.wezterm.enable) {
 | 
			
		||||
 | 
			
		||||
      # Set the Rofi-Systemd terminal for viewing logs
 | 
			
		||||
      # Using optionalAttrs because only available in NixOS
 | 
			
		||||
      environment =
 | 
			
		||||
        { }
 | 
			
		||||
        // lib.attrsets.optionalAttrs (builtins.hasAttr "sessionVariables" config.environment) {
 | 
			
		||||
          sessionVariables.ROFI_SYSTEMD_TERM = "${pkgs.wezterm}/bin/wezterm";
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
      home-manager.users.${config.user} = {
 | 
			
		||||
 | 
			
		||||
        # Set the i3 terminal
 | 
			
		||||
        xsession.windowManager.i3.config.terminal = lib.mkIf pkgs.stdenv.isLinux "wezterm";
 | 
			
		||||
 | 
			
		||||
        # Set the Rofi terminal for running programs
 | 
			
		||||
        programs.rofi.terminal = lib.mkIf pkgs.stdenv.isLinux "${pkgs.wezterm}/bin/wezterm";
 | 
			
		||||
 | 
			
		||||
        # Display images in the terminal
 | 
			
		||||
        programs.fish.shellAliases = {
 | 
			
		||||
          icat = lib.mkForce "wezterm imgcat";
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        programs.wezterm = {
 | 
			
		||||
          enable = true;
 | 
			
		||||
          colorSchemes = {
 | 
			
		||||
            myTheme = {
 | 
			
		||||
              background = config.theme.colors.base00;
 | 
			
		||||
              foreground = config.theme.colors.base05;
 | 
			
		||||
              cursor_bg = config.theme.colors.base05;
 | 
			
		||||
              cursor_fg = config.theme.colors.base00;
 | 
			
		||||
              cursor_border = config.theme.colors.base05;
 | 
			
		||||
              selection_bg = config.theme.colors.base05;
 | 
			
		||||
              selection_fg = config.theme.colors.base00;
 | 
			
		||||
              scrollbar_thumb = config.theme.colors.base03;
 | 
			
		||||
              ansi = [
 | 
			
		||||
                config.theme.colors.base01 # black
 | 
			
		||||
                config.theme.colors.base0F # maroon
 | 
			
		||||
                config.theme.colors.base0B # green
 | 
			
		||||
                config.theme.colors.base0A # olive
 | 
			
		||||
                config.theme.colors.base0D # navy
 | 
			
		||||
                config.theme.colors.base0E # purple
 | 
			
		||||
                config.theme.colors.base0C # teal
 | 
			
		||||
                config.theme.colors.base06 # silver
 | 
			
		||||
              ];
 | 
			
		||||
              brights = [
 | 
			
		||||
                config.theme.colors.base03 # grey
 | 
			
		||||
                config.theme.colors.base08 # red
 | 
			
		||||
                config.theme.colors.base0B # lime
 | 
			
		||||
                config.theme.colors.base0A # yellow
 | 
			
		||||
                config.theme.colors.base0D # blue
 | 
			
		||||
                config.theme.colors.base0E # fuchsia
 | 
			
		||||
                config.theme.colors.base0C # aqua
 | 
			
		||||
                config.theme.colors.base07 # white
 | 
			
		||||
              ];
 | 
			
		||||
              compose_cursor = config.theme.colors.base09; # orange
 | 
			
		||||
              copy_mode_active_highlight_bg = {
 | 
			
		||||
                Color = config.theme.colors.base03;
 | 
			
		||||
              };
 | 
			
		||||
              copy_mode_active_highlight_fg = {
 | 
			
		||||
                Color = config.theme.colors.base07;
 | 
			
		||||
              };
 | 
			
		||||
              copy_mode_inactive_highlight_bg = {
 | 
			
		||||
                Color = config.theme.colors.base02;
 | 
			
		||||
              };
 | 
			
		||||
              copy_mode_inactive_highlight_fg = {
 | 
			
		||||
                Color = config.theme.colors.base06;
 | 
			
		||||
              };
 | 
			
		||||
              quick_select_label_bg = {
 | 
			
		||||
                Color = config.theme.colors.base02;
 | 
			
		||||
              };
 | 
			
		||||
              quick_select_label_fg = {
 | 
			
		||||
                Color = config.theme.colors.base06;
 | 
			
		||||
              };
 | 
			
		||||
              quick_select_match_bg = {
 | 
			
		||||
                Color = config.theme.colors.base03;
 | 
			
		||||
              };
 | 
			
		||||
              quick_select_match_fg = {
 | 
			
		||||
                Color = config.theme.colors.base07;
 | 
			
		||||
              };
 | 
			
		||||
            };
 | 
			
		||||
          };
 | 
			
		||||
          extraConfig = ''
 | 
			
		||||
            return {
 | 
			
		||||
                color_scheme = "myTheme",
 | 
			
		||||
 | 
			
		||||
                -- Scrollback
 | 
			
		||||
                scrollback_lines = 10000,
 | 
			
		||||
 | 
			
		||||
                -- Window
 | 
			
		||||
                window_padding = {
 | 
			
		||||
                  left = 10,
 | 
			
		||||
                  right = 10,
 | 
			
		||||
                  top = 10,
 | 
			
		||||
                  bottom = 10,
 | 
			
		||||
                },
 | 
			
		||||
 | 
			
		||||
                font = wezterm.font('${font}', { weight = 'Bold'}),
 | 
			
		||||
                font_size = ${if pkgs.stdenv.isLinux then "14.0" else "18.0"},
 | 
			
		||||
 | 
			
		||||
                -- Tab Bar
 | 
			
		||||
                hide_tab_bar_if_only_one_tab = true,
 | 
			
		||||
                window_frame = {
 | 
			
		||||
                  font = wezterm.font('${font}', { weight = 'Bold'}),
 | 
			
		||||
                  font_size = ${if pkgs.stdenv.isLinux then "12.0" else "16.0"},
 | 
			
		||||
                },
 | 
			
		||||
 | 
			
		||||
                colors = {
 | 
			
		||||
                  tab_bar = {
 | 
			
		||||
                    active_tab = {
 | 
			
		||||
                      bg_color = '${config.theme.colors.base00}',
 | 
			
		||||
                      fg_color = '${config.theme.colors.base04}',
 | 
			
		||||
                    },
 | 
			
		||||
                  },
 | 
			
		||||
                },
 | 
			
		||||
 | 
			
		||||
                -- Disable audio
 | 
			
		||||
                audible_bell = "Disabled",
 | 
			
		||||
 | 
			
		||||
                initial_rows = 80,
 | 
			
		||||
                initial_cols = 200,
 | 
			
		||||
 | 
			
		||||
                keys = {
 | 
			
		||||
                  -- sends completion string for fish autosuggestions
 | 
			
		||||
                  {
 | 
			
		||||
                    key = 'Enter',
 | 
			
		||||
                    mods = 'SHIFT',
 | 
			
		||||
                    action = wezterm.action.SendString '\x1F'
 | 
			
		||||
                  },
 | 
			
		||||
                  -- ctrl-shift-h was "hide"
 | 
			
		||||
                  {
 | 
			
		||||
                    key = 'H',
 | 
			
		||||
                    mods = 'SHIFT|CTRL',
 | 
			
		||||
                    action = wezterm.action.DisableDefaultAssignment
 | 
			
		||||
                  },
 | 
			
		||||
                  -- alt-enter was "fullscreen"
 | 
			
		||||
                  {
 | 
			
		||||
                    key = 'Enter',
 | 
			
		||||
                    mods = 'ALT',
 | 
			
		||||
                    action = wezterm.action.DisableDefaultAssignment
 | 
			
		||||
                  },
 | 
			
		||||
                  -- make super-f "fullscreen"
 | 
			
		||||
                  {
 | 
			
		||||
                    key = 'f',
 | 
			
		||||
                    mods = 'SUPER',
 | 
			
		||||
                    action = wezterm.action.ToggleFullScreen
 | 
			
		||||
                  },
 | 
			
		||||
                  -- super-t open new tab in new dir
 | 
			
		||||
                  {
 | 
			
		||||
                    key = 't',
 | 
			
		||||
                    mods = 'SUPER',
 | 
			
		||||
                    action = wezterm.action.SpawnCommandInNewTab {
 | 
			
		||||
                      cwd = wezterm.home_dir,
 | 
			
		||||
                    },
 | 
			
		||||
                  },
 | 
			
		||||
                  -- shift-super-t open new tab in same dir
 | 
			
		||||
                  {
 | 
			
		||||
                    key = 't',
 | 
			
		||||
                    mods = 'SUPER|SHIFT',
 | 
			
		||||
                    action = wezterm.action.SpawnTab 'CurrentPaneDomain'
 | 
			
		||||
                  },
 | 
			
		||||
                  -- project switcher
 | 
			
		||||
                  {
 | 
			
		||||
                     key = 'P',
 | 
			
		||||
                     mods = 'SUPER',
 | 
			
		||||
                     action = wezterm.action_callback(function(window, pane)
 | 
			
		||||
                       local choices = {}
 | 
			
		||||
 | 
			
		||||
                       wezterm.log_info "working?"
 | 
			
		||||
 | 
			
		||||
                       function scandir(directory)
 | 
			
		||||
                           local i, t, popen = 0, {}, io.popen
 | 
			
		||||
                           local pfile = popen('${pkgs.fd}/bin/fd --search-path "'..directory..'" --type directory --exact-depth 2 | ${pkgs.proximity-sort}/bin/proximity-sort "'..os.getenv("HOME").."/dev/work"..'"')
 | 
			
		||||
                           for filename in pfile:lines() do
 | 
			
		||||
                               i = i + 1
 | 
			
		||||
                               t[i] = filename
 | 
			
		||||
                           end
 | 
			
		||||
                           pfile:close()
 | 
			
		||||
                           return t
 | 
			
		||||
                       end
 | 
			
		||||
 | 
			
		||||
                       for _, v in pairs(scandir(os.getenv("HOME").."/dev")) do
 | 
			
		||||
                         table.insert(choices, { label = v })
 | 
			
		||||
                       end
 | 
			
		||||
 | 
			
		||||
                       window:perform_action(
 | 
			
		||||
                         wezterm.action.InputSelector {
 | 
			
		||||
                           action = wezterm.action_callback(function(window, pane, id, label)
 | 
			
		||||
                             if not id and not label then
 | 
			
		||||
                               wezterm.log_info "cancelled"
 | 
			
		||||
                             else
 | 
			
		||||
                               window:perform_action(
 | 
			
		||||
                                 wezterm.action.SpawnCommandInNewTab {
 | 
			
		||||
                                   cwd = label,
 | 
			
		||||
                                 },
 | 
			
		||||
                                 pane
 | 
			
		||||
                               )
 | 
			
		||||
                             end
 | 
			
		||||
                           end),
 | 
			
		||||
                           fuzzy = true,
 | 
			
		||||
                           title = "Select Project",
 | 
			
		||||
                           choices = choices,
 | 
			
		||||
                         },
 | 
			
		||||
                         pane
 | 
			
		||||
                       )
 | 
			
		||||
                     end),
 | 
			
		||||
                  },
 | 
			
		||||
                },
 | 
			
		||||
            }
 | 
			
		||||
          '';
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
}
 | 
			
		||||
@@ -1,4 +1,10 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  options = {
 | 
			
		||||
    yt-dlp = {
 | 
			
		||||
@@ -27,9 +33,6 @@
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      programs.fish.shellAbbrs.yt = "yt-dlp";
 | 
			
		||||
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,19 @@
 | 
			
		||||
{ config, lib, pkgs, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  lib,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  imports =
 | 
			
		||||
    [ ./applications ./mail ./neovim ./programming ./repositories ./shell ];
 | 
			
		||||
  imports = [
 | 
			
		||||
    ./applications
 | 
			
		||||
    ./mail
 | 
			
		||||
    ./neovim
 | 
			
		||||
    ./programming
 | 
			
		||||
    ./repositories
 | 
			
		||||
    ./shell
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  options = {
 | 
			
		||||
    user = lib.mkOption {
 | 
			
		||||
@@ -17,8 +29,7 @@
 | 
			
		||||
      download = lib.mkOption {
 | 
			
		||||
        type = lib.types.str;
 | 
			
		||||
        description = "XDG directory for downloads";
 | 
			
		||||
        default =
 | 
			
		||||
          if pkgs.stdenv.isDarwin then "$HOME/Downloads" else "$HOME/downloads";
 | 
			
		||||
        default = if pkgs.stdenv.isDarwin then "$HOME/Downloads" else "$HOME/downloads";
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
    identityFile = lib.mkOption {
 | 
			
		||||
@@ -47,10 +58,9 @@
 | 
			
		||||
    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}");
 | 
			
		||||
      default = builtins.toPath (
 | 
			
		||||
        if pkgs.stdenv.isDarwin then "/Users/${config.user}" else "/home/${config.user}"
 | 
			
		||||
      );
 | 
			
		||||
    };
 | 
			
		||||
    dotfilesPath = lib.mkOption {
 | 
			
		||||
      type = lib.types.path;
 | 
			
		||||
@@ -75,6 +85,10 @@
 | 
			
		||||
        type = lib.types.str;
 | 
			
		||||
        description = "Hostname for metrics server.";
 | 
			
		||||
      };
 | 
			
		||||
      minecraft = lib.mkOption {
 | 
			
		||||
        type = lib.types.str;
 | 
			
		||||
        description = "Hostname for Minecraft server.";
 | 
			
		||||
      };
 | 
			
		||||
      paperless = lib.mkOption {
 | 
			
		||||
        type = lib.types.str;
 | 
			
		||||
        description = "Hostname for document server (paperless-ngx).";
 | 
			
		||||
@@ -107,46 +121,34 @@
 | 
			
		||||
        type = lib.types.str;
 | 
			
		||||
        description = "Hostname for download services.";
 | 
			
		||||
      };
 | 
			
		||||
      irc = lib.mkOption {
 | 
			
		||||
        type = lib.types.str;
 | 
			
		||||
        description = "Hostname for IRC services.";
 | 
			
		||||
      };
 | 
			
		||||
      n8n = lib.mkOption {
 | 
			
		||||
        type = lib.types.str;
 | 
			
		||||
        description = "Hostname for n8n automation.";
 | 
			
		||||
      };
 | 
			
		||||
      transmission = lib.mkOption {
 | 
			
		||||
        type = lib.types.str;
 | 
			
		||||
        description = "Hostname for peer2peer downloads (Transmission).";
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  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;
 | 
			
		||||
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
    };
 | 
			
		||||
  config =
 | 
			
		||||
    let
 | 
			
		||||
      stateVersion = "23.05";
 | 
			
		||||
    in
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
      # Basic common system packages for all devices
 | 
			
		||||
    environment.systemPackages = with pkgs; [ git vim wget curl ];
 | 
			
		||||
      environment.systemPackages = with pkgs; [
 | 
			
		||||
        git
 | 
			
		||||
        vim
 | 
			
		||||
        wget
 | 
			
		||||
        curl
 | 
			
		||||
      ];
 | 
			
		||||
 | 
			
		||||
      # Use the system-level nixpkgs instead of Home Manager's
 | 
			
		||||
      home-manager.useGlobalPkgs = true;
 | 
			
		||||
@@ -157,13 +159,10 @@
 | 
			
		||||
 | 
			
		||||
      # Allow specified unfree packages (identified elsewhere)
 | 
			
		||||
      # Retrieves package object based on string name
 | 
			
		||||
    nixpkgs.config.allowUnfreePredicate = pkg:
 | 
			
		||||
      builtins.elem (lib.getName pkg) config.unfreePackages;
 | 
			
		||||
      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,4 +1,10 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  options.mail.aerc.enable = lib.mkEnableOption "Aerc email.";
 | 
			
		||||
 | 
			
		||||
@@ -75,7 +81,9 @@
 | 
			
		||||
            "<Esc>" = ":clear<Enter>";
 | 
			
		||||
          };
 | 
			
		||||
 | 
			
		||||
          "messages:folder=Drafts" = { "<Enter>" = ":recall<Enter>"; };
 | 
			
		||||
          "messages:folder=Drafts" = {
 | 
			
		||||
            "<Enter>" = ":recall<Enter>";
 | 
			
		||||
          };
 | 
			
		||||
 | 
			
		||||
          view = {
 | 
			
		||||
            "/" = ":toggle-key-passthrough <Enter> /";
 | 
			
		||||
@@ -148,21 +156,23 @@
 | 
			
		||||
            "<C-p>" = ":prev-tab<Enter>";
 | 
			
		||||
            "<C-n>" = ":next-tab<Enter>";
 | 
			
		||||
          };
 | 
			
		||||
 | 
			
		||||
        };
 | 
			
		||||
        extraConfig = {
 | 
			
		||||
          general.unsafe-accounts-conf = true;
 | 
			
		||||
          viewer = { pager = "${pkgs.less}/bin/less -R"; };
 | 
			
		||||
          general = {
 | 
			
		||||
            unsafe-accounts-conf = true;
 | 
			
		||||
            # log-file = "~/.cache/aerc.log";
 | 
			
		||||
            # log-level = "debug";
 | 
			
		||||
          };
 | 
			
		||||
          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/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/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 -";
 | 
			
		||||
@@ -176,6 +186,7 @@
 | 
			
		||||
        extraAccounts = {
 | 
			
		||||
          check-mail = "5m";
 | 
			
		||||
          check-mail-cmd = "${pkgs.isync}/bin/mbsync -a";
 | 
			
		||||
          check-mail-timeout = "15s";
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
@@ -183,26 +194,27 @@
 | 
			
		||||
        name = "aerc";
 | 
			
		||||
        exec = "kitty aerc %u";
 | 
			
		||||
      };
 | 
			
		||||
      xsession.windowManager.i3.config.keybindings =
 | 
			
		||||
        lib.mkIf pkgs.stdenv.isLinux {
 | 
			
		||||
      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" ''
 | 
			
		||||
          builtins.toString (
 | 
			
		||||
            pkgs.writeShellScript "focus-mail.sh" ''
 | 
			
		||||
              count=$(ps aux | grep -c aerc)
 | 
			
		||||
              if [ "$count" -eq 1 ]; then
 | 
			
		||||
                  i3-msg "exec --no-startup-id kitty --class aerc aerc"
 | 
			
		||||
                  sleep 0.25
 | 
			
		||||
              fi
 | 
			
		||||
              i3-msg "[class=aerc] focus"
 | 
			
		||||
              '')
 | 
			
		||||
            ''
 | 
			
		||||
          )
 | 
			
		||||
        }";
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      programs.fish.shellAbbrs = { ae = "aerc"; };
 | 
			
		||||
 | 
			
		||||
      programs.fish.shellAbbrs = {
 | 
			
		||||
        ae = "aerc";
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,16 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  imports = [ ./himalaya.nix ./aerc.nix ./system.nix ];
 | 
			
		||||
  imports = [
 | 
			
		||||
    ./himalaya.nix
 | 
			
		||||
    ./aerc.nix
 | 
			
		||||
    ./system.nix
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  options = {
 | 
			
		||||
    mail.enable = lib.mkEnableOption "Mail service.";
 | 
			
		||||
@@ -26,7 +36,9 @@
 | 
			
		||||
  config = lib.mkIf config.mail.enable {
 | 
			
		||||
 | 
			
		||||
    home-manager.users.${config.user} = {
 | 
			
		||||
      programs.mbsync = { enable = true; };
 | 
			
		||||
      programs.mbsync = {
 | 
			
		||||
        enable = true;
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      # Automatically check for mail and keep files synced locally
 | 
			
		||||
      services.mbsync = lib.mkIf pkgs.stdenv.isLinux {
 | 
			
		||||
@@ -44,8 +56,11 @@
 | 
			
		||||
      # Better local mail search
 | 
			
		||||
      programs.notmuch = {
 | 
			
		||||
        enable = true;
 | 
			
		||||
        new.ignore =
 | 
			
		||||
          [ ".mbsyncstate.lock" ".mbsyncstate.journal" ".mbsyncstate.new" ];
 | 
			
		||||
        new.ignore = [
 | 
			
		||||
          ".mbsyncstate.lock"
 | 
			
		||||
          ".mbsyncstate.journal"
 | 
			
		||||
          ".mbsyncstate.new"
 | 
			
		||||
        ];
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      accounts.email = {
 | 
			
		||||
@@ -54,8 +69,11 @@
 | 
			
		||||
        maildirBasePath = "${config.homePath}/mail";
 | 
			
		||||
 | 
			
		||||
        accounts = {
 | 
			
		||||
          home = let address = "${config.mail.user}@${config.mail.server}";
 | 
			
		||||
          in {
 | 
			
		||||
          home =
 | 
			
		||||
            let
 | 
			
		||||
              address = "${config.mail.user}@${config.mail.server}";
 | 
			
		||||
            in
 | 
			
		||||
            {
 | 
			
		||||
              userName = address;
 | 
			
		||||
              realName = config.fullName;
 | 
			
		||||
              primary = true;
 | 
			
		||||
@@ -80,13 +98,15 @@
 | 
			
		||||
                enable = true;
 | 
			
		||||
                boxes = [ "Inbox" ];
 | 
			
		||||
                onNotify = "${pkgs.isync}/bin/mbsync -a";
 | 
			
		||||
              onNotifyPost = lib.mkIf
 | 
			
		||||
                config.home-manager.users.${config.user}.services.dunst.enable
 | 
			
		||||
                onNotifyPost =
 | 
			
		||||
                  lib.mkIf config.home-manager.users.${config.user}.services.dunst.enable
 | 
			
		||||
                    "${pkgs.libnotify}/bin/notify-send 'New mail arrived'";
 | 
			
		||||
              };
 | 
			
		||||
 | 
			
		||||
              # Name of the directory in maildir for this account
 | 
			
		||||
            maildir = { path = "main"; };
 | 
			
		||||
              maildir = {
 | 
			
		||||
                path = "main";
 | 
			
		||||
              };
 | 
			
		||||
 | 
			
		||||
              # Bi-directional syncing options for local files
 | 
			
		||||
              mbsync = {
 | 
			
		||||
@@ -104,11 +124,7 @@
 | 
			
		||||
              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)
 | 
			
		||||
              }";
 | 
			
		||||
              passwordCommand = "${pkgs.age}/bin/age --decrypt --identity ~/.ssh/id_ed25519 ${pkgs.writeText "mailpass.age" (builtins.readFile ../../../private/mailpass.age)}";
 | 
			
		||||
 | 
			
		||||
              smtp = {
 | 
			
		||||
                host = config.mail.smtpHost;
 | 
			
		||||
@@ -118,8 +134,6 @@
 | 
			
		||||
            };
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
{ config, lib, ... }: {
 | 
			
		||||
{ config, lib, ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  options.mail.himalaya.enable = lib.mkEnableOption "Himalaya email.";
 | 
			
		||||
 | 
			
		||||
@@ -6,20 +7,20 @@
 | 
			
		||||
 | 
			
		||||
    home-manager.users.${config.user} = {
 | 
			
		||||
 | 
			
		||||
      programs.himalaya = { enable = true; };
 | 
			
		||||
      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"; };
 | 
			
		||||
 | 
			
		||||
      programs.fish.shellAbbrs = {
 | 
			
		||||
        hi = "himalaya";
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,10 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  config = lib.mkIf (config.mail.enable || config.server) {
 | 
			
		||||
 | 
			
		||||
@@ -8,17 +14,15 @@
 | 
			
		||||
 | 
			
		||||
      # The system user for sending automatic notifications
 | 
			
		||||
      accounts.email.accounts.system =
 | 
			
		||||
        let address = "system@${config.mail.server}";
 | 
			
		||||
        in {
 | 
			
		||||
        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)
 | 
			
		||||
            }";
 | 
			
		||||
          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;
 | 
			
		||||
@@ -26,9 +30,6 @@
 | 
			
		||||
            tls.enable = true;
 | 
			
		||||
          };
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
{ pkgs, ... }: {
 | 
			
		||||
{ pkgs, ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  # Plugin for aligning text programmatically
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
{ pkgs, ... }: {
 | 
			
		||||
{ pkgs, ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  # Shows buffers in a VSCode-style tab layout
 | 
			
		||||
 | 
			
		||||
@@ -11,7 +12,7 @@
 | 
			
		||||
      diagnostics = "nvim_lsp";
 | 
			
		||||
      always_show_bufferline = false;
 | 
			
		||||
      separator_style = "slant";
 | 
			
		||||
      offsets = [{ filetype = "NvimTree"; }];
 | 
			
		||||
      offsets = [ { filetype = "NvimTree"; } ];
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
  lua = ''
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,10 @@
 | 
			
		||||
{ pkgs, lib, config, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  config,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  # Sets Neovim colors based on Nix colorscheme
 | 
			
		||||
 | 
			
		||||
@@ -8,7 +14,7 @@
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  config = {
 | 
			
		||||
    plugins = [ pkgs.vimPlugins.nvim-base16 ];
 | 
			
		||||
    plugins = [ pkgs.vimPlugins.base16-nvim ];
 | 
			
		||||
    setup.base16-colorscheme = config.colors;
 | 
			
		||||
 | 
			
		||||
    # Telescope isn't working, shut off for now
 | 
			
		||||
@@ -18,5 +24,4 @@
 | 
			
		||||
      }
 | 
			
		||||
    '';
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
{ pkgs, dsl, ... }: {
 | 
			
		||||
{ pkgs, dsl, ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  plugins = [
 | 
			
		||||
    pkgs.vimPlugins.cmp-nvim-lsp
 | 
			
		||||
@@ -25,21 +26,15 @@
 | 
			
		||||
 | 
			
		||||
    # Basic completion keybinds
 | 
			
		||||
    mapping = {
 | 
			
		||||
      "['<C-n>']" = dsl.rawLua
 | 
			
		||||
        "require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Insert })";
 | 
			
		||||
      "['<C-p>']" = dsl.rawLua
 | 
			
		||||
        "require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Insert })";
 | 
			
		||||
      "['<Down>']" = dsl.rawLua
 | 
			
		||||
        "require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Select })";
 | 
			
		||||
      "['<Up>']" = dsl.rawLua
 | 
			
		||||
        "require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Select })";
 | 
			
		||||
      "['<C-n>']" = dsl.rawLua "require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Insert }, { 'i', 'c' })";
 | 
			
		||||
      "['<C-p>']" = dsl.rawLua "require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Insert }, { 'i', 'c' })";
 | 
			
		||||
      "['<Down>']" = dsl.rawLua "require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Select }, { 'i', 'c' })";
 | 
			
		||||
      "['<Up>']" = dsl.rawLua "require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Select }, { 'i', 'c' })";
 | 
			
		||||
      "['<C-d>']" = dsl.rawLua "require('cmp').mapping.scroll_docs(-4)";
 | 
			
		||||
      "['<C-f>']" = dsl.rawLua "require('cmp').mapping.scroll_docs(4)";
 | 
			
		||||
      "['<C-e>']" = dsl.rawLua "require('cmp').mapping.abort()";
 | 
			
		||||
      "['<CR>']" = dsl.rawLua
 | 
			
		||||
        "require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, })";
 | 
			
		||||
      "['<C-r>']" = dsl.rawLua
 | 
			
		||||
        "require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, })";
 | 
			
		||||
      "['<C-y>']" = dsl.rawLua "require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Insert, select = true, }, { 'i', 'c' })";
 | 
			
		||||
      "['<C-r>']" = dsl.rawLua "require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, }, { 'i', 'c' })";
 | 
			
		||||
      "['<Esc>']" = dsl.rawLua ''
 | 
			
		||||
        function(_)
 | 
			
		||||
            cmp.mapping({
 | 
			
		||||
@@ -49,7 +44,7 @@
 | 
			
		||||
            vim.cmd("stopinsert") --- Abort and leave insert mode
 | 
			
		||||
        end
 | 
			
		||||
      '';
 | 
			
		||||
      "['<C-l>']" = dsl.rawLua ''
 | 
			
		||||
      "['<C-k>']" = dsl.rawLua ''
 | 
			
		||||
        cmp.mapping(function(_)
 | 
			
		||||
            if require("luasnip").expand_or_jumpable() then
 | 
			
		||||
                require("luasnip").expand_or_jump()
 | 
			
		||||
@@ -72,13 +67,19 @@
 | 
			
		||||
        name = "rg"; # Grep for text from the current directory
 | 
			
		||||
        keyword_length = 6;
 | 
			
		||||
        max_item_count = 10;
 | 
			
		||||
        option = { additional_arguments = "--ignore-case"; };
 | 
			
		||||
        option = {
 | 
			
		||||
          additional_arguments = "--ignore-case";
 | 
			
		||||
        };
 | 
			
		||||
      }
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
    # Styling of the completion menu
 | 
			
		||||
    formatting = {
 | 
			
		||||
      fields = [ "kind" "abbr" "menu" ];
 | 
			
		||||
      fields = [
 | 
			
		||||
        "kind"
 | 
			
		||||
        "abbr"
 | 
			
		||||
        "menu"
 | 
			
		||||
      ];
 | 
			
		||||
      format = dsl.rawLua ''
 | 
			
		||||
        function(entry, vim_item)
 | 
			
		||||
            local kind_icons = {
 | 
			
		||||
@@ -125,19 +126,46 @@
 | 
			
		||||
      native_menu = false; # Use cmp menu instead of Vim menu
 | 
			
		||||
      ghost_text = true; # Show preview auto-completion
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  lua = ''
 | 
			
		||||
    -- Use buffer source for `/`
 | 
			
		||||
    require('cmp').setup.cmdline("/", {
 | 
			
		||||
        sources = {
 | 
			
		||||
            { name = "buffer", keyword_length = 5 },
 | 
			
		||||
        mapping = {
 | 
			
		||||
            ['<C-n>'] = {
 | 
			
		||||
                c = require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Insert }, { 'i', 'c' })
 | 
			
		||||
            },
 | 
			
		||||
            ['<C-p>'] = {
 | 
			
		||||
                c = require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Insert }, { 'i', 'c' })
 | 
			
		||||
            },
 | 
			
		||||
            ['<C-y>'] = {
 | 
			
		||||
                c = require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Insert, select = true, }, { 'i', 'c' })
 | 
			
		||||
            },
 | 
			
		||||
            ['<C-r>'] = {
 | 
			
		||||
                c = require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, }, { 'i', 'c' })
 | 
			
		||||
            },
 | 
			
		||||
        },
 | 
			
		||||
        sources = require('cmp').config.sources({
 | 
			
		||||
            { name = "buffer", keyword_length = 5 },
 | 
			
		||||
        }),
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    -- Use cmdline & path source for ':'
 | 
			
		||||
    require('cmp').setup.cmdline(":", {
 | 
			
		||||
        mapping = {
 | 
			
		||||
            ['<C-n>'] = {
 | 
			
		||||
                c = require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Insert }, { 'i', 'c' })
 | 
			
		||||
            },
 | 
			
		||||
            ['<C-p>'] = {
 | 
			
		||||
                c = require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Insert }, { 'i', 'c' })
 | 
			
		||||
            },
 | 
			
		||||
            ['<C-y>'] = {
 | 
			
		||||
                c = require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Insert, select = true, }, { 'i', 'c' })
 | 
			
		||||
            },
 | 
			
		||||
            ['<C-r>'] = {
 | 
			
		||||
                c = require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, }, { 'i', 'c' })
 | 
			
		||||
            },
 | 
			
		||||
        },
 | 
			
		||||
        sources = require('cmp').config.sources({
 | 
			
		||||
            { name = "path" },
 | 
			
		||||
        }, {
 | 
			
		||||
@@ -145,5 +173,4 @@
 | 
			
		||||
        }),
 | 
			
		||||
    })
 | 
			
		||||
  '';
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -2,8 +2,11 @@
 | 
			
		||||
vim.keymap.set("n", "<Leader>gr", ":!gh browse %<CR><CR>", { silent = true })
 | 
			
		||||
 | 
			
		||||
-- Pop a terminal to watch the current run
 | 
			
		||||
local gitwatch =
 | 
			
		||||
    require("toggleterm.terminal").Terminal:new({ cmd = "fish --interactive --init-command 'gh run watch'" })
 | 
			
		||||
local gitwatch = require("toggleterm.terminal").Terminal:new({
 | 
			
		||||
    cmd = "fish --interactive --init-command 'gh run watch'",
 | 
			
		||||
    hidden = true,
 | 
			
		||||
    direction = "float",
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
-- Set a toggle for this terminal
 | 
			
		||||
function GITWATCH_TOGGLE()
 | 
			
		||||
@@ -11,4 +14,4 @@ function GITWATCH_TOGGLE()
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
-- Keymap to toggle the run
 | 
			
		||||
vim.keymap.set("n", "<Leader>gw", GITWATCH_TOGGLE)
 | 
			
		||||
vim.keymap.set("n", "<Leader>W", GITWATCH_TOGGLE)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
{ pkgs, ... }: {
 | 
			
		||||
{ pkgs, ... }:
 | 
			
		||||
{
 | 
			
		||||
  plugins = [ pkgs.vimPlugins.gitsigns-nvim ];
 | 
			
		||||
  setup.gitsigns = { };
 | 
			
		||||
  lua = builtins.readFile ./gitsigns.lua;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,110 +1,138 @@
 | 
			
		||||
{ pkgs, lib, config, dsl, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  config,
 | 
			
		||||
  dsl,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  # Terraform optional because non-free
 | 
			
		||||
  options.terraform = lib.mkEnableOption "Whether to enable Terraform LSP";
 | 
			
		||||
  options.github = lib.mkEnableOption "Whether to enable GitHub features";
 | 
			
		||||
  options.kubernetes =
 | 
			
		||||
    lib.mkEnableOption "Whether to enable Kubernetes features";
 | 
			
		||||
  options.kubernetes = lib.mkEnableOption "Whether to enable Kubernetes features";
 | 
			
		||||
 | 
			
		||||
  config =
 | 
			
		||||
 | 
			
		||||
    let
 | 
			
		||||
 | 
			
		||||
      terraformFormat = if config.terraform then ''
 | 
			
		||||
        require("null-ls").builtins.formatting.terraform_fmt.with({
 | 
			
		||||
            command = "${pkgs.terraform}/bin/terraform",
 | 
			
		||||
            extra_filetypes = { "hcl" },
 | 
			
		||||
        }),
 | 
			
		||||
      '' else
 | 
			
		||||
        "";
 | 
			
		||||
 | 
			
		||||
    in {
 | 
			
		||||
  config = {
 | 
			
		||||
    plugins = [
 | 
			
		||||
      pkgs.vimPlugins.nvim-lspconfig
 | 
			
		||||
        pkgs.vimPlugins.null-ls-nvim
 | 
			
		||||
      pkgs.vimPlugins.conform-nvim
 | 
			
		||||
      pkgs.vimPlugins.fidget-nvim
 | 
			
		||||
      pkgs.vimPlugins.nvim-lint
 | 
			
		||||
      pkgs.vimPlugins.vim-table-mode
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
    setup.fidget = { };
 | 
			
		||||
 | 
			
		||||
    use.lspconfig.lua_ls.setup = dsl.callWith {
 | 
			
		||||
        settings = { Lua = { diagnostics = { globals = [ "vim" "hs" ]; }; }; };
 | 
			
		||||
        capabilities =
 | 
			
		||||
          dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
 | 
			
		||||
      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.nixd.setup = dsl.callWith {
 | 
			
		||||
      cmd = [ "${pkgs.nixd}/bin/nixd" ];
 | 
			
		||||
      capabilities = dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    use.lspconfig.pyright.setup = dsl.callWith {
 | 
			
		||||
        cmd = [ "${pkgs.pyright}/bin/pyright-langserver" "--stdio" ];
 | 
			
		||||
      cmd = [
 | 
			
		||||
        "${pkgs.pyright}/bin/pyright-langserver"
 | 
			
		||||
        "--stdio"
 | 
			
		||||
      ];
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    use.lspconfig.terraformls.setup = dsl.callWith {
 | 
			
		||||
        cmd = if config.terraform then [
 | 
			
		||||
      cmd =
 | 
			
		||||
        if config.terraform then
 | 
			
		||||
          [
 | 
			
		||||
            "${pkgs.terraform-ls}/bin/terraform-ls"
 | 
			
		||||
            "serve"
 | 
			
		||||
        ] else
 | 
			
		||||
          ]
 | 
			
		||||
        else
 | 
			
		||||
          [ "echo" ];
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    use.lspconfig.rust_analyzer.setup = dsl.callWith {
 | 
			
		||||
      cmd = [ "${pkgs.rust-analyzer}/bin/rust-analyzer" ];
 | 
			
		||||
      settings = {
 | 
			
		||||
          "['rust-analyzer']" = { check = { command = "clippy"; }; };
 | 
			
		||||
        "['rust-analyzer']" = {
 | 
			
		||||
          check = {
 | 
			
		||||
            command = "clippy";
 | 
			
		||||
          };
 | 
			
		||||
          files = {
 | 
			
		||||
            excludeDirs = [ ".direnv" ];
 | 
			
		||||
          };
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
      vim.api.nvim_create_augroup = dsl.callWith [ "LspFormatting" { } ];
 | 
			
		||||
    setup.conform = {
 | 
			
		||||
      format_on_save = {
 | 
			
		||||
        # These options will be passed to conform.format()
 | 
			
		||||
        timeout_ms = 1500;
 | 
			
		||||
        lsp_fallback = true;
 | 
			
		||||
      };
 | 
			
		||||
      formatters_by_ft = {
 | 
			
		||||
        lua = [ "stylua" ];
 | 
			
		||||
        python = [ "black" ];
 | 
			
		||||
        fish = [ "fish_indent" ];
 | 
			
		||||
        nix = [ "nixfmt" ];
 | 
			
		||||
        rust = [ "rustfmt" ];
 | 
			
		||||
        sh = [ "shfmt" ];
 | 
			
		||||
        terraform = if config.terraform then [ "terraform_fmt" ] else [ ];
 | 
			
		||||
        hcl = [ "hcl" ];
 | 
			
		||||
      };
 | 
			
		||||
      formatters = {
 | 
			
		||||
        lua.command = "${pkgs.stylua}/bin/stylua";
 | 
			
		||||
        black.command = "${pkgs.black}/bin/black";
 | 
			
		||||
        fish_indent.command = "${pkgs.fish}/bin/fish_indent";
 | 
			
		||||
        nixfmt.command = "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
 | 
			
		||||
        rustfmt.command = "${pkgs.rustfmt}/bin/rustfmt";
 | 
			
		||||
        shfmt = {
 | 
			
		||||
          command = "${pkgs.shfmt}/bin/shfmt";
 | 
			
		||||
          prepend_args = [
 | 
			
		||||
            "-i"
 | 
			
		||||
            "4"
 | 
			
		||||
            "-ci"
 | 
			
		||||
          ];
 | 
			
		||||
        };
 | 
			
		||||
        terraform_fmt.command = if config.terraform then "${pkgs.terraform}/bin/terraform" else "";
 | 
			
		||||
        hcl.command = "${pkgs.hclfmt}/bin/hclfmt";
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    use.lint = {
 | 
			
		||||
      linters_by_ft = dsl.toTable {
 | 
			
		||||
        python = [ "ruff" ];
 | 
			
		||||
        sh = [ "shellcheck" ];
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    vim.api.nvim_create_autocmd = dsl.callWith [
 | 
			
		||||
      (dsl.toTable [
 | 
			
		||||
        "BufEnter"
 | 
			
		||||
        "BufWritePost"
 | 
			
		||||
      ])
 | 
			
		||||
      (dsl.rawLua "{ callback = function() require('lint').try_lint() end }")
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
    lua = ''
 | 
			
		||||
      ${builtins.readFile ./lsp.lua}
 | 
			
		||||
 | 
			
		||||
      local ruff = require('lint').linters.ruff; ruff.cmd = "${pkgs.ruff}/bin/ruff"
 | 
			
		||||
      local shellcheck = require('lint').linters.shellcheck; shellcheck.cmd = "${pkgs.shellcheck}/bin/shellcheck"
 | 
			
		||||
 | 
			
		||||
      -- 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" },
 | 
			
		||||
                }),
 | 
			
		||||
                ${terraformFormat}
 | 
			
		||||
            },
 | 
			
		||||
 | 
			
		||||
            on_attach = function(client, bufnr)
 | 
			
		||||
                if client.supports_method("textDocument/formatting") then
 | 
			
		||||
                    -- Auto-format on save
 | 
			
		||||
                    vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
 | 
			
		||||
                    vim.api.nvim_create_autocmd("BufWritePre", {
 | 
			
		||||
                        group = augroup,
 | 
			
		||||
                        buffer = bufnr,
 | 
			
		||||
                        callback = function()
 | 
			
		||||
                            vim.lsp.buf.format({ bufnr = bufnr })
 | 
			
		||||
                        end,
 | 
			
		||||
                    })
 | 
			
		||||
                    -- Use internal formatting for bindings like gq.
 | 
			
		||||
                    vim.api.nvim_create_autocmd("LspAttach", {
 | 
			
		||||
                        callback = function(args)
 | 
			
		||||
                            vim.bo[args.buf].formatexpr = nil
 | 
			
		||||
                        end,
 | 
			
		||||
                    })
 | 
			
		||||
                end
 | 
			
		||||
            end,
 | 
			
		||||
        })
 | 
			
		||||
    '';
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,22 +1,28 @@
 | 
			
		||||
{ pkgs, dsl, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  pkgs,
 | 
			
		||||
  dsl,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
  plugins = [
 | 
			
		||||
    pkgs.vimPlugins.vim-surround # Keybinds for surround characters
 | 
			
		||||
    pkgs.vimPlugins.vim-eunuch # File manipulation commands
 | 
			
		||||
    pkgs.vimPlugins.vim-fugitive # Git commands
 | 
			
		||||
    pkgs.vimPlugins.vim-repeat # Better repeat using .
 | 
			
		||||
    pkgs.vimPlugins.comment-nvim # Smart comment commands
 | 
			
		||||
    pkgs.vimPlugins.glow-nvim # Markdown preview popup
 | 
			
		||||
    pkgs.vimPlugins.markview-nvim # Markdown preview
 | 
			
		||||
    pkgs.vimPlugins.nvim-colorizer-lua # Hex color previews
 | 
			
		||||
    pkgs.vimPlugins.which-key-nvim # Keybind helper
 | 
			
		||||
    pkgs.kitty-scrollback-nvim # Scrollback pager for kitty
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  # Initialize some plugins
 | 
			
		||||
  setup.Comment = { };
 | 
			
		||||
  setup.colorizer = { user_default_options = { names = false; }; };
 | 
			
		||||
  setup.glow = { };
 | 
			
		||||
  setup.colorizer = {
 | 
			
		||||
    user_default_options = {
 | 
			
		||||
      names = false;
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
  setup.markview = { };
 | 
			
		||||
  setup.which-key = { };
 | 
			
		||||
  setup.kitty-scrollback = { };
 | 
			
		||||
 | 
			
		||||
  vim.o = {
 | 
			
		||||
    termguicolors = true; # Set to truecolor
 | 
			
		||||
@@ -34,7 +40,6 @@
 | 
			
		||||
    scrolloff = 3; # Margin of lines to see while scrolling
 | 
			
		||||
    splitright = true; # Vertical splits on the right side
 | 
			
		||||
    splitbelow = true; # Horizontal splits on the bottom side
 | 
			
		||||
    pastetoggle = "<F3>"; # Use F3 to enter raw paste mode
 | 
			
		||||
    clipboard = "unnamedplus"; # Uses system clipboard for yanking
 | 
			
		||||
    updatetime = 300; # Faster diagnostics
 | 
			
		||||
    mouse = "nv"; # Mouse interaction / scrolling
 | 
			
		||||
@@ -54,12 +59,15 @@
 | 
			
		||||
  vim.o.backup = true; # Easier to recover and more secure
 | 
			
		||||
  vim.bo.swapfile = false; # Instead of swaps, create backups
 | 
			
		||||
  vim.bo.undofile = true; # Keeps undos after quit
 | 
			
		||||
  vim.o.backupdir =
 | 
			
		||||
    dsl.rawLua ''vim.fn.expand("~/.local/state/nvim/backup//")'';
 | 
			
		||||
  vim.o.backupdir = dsl.rawLua ''vim.fn.expand("~/.local/state/nvim/backup//")'';
 | 
			
		||||
  vim.o.undodir = dsl.rawLua ''vim.fn.expand("~/.local/state/nvim/undo//")'';
 | 
			
		||||
 | 
			
		||||
  # Required for nvim-cmp completion
 | 
			
		||||
  vim.opt.completeopt = [ "menu" "menuone" "noselect" ];
 | 
			
		||||
  vim.opt.completeopt = [
 | 
			
		||||
    "menu"
 | 
			
		||||
    "menuone"
 | 
			
		||||
    "noselect"
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  lua = lib.mkBefore ''
 | 
			
		||||
    vim.loader.enable()
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
{ pkgs, ... }: {
 | 
			
		||||
{ pkgs, ... }:
 | 
			
		||||
{
 | 
			
		||||
  plugins = [ pkgs.vimPlugins.lualine-nvim ];
 | 
			
		||||
  setup.lualine = {
 | 
			
		||||
    options = {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,9 @@
 | 
			
		||||
{ pkgs, lib, ... }: {
 | 
			
		||||
{ pkgs, lib, ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  plugins = [
 | 
			
		||||
    (pkgs.vimPlugins.nvim-treesitter.withPlugins (_plugins:
 | 
			
		||||
      with pkgs.tree-sitter-grammars; [
 | 
			
		||||
    (pkgs.vimPlugins.nvim-treesitter.withPlugins (
 | 
			
		||||
      _plugins: with pkgs.tree-sitter-grammars; [
 | 
			
		||||
        tree-sitter-bash
 | 
			
		||||
        tree-sitter-c
 | 
			
		||||
        tree-sitter-fish
 | 
			
		||||
@@ -19,13 +20,13 @@
 | 
			
		||||
        tree-sitter-toml
 | 
			
		||||
        tree-sitter-vimdoc
 | 
			
		||||
        tree-sitter-yaml
 | 
			
		||||
      ]))
 | 
			
		||||
      ]
 | 
			
		||||
    ))
 | 
			
		||||
    pkgs.vimPlugins.vim-matchup # Better % jumping in languages
 | 
			
		||||
    pkgs.vimPlugins.playground # Tree-sitter experimenting
 | 
			
		||||
    pkgs.vimPlugins.nginx-vim
 | 
			
		||||
    pkgs.vimPlugins.vim-helm
 | 
			
		||||
    pkgs.baleia-nvim # Clean ANSI from kitty scrollback
 | 
			
		||||
    # pkgs.hmts-nvim # Tree-sitter injections for home-manager
 | 
			
		||||
    # pkgs.vimPlugins.hmts-nvim # Tree-sitter injections for home-manager
 | 
			
		||||
    (pkgs.vimUtils.buildVimPlugin {
 | 
			
		||||
      pname = "nmasur";
 | 
			
		||||
      version = "0.1";
 | 
			
		||||
@@ -34,9 +35,15 @@
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  setup."nvim-treesitter.configs" = {
 | 
			
		||||
    highlight = { enable = true; };
 | 
			
		||||
    indent = { enable = true; };
 | 
			
		||||
    matchup = { enable = true; }; # Uses vim-matchup
 | 
			
		||||
    highlight = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
    };
 | 
			
		||||
    indent = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
    };
 | 
			
		||||
    matchup = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
    }; # Uses vim-matchup
 | 
			
		||||
 | 
			
		||||
    textobjects = {
 | 
			
		||||
      select = {
 | 
			
		||||
@@ -70,5 +77,4 @@
 | 
			
		||||
    -- Use HCL parser with .tf files
 | 
			
		||||
    vim.treesitter.language.register('hcl', 'terraform')
 | 
			
		||||
  '';
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
{ pkgs, dsl, ... }: {
 | 
			
		||||
{ pkgs, dsl, ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  # Telescope is a fuzzy finder that can work with different sub-plugins
 | 
			
		||||
 | 
			
		||||
@@ -20,9 +21,15 @@
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
    pickers = {
 | 
			
		||||
      find_files = { theme = "ivy"; };
 | 
			
		||||
      oldfiles = { theme = "ivy"; };
 | 
			
		||||
      buffers = { theme = "dropdown"; };
 | 
			
		||||
      find_files = {
 | 
			
		||||
        theme = "ivy";
 | 
			
		||||
      };
 | 
			
		||||
      oldfiles = {
 | 
			
		||||
        theme = "ivy";
 | 
			
		||||
      };
 | 
			
		||||
      buffers = {
 | 
			
		||||
        theme = "dropdown";
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
    extensions = {
 | 
			
		||||
      fzy_native = { };
 | 
			
		||||
@@ -33,5 +40,4 @@
 | 
			
		||||
  setup.project_nvim = { };
 | 
			
		||||
 | 
			
		||||
  lua = builtins.readFile ./telescope.lua;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,10 @@
 | 
			
		||||
{ pkgs, dsl, config, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  pkgs,
 | 
			
		||||
  dsl,
 | 
			
		||||
  config,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  # Toggleterm provides a floating terminal inside the editor for quick access
 | 
			
		||||
 | 
			
		||||
@@ -15,5 +21,4 @@
 | 
			
		||||
    ${if config.github then (builtins.readFile ./github.lua) else ""}
 | 
			
		||||
    ${if config.kubernetes then (builtins.readFile ./kubernetes.lua) else ""}
 | 
			
		||||
  '';
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,12 @@
 | 
			
		||||
{ pkgs, dsl, ... }: {
 | 
			
		||||
{ pkgs, dsl, ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  # This plugin creates a side drawer for navigating the current project
 | 
			
		||||
 | 
			
		||||
  plugins = [ pkgs.vimPlugins.nvim-tree-lua pkgs.vimPlugins.nvim-web-devicons ];
 | 
			
		||||
  plugins = [
 | 
			
		||||
    pkgs.vimPlugins.nvim-tree-lua
 | 
			
		||||
    pkgs.vimPlugins.nvim-web-devicons
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  # Disable netrw eagerly
 | 
			
		||||
  # https://github.com/kyazdani42/nvim-tree.lua/commit/fb8735e96cecf004fbefb086ce85371d003c5129
 | 
			
		||||
@@ -16,12 +20,14 @@
 | 
			
		||||
    hijack_netrw = true; # Works as the file manager
 | 
			
		||||
    sync_root_with_cwd = true; # Change project whenever currend dir changes
 | 
			
		||||
    respect_buf_cwd = true; # Change to exact location of focused buffer
 | 
			
		||||
    update_focused_file = { # Change project based on the focused buffer
 | 
			
		||||
    update_focused_file = {
 | 
			
		||||
      # Change project based on the focused buffer
 | 
			
		||||
      enable = true;
 | 
			
		||||
      update_root = true;
 | 
			
		||||
      ignore_list = { };
 | 
			
		||||
    };
 | 
			
		||||
    diagnostics = { # Enable LSP and linter integration
 | 
			
		||||
    diagnostics = {
 | 
			
		||||
      # Enable LSP and linter integration
 | 
			
		||||
      enable = true;
 | 
			
		||||
      icons = {
 | 
			
		||||
        hint = "";
 | 
			
		||||
@@ -30,7 +36,8 @@
 | 
			
		||||
        error = "";
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
    renderer = { # Show files with changes vs. current commit
 | 
			
		||||
    renderer = {
 | 
			
		||||
      # Show files with changes vs. current commit
 | 
			
		||||
      icons = {
 | 
			
		||||
        glyphs = {
 | 
			
		||||
          git = {
 | 
			
		||||
@@ -61,7 +68,8 @@
 | 
			
		||||
        vim.keymap.set('n', 'v', api.node.open.vertical, opts('Open: Vertical Split'))
 | 
			
		||||
      end
 | 
			
		||||
    '';
 | 
			
		||||
    view = { # Set look and feel
 | 
			
		||||
    view = {
 | 
			
		||||
      # Set look and feel
 | 
			
		||||
      width = 30;
 | 
			
		||||
      side = "left";
 | 
			
		||||
      number = false;
 | 
			
		||||
@@ -73,5 +81,4 @@
 | 
			
		||||
  lua = ''
 | 
			
		||||
    vim.keymap.set("n", "<Leader>e", ":NvimTreeFindFileToggle<CR>", { silent = true })
 | 
			
		||||
  '';
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,9 @@
 | 
			
		||||
{ config, pkgs, lib, ... }:
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
 | 
			
		||||
let
 | 
			
		||||
 | 
			
		||||
@@ -9,8 +14,8 @@ let
 | 
			
		||||
    github = true;
 | 
			
		||||
    kubernetes = config.kubernetes.enable;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
in {
 | 
			
		||||
in
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  options.neovim.enable = lib.mkEnableOption "Neovim.";
 | 
			
		||||
 | 
			
		||||
@@ -33,7 +38,9 @@ in {
 | 
			
		||||
 | 
			
		||||
        # Create quick aliases for launching Neovim
 | 
			
		||||
        programs.fish = {
 | 
			
		||||
          shellAliases = { vim = "nvim"; };
 | 
			
		||||
          shellAliases = {
 | 
			
		||||
            vim = "nvim";
 | 
			
		||||
          };
 | 
			
		||||
          shellAbbrs = {
 | 
			
		||||
            v = lib.mkForce "nvim";
 | 
			
		||||
            vl = lib.mkForce "nvim -c 'normal! `0' -c 'bdelete 1'";
 | 
			
		||||
@@ -41,27 +48,20 @@ in {
 | 
			
		||||
          };
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        # Set Neovim as the kitty terminal "scrollback" (vi mode) option.
 | 
			
		||||
        # Requires removing some of the ANSI escape codes that are sent to the
 | 
			
		||||
        # scrollback using sed and baleia, as well as removing several
 | 
			
		||||
        # unnecessary features.
 | 
			
		||||
        programs.kitty.settings.scrollback_pager =
 | 
			
		||||
          "${neovim}/bin/nvim --headless +'KittyScrollbackGenerateKittens' +'set nonumber' +'set norelativenumber' +'%print' +'quit!' 2>&1";
 | 
			
		||||
 | 
			
		||||
        # Create a desktop option for launching Neovim from a file manager
 | 
			
		||||
        # (Requires launching the terminal and then executing Neovim)
 | 
			
		||||
        xdg.desktopEntries.nvim = lib.mkIf pkgs.stdenv.isLinux {
 | 
			
		||||
          name = "Neovim wrapper";
 | 
			
		||||
          exec = "kitty nvim %F";
 | 
			
		||||
          mimeType = [ "text/plain" "text/markdown" ];
 | 
			
		||||
          mimeType = [
 | 
			
		||||
            "text/plain"
 | 
			
		||||
            "text/markdown"
 | 
			
		||||
          ];
 | 
			
		||||
        };
 | 
			
		||||
        xdg.mimeApps.defaultApplications = lib.mkIf pkgs.stdenv.isLinux {
 | 
			
		||||
          "text/plain" = [ "nvim.desktop" ];
 | 
			
		||||
          "text/markdown" = [ "nvim.desktop" ];
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -11,8 +11,20 @@ vim.filetype.add({
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
vim.api.nvim_create_autocmd("FileType", {
 | 
			
		||||
    pattern = "*.eml",
 | 
			
		||||
    pattern = "mail",
 | 
			
		||||
    callback = function()
 | 
			
		||||
        vim.o.wrapmargin = 79 -- Wrap text automatically
 | 
			
		||||
    end,
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
vim.api.nvim_create_autocmd("FileType", {
 | 
			
		||||
    pattern = "markdown",
 | 
			
		||||
    command = "TableModeEnable",
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
vim.api.nvim_create_autocmd("FileType", {
 | 
			
		||||
    pattern = "terraform",
 | 
			
		||||
    callback = function()
 | 
			
		||||
        vim.bo.commentstring = "# %s"
 | 
			
		||||
    end,
 | 
			
		||||
})
 | 
			
		||||
 
 | 
			
		||||
@@ -26,13 +26,25 @@
 | 
			
		||||
#   ] ++ extraConfig;
 | 
			
		||||
# }
 | 
			
		||||
 | 
			
		||||
{ pkgs, colors, terraform ? false, github ? false, kubernetes ? false, ... }:
 | 
			
		||||
{
 | 
			
		||||
  pkgs,
 | 
			
		||||
  colors,
 | 
			
		||||
  terraform ? false,
 | 
			
		||||
  github ? false,
 | 
			
		||||
  kubernetes ? false,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
 | 
			
		||||
# Comes from nix2vim overlay:
 | 
			
		||||
# https://github.com/gytis-ivaskevicius/nix2vim/blob/master/lib/neovim-builder.nix
 | 
			
		||||
pkgs.neovimBuilder {
 | 
			
		||||
  package = pkgs.neovim-unwrapped;
 | 
			
		||||
  inherit colors terraform github kubernetes;
 | 
			
		||||
  inherit
 | 
			
		||||
    colors
 | 
			
		||||
    terraform
 | 
			
		||||
    github
 | 
			
		||||
    kubernetes
 | 
			
		||||
    ;
 | 
			
		||||
  imports = [
 | 
			
		||||
    ../config/align.nix
 | 
			
		||||
    ../config/bufferline.nix
 | 
			
		||||
 
 | 
			
		||||
@@ -1,13 +1,12 @@
 | 
			
		||||
{ ... }: {
 | 
			
		||||
{ ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  imports = [
 | 
			
		||||
    ./haskell.nix
 | 
			
		||||
    ./kubernetes.nix
 | 
			
		||||
    ./lua.nix
 | 
			
		||||
    ./nix.nix
 | 
			
		||||
    ./python.nix
 | 
			
		||||
    ./rust.nix
 | 
			
		||||
    ./terraform.nix
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,14 +1,12 @@
 | 
			
		||||
{ config, lib, ... }: {
 | 
			
		||||
{ 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.trusted-public-keys = [ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ];
 | 
			
		||||
    nix.settings.substituters = [ "https://cache.iog.io" ];
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,10 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  options.kubernetes.enable = lib.mkEnableOption "Kubernetes tools.";
 | 
			
		||||
 | 
			
		||||
@@ -99,12 +105,16 @@
 | 
			
		||||
              views = {
 | 
			
		||||
                charts = {
 | 
			
		||||
                  bgColor = "default";
 | 
			
		||||
                  defaultDialColors =
 | 
			
		||||
                    [ config.theme.colors.base0D config.theme.colors.base08 ];
 | 
			
		||||
                  defaultDialColors = [
 | 
			
		||||
                    config.theme.colors.base0D
 | 
			
		||||
                    config.theme.colors.base08
 | 
			
		||||
                  ];
 | 
			
		||||
                  # - *blue
 | 
			
		||||
                  # - *red
 | 
			
		||||
                  defaultChartColors =
 | 
			
		||||
                    [ config.theme.colors.base0D config.theme.colors.base08 ];
 | 
			
		||||
                  defaultChartColors = [
 | 
			
		||||
                    config.theme.colors.base0D
 | 
			
		||||
                    config.theme.colors.base08
 | 
			
		||||
                  ];
 | 
			
		||||
                  # - *blue
 | 
			
		||||
                  # - *red
 | 
			
		||||
                };
 | 
			
		||||
@@ -149,9 +159,6 @@
 | 
			
		||||
          };
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,10 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  options.lua.enable = lib.mkEnableOption "Lua programming language.";
 | 
			
		||||
 | 
			
		||||
@@ -8,5 +14,4 @@
 | 
			
		||||
      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,4 +1,10 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  options.python.enable = lib.mkEnableOption "Python programming language.";
 | 
			
		||||
 | 
			
		||||
@@ -8,15 +14,14 @@
 | 
			
		||||
 | 
			
		||||
      home.packages = with pkgs; [
 | 
			
		||||
        # python310 # Standard Python interpreter
 | 
			
		||||
        nodePackages.pyright # Python language server
 | 
			
		||||
        pyright # Python language server
 | 
			
		||||
        black # Python formatter
 | 
			
		||||
        python310Packages.flake8 # Python linter
 | 
			
		||||
      ];
 | 
			
		||||
 | 
			
		||||
      programs.fish.shellAbbrs = { py = "python3"; };
 | 
			
		||||
 | 
			
		||||
      programs.fish.shellAbbrs = {
 | 
			
		||||
        py = "python3";
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,10 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  options.rust.enable = lib.mkEnableOption "Rust programming language.";
 | 
			
		||||
 | 
			
		||||
@@ -6,12 +12,16 @@
 | 
			
		||||
 | 
			
		||||
    home-manager.users.${config.user} = {
 | 
			
		||||
 | 
			
		||||
      programs.fish.shellAbbrs = { ca = "cargo"; };
 | 
			
		||||
 | 
			
		||||
      home.packages = with pkgs; [ cargo rustc clippy gcc ];
 | 
			
		||||
 | 
			
		||||
      programs.fish.shellAbbrs = {
 | 
			
		||||
        ca = "cargo";
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      home.packages = with pkgs; [
 | 
			
		||||
        cargo
 | 
			
		||||
        rustc
 | 
			
		||||
        clippy
 | 
			
		||||
        gcc
 | 
			
		||||
      ];
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,10 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  options.terraform.enable = lib.mkEnableOption "Terraform tools.";
 | 
			
		||||
 | 
			
		||||
@@ -15,9 +21,6 @@
 | 
			
		||||
        terraform-ls # Language server
 | 
			
		||||
        tflint # Linter
 | 
			
		||||
      ];
 | 
			
		||||
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,8 @@
 | 
			
		||||
{ ... }: {
 | 
			
		||||
 | 
			
		||||
  imports = [ ./dotfiles.nix ./notes.nix ];
 | 
			
		||||
{ ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  imports = [
 | 
			
		||||
    ./dotfiles.nix
 | 
			
		||||
    ./notes.nix
 | 
			
		||||
  ];
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,10 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  # Allows me to make sure I can work on my dotfiles locally
 | 
			
		||||
 | 
			
		||||
@@ -11,23 +17,17 @@
 | 
			
		||||
      home.activation = {
 | 
			
		||||
 | 
			
		||||
        # Always clone dotfiles repository if it doesn't exist
 | 
			
		||||
        cloneDotfiles =
 | 
			
		||||
          config.home-manager.users.${config.user}.lib.dag.entryAfter
 | 
			
		||||
          [ "writeBoundary" ] ''
 | 
			
		||||
        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,4 +1,10 @@
 | 
			
		||||
{ config, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  # This is just a placeholder as I expect to interact with my notes in a
 | 
			
		||||
  # certain location
 | 
			
		||||
@@ -9,6 +15,22 @@
 | 
			
		||||
      NOTES_PATH = "${config.homePath}/dev/personal/notes/content";
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    # Sync notes for Nextcloud automatically
 | 
			
		||||
    systemd.user.timers.refresh-notes = lib.mkIf config.services.nextcloud.enable {
 | 
			
		||||
      Timer = {
 | 
			
		||||
        OnCalendar = "*-*-* *:0/10:50"; # Every 10 minutes
 | 
			
		||||
        Unit = "refresh-notes.service";
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
    systemd.user.services.refresh-notes = {
 | 
			
		||||
      Unit.Description = "Get latest notes.";
 | 
			
		||||
      Service = {
 | 
			
		||||
        Type = "oneshot";
 | 
			
		||||
        ExecStartPre = "${pkgs.git}/bin/git -C /data/git/notes reset --hard master";
 | 
			
		||||
        ExecStart = "${pkgs.git}/bin/git -C /data/git/notes pull";
 | 
			
		||||
        WorkingDirectory = config.homePath;
 | 
			
		||||
        Environment = "PATH=${pkgs.openssh}/bin";
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
{ config, lib, ... }: {
 | 
			
		||||
{ config, lib, ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  # Shell history sync
 | 
			
		||||
 | 
			
		||||
@@ -10,7 +11,10 @@
 | 
			
		||||
 | 
			
		||||
      programs.atuin = {
 | 
			
		||||
        enable = true;
 | 
			
		||||
        flags = [ "--disable-up-arrow" "--disable-ctrl-r" ];
 | 
			
		||||
        flags = [
 | 
			
		||||
          "--disable-up-arrow"
 | 
			
		||||
          "--disable-ctrl-r"
 | 
			
		||||
        ];
 | 
			
		||||
        settings = {
 | 
			
		||||
          auto_sync = true;
 | 
			
		||||
          update_check = false;
 | 
			
		||||
@@ -27,13 +31,9 @@
 | 
			
		||||
          keymap_mode = "vim-normal";
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    # Give root user the same setup
 | 
			
		||||
    home-manager.users.root.programs.atuin =
 | 
			
		||||
      config.home-manager.users.${config.user}.programs.atuin;
 | 
			
		||||
 | 
			
		||||
    home-manager.users.root.programs.atuin = config.home-manager.users.${config.user}.programs.atuin;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,12 +1,17 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  config = {
 | 
			
		||||
    home-manager.users.${config.user} = {
 | 
			
		||||
 | 
			
		||||
      programs.bash = {
 | 
			
		||||
        enable = true;
 | 
			
		||||
        shellAliases =
 | 
			
		||||
          config.home-manager.users.${config.user}.programs.fish.shellAliases;
 | 
			
		||||
        shellAliases = config.home-manager.users.${config.user}.programs.fish.shellAliases;
 | 
			
		||||
        initExtra = "";
 | 
			
		||||
        profileExtra = "";
 | 
			
		||||
      };
 | 
			
		||||
@@ -14,7 +19,6 @@
 | 
			
		||||
      programs.starship.enableBashIntegration = false;
 | 
			
		||||
      programs.zoxide.enableBashIntegration = true;
 | 
			
		||||
      programs.fzf.enableBashIntegration = true;
 | 
			
		||||
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										22
									
								
								modules/common/shell/bash/scripts/aws-ec2.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										22
									
								
								modules/common/shell/bash/scripts/aws-ec2.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# Retrieve list of AWS instances
 | 
			
		||||
# Use enter to jump into their sessions with SSM
 | 
			
		||||
 | 
			
		||||
# Specify AWS_PROFILE and AWS_REGION before running this script
 | 
			
		||||
 | 
			
		||||
aws ec2 describe-instances \
 | 
			
		||||
    --filters "Name=instance-state-name,Values=running" |
 | 
			
		||||
    jq -r \
 | 
			
		||||
        '.Reservations[]
 | 
			
		||||
        | .Instances[]
 | 
			
		||||
        | .InstanceId + " - " +
 | 
			
		||||
        (.PrivateIpAddress // "n/a") + " - " +
 | 
			
		||||
        (.PublicIpAddress // "n/a") + " - " +
 | 
			
		||||
        (.Tags // [] | from_entries | .Name // "n/a")' |
 | 
			
		||||
    fzf \
 | 
			
		||||
        --height 100% \
 | 
			
		||||
        --layout reverse \
 | 
			
		||||
        --header $'Press Enter to start SSM session\nInstance ID - Private IP - Public IP - Name' \
 | 
			
		||||
        --preview "aws ec2 describe-instances --instance-ids \"\$(echo {} | cut -d' ' -f1)\" | jq -r '.Reservations[].Instances[0]'" \
 | 
			
		||||
        --bind "enter:become(aws ssm start-session --target \$(echo {} | cut -d' ' -f1))"
 | 
			
		||||
@@ -31,6 +31,10 @@ STATUS=$?
 | 
			
		||||
# because tesseract adds .txt to the given file path anyways. So if we were to
 | 
			
		||||
# specify /tmp/ocr.txt as the file path, tesseract would out the text to
 | 
			
		||||
# /tmp/ocr.txt.txt
 | 
			
		||||
cd /tmp || {
 | 
			
		||||
    echo "Failed to jump to directory."
 | 
			
		||||
    exit 1
 | 
			
		||||
}
 | 
			
		||||
tesseract "$IMAGE_FILE" "${TEXT_FILE//\.txt/}"
 | 
			
		||||
 | 
			
		||||
# Check if the text was detected by checking number
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										54
									
								
								modules/common/shell/bash/scripts/terraform-init.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										54
									
								
								modules/common/shell/bash/scripts/terraform-init.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,54 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
export AWS_PROFILE="gs"
 | 
			
		||||
 | 
			
		||||
BUCKET_NAME_PART_1="t2"
 | 
			
		||||
BUCKET_NAME_PART_2="global"
 | 
			
		||||
BUCKET_NAME_PART_3="terraformstate"
 | 
			
		||||
 | 
			
		||||
WORKFLOW_FILE=".github/workflows/terraform.yml"
 | 
			
		||||
 | 
			
		||||
if [ ! -f $WORKFLOW_FILE ]; then
 | 
			
		||||
    WORKFLOW_FILE=".github/workflows/apply.yml"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
AWS_ACCOUNT_NUMBER=$(
 | 
			
		||||
    awk '/aws_account_number: .*/ {print $2}' $WORKFLOW_FILE | # Grab account number
 | 
			
		||||
        echo "$(
 | 
			
		||||
            read -r s
 | 
			
		||||
            s=${s//\'/}
 | 
			
		||||
            echo "$s"
 | 
			
		||||
        )" # Remove single quote if it exists
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
if [ -z "${AWS_ACCOUNT_NUMBER}" ]; then
 | 
			
		||||
    AWS_ACCOUNT_NUMBER=$(
 | 
			
		||||
        awk '/AWS_ACCOUNT_NUMBER: .*/ {print $2}' $WORKFLOW_FILE | # Grab account number
 | 
			
		||||
            echo "$(
 | 
			
		||||
                read -r s
 | 
			
		||||
                s=${s//\'/}
 | 
			
		||||
                echo "$s"
 | 
			
		||||
            )" # Remove single quote if it exists
 | 
			
		||||
    )
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
REPOSITORY=$(
 | 
			
		||||
    git remote get-url origin |
 | 
			
		||||
        awk -F'/' -v OFS='/' '{print $(NF-1),$NF }' |
 | 
			
		||||
        echo "$(
 | 
			
		||||
            read -r s
 | 
			
		||||
            s=${s%.git}
 | 
			
		||||
            echo "$s"
 | 
			
		||||
        )" # Remove .git suffix if it exists
 | 
			
		||||
)
 | 
			
		||||
BRANCH=$(git branch --show-current)
 | 
			
		||||
 | 
			
		||||
terraform init \
 | 
			
		||||
    -backend-config="region=us-east-1" \
 | 
			
		||||
    -backend-config="bucket=${BUCKET_NAME_PART_1}${BUCKET_NAME_PART_2}${BUCKET_NAME_PART_3}" \
 | 
			
		||||
    -backend-config="workspace_key_prefix=accounts/${AWS_ACCOUNT_NUMBER}/${REPOSITORY}" \
 | 
			
		||||
    -backend-config="key=state.tfstate" \
 | 
			
		||||
    -backend-config="dynamodb_table=global-tf-state-lock" \
 | 
			
		||||
    -upgrade
 | 
			
		||||
 | 
			
		||||
terraform workspace select "$BRANCH"
 | 
			
		||||
@@ -1,4 +1,10 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  # Convenience utilities from charm.sh
 | 
			
		||||
 | 
			
		||||
@@ -12,7 +18,5 @@
 | 
			
		||||
      charm # Manage account and filesystem
 | 
			
		||||
      pop # Send emails from a TUI
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
{ ... }: {
 | 
			
		||||
{ ... }:
 | 
			
		||||
{
 | 
			
		||||
  imports = [
 | 
			
		||||
    ./atuin.nix
 | 
			
		||||
    ./bash
 | 
			
		||||
@@ -12,5 +13,6 @@
 | 
			
		||||
    ./nixpkgs.nix
 | 
			
		||||
    ./starship.nix
 | 
			
		||||
    ./utilities.nix
 | 
			
		||||
    ./work.nix
 | 
			
		||||
  ];
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,15 @@
 | 
			
		||||
{ config, ... }: {
 | 
			
		||||
{ 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 ]; }; };
 | 
			
		||||
    config = {
 | 
			
		||||
      whitelist = {
 | 
			
		||||
        prefix = [ config.dotfilesPath ];
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  # programs.direnv.direnvrcExtra = ''
 | 
			
		||||
@@ -28,5 +33,4 @@
 | 
			
		||||
    keep-outputs = true
 | 
			
		||||
    keep-derivations = true
 | 
			
		||||
  '';
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,10 @@
 | 
			
		||||
{ config, pkgs, lib, ... }: {
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  users.users.${config.user}.shell = pkgs.fish;
 | 
			
		||||
  programs.fish.enable = true; # Needed for LightDM to remember username
 | 
			
		||||
@@ -46,7 +52,9 @@
 | 
			
		||||
        fish_user_key_bindings = {
 | 
			
		||||
          body = builtins.readFile ./functions/fish_user_key_bindings.fish;
 | 
			
		||||
        };
 | 
			
		||||
        ip = { body = builtins.readFile ./functions/ip.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
 | 
			
		||||
@@ -112,8 +120,7 @@
 | 
			
		||||
        moon = "curl wttr.in/Moon";
 | 
			
		||||
 | 
			
		||||
        # Cheat Sheets
 | 
			
		||||
        ssl =
 | 
			
		||||
          "openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr";
 | 
			
		||||
        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)";
 | 
			
		||||
@@ -122,7 +129,6 @@
 | 
			
		||||
        dc = "$DOTS/bin/docker_cleanup";
 | 
			
		||||
        dr = "docker run --rm -it";
 | 
			
		||||
        db = "docker build . -t";
 | 
			
		||||
 | 
			
		||||
      };
 | 
			
		||||
      shellInit = "";
 | 
			
		||||
    };
 | 
			
		||||
@@ -132,6 +138,5 @@
 | 
			
		||||
    programs.starship.enableFishIntegration = true;
 | 
			
		||||
    programs.zoxide.enableFishIntegration = true;
 | 
			
		||||
    programs.fzf.enableFishIntegration = true;
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -18,5 +18,5 @@ 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
 | 
			
		||||
bind -M insert \ch _atuin_search --filter-mode global
 | 
			
		||||
bind -M default \ch _atuin_search --filter-mode global
 | 
			
		||||
bind -M insert \ch '_atuin_search --filter-mode global'
 | 
			
		||||
bind -M default \ch '_atuin_search --filter-mode global'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
{ config, pkgs, ... }: {
 | 
			
		||||
{ config, pkgs, ... }:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  # FZF is a fuzzy-finder for the terminal
 | 
			
		||||
 | 
			
		||||
@@ -25,17 +26,20 @@
 | 
			
		||||
          '';
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
      shellAbbrs = { lsf = "ls -lh | fzf"; };
 | 
			
		||||
      shellAbbrs = {
 | 
			
		||||
        lsf = "ls -lh | fzf";
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    # Global fzf configuration
 | 
			
		||||
    home.sessionVariables = let fzfCommand = "fd --type file";
 | 
			
		||||
    in {
 | 
			
		||||
    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,8 +1,14 @@
 | 
			
		||||
{ config, pkgs, lib, ... }:
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
 | 
			
		||||
let home-packages = config.home-manager.users.${config.user}.home.packages;
 | 
			
		||||
 | 
			
		||||
in {
 | 
			
		||||
let
 | 
			
		||||
  home-packages = config.home-manager.users.${config.user}.home.packages;
 | 
			
		||||
in
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  options = {
 | 
			
		||||
    gitName = lib.mkOption {
 | 
			
		||||
@@ -28,25 +34,60 @@ in {
 | 
			
		||||
        userName = config.gitName;
 | 
			
		||||
        userEmail = config.gitEmail;
 | 
			
		||||
        extraConfig = {
 | 
			
		||||
          pager = { branch = "false"; };
 | 
			
		||||
          safe = { directory = config.dotfilesPath; };
 | 
			
		||||
          pull = { ff = "only"; };
 | 
			
		||||
          push = { autoSetupRemote = "true"; };
 | 
			
		||||
          init = { defaultBranch = "master"; };
 | 
			
		||||
          core.pager = "${pkgs.git}/share/git/contrib/diff-highlight/diff-highlight | less -F";
 | 
			
		||||
          interactive.difffilter = "${pkgs.git}/share/git/contrib/diff-highlight/diff-highlight";
 | 
			
		||||
          pager = {
 | 
			
		||||
            branch = "false";
 | 
			
		||||
          };
 | 
			
		||||
        ignores = [ ".direnv/**" "result" ];
 | 
			
		||||
        includes = [{
 | 
			
		||||
          safe = {
 | 
			
		||||
            directory = config.dotfilesPath;
 | 
			
		||||
          };
 | 
			
		||||
          pull = {
 | 
			
		||||
            ff = "only";
 | 
			
		||||
          };
 | 
			
		||||
          push = {
 | 
			
		||||
            autoSetupRemote = "true";
 | 
			
		||||
          };
 | 
			
		||||
          init = {
 | 
			
		||||
            defaultBranch = "master";
 | 
			
		||||
          };
 | 
			
		||||
          rebase = {
 | 
			
		||||
            autosquash = "true";
 | 
			
		||||
          };
 | 
			
		||||
          gpg = {
 | 
			
		||||
            format = "ssh";
 | 
			
		||||
            ssh.allowedSignersFile = "~/.config/git/allowed-signers";
 | 
			
		||||
          };
 | 
			
		||||
          # commit.gpgsign = true;
 | 
			
		||||
          # tag.gpgsign = true;
 | 
			
		||||
        };
 | 
			
		||||
        ignores = [
 | 
			
		||||
          ".direnv/**"
 | 
			
		||||
          "result"
 | 
			
		||||
        ];
 | 
			
		||||
        includes = [
 | 
			
		||||
          {
 | 
			
		||||
            path = "~/.config/git/personal";
 | 
			
		||||
            condition = "gitdir:~/dev/personal/";
 | 
			
		||||
        }];
 | 
			
		||||
          }
 | 
			
		||||
        ];
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      # Personal git config
 | 
			
		||||
      # TODO: fix with variables
 | 
			
		||||
      xdg.configFile."git/personal".text = ''
 | 
			
		||||
        [user]
 | 
			
		||||
            name = "Noah Masur"
 | 
			
		||||
            name = "${config.fullName}"
 | 
			
		||||
            email = "7386960+nmasur@users.noreply.github.com"
 | 
			
		||||
            signingkey = ~/.ssh/id_ed25519
 | 
			
		||||
        [commit]
 | 
			
		||||
            gpgsign = true
 | 
			
		||||
        [tag]
 | 
			
		||||
            gpgsign = true
 | 
			
		||||
      '';
 | 
			
		||||
 | 
			
		||||
      xdg.configFile."git/allowed-signers".text = ''
 | 
			
		||||
        7386960+nmasur@users.noreply.github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s
 | 
			
		||||
      '';
 | 
			
		||||
 | 
			
		||||
      programs.fish.shellAbbrs = {
 | 
			
		||||
@@ -66,8 +107,7 @@ in {
 | 
			
		||||
        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)'';
 | 
			
		||||
        gcom = ''git switch (git symbolic-ref refs/remotes/origin/HEAD | cut -d"/" -f4)'';
 | 
			
		||||
        gcob = "git switch -c";
 | 
			
		||||
        gb = "git branch";
 | 
			
		||||
        gpd = "git push origin -d";
 | 
			
		||||
@@ -81,11 +121,18 @@ in {
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      # Required for fish commands
 | 
			
		||||
      home.packages = with pkgs; [ fish fzf bat ];
 | 
			
		||||
      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; };
 | 
			
		||||
      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;
 | 
			
		||||
            };
 | 
			
		||||
@@ -132,7 +179,5 @@ in {
 | 
			
		||||
            };
 | 
			
		||||
          };
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user