├── .editorconfig
├── .github
├── actions
│ └── setup-nix
│ │ └── action.yml
├── dependabot.yml
└── workflows
│ ├── ci.yml
│ ├── main.yml
│ └── update.yml
├── .gitignore
├── .secretlintrc.json
├── .sops.yaml
├── README.org
├── _sources
├── generated.json
└── generated.nix
├── deploy
├── flake.lock
├── flake.nix
└── script.el
├── flake.lock
├── flake.nix
├── home-manager
├── advanced.nix
├── basic.nix
├── mcp-servers
│ └── default.nix
├── misc
│ ├── default.nix
│ └── nix
│ │ └── default.nix
├── modules
│ ├── default.nix
│ ├── dust
│ │ └── default.nix
│ ├── lnav
│ │ └── default.nix
│ ├── nyxt
│ │ └── default.nix
│ ├── peco
│ │ └── default.nix
│ ├── sops
│ │ └── default.nix
│ ├── tig
│ │ └── default.nix
│ └── wget
│ │ └── default.nix
├── overlay
│ ├── advanced.nix
│ └── basic.nix
├── packages
│ ├── advanced.nix
│ ├── basic.nix
│ └── emacs
│ │ ├── default.nix
│ │ └── epkgs
│ │ ├── default.nix
│ │ └── packages
│ │ ├── ai
│ │ ├── default.nix
│ │ └── packages.nix
│ │ ├── awesome
│ │ ├── default.nix
│ │ └── packages.nix
│ │ ├── buffer
│ │ └── default.nix
│ │ ├── client
│ │ ├── default.nix
│ │ └── packages.nix
│ │ ├── coding
│ │ ├── default.nix
│ │ └── packages.nix
│ │ ├── cursor
│ │ └── default.nix
│ │ ├── dired
│ │ └── default.nix
│ │ ├── elfeed
│ │ └── default.nix
│ │ ├── eshell
│ │ ├── default.nix
│ │ └── packages.nix
│ │ ├── eww
│ │ └── default.nix
│ │ ├── exwm
│ │ └── default.nix
│ │ ├── file
│ │ └── default.nix
│ │ ├── ime
│ │ └── default.nix
│ │ ├── language
│ │ ├── default.nix
│ │ └── packages.nix
│ │ ├── language_specific
│ │ ├── default.nix
│ │ └── packages.nix
│ │ ├── monitor
│ │ ├── default.nix
│ │ └── packages.nix
│ │ ├── org
│ │ ├── default.nix
│ │ └── packages.nix
│ │ ├── project
│ │ └── default.nix
│ │ ├── remote_access
│ │ ├── default.nix
│ │ └── packages.nix
│ │ ├── search
│ │ └── default.nix
│ │ ├── themes
│ │ └── default.nix
│ │ ├── tree-sitter
│ │ └── default.nix
│ │ └── window
│ │ └── default.nix
├── programs
│ ├── advanced.nix
│ ├── basic.nix
│ ├── bat
│ │ └── default.nix
│ ├── bottom
│ │ └── default.nix
│ ├── copilot-language-server
│ │ └── default.nix
│ ├── direnv
│ │ └── default.nix
│ ├── dust
│ │ └── default.nix
│ ├── editorconfig
│ │ └── default.nix
│ ├── emacs
│ │ ├── default.nix
│ │ ├── elisp
│ │ │ ├── early-init.org
│ │ │ └── init.org
│ │ └── misc
│ │ │ ├── mu4e-dashboard.org
│ │ │ └── yasnippet.org
│ ├── eza
│ │ └── default.nix
│ ├── fd
│ │ └── default.nix
│ ├── fish
│ │ ├── completions
│ │ │ ├── actionlint.fish
│ │ │ ├── aws.fish
│ │ │ ├── cdk.fish
│ │ │ ├── clasp.fish
│ │ │ ├── cmigemo.fish
│ │ │ ├── copilot.fish
│ │ │ ├── devbox.fish
│ │ │ ├── ecschedule.fish
│ │ │ ├── ecspresso.fish
│ │ │ ├── guix.fish
│ │ │ ├── mitamae.fish
│ │ │ ├── pass.fish
│ │ │ ├── pod.fish
│ │ │ ├── pry.fish
│ │ │ ├── rain.fish
│ │ │ ├── shellcheck.fish
│ │ │ ├── skylark.fish
│ │ │ ├── solc.fish
│ │ │ ├── tbls.fish
│ │ │ ├── terminal-notifier.fish
│ │ │ ├── tfenv.fish
│ │ │ ├── waypoint.fish
│ │ │ └── zat.fish
│ │ ├── default.nix
│ │ └── functions
│ │ │ ├── calculate_oidc_thumbprint.fish
│ │ │ ├── fish_prompt.fish
│ │ │ ├── fish_user_key_bindings.fish
│ │ │ ├── fzf_ghq.fish
│ │ │ ├── ghq_create.fish
│ │ │ ├── ghq_org_all.fish
│ │ │ ├── ghq_remove.fish
│ │ │ ├── ghq_remove_user.fish
│ │ │ ├── ghq_user_all.fish
│ │ │ ├── ghq_users.fish
│ │ │ ├── gibo_generate.fish
│ │ │ ├── growi_create_page.fish
│ │ │ ├── kill_process.fish
│ │ │ ├── logo.fish
│ │ │ ├── loop.fish
│ │ │ ├── myip.fish
│ │ │ ├── peco_genact.fish
│ │ │ ├── peco_ghq.fish
│ │ │ ├── peco_growi.fish
│ │ │ ├── peco_redmine_my_issue.fish
│ │ │ ├── peco_redmine_search_issue.fish
│ │ │ ├── peco_select_history.fish
│ │ │ ├── prompt_pwd.fish
│ │ │ ├── skylark.fish
│ │ │ └── tmux_attach_session_if_needed.fish
│ ├── fzf
│ │ └── default.nix
│ ├── gh-dash
│ │ └── default.nix
│ ├── gh
│ │ └── default.nix
│ ├── git
│ │ ├── default.nix
│ │ └── message
│ ├── gnupg
│ │ └── default.nix
│ ├── jq
│ │ └── default.nix
│ ├── kitty
│ │ └── default.nix
│ ├── lnav
│ │ ├── default.nix
│ │ └── formats
│ │ │ └── laravel_log.json
│ ├── man
│ │ └── default.nix
│ ├── misc
│ │ ├── config
│ │ │ ├── .chromemacs
│ │ │ ├── .gemrc
│ │ │ ├── cargo_config
│ │ │ ├── composer_config.json
│ │ │ └── sourcekit-lsp.config.json
│ │ └── default.nix
│ ├── mu
│ │ └── default.nix
│ ├── neovim
│ │ ├── default.nix
│ │ ├── init.lua
│ │ └── plugins
│ │ │ ├── basic
│ │ │ ├── default.nix
│ │ │ └── plugins.nix
│ │ │ ├── default.nix
│ │ │ ├── git
│ │ │ ├── default.nix
│ │ │ └── plugins.nix
│ │ │ ├── language
│ │ │ └── default.nix
│ │ │ ├── lsp
│ │ │ └── default.nix
│ │ │ ├── skk
│ │ │ ├── default.nix
│ │ │ └── plugins.nix
│ │ │ ├── telescope
│ │ │ └── default.nix
│ │ │ ├── themes
│ │ │ └── default.nix
│ │ │ └── tree-sitter
│ │ │ └── default.nix
│ ├── nix-index
│ │ └── default.nix
│ ├── nix-init
│ │ └── default.nix
│ ├── nyxt
│ │ ├── config.lisp
│ │ └── default.nix
│ ├── offlineimap
│ │ └── default.nix
│ ├── pandoc
│ │ └── default.nix
│ ├── password-store
│ │ └── default.nix
│ ├── peco
│ │ └── default.nix
│ ├── readline
│ │ └── default.nix
│ ├── ripgrep
│ │ └── default.nix
│ ├── rofi
│ │ ├── default.nix
│ │ └── themes
│ │ │ └── dracula.rasi
│ ├── sketchybar
│ │ ├── default.nix
│ │ ├── plugins
│ │ │ ├── date.sh
│ │ │ ├── power.sh
│ │ │ ├── time.sh
│ │ │ └── window_title.sh
│ │ └── sketchybarrc
│ ├── sops
│ │ └── default.nix
│ ├── ssh
│ │ └── default.nix
│ ├── sway
│ │ ├── config
│ │ ├── config.d
│ │ │ ├── basic.conf
│ │ │ ├── bindkey.conf
│ │ │ ├── input.conf
│ │ │ └── style.conf
│ │ ├── default.nix
│ │ ├── ime.sh
│ │ └── wallpaper.png
│ ├── swaylock
│ │ └── default.nix
│ ├── tig
│ │ └── default.nix
│ ├── tmux
│ │ └── default.nix
│ ├── vim
│ │ └── default.nix
│ ├── waybar
│ │ ├── colors.css
│ │ ├── config
│ │ ├── default.nix
│ │ └── style.css
│ ├── wget
│ │ └── default.nix
│ └── zellij
│ │ └── default.nix
└── services
│ ├── advanced.nix
│ ├── autorandr
│ └── default.nix
│ ├── basic.nix
│ ├── emacs
│ └── default.nix
│ ├── gpg-agent
│ └── default.nix
│ ├── mako
│ └── default.nix
│ ├── nix-gc
│ └── default.nix
│ ├── ollama
│ └── default.nix
│ ├── swayidle
│ └── default.nix
│ ├── swaync
│ └── default.nix
│ └── swayosd
│ └── default.nix
├── hosts
├── OPL2212-2
│ └── default.nix
├── OPPO-A79
│ └── default.nix
└── X13Gen2
│ ├── default.nix
│ └── hardware-configuration.nix
├── nix-darwin
├── config
│ ├── fonts.nix
│ ├── homebrew.nix
│ ├── keyboard.nix
│ ├── networking.nix
│ ├── nix.nix
│ ├── power.nix
│ ├── security.nix
│ ├── services
│ │ ├── aerospace
│ │ │ └── default.nix
│ │ ├── default.nix
│ │ └── sketchybar
│ │ │ └── default.nix
│ ├── startup.nix
│ ├── system.nix
│ └── time.nix
└── default.nix
├── nix-on-droid
└── default.nix
├── nixos
├── config
│ ├── boot.nix
│ ├── fonts.nix
│ ├── hardware.nix
│ ├── i18n.nix
│ ├── networking.nix
│ ├── nix.nix
│ ├── programs.nix
│ ├── security.nix
│ ├── services.nix
│ ├── systemd.nix
│ ├── time.nix
│ ├── users.nix
│ └── virtualisation.nix
└── default.nix
├── node2nix
├── default.nix
├── node-env.nix
├── node-packages.json
└── node-packages.nix
├── nvfetcher.toml
├── package-lock.json
├── package.json
└── sops
├── default.nix
└── password.yaml
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | insert_final_newline = true
7 | trim_trailing_whitespace = true
8 | indent_style = space
9 |
10 | [*.nix]
11 | indent_size = 2
12 |
13 | [package.json]
14 | indent_size = 2
15 |
--------------------------------------------------------------------------------
/.github/actions/setup-nix/action.yml:
--------------------------------------------------------------------------------
1 | name: Run setup-nix
2 | description: Set up Nix environment for GitHub Actions
3 | inputs:
4 | cachix-auth-token:
5 | required: true
6 | runs:
7 | using: composite
8 | steps:
9 | - uses: cachix/install-nix-action@v31
10 | with:
11 | nix_path: nixpkgs=channel:nixos-unstable
12 | - uses: cachix/cachix-action@v14
13 | with:
14 | name: takeokunn-nixos-configuration
15 | authToken: "${{ inputs.cachix-auth-token }}"
16 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: npm
4 | directory: /
5 | schedule:
6 | interval: daily
7 | target-branch: main
8 | - package-ecosystem: github-actions
9 | directory: /
10 | schedule:
11 | interval: daily
12 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | name: ci
2 | on:
3 | pull_request:
4 | workflow_call:
5 | secrets:
6 | CACHIX_AUTH_TOKEN:
7 | required: true
8 | jobs:
9 | secretlint:
10 | name: Secretlint
11 | runs-on: ubuntu-latest
12 | steps:
13 | - name: checkout
14 | uses: actions/checkout@v4
15 | - name: setup Node.js
16 | uses: actions/setup-node@v4
17 | with:
18 | node-version: latest
19 | cache: npm
20 | - name: npm ci
21 | run: npm ci
22 | - name: Run secretlint
23 | run: npm run lint
24 | nix-flake:
25 | name: Nix Flake Check
26 | runs-on: ubuntu-latest
27 | steps:
28 | - uses: actions/checkout@v4
29 | - name: Setup nix
30 | uses: ./.github/actions/setup-nix
31 | with:
32 | cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
33 | - name: flake check
34 | run: nix flake check
35 | dependabot:
36 | runs-on: ubuntu-latest
37 | needs: [secretlint, nix-flake]
38 | if: github.actor == 'dependabot[bot]'
39 | permissions:
40 | contents: write
41 | pull-requests: write
42 | steps:
43 | - name: Dependabot metadata
44 | id: metadata
45 | uses: dependabot/fetch-metadata@v2
46 | with:
47 | github-token: "${{ secrets.GITHUB_TOKEN }}"
48 | - name: Merge PR
49 | run: gh pr merge --auto --merge "$PR_URL"
50 | env:
51 | PR_URL: ${{ github.event.pull_request.html_url }}
52 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53 |
--------------------------------------------------------------------------------
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: Deploy github pages
2 | on:
3 | push:
4 | branches:
5 | - main
6 | jobs:
7 | ci:
8 | uses: ./.github/workflows/ci.yml
9 | secrets:
10 | CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
11 | build-and-deploy:
12 | runs-on: ubuntu-latest
13 | needs: ci
14 | permissions:
15 | contents: write
16 | pages: write
17 | id-token: write
18 | steps:
19 | - uses: actions/checkout@v4
20 | - name: Setup nix
21 | uses: ./.github/actions/setup-nix
22 | with:
23 | cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
24 | - name: nix build
25 | run: nix build ./deploy#emacs-takeokunn-org
26 | - name: Setup Pages
27 | id: pages
28 | uses: actions/configure-pages@v5
29 | - name: Upload artifact
30 | uses: actions/upload-pages-artifact@v3
31 | with:
32 | path: ./result
33 | - name: Deploy to GitHub Pages
34 | id: deployment
35 | uses: actions/deploy-pages@v4
36 |
--------------------------------------------------------------------------------
/.github/workflows/update.yml:
--------------------------------------------------------------------------------
1 | name: update
2 | on:
3 | workflow_dispatch:
4 | schedule:
5 | - cron: 0 11 * * *
6 | jobs:
7 | nix-update:
8 | name: Update lockfile
9 | runs-on: ubuntu-latest
10 | permissions:
11 | contents: write
12 | steps:
13 | - name: Import GPG key
14 | uses: crazy-max/ghaction-import-gpg@v6
15 | with:
16 | gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
17 | passphrase: ${{ secrets.PASSPHRASE }}
18 | fingerprint: AA9FDAC790F6622DFABD16F578D9E77CFA1C6D36
19 | git_user_signingkey: true
20 | git_commit_gpgsign: true
21 | git_config_global: true
22 | - uses: actions/checkout@v4
23 | - name: Setup nix
24 | uses: ./.github/actions/setup-nix
25 | with:
26 | cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
27 | - name: Run nvfetcher
28 | run: |
29 | export LANG=en_US.UTF-8
30 | export LC_ALL=en_US.UTF-8
31 | nix run nixpkgs#nvfetcher
32 | - name: Run node2nix
33 | run: |
34 | cd node2nix/
35 | nix-shell -p nodePackages.node2nix --command "node2nix -i ./node-packages.json -o node-packages.nix"
36 | - name: Run flake update
37 | run: nix flake update
38 | - name: Run fmt
39 | run: nix fmt
40 | - name: Commit changes
41 | run: |
42 | git add .
43 | git commit -S -m "Update lockfile"
44 | git push origin HEAD
45 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .devenv*
2 | .devenv.flake.nix
3 | .direnv/
4 | .pre-commit-config.yaml
5 | node_modules/
6 | .neotree
7 | htmlize.el
8 | public/
9 | home-manager/programs/emacs/elisp/init.el
10 | result
11 |
--------------------------------------------------------------------------------
/.secretlintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": [
3 | {
4 | "id": "@secretlint/secretlint-rule-preset-recommend"
5 | }
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/.sops.yaml:
--------------------------------------------------------------------------------
1 | keys:
2 | - &take 0B10DAA7BA0236D7382287660F79C0AB03FD7A1C
3 | creation_rules:
4 | - path_regex: sops/[^/]+\.yaml$
5 | key_groups:
6 | - pgp:
7 | - *take
8 |
--------------------------------------------------------------------------------
/README.org:
--------------------------------------------------------------------------------
1 | #+STARTUP: fold
2 | * nixos-configuration
3 |
4 | [[https://deepwiki.com/takeokunn/nixos-configuration][https://img.shields.io/badge/DeepWiki-takeokunn%2Fnixos--configuration-blue.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==]]
5 |
6 | ** Target
7 |
8 | | machine | name | os | system | stable |
9 | |------------------+-----------+---------+----------------+--------|
10 | | M1 Mac Pro | OPL2212-2 | OSX | aarch64-darwin | ◎ |
11 | | Thinkpad X13Gen2 | X13Gen2 | NixOS | x86_64-linux | × |
12 | | Android OPPO-A79 | OPPO-A79 | Android | aarch64-linux | △ |
13 |
14 | ** Usage
15 | *** for OPL2212-2
16 | #+begin_src shell
17 | nix run nix-darwin --extra-experimental-features 'flakes nix-command' -- switch --flake .#OPL2212-2 --show-trace
18 | #+end_src
19 | *** for X13Gen2
20 | #+begin_src shell
21 | sudo nixos-rebuild switch --extra-experimental-features 'flakes nix-command' --flake .#X13Gen2 --show-trace
22 | #+end_src
23 | *** for OPPO-A79
24 | #+begin_src shell
25 | nix-on-droid switch --flake .#OPPO-A79 --show-trace
26 | #+end_src
27 |
--------------------------------------------------------------------------------
/deploy/flake.lock:
--------------------------------------------------------------------------------
1 | {
2 | "nodes": {
3 | "flake-utils": {
4 | "inputs": {
5 | "systems": "systems"
6 | },
7 | "locked": {
8 | "lastModified": 1731533236,
9 | "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
10 | "owner": "numtide",
11 | "repo": "flake-utils",
12 | "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
13 | "type": "github"
14 | },
15 | "original": {
16 | "owner": "numtide",
17 | "repo": "flake-utils",
18 | "type": "github"
19 | }
20 | },
21 | "nixpkgs": {
22 | "locked": {
23 | "lastModified": 1745947548,
24 | "narHash": "sha256-FxW0JywQOR4rfbgM4SZhcd1ZvKtCP4rmgScFblPhQ5s=",
25 | "owner": "NixOS",
26 | "repo": "nixpkgs",
27 | "rev": "b974a8a06f1397d18859d26b505a86963f6bf2fb",
28 | "type": "github"
29 | },
30 | "original": {
31 | "owner": "NixOS",
32 | "repo": "nixpkgs",
33 | "type": "github"
34 | }
35 | },
36 | "root": {
37 | "inputs": {
38 | "flake-utils": "flake-utils",
39 | "nixpkgs": "nixpkgs"
40 | }
41 | },
42 | "systems": {
43 | "locked": {
44 | "lastModified": 1681028828,
45 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
46 | "owner": "nix-systems",
47 | "repo": "default",
48 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
49 | "type": "github"
50 | },
51 | "original": {
52 | "owner": "nix-systems",
53 | "repo": "default",
54 | "type": "github"
55 | }
56 | }
57 | },
58 | "root": "root",
59 | "version": 7
60 | }
61 |
--------------------------------------------------------------------------------
/deploy/flake.nix:
--------------------------------------------------------------------------------
1 | {
2 | inputs = {
3 | nixpkgs.url = "github:NixOS/nixpkgs";
4 | flake-utils.url = "github:numtide/flake-utils";
5 | };
6 |
7 | outputs =
8 | {
9 | self,
10 | nixpkgs,
11 | flake-utils,
12 | }:
13 | flake-utils.lib.eachDefaultSystem (
14 | system:
15 | let
16 | pkgs = import nixpkgs { inherit system; };
17 | emacsPkg = pkgs.emacs.override {
18 | withNativeCompilation = false;
19 | };
20 | in
21 | {
22 | packages = {
23 | emacs-takeokunn-org = pkgs.stdenv.mkDerivation {
24 | name = "emacs-takeokunn-org";
25 | src = ../.;
26 | nativeBuildInputs = with pkgs; [
27 | (emacsPkg.pkgs.withPackages (epkgs: with epkgs; [ htmlize ]))
28 | ];
29 | buildPhase = ''
30 | emacs --batch --load deploy/script.el --funcall export-org-files
31 | '';
32 | installPhase = ''
33 | mv public/init.html public/index.html
34 | cp -r public/ $out/
35 | '';
36 | };
37 | };
38 | }
39 | );
40 | }
41 |
--------------------------------------------------------------------------------
/deploy/script.el:
--------------------------------------------------------------------------------
1 | (require 'htmlize)
2 | (require 'ox-publish)
3 |
4 | (setq org-publish-timestamp-directory "./.org-timestamps")
5 |
6 | (defun export-org-files ()
7 | "Exports Org files to html."
8 | (interactive)
9 | (let ((org-html-htmlize-output-type 'css)
10 | (org-publish-project-alist `(("org"
11 | :base-directory "./home-manager/programs/emacs/elisp/"
12 | :base-extension "org"
13 | :exclude "README.org"
14 | :publishing-directory "./public"))))
15 | (org-publish-all t)))
16 |
--------------------------------------------------------------------------------
/flake.nix:
--------------------------------------------------------------------------------
1 | {
2 | description = "takeokunn's nix configuration";
3 |
4 | inputs = {
5 | nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6 | nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
7 | emacs-overlay = {
8 | url = "github:nix-community/emacs-overlay";
9 | inputs.nixpkgs.follows = "nixpkgs";
10 | inputs.nixpkgs-stable.follows = "nixpkgs-stable";
11 | };
12 | org-babel.url = "github:emacs-twist/org-babel";
13 | home-manager = {
14 | url = "github:nix-community/home-manager";
15 | inputs.nixpkgs.follows = "nixpkgs";
16 | };
17 | nixos-hardware.url = "github:NixOS/nixos-hardware";
18 | xremap = {
19 | url = "github:xremap/nix-flake";
20 | inputs.nixpkgs.follows = "nixpkgs";
21 | inputs.home-manager.follows = "home-manager";
22 | };
23 | nix-darwin = {
24 | url = "github:LnL7/nix-darwin";
25 | inputs.nixpkgs.follows = "nixpkgs";
26 | };
27 | nix-on-droid = {
28 | url = "github:nix-community/nix-on-droid";
29 | inputs.nixpkgs.follows = "nixpkgs";
30 | inputs.home-manager.follows = "home-manager";
31 | };
32 | sops-nix = {
33 | url = "github:Mic92/sops-nix";
34 | inputs.nixpkgs.follows = "nixpkgs";
35 | };
36 | flake-parts.url = "github:hercules-ci/flake-parts";
37 | treefmt-nix = {
38 | url = "github:numtide/treefmt-nix";
39 | inputs.nixpkgs.follows = "nixpkgs";
40 | };
41 | mcp-servers-nix = {
42 | url = "github:natsukium/mcp-servers-nix";
43 | inputs.nixpkgs.follows = "nixpkgs";
44 | };
45 | };
46 |
47 | outputs =
48 | {
49 | flake-parts,
50 | treefmt-nix,
51 | ...
52 | }@inputs:
53 |
54 | flake-parts.lib.mkFlake { inherit inputs; } {
55 | systems = [
56 | "aarch64-darwin"
57 | "aarch64-linux"
58 | "x86_64-linux"
59 | ];
60 |
61 | imports = [ treefmt-nix.flakeModule ];
62 |
63 | flake = {
64 | darwinConfigurations = {
65 | OPL2212-2 = import ./hosts/OPL2212-2 { inherit inputs; };
66 | };
67 | nixosConfigurations = {
68 | # X13Gen2 = import ./hosts/X13Gen2 { inherit inputs; };
69 | };
70 | nixOnDroidConfigurations = {
71 | OPPO-A79 = import ./hosts/OPPO-A79 { inherit inputs; };
72 | };
73 | };
74 |
75 | perSystem =
76 | { ... }:
77 | {
78 | treefmt = {
79 | projectRootFile = "flake.nix";
80 | programs = {
81 | actionlint.enable = true;
82 | nixfmt.enable = true;
83 | taplo.enable = true;
84 | jsonfmt.enable = true;
85 | yamlfmt.enable = true;
86 | fish_indent.enable = true;
87 | stylua.enable = true;
88 | shfmt.enable = true;
89 | prettier.enable = true;
90 | };
91 | };
92 | };
93 | };
94 | }
95 |
--------------------------------------------------------------------------------
/home-manager/advanced.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | system,
4 | nixpkgs,
5 | org-babel,
6 | emacs-overlay,
7 | mcp-servers-nix,
8 | ...
9 | }:
10 | let
11 | # nvfetcher
12 | sources = pkgs.callPackage ../_sources/generated.nix { };
13 |
14 | # packages
15 | basicOverlay = import ./overlay/basic.nix;
16 | advancedOverlay = import ./overlay/advanced.nix { inherit emacs-overlay; };
17 | pkgs = import nixpkgs {
18 | inherit system;
19 | config.allowUnfree = true;
20 | overlays = basicOverlay ++ advancedOverlay;
21 | };
22 | nodePkgs = pkgs.callPackage ../node2nix { inherit pkgs; };
23 | basicPkgs = import ./packages/basic.nix { inherit pkgs; };
24 | advancedPkgs = import ./packages/advanced.nix { inherit pkgs nodePkgs; };
25 |
26 | # emacs package
27 | emacs = import ./packages/emacs {
28 | inherit (nixpkgs) lib;
29 | inherit pkgs sources;
30 | };
31 | emacsPkg = emacs.emacs-unstable-with-widgets;
32 |
33 | # misc
34 | misc = import ./misc;
35 |
36 | # modules
37 | modules = import ./modules;
38 |
39 | # programs
40 | basicPrograms = import ./programs/basic.nix {
41 | inherit pkgs sources;
42 | };
43 | advancedPrograms = import ./programs/advanced.nix {
44 | inherit (nixpkgs) lib;
45 | inherit pkgs nodePkgs sources;
46 | inherit org-babel emacsPkg;
47 | };
48 |
49 | # services
50 | basicServices = import ./services/basic.nix;
51 | advancedServices = import ./services/advanced.nix {
52 | inherit pkgs emacsPkg;
53 | };
54 |
55 | # sops
56 | sops = [
57 | (import ../sops {
58 | homeDirectory = config.home.homeDirectory;
59 | })
60 | ];
61 |
62 | # mcp servers
63 | mcpServers = import ./mcp-servers {
64 | inherit pkgs nodePkgs;
65 | inherit config mcp-servers-nix;
66 | };
67 | in
68 | {
69 | imports =
70 | misc
71 | ++ modules
72 | ++ basicPrograms
73 | ++ advancedPrograms
74 | ++ basicServices
75 | ++ advancedServices
76 | ++ sops
77 | ++ mcpServers;
78 |
79 | home.stateVersion = "24.11";
80 | home.packages = basicPkgs ++ advancedPkgs;
81 |
82 | accounts.email.accounts = {
83 | Gmail = {
84 | primary = true;
85 | flavor = "gmail.com";
86 | realName = "takeo obara";
87 | address = "bararararatty@gmail.com";
88 | };
89 | };
90 | }
91 |
--------------------------------------------------------------------------------
/home-manager/basic.nix:
--------------------------------------------------------------------------------
1 | {
2 | system,
3 | nixpkgs,
4 | }:
5 | let
6 | # nvfetcher
7 | sources = pkgs.callPackage ../_sources/generated.nix { };
8 |
9 | # packages
10 | basicOverlay = import ./overlay/basic.nix;
11 | pkgs = import nixpkgs {
12 | inherit system;
13 | config.allowUnfree = true;
14 | overlays = basicOverlay;
15 | };
16 | basicPkgs = import ./packages/basic.nix { inherit pkgs; };
17 |
18 | # modules
19 | modules = import ./modules;
20 |
21 | # programs
22 | basicPrograms = import ./programs/basic.nix {
23 | inherit pkgs sources;
24 | };
25 |
26 | # services
27 | basicServices = import ./services/basic.nix;
28 | in
29 | {
30 | imports = modules ++ basicPrograms ++ basicServices;
31 | home.stateVersion = "24.11";
32 | home.packages = basicPkgs;
33 | }
34 |
--------------------------------------------------------------------------------
/home-manager/mcp-servers/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | config,
4 | mcp-servers-nix,
5 | nodePkgs,
6 | }:
7 | let
8 | programs = {
9 | fetch.enable = true;
10 | playwright.enable = true;
11 | brave-search = {
12 | enable = true;
13 | envFile = config.sops.secrets.brave-api-token.path;
14 | };
15 | };
16 | settings = {
17 | servers.sitemcp-takeokunn-org = {
18 | command = "${nodePkgs."sitemcp"}/bin/sitemcp";
19 | args = [
20 | "https://www.takeokunn.org/"
21 | ];
22 | };
23 | };
24 | in
25 | [
26 | {
27 | home.file."Library/Application\ Support/Claude/claude_desktop_config.json" = {
28 | source = mcp-servers-nix.lib.mkConfig pkgs {
29 | inherit programs settings;
30 | };
31 | };
32 | }
33 | ]
34 |
--------------------------------------------------------------------------------
/home-manager/misc/default.nix:
--------------------------------------------------------------------------------
1 | [
2 | ./nix
3 | ]
4 |
--------------------------------------------------------------------------------
/home-manager/misc/nix/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | nix = {
3 | enable = true;
4 | extraOptions = ''
5 | experimental-features = nix-command flakes
6 | '';
7 | };
8 | }
9 |
--------------------------------------------------------------------------------
/home-manager/modules/default.nix:
--------------------------------------------------------------------------------
1 | [
2 | ./dust
3 | ./lnav
4 | ./nyxt
5 | ./peco
6 | ./sops
7 | ./tig
8 | ./wget
9 | ]
10 |
--------------------------------------------------------------------------------
/home-manager/modules/dust/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | lib,
4 | config,
5 | ...
6 | }:
7 | let
8 | cfg = config.programs.dust;
9 | in
10 | with lib;
11 | {
12 | options.programs.dust = {
13 | enable = mkEnableOption "A more intuitive version of du in rust";
14 | package = mkPackageOption pkgs "du-dust" { };
15 | config = mkOption {
16 | type = types.lines;
17 | default = "";
18 | };
19 | };
20 |
21 | config = mkIf cfg.enable {
22 | home.packages = [ cfg.package ];
23 | xdg.configFile."dust/config.toml".text = cfg.config;
24 | };
25 | }
26 |
--------------------------------------------------------------------------------
/home-manager/modules/lnav/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | lib,
4 | config,
5 | ...
6 | }:
7 | let
8 | cfg = config.programs.lnav;
9 | jsonFormat = pkgs.formats.json { };
10 | in
11 | with lib;
12 | {
13 | options.programs.lnav = {
14 | enable = mkEnableOption "Log file navigator";
15 | package = mkPackageOption pkgs "lnav" { };
16 | config = mkOption { type = jsonFormat.type; };
17 | };
18 |
19 | config = mkIf cfg.enable {
20 | home.packages = [ cfg.package ];
21 | xdg.configFile = {
22 | "lnav/config.json".source = jsonFormat.generate "config.json" cfg.config;
23 | };
24 | };
25 | }
26 |
--------------------------------------------------------------------------------
/home-manager/modules/nyxt/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | lib,
4 | config,
5 | ...
6 | }:
7 | let
8 | cfg = config.programs.nyxt;
9 | in
10 | with lib;
11 | {
12 | options.programs.nyxt = {
13 | enable = mkEnableOption "";
14 | package = mkPackageOption pkgs "nyxt" { };
15 | };
16 |
17 | config = mkIf cfg.enable { home.packages = [ cfg.package ]; };
18 | }
19 |
--------------------------------------------------------------------------------
/home-manager/modules/peco/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | lib,
4 | config,
5 | ...
6 | }:
7 | let
8 | cfg = config.programs.peco;
9 | jsonFormat = pkgs.formats.json { };
10 | in
11 | with lib;
12 | {
13 | options.programs.peco = {
14 | enable = mkEnableOption "Simplistic interactive filtering tool";
15 | package = mkPackageOption pkgs "peco" { };
16 | config = mkOption { type = jsonFormat.type; };
17 | };
18 |
19 | config = mkIf cfg.enable {
20 | home.packages = [ cfg.package ];
21 | xdg.configFile."peco/config.json".source = jsonFormat.generate "config.json" cfg.config;
22 | };
23 | }
24 |
--------------------------------------------------------------------------------
/home-manager/modules/sops/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | lib,
4 | config,
5 | ...
6 | }:
7 | let
8 | cfg = config.programs.sops;
9 | in
10 | with lib;
11 | {
12 | options.programs.sops = {
13 | enable = mkEnableOption "Simple and flexible tool for managing secrets";
14 | package = mkPackageOption pkgs "sops" { };
15 | };
16 |
17 | config = mkIf cfg.enable { home.packages = [ cfg.package ]; };
18 | }
19 |
--------------------------------------------------------------------------------
/home-manager/modules/tig/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | lib,
4 | config,
5 | ...
6 | }:
7 | let
8 | cfg = config.programs.tig;
9 | in
10 | with lib;
11 | {
12 | options.programs.tig = {
13 | enable = mkEnableOption "Text-mode interface for git";
14 | package = mkPackageOption pkgs "tig" { };
15 | config = mkOption {
16 | type = types.lines;
17 | default = "";
18 | };
19 | };
20 |
21 | config = mkIf cfg.enable {
22 | home.packages = [ cfg.package ];
23 | home.file.".tigrc".text = cfg.config;
24 | };
25 | }
26 |
--------------------------------------------------------------------------------
/home-manager/modules/wget/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | lib,
4 | config,
5 | ...
6 | }:
7 | let
8 | cfg = config.programs.wget;
9 | wgetConf = ''
10 | check_certificate = ${cfg.checkCertificate}
11 | timestamping = ${cfg.timestamping}
12 | no_parent = ${cfg.noParent}
13 | timeout = ${toString cfg.timeout}
14 | tries = ${toString cfg.tries}
15 | retry_connrefused = ${cfg.retryConnrefused}
16 | trust_server_names = ${cfg.trustServerNames}
17 | follow_ftp = ${cfg.followFtp}
18 | adjust_extension = ${cfg.adjustExtension}
19 | local_encoding = ${cfg.localEncoding}
20 | robots = ${cfg.robots}
21 | server_response = ${cfg.serverResponse}
22 | '';
23 | in
24 | with lib;
25 | {
26 | options.programs.wget = {
27 | enable = mkEnableOption "Simplistic interactive filtering tool";
28 | package = mkPackageOption pkgs "wget" { };
29 |
30 | checkCertificate = mkOption {
31 | type = types.nullOr types.str;
32 | default = null;
33 | description = ''
34 | WARNING: This option forces an "insecure" mode of operation that turns the certificate
35 | verification errors into warnings and allows you to proceed.
36 | '';
37 | };
38 |
39 | timestamping = mkOption {
40 | type = types.nullOr types.str;
41 | default = "off";
42 | description = ''
43 | Use the server-provided last modification date, if available
44 | '';
45 | };
46 |
47 | noParent = mkOption {
48 | type = types.nullOr types.str;
49 | default = "off";
50 | description = ''
51 | Do not go up in the directory structure when downloading recursively
52 | '';
53 | };
54 |
55 | timeout = mkOption {
56 | type = types.ints.unsigned;
57 | default = 15;
58 | description = ''
59 | Wait 60 seconds before timing out. This applies to all timeouts: DNS, connect and read. (The default read timeout is 15 minutes!)
60 | '';
61 | };
62 |
63 | tries = mkOption {
64 | type = types.ints.unsigned;
65 | default = 20;
66 | description = ''
67 | Retry a few times when a download fails, but don’t overdo it. (The default is 20!)
68 | '';
69 | };
70 |
71 | retryConnrefused = mkOption {
72 | type = types.nullOr types.str;
73 | default = "off";
74 | description = ''
75 | Retry even when the connection was refused
76 | '';
77 | };
78 |
79 | trustServerNames = mkOption {
80 | type = types.nullOr types.str;
81 | default = "off";
82 | description = ''
83 | Use the last component of a redirection URL for the local file name
84 | '';
85 | };
86 |
87 | followFtp = mkOption {
88 | type = types.nullOr types.str;
89 | default = "off";
90 | description = ''
91 | Follow FTP links from HTML documents by default
92 | '';
93 | };
94 |
95 | adjustExtension = mkOption {
96 | type = types.nullOr types.str;
97 | default = "off";
98 | description = ''
99 | Add a `.html` extension to `text/html` or `application/xhtml+xml` files that lack one, or a `.css` extension to `text/css` files that lack one
100 | '';
101 | };
102 |
103 | localEncoding = mkOption {
104 | type = types.nullOr types.str;
105 | default = "UTF-8";
106 | description = ''
107 | Use UTF-8 as the default system encoding
108 | Disabled as it makes `wget` builds that don’t support this feature unusable.
109 | Does anyone know how to conditionally configure a wget setting?
110 | http://unix.stackexchange.com/q/34730/6040
111 | '';
112 | };
113 |
114 | robots = mkOption {
115 | type = types.nullOr types.str;
116 | default = "off";
117 | description = ''
118 | Ignore `robots.txt` and ``
119 | '';
120 | };
121 |
122 | serverResponse = mkOption {
123 | type = types.nullOr types.str;
124 | default = "off";
125 | description = ''
126 | Print the HTTP and FTP server responses
127 | '';
128 | };
129 |
130 | config = mkOption { type = types.lines; };
131 | };
132 |
133 | config = mkIf cfg.enable {
134 | home.packages = [ cfg.package ];
135 | xdg.configFile."wgetrc".text = wgetConf;
136 | };
137 | }
138 |
--------------------------------------------------------------------------------
/home-manager/overlay/advanced.nix:
--------------------------------------------------------------------------------
1 | { emacs-overlay }:
2 | [
3 | (import emacs-overlay)
4 |
5 | # bug: https://github.com/NixOS/nixpkgs/issues/395169
6 | (final: prev: {
7 | emacs = prev.emacs.override {
8 | withNativeCompilation = false;
9 | };
10 | emacs-unstable = prev.emacs-unstable.override {
11 | withNativeCompilation = false;
12 | };
13 | emacs-git = prev.emacs-git.override {
14 | withNativeCompilation = false;
15 | };
16 | })
17 | (final: prev: {
18 | python3Packages = prev.python3Packages // {
19 | sentry-sdk = prev.python3Packages.sentry-sdk.overrideAttrs (old: {
20 | doCheck = false;
21 | });
22 | };
23 | })
24 | (final: prev: {
25 | lnav = prev.lnav.overrideAttrs (old: {
26 | version = "2025-05-03-HEAD";
27 | src = prev.fetchFromGitHub {
28 | owner = "tstack";
29 | repo = "lnav";
30 | rev = "adec0dc8ec0ffd5a7f06c19852edc35d00dc4fe1";
31 | hash = "sha256-Dk+pFg+Tt1krFmEzoT4sW8dPd0x5kCD6vTIQVzAvs3A=";
32 | };
33 | });
34 | })
35 | ]
36 |
--------------------------------------------------------------------------------
/home-manager/overlay/basic.nix:
--------------------------------------------------------------------------------
1 | [
2 |
3 | ]
4 |
--------------------------------------------------------------------------------
/home-manager/packages/advanced.nix:
--------------------------------------------------------------------------------
1 | { pkgs, nodePkgs }:
2 | with pkgs;
3 | [
4 | yubikey-manager
5 |
6 | # for ai
7 | ollama
8 | (aider-chat.overrideAttrs (old: {
9 | doCheck = false;
10 | }))
11 | nodePkgs."@anthropic-ai/claude-code"
12 |
13 | # for web service
14 | discord
15 | drawio
16 | slack
17 | ]
18 |
--------------------------------------------------------------------------------
/home-manager/packages/basic.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | with pkgs;
3 | [
4 | # for terminal tools
5 | devenv
6 | unixtools.watch
7 |
8 | # for git
9 | ghq
10 |
11 | # for nix
12 | nix-output-monitor
13 | ]
14 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | pkgs,
4 | sources,
5 | }:
6 | let
7 | override = final: prev: {
8 | dap-mode = prev.melpaPackages.dap-mode.overrideAttrs (old: {
9 | preBuild = null;
10 | });
11 | };
12 | in
13 | {
14 | emacs-git = pkgs.emacsWithPackagesFromUsePackage {
15 | config = builtins.toFile "empty.el" "";
16 | package = pkgs.emacs-git.overrideAttrs (old: {
17 | buildInputs =
18 | old.buildInputs
19 | ++ lib.optional pkgs.stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.WebKit ];
20 | configureFlags = old.configureFlags ++ [ "--with-xwidgets" ];
21 | });
22 | extraEmacsPackages = import ./epkgs { inherit pkgs sources; };
23 | override = override;
24 | };
25 |
26 | emacs-unstable = pkgs.emacsWithPackagesFromUsePackage {
27 | config = builtins.toFile "empty.el" "";
28 | package = pkgs.emacs-unstable;
29 | extraEmacsPackages = import ./epkgs { inherit pkgs sources; };
30 | override = override;
31 | };
32 |
33 | emacs-unstable-with-widgets = pkgs.emacsWithPackagesFromUsePackage {
34 | config = builtins.toFile "empty.el" "";
35 | package = pkgs.emacs-unstable.overrideAttrs (old: {
36 | buildInputs =
37 | old.buildInputs
38 | ++ lib.optional pkgs.stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.WebKit ];
39 | configureFlags = old.configureFlags ++ [ "--with-xwidgets" ];
40 | });
41 | extraEmacsPackages = import ./epkgs { inherit pkgs sources; };
42 | override = override;
43 | };
44 |
45 | emacs-stable = pkgs.emacsWithPackagesFromUsePackage {
46 | config = builtins.toFile "empty.el" "";
47 | package = pkgs.emacs;
48 | extraEmacsPackages = import ./epkgs { inherit pkgs sources; };
49 | override = override;
50 | };
51 | }
52 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, sources }:
2 | epkgs:
3 | let
4 | ai = import ./packages/ai { inherit epkgs pkgs sources; };
5 | awesome = import ./packages/awesome { inherit epkgs pkgs sources; };
6 | buffer = import ./packages/buffer { inherit epkgs; };
7 | client = import ./packages/client { inherit epkgs pkgs sources; };
8 | coding = import ./packages/coding { inherit epkgs pkgs sources; };
9 | cursor = import ./packages/cursor { inherit epkgs pkgs; };
10 | dired = import ./packages/dired { inherit epkgs; };
11 | elfeed = import ./packages/elfeed { inherit epkgs; };
12 | eshell = import ./packages/eshell { inherit epkgs pkgs sources; };
13 | eww = import ./packages/eww { inherit epkgs; };
14 | exwm = import ./packages/exwm { inherit epkgs; };
15 | file = import ./packages/file { inherit epkgs; };
16 | ime = import ./packages/ime { inherit epkgs; };
17 | language = import ./packages/language { inherit epkgs pkgs sources; };
18 | language_specific = import ./packages/language_specific { inherit epkgs pkgs sources; };
19 | monitor = import ./packages/monitor { inherit epkgs pkgs sources; };
20 | org = import ./packages/org { inherit epkgs pkgs sources; };
21 | project = import ./packages/project { inherit epkgs; };
22 | remote_access = import ./packages/remote_access { inherit epkgs pkgs sources; };
23 | themes = import ./packages/themes { inherit epkgs; };
24 | search = import ./packages/search { inherit epkgs; };
25 | tree-sitter = import ./packages/tree-sitter { inherit epkgs; };
26 | window = import ./packages/window { inherit epkgs; };
27 | in
28 | ai
29 | ++ awesome
30 | ++ buffer
31 | ++ client
32 | ++ coding
33 | ++ cursor
34 | ++ dired
35 | ++ elfeed
36 | ++ eshell
37 | ++ eww
38 | ++ exwm
39 | ++ file
40 | ++ ime
41 | ++ language
42 | ++ language_specific
43 | ++ monitor
44 | ++ org
45 | ++ project
46 | ++ remote_access
47 | ++ themes
48 | ++ search
49 | ++ tree-sitter
50 | ++ window
51 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/ai/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | epkgs,
3 | pkgs,
4 | sources,
5 | }:
6 | let
7 | packages = pkgs.callPackage ./packages.nix { inherit sources epkgs; };
8 | in
9 | with epkgs;
10 | [
11 | packages.copilot
12 | packages.llm
13 | packages.plz-media-type
14 | packages.plz-event-source
15 | packages.copilot-chat
16 | ellama
17 | aidermacs
18 | ]
19 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/ai/packages.nix:
--------------------------------------------------------------------------------
1 | { sources, epkgs }:
2 | {
3 | aio = epkgs.melpaBuild {
4 | pname = "aio";
5 | version = "0.0.1";
6 | src = sources.emacs-aio.src;
7 |
8 | ignoreCompilationError = false;
9 | };
10 |
11 | copilot = epkgs.melpaBuild {
12 | pname = "copilot";
13 | version = "0.0.1";
14 | src = sources.emacs-copilot.src;
15 |
16 | packageRequires = with epkgs; [
17 | f
18 | editorconfig
19 | ];
20 |
21 | ignoreCompilationError = false;
22 | };
23 |
24 | copilot-chat = epkgs.melpaBuild {
25 | pname = "copilot-chat";
26 | version = "0.0.1";
27 | src = sources.emacs-copilot-chat.src;
28 |
29 | packageRequires = with epkgs; [
30 | aio
31 | request
32 | markdown-mode
33 | chatgpt-shell
34 | magit
35 | polymode
36 | ];
37 |
38 | ignoreCompilationError = false;
39 | };
40 |
41 | plz-media-type = epkgs.melpaBuild {
42 | pname = "plz-media-type";
43 | version = "0.0.1";
44 | src = sources.emacs-plz-media-type.src;
45 |
46 | packageRequires = with epkgs; [ plz ];
47 |
48 | ignoreCompilationError = false;
49 | };
50 |
51 | plz-event-source = epkgs.melpaBuild {
52 | pname = "plz-event-source";
53 | version = "0.0.1";
54 | src = sources.emacs-plz-event-source.src;
55 |
56 | packageRequires = with epkgs; [
57 | plz
58 | plz-media-type
59 | ];
60 |
61 | ignoreCompilationError = false;
62 | };
63 |
64 | llm = epkgs.melpaBuild {
65 | pname = "llm";
66 | version = "0.0.1";
67 | src = sources.emacs-llm.src;
68 |
69 | packageRequires = with epkgs; [
70 | plz
71 | plz-media-type
72 | plz-event-source
73 | ];
74 |
75 | ignoreCompilationError = false;
76 | };
77 | }
78 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/awesome/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | epkgs,
4 | sources,
5 | }:
6 | let
7 | packages = pkgs.callPackage ./packages.nix { inherit sources epkgs; };
8 | in
9 | with epkgs;
10 | [
11 | dumb-jump
12 |
13 | # Command
14 | amx
15 |
16 | # Cursor
17 | avy
18 | avy-zap
19 | expand-region
20 | multiple-cursors
21 |
22 | # Dictionary
23 | define-word
24 |
25 | # EWW
26 | eww-lnum
27 |
28 | # GC
29 | gcmh
30 |
31 | # GPG
32 | packages.pinentry-el
33 |
34 | # Help
35 | helpful
36 |
37 | # Joke
38 | hacker-typer
39 | power-mode
40 | packages.sudden-death
41 | redacted
42 | lorem-ipsum
43 | packages.zalgo-mode
44 |
45 | # Minor Modes
46 | command-log-mode
47 |
48 | # Shell
49 | exec-path-from-shell
50 |
51 | # Utility
52 | lte
53 |
54 | # Password
55 | password-store
56 | password-store-otp
57 | pass
58 | password-generator
59 | sops
60 |
61 | # pdf
62 | pdf-tools
63 |
64 | # Mouse
65 | inhibit-mouse
66 | ]
67 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/awesome/packages.nix:
--------------------------------------------------------------------------------
1 | { sources, epkgs }:
2 | {
3 | pinentry-el = epkgs.melpaBuild {
4 | pname = "pinentry";
5 | version = "0.0.1";
6 | src = sources.emacs-pinentry.src;
7 |
8 | ignoreCompilationError = false;
9 | };
10 |
11 | sudden-death = epkgs.melpaBuild {
12 | pname = "sudden-death";
13 | version = "0.0.1";
14 | src = sources.emacs-sudden-death.src;
15 |
16 | ignoreCompilationError = false;
17 | };
18 |
19 | zalgo-mode = epkgs.melpaBuild {
20 | pname = "zalgo-mode";
21 | version = "0.0.1";
22 | src = sources.emacs-zalgo-mode.src;
23 |
24 | ignoreCompilationError = false;
25 | };
26 | }
27 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/buffer/default.nix:
--------------------------------------------------------------------------------
1 | { epkgs }:
2 | with epkgs;
3 | [
4 | auto-save-buffers-enhanced
5 | editorconfig
6 | popwin
7 | ]
8 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/client/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | epkgs,
3 | pkgs,
4 | sources,
5 | }:
6 | let
7 | packages = pkgs.callPackage ./packages.nix { inherit sources epkgs; };
8 | in
9 | with epkgs;
10 | [
11 | # Client
12 | md4rd
13 |
14 | # Googling
15 | google-this
16 | google-translate
17 |
18 | # Mail
19 | mu4e
20 | mu4e-views
21 | packages.mu4e-dashboard
22 | ]
23 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/client/packages.nix:
--------------------------------------------------------------------------------
1 | { sources, epkgs }:
2 | {
3 | mu4e-dashboard = epkgs.melpaBuild {
4 | pname = "mu4e-dashboard";
5 | version = "0.0.1";
6 | src = sources.emacs-mu4e-dashboard.src;
7 |
8 | packageRequires = with epkgs; [
9 | mu4e
10 | async
11 | ];
12 |
13 | ignoreCompilationError = false;
14 | };
15 | }
16 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/coding/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | epkgs,
3 | pkgs,
4 | sources,
5 | }:
6 | let
7 | packages = pkgs.callPackage ./packages.nix { inherit sources epkgs; };
8 | in
9 | with epkgs;
10 | [
11 | # check
12 | flycheck
13 | flycheck-elsa
14 | packages.flycheck-projectile
15 | flycheck-cfn
16 |
17 | # completion
18 | corfu
19 | cape
20 | prescient
21 | kind-icon
22 |
23 | # git
24 | magit
25 | git-gutter
26 | git-gutter-fringe
27 | git-timemachine
28 | gist
29 | blamer
30 | git-auto-commit-mode
31 |
32 | # keyboard
33 | key-chord
34 | key-combo
35 | dmacro
36 | god-mode
37 | which-key
38 |
39 | # refactor
40 | emr
41 |
42 | # snippet
43 | yasnippet
44 | consult-yasnippet
45 |
46 | # narrowing
47 | fancy-narrow
48 | origami
49 |
50 | # LSP
51 | packages.eglot-booster
52 | lsp-mode
53 | lsp-sourcekit
54 | ccls
55 | consult-lsp
56 | dap-mode
57 | lsp-ui
58 | lsp-scheme
59 | lsp-dart
60 | # lsp-bridge
61 |
62 | # Syntax
63 | syntax-subword
64 |
65 | # Undo
66 | undo-tree
67 |
68 | # View Mode
69 | packages.view-lock-mode
70 |
71 | # Utility
72 | crux
73 | dogears
74 | embark
75 | embark-consult
76 | htmlize
77 | minimap
78 | puni
79 | quickrun
80 | restclient
81 | smartparens
82 | smart-jump
83 | string-inflection
84 | sudo-edit
85 | topsy
86 | uuid
87 | ]
88 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/coding/packages.nix:
--------------------------------------------------------------------------------
1 | { sources, epkgs }:
2 | {
3 | flycheck-projectile = epkgs.melpaBuild {
4 | pname = "flycheck-projectile";
5 | version = "0.0.1";
6 | src = sources.emacs-flycheck-projectile.src;
7 |
8 | packageRequires = with epkgs; [ flycheck ];
9 |
10 | ignoreCompilationError = false;
11 | };
12 |
13 | view-lock-mode = epkgs.melpaBuild {
14 | pname = "view-lock-mode";
15 | version = "0.0.1";
16 | src = sources.emacs-view-lock-mode.src;
17 |
18 | ignoreCompilationError = false;
19 | };
20 |
21 | eglot-booster = epkgs.melpaBuild {
22 | pname = "eglot-booster";
23 | version = "0.0.1";
24 | src = sources.emacs-eglot-booster.src;
25 |
26 | ignoreCompilationError = false;
27 | };
28 | }
29 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/cursor/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, epkgs }:
2 | with epkgs;
3 | [
4 | avy
5 | avy-zap
6 | expand-region
7 | multiple-cursors
8 | ]
9 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/dired/default.nix:
--------------------------------------------------------------------------------
1 | { epkgs }:
2 | with epkgs;
3 | [
4 | dired-narrow
5 | dired-open
6 | dired-quick-sort
7 | diredfl
8 | ]
9 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/elfeed/default.nix:
--------------------------------------------------------------------------------
1 | { epkgs }:
2 | with epkgs;
3 | [
4 | elfeed
5 | elfeed-org
6 | elfeed-dashboard
7 | elfeed-goodies
8 | ]
9 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/eshell/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | epkgs,
3 | pkgs,
4 | sources,
5 | }:
6 | let
7 | packages = pkgs.callPackage ./packages.nix { inherit sources epkgs; };
8 | in
9 | with epkgs;
10 | [
11 | esh-help
12 | eshell-did-you-mean
13 | eshell-z
14 | fish-completion
15 | packages.eshell-multiple
16 | eshell-syntax-highlighting
17 | eshell-fringe-status
18 | ]
19 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/eshell/packages.nix:
--------------------------------------------------------------------------------
1 | { sources, epkgs }:
2 | {
3 | eshell-multiple = epkgs.melpaBuild {
4 | pname = "eshell-multiple";
5 | version = "0.0.1";
6 | src = sources.emacs-eshell-multiple.src;
7 |
8 | ignoreCompilationError = false;
9 | };
10 | }
11 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/eww/default.nix:
--------------------------------------------------------------------------------
1 | { epkgs }: with epkgs; [ eww-lnum ]
2 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/exwm/default.nix:
--------------------------------------------------------------------------------
1 | { epkgs }:
2 | with epkgs;
3 | [
4 | exwm
5 | exwm-edit
6 | exwm-modeline
7 | ]
8 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/file/default.nix:
--------------------------------------------------------------------------------
1 | { epkgs }:
2 | with epkgs;
3 | [
4 | open-junk-file
5 | vlf
6 | ]
7 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/ime/default.nix:
--------------------------------------------------------------------------------
1 | { epkgs }:
2 | with epkgs;
3 | [
4 | ddskk
5 | ddskk-posframe
6 | ]
7 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/language/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | epkgs,
3 | pkgs,
4 | sources,
5 | }:
6 | let
7 | packages = pkgs.callPackage ./packages.nix { inherit epkgs sources; };
8 | in
9 | with epkgs;
10 | [
11 | ansible
12 | apache-mode
13 | packages.bazel-mode
14 | bison-mode
15 | cask-mode
16 | cfn-mode
17 | clojure-mode
18 | cmake-mode
19 | coffee-mode
20 | crontab-mode
21 | csharp-mode
22 | csv-mode
23 | cuda-mode
24 | crystal-mode
25 | dart-mode
26 | dhall-mode
27 | packages.direnv-mode
28 | docker-compose-mode
29 | dockerfile-mode
30 | dotenv-mode
31 | elixir-mode
32 | elm-mode
33 | fish-mode
34 | forth-mode
35 | fsharp-mode
36 | git-modes
37 | glsl-mode
38 | go-mode
39 | gradle-mode
40 | graphql-mode
41 | graphviz-dot-mode
42 | groovy-mode
43 | hack-mode
44 | haskell-mode
45 | hcl-mode
46 | hy-mode
47 | ini-mode
48 | jade-mode
49 | js2-mode
50 | json-mode
51 | jsonnet-mode
52 | kotlin-mode
53 | lua-mode
54 | markdown-mode
55 | mermaid-mode
56 | nasm-mode
57 | neon-mode
58 | nim-mode
59 | ninja-mode
60 | nix-mode
61 | nginx-mode
62 | nov
63 | pcap-mode
64 | php-mode
65 | phpt-mode
66 | plantuml-mode
67 | po-mode
68 | protobuf-mode
69 | pug-mode
70 | prisma-mode
71 | processing-mode
72 | python-mode
73 | qt-pro-mode
74 | racket-mode
75 | robots-txt-mode
76 | rust-mode
77 | scala-mode
78 | scad-mode
79 | scss-mode
80 | slim-mode
81 | solidity-mode
82 | ssh-config-mode
83 | swift-mode
84 | syslog-mode
85 | packages.systemd-mode
86 | terraform-mode
87 | toml-mode
88 | tmux-mode
89 | typescript-mode
90 | packages.typst-mode
91 | v-mode
92 | vue-mode
93 | vimrc-mode
94 | wat-mode
95 | web-mode
96 | packages.web-php-blade-mode
97 | wolfram-mode
98 | yaml-mode
99 | yarn-mode
100 | zig-mode
101 | ]
102 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/language/packages.nix:
--------------------------------------------------------------------------------
1 | { sources, epkgs }:
2 | {
3 | bazel-mode = epkgs.melpaBuild {
4 | pname = "bazel";
5 | version = "0.0.1";
6 | src = sources.emacs-bazel-mode.src;
7 |
8 | ignoreCompilationError = false;
9 | };
10 |
11 | direnv-mode = epkgs.melpaBuild {
12 | pname = "direnv";
13 | version = "0.0.1";
14 | src = sources.emacs-direnv-mode.src;
15 |
16 | packageRequires = with epkgs; [ dash ];
17 |
18 | ignoreCompilationError = false;
19 | };
20 |
21 | systemd-mode = epkgs.melpaBuild {
22 | pname = "systemd";
23 | version = "0.0.1";
24 | src = sources.emacs-systemd-mode.src;
25 | files = ''("*.el" "*.txt")'';
26 |
27 | ignoreCompilationError = false;
28 | };
29 |
30 | web-php-blade-mode = epkgs.melpaBuild {
31 | pname = "web-php-blade-mode";
32 | version = "0.0.1";
33 | src = sources.emacs-web-php-blade-mode.src;
34 |
35 | ignoreCompilationError = false;
36 | };
37 |
38 | typst-mode = epkgs.melpaBuild {
39 | pname = "typst-mode";
40 | version = "0.0.1";
41 | src = sources.emacs-typst-mode.src;
42 |
43 | packageRequires = with epkgs; [ polymode ];
44 |
45 | ignoreCompilationError = false;
46 | };
47 | }
48 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/language_specific/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | sources,
3 | epkgs,
4 | pkgs,
5 | }:
6 | let
7 | packages = pkgs.callPackage ./packages.nix { inherit sources epkgs; };
8 | in
9 | with epkgs;
10 | [
11 | # Basic Lisp
12 | paredit
13 | rainbow-delimiters
14 |
15 | # Common Lisp
16 | sly
17 | sly-asdf
18 | sly-macrostep
19 | sly-named-readtables
20 | sly-overlay
21 |
22 | # Emacs Lisp
23 | eros
24 | elsa
25 | lispxmp
26 | macrostep
27 | elisp-slime-nav
28 | nameless
29 | elisp-refs
30 | highlight-quoted
31 | highlight-defined
32 |
33 | # Clojure
34 | anakondo
35 | cider
36 | kibit-helper
37 | clj-refactor
38 | inf-clojure
39 |
40 | # C/C++
41 | clang-format
42 |
43 | # Csv
44 | packages.rainbow-csv
45 |
46 | # JavaScript/TypeScript
47 | nodejs-repl
48 | js2-refactor
49 | jest
50 |
51 | # Ruby
52 | robe
53 | rubocop
54 | ruby-refactor
55 | inf-ruby
56 | yard-mode
57 |
58 | # SQL
59 | sql-indent
60 |
61 | # PHP
62 | composer
63 | php-runtime
64 | psysh
65 | # laravel-tinker-repl
66 | packages.emacs-php-doc-block
67 | phpstan
68 | phpunit
69 |
70 | # Markdown
71 | poly-markdown
72 | markdown-preview-mode
73 |
74 | # Fish
75 | packages.fish-repl
76 |
77 | # Haskell
78 | hindent
79 |
80 | # Web
81 | emmet-mode
82 |
83 | # JSON
84 | jq-mode
85 | json-reformat
86 |
87 | # Python
88 | py-isort
89 |
90 | # Dart
91 | flutter
92 | ]
93 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/language_specific/packages.nix:
--------------------------------------------------------------------------------
1 | { sources, epkgs }:
2 | {
3 | rainbow-csv = epkgs.melpaBuild {
4 | pname = "rainbow-csv";
5 | version = "0.0.1";
6 | src = sources.emacs-rainbow-csv.src;
7 |
8 | packageRequires = with epkgs; [ csv-mode ];
9 |
10 | ignoreCompilationError = false;
11 | };
12 |
13 | emacs-php-doc-block = epkgs.melpaBuild {
14 | pname = "php-doc-block";
15 | version = "0.0.1";
16 | src = sources.emacs-php-doc-block.src;
17 |
18 | ignoreCompilationError = false;
19 | };
20 |
21 | fish-repl = epkgs.melpaBuild {
22 | pname = "fish-repl";
23 | version = "0.0.1";
24 | src = sources.emacs-fish-repl.src;
25 |
26 | packageRequires = with epkgs; [ f ];
27 |
28 | ignoreCompilationError = false;
29 | };
30 | }
31 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/monitor/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | epkgs,
3 | pkgs,
4 | sources,
5 | }:
6 | let
7 | packages = pkgs.callPackage ./packages.nix { inherit sources epkgs; };
8 | in
9 | with epkgs;
10 | [
11 | proced-narrow
12 | symon
13 | esup
14 | packages.explain-pause-mode
15 | disk-usage
16 | keyfreq
17 | uptimes
18 | ]
19 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/monitor/packages.nix:
--------------------------------------------------------------------------------
1 | { sources, epkgs }:
2 | {
3 | explain-pause-mode = epkgs.melpaBuild {
4 | pname = "explain-pause-mode";
5 | version = "0.0.1";
6 | src = sources.emacs-explain-pause-mode.src;
7 |
8 | packageRequires = with epkgs; [ csv-mode ];
9 |
10 | ignoreCompilationError = false;
11 | };
12 | }
13 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/org/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | epkgs,
3 | pkgs,
4 | sources,
5 | }:
6 | let
7 | packages = pkgs.callPackage ./packages.nix { inherit sources epkgs; };
8 | in
9 | with epkgs;
10 | [
11 | # Basic
12 | org-journal
13 | org-generate
14 | org-pomodoro
15 | packages.org-view-mode
16 | org-random-todo
17 | packages.org-dashboard
18 | packages.org-volume
19 | org-ql
20 | org-sliced-images
21 | org-preview-html
22 |
23 | # Theme
24 | org-superstar
25 |
26 | # Content
27 | toc-org
28 |
29 | # Presentation
30 | org-tree-slide
31 |
32 | # Org Link
33 | orgit
34 |
35 | # Org Agenda
36 | org-super-agenda
37 | org-hyperscheduler
38 |
39 | # Org External Tools
40 | org-redmine
41 | org-ai
42 |
43 | # Org Babel
44 | ob-async
45 | packages.ob-fish
46 | ob-rust
47 | ob-go
48 | ob-translate
49 | ob-typescript
50 | ob-php
51 | packages.ob-phpstan
52 | ob-http
53 | ob-mermaid
54 | ob-graphql
55 | ob-swift
56 | ob-elixir
57 | ob-dart
58 | ob-deno
59 | ob-fsharp
60 | packages.ob-treesitter
61 | packages.ob-racket
62 | ob-base64
63 | ob-prolog
64 | org-nix-shell
65 |
66 | # Org Publish
67 | ox-gfm
68 | ox-zenn
69 | packages.ox-hatena
70 | ox-qmd
71 | ox-hugo
72 | packages.ox-typst
73 |
74 | # Org Roam
75 | org-roam
76 | consult-org-roam
77 | org-roam-ui
78 | org-roam-timestamps
79 | org-roam-ql
80 | org-roam-ql-ql
81 | ]
82 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/org/packages.nix:
--------------------------------------------------------------------------------
1 | { sources, epkgs }:
2 | {
3 | org-view-mode = epkgs.melpaBuild {
4 | pname = "org-view-mode";
5 | version = "0.0.1";
6 | src = sources.emacs-org-view-mode.src;
7 |
8 | ignoreCompilationError = false;
9 | };
10 |
11 | org-dashboard = epkgs.melpaBuild {
12 | pname = "org-dashboard";
13 | version = "0.0.1";
14 | src = sources.emacs-org-dashboard.src;
15 |
16 | ignoreCompilationError = false;
17 | };
18 |
19 | org-volume = epkgs.melpaBuild {
20 | pname = "org-volume";
21 | version = "0.0.1";
22 | src = sources.emacs-org-volume.src;
23 |
24 | packageRequires = with epkgs; [
25 | request
26 | dash
27 | f
28 | ];
29 |
30 | ignoreCompilationError = false;
31 | };
32 |
33 | ob-phpstan = epkgs.melpaBuild {
34 | pname = "ob-phpstan";
35 | version = "0.0.1";
36 | src = sources.emacs-ob-phpstan.src;
37 |
38 | ignoreCompilationError = false;
39 | };
40 |
41 | ob-racket = epkgs.melpaBuild {
42 | pname = "ob-racket";
43 | version = "0.0.1";
44 | src = sources.emacs-ob-racket.src;
45 |
46 | ignoreCompilationError = false;
47 | };
48 |
49 | ob-treesitter = epkgs.melpaBuild {
50 | pname = "ob-treesitter";
51 | version = "0.0.1";
52 | src = sources.emacs-ob-treesitter.src;
53 |
54 | ignoreCompilationError = false;
55 | };
56 |
57 | ob-fish = epkgs.melpaBuild {
58 | pname = "ob-fish";
59 | version = "0.0.1";
60 | src = sources.emacs-ob-fish.src;
61 |
62 | ignoreCompilationError = false;
63 | };
64 |
65 | ox-hatena = epkgs.melpaBuild {
66 | pname = "ox-hatena";
67 | version = "0.0.1";
68 | src = sources.emacs-ox-hatena.src;
69 |
70 | ignoreCompilationError = false;
71 | };
72 |
73 | ox-typst = epkgs.melpaBuild {
74 | pname = "ox-typst";
75 | version = "0.0.1";
76 | src = sources.emacs-ox-typst.src;
77 |
78 | ignoreCompilationError = false;
79 | };
80 | }
81 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/project/default.nix:
--------------------------------------------------------------------------------
1 | { epkgs }:
2 | with epkgs;
3 | [
4 | projectile
5 | consult-projectile
6 | projectile-git-autofetch
7 | projectile-ripgrep
8 | ]
9 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/remote_access/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | epkgs,
3 | pkgs,
4 | sources,
5 | }:
6 | let
7 | packages = pkgs.callPackage ./packages.nix { inherit sources epkgs; };
8 | in
9 | [
10 | packages.consult-tramp
11 | ]
12 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/remote_access/packages.nix:
--------------------------------------------------------------------------------
1 | { sources, epkgs }:
2 | {
3 | consult-tramp = epkgs.melpaBuild {
4 | pname = "consult-tramp";
5 | version = "0.0.1";
6 | src = sources.emacs-consult-tramp.src;
7 |
8 | packageRequires = with epkgs; [ consult ];
9 |
10 | ignoreCompilationError = false;
11 | };
12 | }
13 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/search/default.nix:
--------------------------------------------------------------------------------
1 | { epkgs }:
2 | with epkgs;
3 | [
4 | migemo
5 | wgrep
6 | consult
7 | consult-compile-multi
8 | compile-multi-embark
9 | affe
10 | compile-multi
11 | vertico
12 | marginalia
13 | orderless
14 | ]
15 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/themes/default.nix:
--------------------------------------------------------------------------------
1 | { epkgs }:
2 | with epkgs;
3 | [
4 | highlight-indent-guides
5 | hl-todo
6 | xterm-color
7 | nerd-icons
8 | nerd-icons-dired
9 | nerd-icons-completion
10 | dashboard
11 | dimmer
12 | doom-themes
13 | doom-modeline
14 | idle-highlight-mode
15 | neotree
16 | nyan-mode
17 | volatile-highlights
18 | idle-highlight-mode
19 | font-lock-studio
20 | emojify
21 | modus-themes
22 | ]
23 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/tree-sitter/default.nix:
--------------------------------------------------------------------------------
1 | { epkgs }:
2 | with epkgs;
3 | [
4 | treesit-grammars.with-all-grammars
5 | ]
6 |
--------------------------------------------------------------------------------
/home-manager/packages/emacs/epkgs/packages/window/default.nix:
--------------------------------------------------------------------------------
1 | { epkgs }:
2 | with epkgs;
3 | [
4 | ace-window
5 | writeroom-mode
6 | zoom-window
7 | ]
8 |
--------------------------------------------------------------------------------
/home-manager/programs/advanced.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | pkgs,
4 | nodePkgs,
5 | sources,
6 | org-babel,
7 | emacsPkg,
8 | }:
9 | let
10 | emacs = import ./emacs { inherit pkgs emacsPkg org-babel; };
11 | gh = import ./gh;
12 | gh-dash = import ./gh-dash;
13 | git = import ./git { inherit pkgs; };
14 | lnav = import ./lnav { inherit pkgs; };
15 | mu = import ./mu { inherit pkgs; };
16 | nix-index = import ./nix-index;
17 | nyxt = import ./nyxt { inherit pkgs; };
18 | offlineimap = import ./offlineimap;
19 | kitty = import ./kitty;
20 | sketchybar = import ./sketchybar;
21 | ssh = import ./ssh;
22 | copilot-language-server = import ./copilot-language-server { inherit pkgs nodePkgs; };
23 | nix-init = import ./nix-init;
24 | pandoc = import ./pandoc;
25 |
26 | # for window manager
27 | rofi = import ./rofi { inherit pkgs; };
28 | sway = import ./sway;
29 | swaylock = import ./swaylock { inherit lib pkgs; };
30 | waybar = import ./waybar { inherit pkgs; };
31 | in
32 | [
33 | emacs
34 | gh
35 | gh-dash
36 | git
37 | lnav
38 | mu
39 | nix-index
40 | nyxt
41 | offlineimap
42 | kitty
43 | sketchybar
44 | ssh
45 | copilot-language-server
46 | nix-init
47 | pandoc
48 |
49 | # for window manager
50 | rofi
51 | sway
52 | swaylock
53 | waybar
54 | ]
55 |
--------------------------------------------------------------------------------
/home-manager/programs/basic.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | sources,
4 | }:
5 | let
6 | bat = import ./bat { inherit pkgs sources; };
7 | bottom = import ./bottom;
8 | direnv = import ./direnv;
9 | dust = import ./dust;
10 | editorconfig = import ./editorconfig { inherit pkgs; };
11 | eza = import ./eza;
12 | fd = import ./fd;
13 | fish = import ./fish { inherit pkgs sources; };
14 | gnupg = import ./gnupg;
15 | man = import ./man;
16 | misc = import ./misc;
17 | neovim = import ./neovim { inherit pkgs sources; };
18 | password-store = import ./password-store { inherit pkgs; };
19 | peco = import ./peco { inherit pkgs; };
20 | fzf = import ./fzf;
21 | readline = import ./readline;
22 | ripgrep = import ./ripgrep;
23 | jq = import ./jq;
24 | sops = import ./sops;
25 | tig = import ./tig { inherit pkgs sources; };
26 | tmux = import ./tmux { inherit pkgs; };
27 | vim = import ./vim { inherit pkgs; };
28 | wget = import ./wget { inherit pkgs; };
29 | zellij = import ./zellij;
30 | in
31 | [
32 | bat
33 | bottom
34 | direnv
35 | dust
36 | editorconfig
37 | eza
38 | fd
39 | fish
40 | gnupg
41 | man
42 | misc
43 | password-store
44 | neovim
45 | peco
46 | fzf
47 | readline
48 | ripgrep
49 | jq
50 | sops
51 | tig
52 | tmux
53 | vim
54 | wget
55 | zellij
56 | ]
57 |
--------------------------------------------------------------------------------
/home-manager/programs/bat/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, sources }:
2 | {
3 | programs.bat = {
4 | enable = true;
5 | themes = {
6 | dracula = {
7 | src = sources.dracula-sublime.src;
8 | file = "Dracula.tmTheme";
9 | };
10 | };
11 | syntaxes = {
12 | gleam = {
13 | src = sources.sublime-gleam.src;
14 | file = "syntax/gleam.sublime-syntax";
15 | };
16 | };
17 | };
18 |
19 | programs.fish = {
20 | shellAliases = {
21 | cat = "bat";
22 | };
23 | };
24 | }
25 |
--------------------------------------------------------------------------------
/home-manager/programs/bottom/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.bottom = {
3 | enable = true;
4 | settings = {
5 | row = [
6 | {
7 | child = [
8 | {
9 | ratio = 2;
10 | type = "cpu";
11 | }
12 | { type = "mem"; }
13 | ];
14 | }
15 | {
16 | child = [
17 | {
18 | ratio = 2;
19 | type = "net";
20 | }
21 | {
22 | ratio = 2;
23 | type = "disk";
24 | }
25 | { type = "temp"; }
26 | ];
27 | }
28 | {
29 | ratio = 3;
30 | child = [
31 | {
32 | default = true;
33 | type = "proc";
34 | }
35 | ];
36 | }
37 | ];
38 | colors = {
39 | avg_cpu_color = "Red";
40 | border_color = "White";
41 | graph_color = "Gray";
42 | highlighted_border_color = "LightMagenta";
43 | selected_bg_color = "Magenta";
44 | selected_text_color = "Black";
45 | table_header_color = "Blue";
46 | text_color = "White";
47 | widget_title_color = "Cyan";
48 | };
49 | disk_filter = {
50 | is_list_ignored = true;
51 | list = [ "/dev/loop\\d+" ];
52 | regex = true;
53 | };
54 | flags = {
55 | basic = false;
56 | case_sensitive = false;
57 | dot_marker = false;
58 | group_processes = true;
59 | hide_table_gap = true;
60 | rate = 700;
61 | };
62 | };
63 | };
64 | }
65 |
--------------------------------------------------------------------------------
/home-manager/programs/copilot-language-server/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, nodePkgs }:
2 | let
3 | platforms = {
4 | "x86_64-linux" = "linux-amd64";
5 | "aarch64-linux" = "linux-aarch64";
6 | "x86_64-darwin" = "darwin-amd64";
7 | "aarch64-darwin" = "darwin-arm64";
8 | };
9 | platform = builtins.getAttr pkgs.system platforms;
10 | in
11 | {
12 | home.packages = [ nodePkgs."@github/copilot-language-server" ];
13 |
14 | programs.fish = {
15 | interactiveShellInit = ''
16 | set -gx COPILOT_LANGUAGE_SERVER_PATH ${
17 | nodePkgs."@github/copilot-language-server"
18 | }/lib/node_modules/@github/copilot-language-server/native/${platform}/copilot-language-server
19 | '';
20 | };
21 | }
22 |
--------------------------------------------------------------------------------
/home-manager/programs/direnv/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.direnv = {
3 | enable = true;
4 | config.global.disable_stdin = true;
5 | stdlib = ''
6 | use_github_token() {
7 | export GITHUB_TOKEN=$(gh auth token)
8 | }
9 | '';
10 | };
11 |
12 | programs.fish = {
13 | interactiveShellInit = ''
14 | set -gx DIRENV_LOG_FORMAT ""
15 | eval (direnv hook fish)
16 | '';
17 | };
18 | }
19 |
--------------------------------------------------------------------------------
/home-manager/programs/dust/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.dust = {
3 | enable = true;
4 | config = ''
5 | # Print tree upside down (biggest highest)
6 | reverse=true
7 |
8 | # Subdirectories will not have their path shortened
9 | display-full-paths=true
10 |
11 | # Use file length instead of blocks
12 | display-apparent-size=true
13 |
14 | # No colors will be printed
15 | no-colors=true
16 |
17 | # No percent bars or percentages will be displayed
18 | no-bars=true
19 |
20 | # No total row will be displayed
21 | skip-total=true
22 |
23 | # Do not display hidden files
24 | ignore-hidden=true
25 |
26 | # print sizes in powers of 1000 (e.g., 1.1G)
27 | output-format="si"
28 | '';
29 | };
30 | }
31 |
--------------------------------------------------------------------------------
/home-manager/programs/editorconfig/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | home.packages = with pkgs; [ editorconfig-core-c ];
4 | editorconfig = {
5 | enable = true;
6 | settings = {
7 | "*" = {
8 | charset = "utf-8";
9 | end_of_line = "lf";
10 | insert_final_newline = true;
11 | trim_trailing_whitespace = true;
12 | indent_style = "space";
13 | };
14 | "{Makefile, *.mk}" = {
15 | indent_style = "tab";
16 | indent_size = 4;
17 | };
18 | "nginx.conf" = {
19 | indent_size = 4;
20 | indent_style = "tab";
21 | };
22 | "mpd.conf" = {
23 | indent_size = 4;
24 | indent_style = "tab";
25 | };
26 | "*.{yml,yaml}" = {
27 | indent_size = 2;
28 | };
29 | "*.tf" = {
30 | indent_size = 2;
31 | };
32 | "*.scala" = {
33 | indent_size = 2;
34 | };
35 | "*.json" = {
36 | indent_size = 2;
37 | };
38 | "*.{el,lisp,asd}" = {
39 | max_line_length = 80;
40 | };
41 | "*.v" = {
42 | indent_size = 4;
43 | indent_style = "tab";
44 | };
45 | "*.{ts,tsx}" = {
46 | indent_size = 2;
47 | };
48 | "*.toml" = {
49 | indent_size = 2;
50 | };
51 | "*.xml" = {
52 | indent_size = 2;
53 | };
54 | "*.jsonnet" = {
55 | indent_size = 2;
56 | };
57 | "*.nix" = {
58 | indent_size = 2;
59 | };
60 | };
61 | };
62 | }
63 |
--------------------------------------------------------------------------------
/home-manager/programs/emacs/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | emacsPkg,
4 | org-babel,
5 | }:
6 | let
7 | tangle = org-babel.lib.tangleOrgBabel { languages = [ "emacs-lisp" ]; };
8 | in
9 | {
10 | programs.emacs = {
11 | enable = true;
12 | package = emacsPkg;
13 | };
14 |
15 | home = {
16 | file = {
17 | ".emacs.d/init.el".text = tangle (builtins.readFile ./elisp/init.org);
18 | ".emacs.d/early-init.el".text = tangle (builtins.readFile ./elisp/early-init.org);
19 | ".emacs.d/misc/yasnippet.org".source = ./misc/yasnippet.org;
20 | ".emacs.d/misc/mu4e-dashboard.org".source = ./misc/mu4e-dashboard.org;
21 | };
22 |
23 | packages = with pkgs; [
24 | emacs-lsp-booster
25 | pinentry-emacs
26 | ];
27 | };
28 | }
29 |
--------------------------------------------------------------------------------
/home-manager/programs/emacs/elisp/early-init.org:
--------------------------------------------------------------------------------
1 | #+TITLE: early-init.el - Configurations for GNU Emacs
2 | #+AUTHOR: takeokunn
3 | #+EMAIL: bararararatty@gmail.com
4 | #+STARTUP: fold
5 | #+HTML_HEAD:
6 | #+HTML_HEAD:
7 | #+HTML_HEAD:
8 | #+HTML_HEAD:
9 | #+HTML_HEAD:
10 | #+HTML_HEAD:
11 | * early-init.el
12 | ** Header
13 | #+begin_src emacs-lisp :tangle yes
14 | ;; early-init.el --- My early-init.el -*- lexical-binding: t -*-
15 | #+end_src
16 | ** 自動的なpackageのロードを無効にする
17 | #+begin_src emacs-lisp :tangle yes
18 | (setq package-enable-at-startup nil)
19 | #+end_src
20 | ** tab bar非表示
21 | #+begin_src emacs-lisp :tangle yes
22 | (push '(menu-bar-lines . 0) default-frame-alist)
23 | (push '(tool-bar-lines . 0) default-frame-alist)
24 | #+end_src
25 | ** スタートアップメッセージを非表示
26 | #+begin_src emacs-lisp :tangle yes
27 | (setq inhibit-startup-message t)
28 | #+END_SRC
29 | ** 自動生成ファイルを無効にする
30 | #+begin_src emacs-lisp :tangle yes
31 | (setq make-backup-files nil)
32 | (setq auto-save-default nil)
33 | (setq auto-save-list-file-prefix nil)
34 | (setq create-lockfiles nil)
35 | #+END_SRC
36 | ** GC/Memory
37 | #+begin_src emacs-lisp :tangle yes
38 | (setq gc-cons-threshold (* 10 128 1024 1024))
39 | (setq garbage-collection-messages nil)
40 | #+END_SRC
41 | ** read-process
42 | #+begin_src emacs-lisp :tangle yes
43 | (setq read-process-output-max (* 8 1024 1024))
44 | #+end_src
45 | ** ビープ音を消す
46 | #+begin_src emacs-lisp :tangle yes
47 | (setq ring-bell-function 'ignore)
48 | #+end_src
49 | ** デフォルトのpathをかえる
50 | #+begin_src emacs-lisp :tangle yes
51 | (setq default-directory "~/")
52 | (setq command-line-default-directory "~/")
53 | #+end_src
54 | ** scratch buffer
55 | #+begin_src emacs-lisp :tangle yes
56 | (setq initial-scratch-message nil)
57 | (setq initial-major-mode 'fundamental-mode)
58 | #+end_src
59 | ** x session resourcesを無視します
60 | #+begin_src emacs-lisp :tangle yes
61 | (advice-add 'x-apply-session-resources :override 'ignore)
62 | #+end_src
63 | ** inhibit-compacting-font-caches
64 | #+begin_src emacs-lisp :tangle yes
65 | (setq inhibit-compacting-font-caches t)
66 | #+end_src
67 | ** history-delete-duplicates
68 | #+begin_src emacs-lisp :tangle yes
69 | (setq history-delete-duplicates t)
70 | #+end_src
71 | ** vc-follow-symlinks
72 | #+begin_src emacs-lisp :tangle yes
73 | (setq vc-follow-symlinks t)
74 | #+end_src
75 | ** error抑制
76 | #+begin_src emacs-lisp :tangle yes
77 | (setq byte-compile-warnings '(cl-functions))
78 | #+end_src
79 |
--------------------------------------------------------------------------------
/home-manager/programs/emacs/misc/mu4e-dashboard.org:
--------------------------------------------------------------------------------
1 | * Mailboxes *[[mu:flag:unread|%3d][4]]*
2 |
3 | /[i]/ [[mu:m:/Gmail/INBOX][Inbox]] /.............../ /[[mu:m:/Gmail/INBOX|%3d][4]]/
4 | /[i]/ [[mu:m:/Gmail/Emacs][Emacs]] /.............../ /[[mu:m:/Gmail/Emacs|%3d][4]]/
5 | /[i]/ [[mu:m:/Gmail/GitHub][GitHub]] /.............../ /[[mu:m:/Gmail/Emacs|%3d][4]]/
6 | /[i]/ [[mu:m:/Gmail/Guix][Guix]] /.............../ /[[mu:m:/Gmail/Guix|%3d][4]]/
7 |
8 | * Smart mailboxes
9 |
10 | /[t]/ [[mu:date:today..now][Today]] /............../ /[[mu:date:today..now|%3d][ 19]]/
11 | /[y]/ [[mu:date:2d..today and not date:today..now][Yesterday]] /........../ /[[mu:date:2d..today and not date:today..now|%3d][380]]/
12 | /[w]/ [[mu:date:1w..now][Last week]] /......... /[[mu:date:7d..now|%4d][1196]]/
13 | /[m]/ [[mu:date:4w..now][Last month]] /......../ /[[mu:date:4w..|%4d][3924]]/
14 |
15 | * /Configuration/
16 | :PROPERTIES:
17 | :VISIBILITY: hideall
18 | :END:
19 |
20 | #+STARTUP: showall showstars indent
21 |
22 | #+NAME: query
23 | #+BEGIN_SRC shell :results list raw :var query="flag:unread count=5
24 | export LANG="en_US.UTF-8"; export LC_ALL="en_US.UTF-8";
25 | mu find --sortfield=date --reverse --fields "f s" $query | head -$count
26 | #+END_SRC
27 |
28 | #+KEYMAP: u | mu4e-headers-search "flag:unread"
29 | #+KEYMAP: i | mu4e-headers-search "m:/Gmail/INBOX"
30 | #+KEYMAP: e | mu4e-headers-search "m:/Gmail/Emacs"
31 | #+KEYMAP: h | mu4e-headers-search "m:/Gmail/GitHub"
32 | #+KEYMAP: g | mu4e-headers-search "m:/Gmail/Guix"
33 |
34 | #+KEYMAP: t | mu4e-headers-search "date:today..now"
35 | #+KEYMAP: y | mu4e-headers-search "date:2d..today and not date:today..now"
36 | #+KEYMAP: w | mu4e-headers-search "date:7d..now"
37 | #+KEYMAP: m | mu4e-headers-search "date:4w..now"
38 |
39 | #+KEYMAP: C | mu4e-compose-new
40 | #+KEYMAP: U | mu4e-dashboard-update
41 | #+KEYMAP: ; | mu4e-context-switch
42 | #+KEYMAP: q | mu4e-dashboard-quit
43 | #+KEYMAP: W | mu4e-headers-toggle-include-related
44 | #+KEYMAP: O | mu4e-headers-change-sorting
45 | #+KEYMAP: x | mu4e-mark-execute-all t
46 | #+KEYMAP: | org-open-at-point
47 |
--------------------------------------------------------------------------------
/home-manager/programs/eza/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.eza = {
3 | enable = true;
4 | git = true;
5 |
6 | enableBashIntegration = false;
7 | enableZshIntegration = false;
8 | enableFishIntegration = false;
9 | enableIonIntegration = false;
10 | };
11 |
12 | programs.fish = {
13 | shellAliases = {
14 | ls = "eza";
15 | la = "eza -a";
16 | lt = "eza --tree";
17 | ll = "eza -la";
18 | lla = "eza -la";
19 | };
20 | };
21 | }
22 |
--------------------------------------------------------------------------------
/home-manager/programs/fd/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.fd = {
3 | enable = true;
4 | hidden = true;
5 | ignores = [ ".git/" ];
6 | };
7 | }
8 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/completions/actionlint.fish:
--------------------------------------------------------------------------------
1 | complete -c actionlint -o color -d "Always enable colorful output. This is useful to force colorful outputs"
2 | complete -c actionlint -o config -d "File path to config file"
3 | complete -c actionlint -o debug -d "Enable debug output (for development)"
4 | complete -c actionlint -o format -d "Custom template to format error messages in Go template syntax. See https://github.com/rhysd/actionlint/tree/main/docs/usage.md#format"
5 | complete -c actionlint -o -ignore -d "Regular expression matching to error messages you want to ignore. This flag is repeatable"
6 | complete -c actionlint -o init-config -d "Generate default config file at .github/actionlint.yaml in current project"
7 | complete -c actionlint -o no-color -d "Disable colorful output"
8 | complete -c actionlint -o oneline -d "Use one line per one error. Useful for reading error messages from programs"
9 | complete -c actionlint -o pyflakes -d "Command name or file path of "pyflakes" external command. If empty, pyflakes integration will be disabled (default \"pyflakes\")"
10 | complete -c actionlint -o shellcheck -d "Command name or file path of \"shellcheck\" external command. If empty, shellcheck integration will be disabled (default \"shellcheck\")"
11 | complete -c actionlint -o stdin-filename -d "File name when reading input from stdin"
12 | complete -c actionlint -o verbose -d "Enable verbose output"
13 | complete -c actionlint -o version -d "Show version and how this binary was installed"
14 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/completions/aws.fish:
--------------------------------------------------------------------------------
1 | complete -c aws -f -a '(
2 | begin
3 | set -lx COMP_SHELL fish
4 | set -lx COMP_LINE (commandline)
5 | aws_completer
6 | end
7 | )'
8 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/completions/cdk.fish:
--------------------------------------------------------------------------------
1 | complete -f -c cdk -n __fish_use_subcommand -xa list -d "Lists all stacks in the app"
2 | complete -f -c cdk -n __fish_use_subcommand -xa ls -d "Lists all stacks in the app"
3 | complete -f -c cdk -n __fish_use_subcommand -xa synthesize -d "Synthesizes and prints the CloudFormation template for this stack"
4 | complete -f -c cdk -n __fish_use_subcommand -xa synth -d "Synthesizes and prints the CloudFormation template for this stack"
5 | complete -f -c cdk -n __fish_use_subcommand -xa bootstrap -d "Deploys the CDK toolkit stack into an AWS environment"
6 | complete -f -c cdk -n __fish_use_subcommand -xa deploy -d "Deploys the stack(s) named STACKS into your AWS account"
7 | complete -f -c cdk -n __fish_use_subcommand -xa destroy -d "Destroy the stack(s) named STACKS"
8 | complete -f -c cdk -n __fish_use_subcommand -xa diff -d "Compares the specified stack with the deployed stack or a local template file, and returns with status 1 if any difference is found"
9 | complete -f -c cdk -n __fish_use_subcommand -xa metadata -d "Returns all metadata associated with this stack"
10 | complete -f -c cdk -n __fish_use_subcommand -xa init -d "Create a new, empty CDK project from a template."
11 | complete -f -c cdk -n __fish_use_subcommand -xa context -d "Manage cached context values"
12 | complete -f -c cdk -n __fish_use_subcommand -xa docs -d "Opens the reference documentation in a browser"
13 | complete -f -c cdk -n __fish_use_subcommand -xa doc -d "Opens the reference documentation in a browser"
14 | complete -f -c cdk -n __fish_use_subcommand -xa doctor -d "Check your set-up for potential problems"
15 |
16 | complete -c cdk -s a -d "REQUIRED: command-line for executing your app or a cloud assembly directory (e.g. \"node bin/my-app.js\") [string]"
17 | complete -c cdk -l app -d "REQUIRED: command-line for executing your app or a cloud assembly directory (e.g. \"node bin/my-app.js\") [string]"
18 | complete -c cdk -s c -d "Add contextual string parameter (KEY=VALUE) [array]"
19 | complete -c cdk -l context -d "Add contextual string parameter (KEY=VALUE) [array]"
20 | complete -c cdk -s p -d "Name or path of a node package that extend the CDK features. Can be specified multiple times [array]"
21 | complete -c cdk -l plugin -d "Name or path of a node package that extend the CDK features. Can be specified multiple times [array]"
22 | complete -c cdk -l trace -d "Print trace for stack warnings [boolean]"
23 | complete -c cdk -l strict -d "Do not construct stacks with warnings [boolean]"
24 | complete -c cdk -l ignore-errors -d "Ignores synthesis errors, which will likely producean invalid output [boolean] [default: false]"
25 | complete -c cdk -l ignore-errors -d "Ignores synthesis errors, which will likely produce"
26 | complete -c cdk -s j -d "Use JSON output instead of YAML when templates are printed to STDOUT [boolean] [default: false]"
27 | complete -c cdk -l json -d "Use JSON output instead of YAML when templates are printed to STDOUT [boolean] [default: false]"
28 | complete -c cdk -s v -d "Show debug logs (specify multiple times to increase verbosity) [count] [default: false]"
29 | complete -c cdk -l verbose -d "Show debug logs (specify multiple times to increase verbosity) [count] [default: false]"
30 | complete -c cdk -l debug -d "Enable emission of additional debugging information, such as creation stack traces of tokens [boolean] [default: false]"
31 | complete -c cdk -l profile -d "Use the indicated AWS profile as the default environment [string]"
32 | complete -c cdk -l proxy -d "Use the indicated proxy. Will read from HTTPS_PROXY environment variable if not specified [string]"
33 | complete -c cdk -l ca-bundle-path -d "Path to CA certificate to use when validating HTTPS requests. Will read from AWS_CA_BUNDLE environment variable if not specified [string]"
34 | complete -c cdk -s i -d "Force trying to fetch EC2 instance credentials. Default: guess EC2 instance status [boolean]"
35 | complete -c cdk -l ec2creds -d "Force trying to fetch EC2 instance credentials. Default: guess EC2 instance status [boolean]"
36 | complete -c cdk -l version-reporting -d "Include the \"AWS::CDK::Metadata\" resource in synthesized templates (enabled by default) [boolean]"
37 | complete -c cdk -l path-metadata -d "Include \"aws:cdk:path\" CloudFormation metadata for each resource (enabled by default) [boolean] [default: true]"
38 | complete -c cdk -l asset-metadata -d "Include \"aws:asset:*\" CloudFormation metadata for resources that user assets (enabled by default) [boolean] [default: true]"
39 | complete -c cdk -s r -d "ARN of Role to use when invoking CloudFormation [string]"
40 | complete -c cdk -l role-arn -d "ARN of Role to use when invoking CloudFormation [string]"
41 | complete -c cdk -l toolkit-stack-name -d "The name of the CDK toolkit stack [string]"
42 | complete -c cdk -l staging -d "Copy assets to the output directory (use --no-staging to disable, needed for local debugging the source files with SAM CLI) [boolean] [default: true]"
43 | complete -c cdk -s o -d "Emits the synthesized cloud assembly into a directory (default: cdk.out) [string]"
44 | complete -c cdk -l output -d "Emits the synthesized cloud assembly into a directory (default: cdk.out) [string]"
45 | complete -c cdk -l no-color -d "Removes colors and other style from console output [boolean] [default: false]"
46 | complete -c cdk -l fail -d "Fail with exit code 1 in case of diff [boolean] [default: false]"
47 | complete -c cdk -l version -d "Show version number [boolean]"
48 | complete -c cdk -s l -d "Display environment information for each stack [boolean] [default: false]"
49 | complete -c cdk -l long -d "Display environment information for each stack [boolean] [default: false]"
50 | complete -c cdk -s h -d "Show help [boolean]"
51 | complete -c cdk -l help -d "Show help [boolean]"
52 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/completions/cmigemo.fish:
--------------------------------------------------------------------------------
1 | # option
2 | complete -c cmigemo -s d -l dict -d "Use a file for dictionary."
3 | complete -c cmigemo -s s -l subdict -d "Sub dictionary files. (MAX 8 times)"
4 | complete -c cmigemo -s q -l quiet -d "Show no message except results."
5 | complete -c cmigemo -s v -l vim -d "Use vim style regexp."
6 | complete -c cmigemo -s e -l emacs -d "Use emacs style regexp."
7 | complete -c cmigemo -s n -l nonewline -d "Don't use newline match."
8 | complete -c cmigemo -s w -l word -d "Expand a and soon exit."
9 | complete -c cmigemo -s h -l help -d "Show this message."
10 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/completions/ecschedule.fish:
--------------------------------------------------------------------------------
1 | # subcommands
2 | complete -f -c ecschedule -n __fish_use_subcommand -xa apply -d "apply the rule"
3 | complete -f -c ecschedule -n __fish_use_subcommand -xa dump -d "dump tasks"
4 | complete -f -c ecschedule -n __fish_use_subcommand -xa run -d "run the rule"
5 | complete -f -c ecschedule -n __fish_use_subcommand -xa diff -d "diff of the rule with remote"
6 |
7 | # option
8 | complete -c ecschedule -l conf -d configuration
9 | complete -c ecschedule -l version -d "display version"
10 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/completions/mitamae.fish:
--------------------------------------------------------------------------------
1 | complete -c mitamae -xa local -d "Run mitamae locally"
2 | complete -c mitamae -xa help -d "Describe available commands or one specific command"
3 | complete -c mitamae -xa version -d "Print version"
4 | complete -c mitamae -s l -l log-level -d "Default: info"
5 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/completions/pass.fish:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012-2014 Dmitry Medvinsky . All Rights Reserved.
2 | # This file is licensed under the GPLv2+. Please see COPYING for more information.
3 |
4 | set -l PROG pass
5 |
6 | function __fish_pass_get_prefix
7 | if set -q PASSWORD_STORE_DIR
8 | realpath -- "$PASSWORD_STORE_DIR"
9 | else
10 | echo "$HOME/.password-store"
11 | end
12 | end
13 |
14 | function __fish_pass_needs_command
15 | [ (count (commandline -opc)) -eq 1 ]
16 | end
17 |
18 | function __fish_pass_uses_command
19 | set -l cmd (commandline -opc)
20 | if [ (count $cmd) -gt 1 ]
21 | if [ $argv[1] = $cmd[2] ]
22 | return 0
23 | end
24 | end
25 | return 1
26 | end
27 |
28 | function __fish_pass_print_gpg_keys
29 | gpg2 --list-keys | grep uid | sed 's/.*<\(.*\)>/\1/'
30 | end
31 |
32 | function __fish_pass_print
33 | set -l ext $argv[1]
34 | set -l strip $argv[2]
35 | set -l prefix (__fish_pass_get_prefix)
36 | set -l matches $prefix/**$ext
37 | printf '%s\n' $matches | sed "s#$prefix/\(.*\)$strip#\1#"
38 | end
39 |
40 | function __fish_pass_print_entry_dirs
41 | __fish_pass_print /
42 | end
43 |
44 | function __fish_pass_print_entries
45 | __fish_pass_print ".gpg" ".gpg"
46 | end
47 |
48 | function __fish_pass_print_entries_and_dirs
49 | __fish_pass_print_entry_dirs
50 | __fish_pass_print_entries
51 | end
52 |
53 | function __fish_pass_git_complete
54 | set -l prefix (__fish_pass_get_prefix)
55 | set -l git_cmd (commandline -opc) (commandline -ct)
56 | set -e git_cmd[1 2] # Drop "pass git".
57 | complete -C"git -C $prefix $git_cmd"
58 | end
59 |
60 | complete -c $PROG -f -n __fish_pass_needs_command -a help -d 'Command: show usage help'
61 | complete -c $PROG -f -n __fish_pass_needs_command -a version -d 'Command: show program version'
62 |
63 | complete -c $PROG -f -n __fish_pass_needs_command -a init -d 'Command: initialize new password storage'
64 | complete -c $PROG -f -n '__fish_pass_uses_command init' -s p -l path -d 'Assign gpg-id for specified sub folder of password store'
65 |
66 | complete -c $PROG -f -n __fish_pass_needs_command -a ls -d 'Command: list passwords'
67 | complete -c $PROG -f -n '__fish_pass_uses_command ls' -a "(__fish_pass_print_entry_dirs)"
68 |
69 | complete -c $PROG -f -n __fish_pass_needs_command -a insert -d 'Command: insert new password'
70 | complete -c $PROG -f -n '__fish_pass_uses_command insert' -s e -l echo -d 'Echo the password on console'
71 | complete -c $PROG -f -n '__fish_pass_uses_command insert' -s m -l multiline -d 'Provide multiline password entry'
72 | complete -c $PROG -f -n '__fish_pass_uses_command insert' -s f -l force -d 'Do not prompt before overwriting'
73 | complete -c $PROG -f -n '__fish_pass_uses_command insert' -a "(__fish_pass_print_entry_dirs)"
74 |
75 | complete -c $PROG -f -n __fish_pass_needs_command -a generate -d 'Command: generate new password'
76 | complete -c $PROG -f -n '__fish_pass_uses_command generate' -s n -l no-symbols -d 'Do not use special symbols'
77 | complete -c $PROG -f -n '__fish_pass_uses_command generate' -s c -l clip -d 'Put the password in clipboard'
78 | complete -c $PROG -f -n '__fish_pass_uses_command generate' -s f -l force -d 'Do not prompt before overwriting'
79 | complete -c $PROG -f -n '__fish_pass_uses_command generate' -s i -l in-place -d 'Replace only the first line with the generated password'
80 | complete -c $PROG -f -n '__fish_pass_uses_command generate' -a "(__fish_pass_print_entry_dirs)"
81 |
82 | complete -c $PROG -f -n __fish_pass_needs_command -a mv -d 'Command: rename existing password'
83 | complete -c $PROG -f -n '__fish_pass_uses_command mv' -s f -l force -d 'Force rename'
84 | complete -c $PROG -f -n '__fish_pass_uses_command mv' -a "(__fish_pass_print_entries_and_dirs)"
85 |
86 | complete -c $PROG -f -n __fish_pass_needs_command -a cp -d 'Command: copy existing password'
87 | complete -c $PROG -f -n '__fish_pass_uses_command cp' -s f -l force -d 'Force copy'
88 | complete -c $PROG -f -n '__fish_pass_uses_command cp' -a "(__fish_pass_print_entries_and_dirs)"
89 |
90 | complete -c $PROG -f -n __fish_pass_needs_command -a rm -d 'Command: remove existing password'
91 | complete -c $PROG -f -n '__fish_pass_uses_command rm' -s r -l recursive -d 'Remove password groups recursively'
92 | complete -c $PROG -f -n '__fish_pass_uses_command rm' -s f -l force -d 'Force removal'
93 | complete -c $PROG -f -n '__fish_pass_uses_command rm' -a "(__fish_pass_print_entries_and_dirs)"
94 |
95 | complete -c $PROG -f -n __fish_pass_needs_command -a edit -d 'Command: edit password using text editor'
96 | complete -c $PROG -f -n '__fish_pass_uses_command edit' -a "(__fish_pass_print_entries)"
97 |
98 | complete -c $PROG -f -n __fish_pass_needs_command -a show -d 'Command: show existing password'
99 | complete -c $PROG -f -n '__fish_pass_uses_command show' -s c -l clip -d 'Put password in clipboard'
100 | complete -c $PROG -f -n '__fish_pass_uses_command show' -a "(__fish_pass_print_entries)"
101 | # When no command is given, `show` is defaulted.
102 | complete -c $PROG -f -n __fish_pass_needs_command -s c -l clip -d 'Put password in clipboard'
103 | complete -c $PROG -f -n __fish_pass_needs_command -a "(__fish_pass_print_entries)"
104 | complete -c $PROG -f -n '__fish_pass_uses_command -c' -a "(__fish_pass_print_entries)"
105 | complete -c $PROG -f -n '__fish_pass_uses_command --clip' -a "(__fish_pass_print_entries)"
106 |
107 | complete -c $PROG -f -n __fish_pass_needs_command -a git -d 'Command: execute a git command'
108 | complete -c $PROG -f -n '__fish_pass_uses_command git' -a '(__fish_pass_git_complete)'
109 | complete -c $PROG -f -n __fish_pass_needs_command -a find -d 'Command: find a password file or directory matching pattern'
110 | complete -c $PROG -f -n __fish_pass_needs_command -a grep -d 'Command: search inside of decrypted password files for matching pattern'
111 | complete -c $PROG -f -n '__fish_pass_uses_command grep' -a '(begin
112 | set -l cmd (commandline -opc) (commandline -ct)
113 | set -e cmd[1 2] # Drop "pass grep".
114 | complete -C"grep $cmd"
115 | end)'
116 |
117 | complete -c $PROG -f -n __fish_pass_needs_command -a otp
118 | complete -c $PROG -f -n '__fish_pass_uses_command otp' -s c -l clip
119 | complete -c $PROG -f -n '__fish_pass_uses_command otp' -a "(__fish_pass_print_entries)"
120 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/completions/pod.fish:
--------------------------------------------------------------------------------
1 | # subcommands
2 | complete -f -c pod -n __fish_use_subcommand -xa cache -d "Manipulate the CocoaPods cache"
3 | complete -f -c pod -n __fish_use_subcommand -xa deintegrate -d "Deintegrate CocoaPods from your project"
4 | complete -f -c pod -n __fish_use_subcommand -xa env -d "Display pod environment"
5 | complete -f -c pod -n __fish_use_subcommand -xa init -d "Generate a Podfile for the current directory"
6 | complete -f -c pod -n __fish_use_subcommand -xa install -d "Install project dependencies according to versions from a Podfile.lock"
7 | complete -f -c pod -n __fish_use_subcommand -xa ipc -d "Inter-process communication"
8 | complete -f -c pod -n __fish_use_subcommand -xa lib -d "Develop pods"
9 | complete -f -c pod -n __fish_use_subcommand -xa list -d "List pods"
10 | complete -f -c pod -n __fish_use_subcommand -xa outdated -d "Show outdated project dependencies"
11 | complete -f -c pod -n __fish_use_subcommand -xa plugins -d "Show available CocoaPods plugins"
12 | complete -f -c pod -n __fish_use_subcommand -xa repo -d "Manage spec-repositories"
13 | complete -f -c pod -n __fish_use_subcommand -xa search -d "Search for pods"
14 | complete -f -c pod -n __fish_use_subcommand -xa setup -d "Setup the CocoaPods environment"
15 | complete -f -c pod -n __fish_use_subcommand -xa spec -d "Manage pod specs"
16 | complete -f -c pod -n __fish_use_subcommand -xa trunk -d "Interact with the CocoaPods API (e.g. publishing new specs)"
17 | complete -f -c pod -n __fish_use_subcommand -xa try -d "Try a Pod!"
18 | complete -f -c pod -n __fish_use_subcommand -xa update -d "Update outdated project dependencies and create new Podfile.lock"
19 |
20 | # options
21 | complete -c pod -l allow-root -d "Allows CocoaPods to run as root"
22 | complete -c pod -l silent -d "Show nothing"
23 | complete -c pod -l version -d "Show the version of the tool"
24 | complete -c pod -l verbose -d "Show more debugging information"
25 | complete -c pod -l no-ansi -d "Show output without ANSI codes"
26 | complete -c pod -l help -d "Show help banner of specified command"
27 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/completions/pry.fish:
--------------------------------------------------------------------------------
1 | ### options
2 | complete -c pry -s e -d "A line of code to execute in context before the session starts"
3 | complete -c pry -l exec -d "A line of code to execute in context before the session starts"
4 | complete -c pry -l no-pager -d "Disable pager for long output"
5 | complete -c pry -l no-history -d "Disable history loading"
6 | complete -c pry -l no-color -d "Disable syntax highlighting for session"
7 | complete -c pry -s f -d "Suppress loading of pryrc"
8 | complete -c pry -s s -d "Only load specified plugin (and no others)."
9 | complete -c pry -l select-plugin -d "Only load specified plugin (and no others)."
10 | complete -c pry -s d -d "Disable a specific plugin."
11 | complete -c pry -l disable-plugin -d "Disable a specific plugin."
12 | complete -c pry -l no-plugins -d "Suppress loading of plugins."
13 | complete -c pry -l plugins -d "List installed plugins."
14 | complete -c pry -l simple-prompt -d "Enable simple prompt mode"
15 | complete -c pry -l noprompt -d "No prompt mode"
16 | complete -c pry -s r -d "`require` a Ruby script at startup"
17 | complete -c pry -l require -d "`require` a Ruby script at startup"
18 | complete -c pry -s I -d "Add a path to the $LOAD_PATH"
19 | complete -c pry -l gem -d "Shorthand for -I./lib -rgemname"
20 | complete -c pry -s v -d "Display the Pry version"
21 | complete -c pry -l version -d "Display the Pry version"
22 | complete -c pry -s c -d "Start the session in the specified context. Equivalent to `context.pry` in a session."
23 | complete -c pry -l context -d "Start the session in the specified context. Equivalent to `context.pry` in a session."
24 | complete -c pry -s h -d "Display this help message."
25 | complete -c pry -l help -d "Display this help message."
26 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/completions/shellcheck.fish:
--------------------------------------------------------------------------------
1 | complete -c shellcheck -s a -l check-sourced -d "Include warnings from sourced files"
2 | complete -c shellcheck -s C -l color -d "Use color (auto, always, never)"
3 | complete -c shellcheck -s i -l include -d "Consider only given types of warnings"
4 | complete -c shellcheck -s e -l exclude -d "Exclude types of warnings"
5 | complete -c shellcheck -s f -l format -d "Output format (checkstyle, diff, gcc, json, json1, quiet, tty)"
6 | complete -c shellcheck -l list-optional -d "List checks disabled by default"
7 | complete -c shellcheck -l norc -d "Don't look for .shellcheckrc files"
8 | complete -c shellcheck -s o -l enable -d "List of optional checks to enable (or 'all')"
9 | complete -c shellcheck -s P -l source-path -d "Specify path when looking for sourced files (\"SCRIPTDIR\" for script's dir)"
10 | complete -c shellcheck -s s -l shell -d "Specify dialect (sh, bash, dash, ksh)"
11 | complete -c shellcheck -s S -l severity -d "Minimum severity of errors to consider (error, warning, info, style)"
12 | complete -c shellcheck -s V -l version -d "Print version information"
13 | complete -c shellcheck -s W -l wiki-link-count -d "The number of wiki links to show, when applicable"
14 | complete -c shellcheck -s x -l external-sources -d "Allow 'source' outside of FILES"
15 | complete -c shellcheck -l help -d "Show this usage summary and exit"
16 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/completions/skylark.fish:
--------------------------------------------------------------------------------
1 | # subcommands
2 | complete -f -c skylark -n __fish_use_subcommand -xa gusto -d "fetch gusto coupon"
3 | complete -f -c skylark -n __fish_use_subcommand -xa jonathan -d "fetch jonathan coupon"
4 | complete -f -c skylark -n __fish_use_subcommand -xa bamiyan -d "fetch bamiyan coupon"
5 | complete -f -c skylark -n __fish_use_subcommand -xa yumean -d "fetch yumean coupon"
6 | complete -f -c skylark -n __fish_use_subcommand -xa steak_gusto -d "fetch steak_gusto coupon"
7 | complete -f -c skylark -n __fish_use_subcommand -xa steak_gusto -d "fetch grazie_gardens coupon"
8 | complete -f -c skylark -n __fish_use_subcommand -xa aiya -d "fetch aiya coupon"
9 | complete -f -c skylark -n __fish_use_subcommand -xa karayoshi -d "fetch karayoshi coupon"
10 | complete -f -c skylark -n __fish_use_subcommand -xa tonkara_tei -d "fetch tonkara_tei coupon"
11 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/completions/terminal-notifier.fish:
--------------------------------------------------------------------------------
1 | complete -c terminal-notifier -o help -d "Display this help banner."
2 | complete -c terminal-notifier -o version -d "Display terminal-notifier version."
3 | complete -c terminal-notifier -o message -d "The notification message."
4 | complete -c terminal-notifier -o remove -d "Removes a notification with the specified ‘group’ ID."
5 | complete -c terminal-notifier -o list -d "If the specified ‘group’ ID exists show when it was delivered, or use ‘ALL’ as ID to see all notifications. The output is a tab-separated list."
6 | complete -c terminal-notifier -o title -d "The notification title. Defaults to ‘Terminal’."
7 | complete -c terminal-notifier -o subtitle -d "The notification subtitle."
8 | complete -c terminal-notifier -o sound -d "The name of a sound to play when the notification appears. The names are listed in Sound Preferences. Use 'default' for the default notification sound."
9 | complete -c terminal-notifier -o group -d "A string which identifies the group the notifications belong to. Old notifications with the same ID will be removed."
10 | complete -c terminal-notifier -o activate -d "The bundle identifier of the application to activate when the user clicks the notification."
11 | complete -c terminal-notifier -o sender -d "The bundle identifier of the application that should be shown as the sender, including its icon."
12 | complete -c terminal-notifier -o appIcon -d "The URL of a image to display instead of the application icon (Mavericks+ only)"
13 | complete -c terminal-notifier -o contentImage -d "The URL of a image to display attached to the notification (Mavericks+ only)"
14 | complete -c terminal-notifier -o open -d "The URL of a resource to open when the user clicks the notification."
15 | complete -c terminal-notifier -o execute -d "A shell command to perform when the user clicks the notification."
16 | complete -c terminal-notifier -o ignoreDnD -d "Send notification even if Do Not Disturb is enabled."
17 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/completions/tfenv.fish:
--------------------------------------------------------------------------------
1 | # subcommands
2 | complete -f -c tfenv -n __fish_use_subcommand -xa install -d "Install a specific version of Terraform"
3 | complete -f -c tfenv -n __fish_use_subcommand -xa use -d "Switch a version to use"
4 | complete -f -c tfenv -n __fish_use_subcommand -xa uninstall -d "Uninstall a specific version of Terraform"
5 | complete -f -c tfenv -n __fish_use_subcommand -xa list -d "List all installed versions"
6 | complete -f -c tfenv -n __fish_use_subcommand -xa list-remote -d "List all installable versions"
7 | complete -f -c tfenv -n __fish_use_subcommand -xa version-name -d "Print current version"
8 | complete -f -c tfenv -n __fish_use_subcommand -xa init -d "Update environment to use tfenv correctly."
9 | complete -f -c tfenv -n __fish_use_subcommand -xa pin -d "Write the current active version to ./.terraform-version"
10 | complete -f -c tfenv -n __fish_use_subcommand -xa help
11 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/completions/zat.fish:
--------------------------------------------------------------------------------
1 | ### subcommands
2 | complete -f -c zat -n __fish_use_subcommand -xa clean -d "Remove app packages in temp folder"
3 | complete -f -c zat -n __fish_use_subcommand -xa create -d "Create and install app on your account"
4 | complete -f -c zat -n __fish_use_subcommand -xa help -d "Describe available commands or one specific command"
5 | complete -f -c zat -n __fish_use_subcommand -xa new -d "Generate a new app"
6 | complete -f -c zat -n __fish_use_subcommand -xa package -d "Package your app"
7 | complete -f -c zat -n __fish_use_subcommand -xa server -d "Run a http server to serve the local app"
8 | complete -f -c zat -n __fish_use_subcommand -xa theme -d "Development tools for Theming Center (Beta)"
9 | complete -f -c zat -n __fish_use_subcommand -xa update -d "Update app on the server"
10 | complete -f -c zat -n __fish_use_subcommand -xa validate -d "Validate your app"
11 | complete -f -c zat -n __fish_use_subcommand -xa version -d "Print the version"
12 |
13 | ### theme
14 | complete -c zat -n "__fish_seen_subcommand_from theme" -xa help -d "Describe subcommands or one specific subcommand"
15 | complete -c zat -n "__fish_seen_subcommand_from theme" -xa preview -d "Preview a theme in development"
16 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, sources }:
2 | {
3 | xdg.configFile = {
4 | # completions
5 | "fish/completions/" = {
6 | source = ./completions;
7 | recursive = true;
8 | };
9 |
10 | # functions
11 | "fish/functions/" = {
12 | source = ./functions;
13 | recursive = true;
14 | };
15 | };
16 |
17 | programs.fish = {
18 | enable = true;
19 |
20 | shellInit = ''
21 | # for tmux
22 | # if type -q tmux && test -z $TMUX && status --is-login
23 | # tmux_attach_session_if_needed
24 | # end
25 |
26 | # suppress fish_greeting
27 | set fish_greeting
28 |
29 | # for env
30 | set -x TMPDIR /tmp
31 | set -x COLORTERM truecolor
32 |
33 | if test -d /etc/profiles/per-user/(whoami)/bin
34 | fish_add_path /etc/profiles/per-user/(whoami)/bin
35 | end
36 | '';
37 |
38 | shellInitLast = ''
39 | # for private.fish
40 | if test -e ~/.config/fish/private.fish
41 | source ~/.config/fish/private.fish
42 | end
43 | '';
44 |
45 | shellAliases = {
46 | cdd = "cd ~/Desktop";
47 | make = "make -j8";
48 | magit = "emacsclient -nw --alternate-editor=\"\" -e \"(magit-status)\"";
49 | };
50 |
51 | plugins = [
52 | {
53 | name = sources.fish-bd.pname;
54 | src = sources.fish-bd.src;
55 | }
56 | {
57 | name = sources.fish-artisan-completion.pname;
58 | src = sources.fish-artisan-completion.src;
59 | }
60 | {
61 | name = sources.fish-ghq.pname;
62 | src = sources.fish-ghq.src;
63 | }
64 | {
65 | name = sources.dracula-fish.pname;
66 | src = sources.dracula-fish.src;
67 | }
68 | {
69 | name = sources.fish-done.pname;
70 | src = sources.fish-done.src;
71 | }
72 | {
73 | name = sources.fish-autopair.pname;
74 | src = sources.fish-autopair.src;
75 | }
76 | {
77 | name = sources.fish-nix-completions.pname;
78 | src = sources.fish-nix-completions.src;
79 | }
80 | {
81 | name = sources.fish-nix-env.pname;
82 | src = sources.fish-nix-env.src;
83 | }
84 | {
85 | name = sources.fish-dart-completions.pname;
86 | src = sources.fish-dart-completions.src;
87 | }
88 | ];
89 | };
90 | }
91 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/calculate_oidc_thumbprint.fish:
--------------------------------------------------------------------------------
1 | function calculate_oidc_thumbprint --description "e.g. `calculate_oidc_thumbprint token.actions.githubusercontent.com`"
2 | set -u url "https:"//$argv[1]"/.well-known/openid-configuration"
3 | set -u jwks_uri (curl -s $url | jq -r '.jwks_uri | split("/")[2]')
4 |
5 | set -u tmpfile (mktemp)
6 | echo | openssl s_client -servername $jwks_uri -showcerts -connect $jwks_uri:443 2>/dev/null | sed -n -e /BEGIN/h -e '/BEGIN/,/END/H' -e '$x' -e '$p' | tail +2 >$tmpfile
7 |
8 | set -u thumbprint (openssl x509 -in $tmpfile -fingerprint -noout | sed -e "s/.*=//" -e "s/://g" | tr "ABCDEF" "abcdef")
9 | echo $thumbprint
10 |
11 | rm $tmpfile
12 | end
13 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/fish_prompt.fish:
--------------------------------------------------------------------------------
1 | function fish_prompt
2 | if [ $status -eq 0 ]
3 | set status_face (set_color 50fa7b)"(*´ω`*) < "
4 | else
5 | set status_face (set_color ff5555)"ಥ﹏ಥ < "
6 | end
7 | printf '%s %s' (set_color f1fa8c)(prompt_pwd) $status_face
8 | end
9 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/fish_user_key_bindings.fish:
--------------------------------------------------------------------------------
1 | function fish_user_key_bindings
2 | bind \co fzf_ghq
3 | bind \c_ edit_command_buffer
4 |
5 | # for vi-mode
6 | fish_vi_key_bindings insert
7 | bind -M insert \cf forward-char
8 |
9 | # unbind
10 | bind -e \cg
11 | end
12 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/fzf_ghq.fish:
--------------------------------------------------------------------------------
1 | function fzf_ghq
2 | ghq list --full-path | fzf --preview "bat --color=always --style=header,grid --line-range :80 {}/README.*" | read recent
3 | if [ $recent ]
4 | cd $recent
5 | commandline -r ''
6 | commandline -f repaint
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/ghq_create.fish:
--------------------------------------------------------------------------------
1 | function ghq_create
2 | # Create github repo
3 | set license (curl https://api.github.com/licenses | jq -r ".[].spdx_id" | peco)
4 | gh repo create (echo $argv) --public --license $license -y
5 | ghq get git@github.com:takeokunn/(echo $argv).git
6 |
7 | # Add README.md
8 | cd (ghq root)/github.com/takeokunn/(echo $argv)
9 | echo "# "(echo $argv) >>README.md
10 | git add README.md
11 | git commit -m "Add README.md"
12 | git branch -M main
13 | git push -u origin main
14 | end
15 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/ghq_org_all.fish:
--------------------------------------------------------------------------------
1 | function ghq_org_all
2 | curl takeokunn "https://api.github.com/orgs/"(echo $argv)"/repos" | jq -r ".[].clone_url" | xargs -L1 ghq get
3 | end
4 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/ghq_remove.fish:
--------------------------------------------------------------------------------
1 | function ghq_remove
2 | ghq list --full-path | peco | xargs -L1 rm -fr
3 | end
4 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/ghq_remove_user.fish:
--------------------------------------------------------------------------------
1 | function ghq_remove_user
2 | ghq list | grep "github.com" | cut -d / -f 2 | sort | uniq | peco | read recent
3 | ghq list --full-path | grep -E "/"(echo $recent)"/" | xargs -L1 rm -fr
4 | end
5 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/ghq_user_all.fish:
--------------------------------------------------------------------------------
1 | function ghq_user_all
2 | curl "https://api.github.com/users/"(echo $argv)"/repos" | jq -r ".[].clone_url" | xargs -L1 ghq get
3 | end
4 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/ghq_users.fish:
--------------------------------------------------------------------------------
1 | function ghq_users
2 | ghq list | grep "github.com" | cut -d / -f 2 | sort | uniq
3 | end
4 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/gibo_generate.fish:
--------------------------------------------------------------------------------
1 | function gibo_generate
2 | gibo list | peco | xargs gibo dump >>.gitignore
3 | end
4 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/growi_create_page.fish:
--------------------------------------------------------------------------------
1 | function growi_create_page
2 | set -l access_token $argv[1]
3 | set -l base_url $argv[2]
4 | set -l base_path $argv[3]
5 | set -l slug (read -p "echo 'slug > '")
6 | set -l path $base_path$slug
7 |
8 | curl -s $base_url"/_api/v3/pages?access_token="$access_token \
9 | -X POST \
10 | -d "{\"path\": \""$path"\",\"body\": \"# "$slug"\"}" \
11 | -H "Content-Type: application/json"
12 |
13 | echo $base_url$path
14 | echo $base_url$path | pbcopy
15 | open $base_url$path
16 | end
17 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/kill_process.fish:
--------------------------------------------------------------------------------
1 | function kill_process
2 | ps -ef | grep $argv
3 | ps -ef | grep $argv | awk '{print $2}' | xargs kill -9 >/dev/null 2>&1
4 | end
5 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/logo.fish:
--------------------------------------------------------------------------------
1 | function logo
2 | echo ' '(set_color F00)'___
3 | ___======____='(set_color FF7F00)'-'(set_color FF0)'-'(set_color FF7F00)'-='(set_color F00)')
4 | /T \_'(set_color FF0)'--='(set_color FF7F00)'=='(set_color F00)')
5 | [ \ '(set_color FF7F00)'('(set_color FF0)'0'(set_color FF7F00)') '(set_color F00)'\~ \_'(set_color FF0)'-='(set_color FF7F00)'='(set_color F00)')
6 | \ / )J'(set_color FF7F00)'~~ \\'(set_color FF0)'-='(set_color F00)')
7 | \\\\___/ )JJ'(set_color FF7F00)'~'(set_color FF0)'~~ '(set_color F00)'\)
8 | \_____/JJJ'(set_color FF7F00)'~~'(set_color FF0)'~~ '(set_color F00)'\\
9 | '(set_color FF7F00)'/ '(set_color FF0)'\ '(set_color FF0)', \\'(set_color F00)'J'(set_color FF7F00)'~~~'(set_color FF0)'~~ '(set_color FF7F00)'\\
10 | (-'(set_color FF0)'\)'(set_color F00)'\='(set_color FF7F00)'|'(set_color FF0)'\\\\\\'(set_color FF7F00)'~~'(set_color FF0)'~~ '(set_color FF7F00)'L_'(set_color FF0)'_
11 | '(set_color FF7F00)'('(set_color F00)'\\'(set_color FF7F00)'\\) ('(set_color FF0)'\\'(set_color FF7F00)'\\\)'(set_color F00)'_ '(set_color FF0)'\=='(set_color FF7F00)'__
12 | '(set_color F00)'\V '(set_color FF7F00)'\\\\'(set_color F00)'\) =='(set_color FF7F00)'=_____ '(set_color FF0)'\\\\\\\\'(set_color FF7F00)'\\\\
13 | '(set_color F00)'\V) \_) '(set_color FF7F00)'\\\\'(set_color FF0)'\\\\JJ\\'(set_color FF7F00)'J\)
14 | '(set_color F00)'/'(set_color FF7F00)'J'(set_color FF0)'\\'(set_color FF7F00)'J'(set_color F00)'T\\'(set_color FF7F00)'JJJ'(set_color F00)'J)
15 | (J'(set_color FF7F00)'JJ'(set_color F00)'| \UUU)
16 | (UU)'(set_color normal)
17 | end
18 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/loop.fish:
--------------------------------------------------------------------------------
1 | function loop --description "loop "
2 | for i in (seq 1 $argv[1])
3 | eval $argv[2..-1]
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/myip.fish:
--------------------------------------------------------------------------------
1 | function myip
2 | set -l ip_address (curl -s https://checkip.amazonaws.com)"/32"
3 | echo $ip_address | pbcopy
4 | echo $ip_address
5 | end
6 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/peco_genact.fish:
--------------------------------------------------------------------------------
1 | function peco_genact
2 | genact -l | peco | xargs genact -m
3 | end
4 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/peco_ghq.fish:
--------------------------------------------------------------------------------
1 | function peco_ghq
2 | set -l query (commandline)
3 |
4 | if test -n $query
5 | set peco_flags --query "$query"
6 | end
7 |
8 | ghq list --full-path | peco $peco_flags | read recent
9 | if [ $recent ]
10 | cd $recent
11 | commandline -r ''
12 | commandline -f repaint
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/peco_growi.fish:
--------------------------------------------------------------------------------
1 | function peco_growi
2 | set -l base_url $argv[3]
3 | set -l path (echo $argv[2] | sort | uniq | peco)
4 | set -l my_path (
5 | curl -s $base_url"/_api/pages.list?path=$path&access_token="$argv[1]"&limit=1000" \
6 | -H "Content-Type: application/json" \
7 | | jq -r ".pages[].path" \
8 | | peco
9 | )
10 | echo $base_url$my_path
11 | echo $base_url$my_path | pbcopy
12 | open $base_url$my_path
13 | end
14 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/peco_redmine_my_issue.fish:
--------------------------------------------------------------------------------
1 | function peco_redmine_my_issue
2 | set -l base_url $argv[2]
3 | set -l issue (
4 | curl -s $base_url"/issues.json?limit=100&assigned_to_id=me" \
5 | -H "X-Redmine-API-Key: "$argv[1] \
6 | | jq -r '.issues[] | "[" + (.id|tostring) + "]" + .subject' \
7 | | peco
8 | )
9 | set -l issue_id (string match -r '\d+' $issue)
10 |
11 | echo $base_url"/issues/"$issue_id
12 | echo $base_url"/issues/"$issue_id | pbcopy
13 | open $base_url"/issues/"$issue_id
14 | end
15 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/peco_redmine_search_issue.fish:
--------------------------------------------------------------------------------
1 | function peco_redmine_search_issue
2 | set -l base_url $argv[2]
3 | set -l project (
4 | curl -s $base_url"/projects.json?limit=100" \
5 | -H "X-Redmine-API-Key: "$argv[1] \
6 | | jq -r '.projects[] | "[" + (.id|tostring) + "]" + " " + .name + " (" + .identifier + ")"' \
7 | | peco
8 | )
9 | set -l project_id (string match -r '\d+' $project)
10 |
11 | set -l issue (
12 | curl -s $base_url"/issues.json?limit=100&project_id="$project_id \
13 | -H "X-Redmine-API-Key: "$argv[1] \
14 | | jq -r '.issues[] | "[" + (.id|tostring) + "]" + .subject' \
15 | | peco
16 | )
17 | set -l issue_id (string match -r '\d+' $issue)
18 |
19 | echo $base_url"/issues/"$issue_id
20 | echo $base_url"/issues/"$issue_id | pbcopy
21 | open $base_url"/issues/"$issue_id
22 | end
23 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/peco_select_history.fish:
--------------------------------------------------------------------------------
1 | function peco_select_history
2 | set -l query (commandline)
3 |
4 | if test -n $query
5 | set peco_flags --query "$query"
6 | end
7 |
8 | history | peco $peco_flags | read recent
9 | if [ $recent ]
10 | commandline $recent
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/prompt_pwd.fish:
--------------------------------------------------------------------------------
1 | function prompt_pwd --description 'ref: https://hotoolong.hatenablog.com/entry/2020/10/22/231921'
2 | set -l options h/help d/dir-length= D/full-length-dirs=
3 | argparse -n prompt_pwd $options -- $argv
4 | or return
5 |
6 | if set -q _flag_help
7 | __fish_print_help prompt_pwd
8 | return 0
9 | end
10 |
11 | set -q argv[1]
12 | or set argv $PWD
13 |
14 | set -ql _flag_d
15 | and set -l fish_prompt_pwd_dir_length $_flag_d
16 |
17 | set -q fish_prompt_pwd_dir_length
18 | or set -l fish_prompt_pwd_dir_length 1
19 |
20 | set -l fulldirs 0
21 | set -ql _flag_D
22 | and set fish_prompt_pwd_full_dirs $_flag_D
23 |
24 | set -q fish_prompt_pwd_full_dirs
25 | or set -l fish_prompt_pwd_full_dirs 1
26 |
27 | for path in $argv
28 | # Replace $HOME with "~"
29 | set -l realhome ~
30 | set -l tmp (string replace -r '^'"$realhome"'($|/)' '~$1' $path)
31 |
32 | if test "$fish_prompt_pwd_dir_length" -eq 0
33 | echo $tmp
34 | else
35 | # Shorten to at most $fish_prompt_pwd_dir_length characters per directory
36 | # with full-length-dirs components left at full length.
37 | set -l full
38 | if test $fish_prompt_pwd_full_dirs -gt 0
39 | set -l all (string split -m (math $fish_prompt_pwd_full_dirs - 1) -r / $tmp)
40 | set tmp $all[1]
41 | set full $all[2..]
42 | else if test $fish_prompt_pwd_full_dirs -eq 0
43 | # 0 means not even the last component is kept
44 | string replace -ar '(\.?[^/]{'"$fish_prompt_pwd_dir_length"'})[^/]*' '$1' $tmp
45 | continue
46 | end
47 |
48 | set -l folders (string split -rm2 / $tmp)
49 | if test (count $folders) -gt 2
50 | echo (string replace -ar '(\.?[^/]{'"$fish_prompt_pwd_dir_length"'})[^/]*/' '$1/' $folders[1]'/')$folders[2]'/'$folders[3]
51 | else
52 | string join / (string replace -ar '(\.?[^/]{'"$fish_prompt_pwd_dir_length"'})[^/]*/' '$1/' $tmp) $full
53 | end
54 | end
55 | end
56 | end
57 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/skylark.fish:
--------------------------------------------------------------------------------
1 | function skylark
2 | set -l brand_id
3 | switch $argv
4 | case gusto
5 | set brand_id 1
6 | case bamiyan
7 | set brand_id 2
8 | case jonathan
9 | set brand_id 3
10 | case yumean
11 | set brand_id 4
12 | case steak_gusto
13 | set brand_id 5
14 | case grazie_gardens
15 | set brand_id 6
16 | case aiya
17 | set brand_id 7
18 | case karayoshi
19 | set brand_id 13
20 | case tonkara_tei
21 | set brand_id 14
22 | case '*'
23 | echo "invalid argument: please input [gusto, bamiyan, jonathan yumean steak_gusto grazie_gardens aiya karayoshi tonkara_tei]"
24 | return
25 | end
26 |
27 | curl -s "https://app-data.skylark-app.net/coupon/normals.json" \
28 | | jq ".[]" \
29 | | jq "{ brand_id: .brand_id, name: .name, before_price: .before_price, after_price: .after_price, display_number: .display_number }" \
30 | | jq "select(.brand_id == \"$brand_id\")" \
31 | | jq "\"[\" + .display_number + \"] \" + .name + \": \" + .before_price + \" → \" + .after_price" \
32 | | uniq \
33 | | tr -d '"'
34 | end
35 |
--------------------------------------------------------------------------------
/home-manager/programs/fish/functions/tmux_attach_session_if_needed.fish:
--------------------------------------------------------------------------------
1 | function tmux_attach_session_if_needed
2 | set ID (tmux list-sessions)
3 | if test -z "$ID"
4 | tmux new-session
5 | return
6 | end
7 |
8 | set new_session "Create New Session"
9 | set ID (string join \n (tmux list-sessions) $new_session | peco --on-cancel=error | cut -d: -f1)
10 | if test "$ID" = "$new_session"
11 | tmux new-session
12 | else if test -n "$ID"
13 | tmux attach-session -t "$ID"
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/home-manager/programs/fzf/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.fzf = {
3 | enable = true;
4 | historyWidgetOptions = [ "--reverse" ];
5 |
6 | colors = {
7 | fg = "#f8f8f2";
8 | "fg+" = "#f8f8f2";
9 | bg = "#282a36";
10 | "bg+" = "#44475a";
11 | hl = "#bd93f9";
12 | "hl+" = "#bd93f9";
13 | info = "#ffb86c";
14 | prompt = "#50fa7b";
15 | pointer = "#ff79c6";
16 | marker = "#ff79c6";
17 | spinner = "#ffb86c";
18 | header = "#6272a4";
19 | };
20 | };
21 | }
22 |
--------------------------------------------------------------------------------
/home-manager/programs/gh-dash/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.gh-dash = {
3 | enable = true;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/home-manager/programs/gh/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.gh = {
3 | enable = true;
4 | };
5 |
6 | programs.fish = {
7 | interactiveShellInit = ''
8 | eval (gh completion -s fish| source)
9 |
10 | # for nix
11 | set -x NIX_CONFIG "access-tokens = github.com="(gh auth token)
12 | '';
13 | };
14 | }
15 |
--------------------------------------------------------------------------------
/home-manager/programs/git/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | home = {
4 | file.".config/git/message".source = ./message;
5 | packages = with pkgs; [ git-secrets ];
6 | };
7 |
8 | programs.git = {
9 | enable = true;
10 | lfs.enable = true;
11 | maintenance.enable = true;
12 |
13 | delta = {
14 | enable = true;
15 | options = {
16 | navigate = true;
17 | dark = true;
18 | line-numbers = true;
19 | side-by-side = true;
20 | };
21 | };
22 |
23 | aliases = {
24 | st = "status --ignore-submodules=all";
25 | br = "branch";
26 | co = "commit";
27 | ch = "checkout";
28 | ad = "add";
29 | rs = "restore";
30 | sw = "switch";
31 | fix = "commit --amend --no-edit";
32 | fixup = "!git log --oneline -n 20 | peco | awk '{print $1}' | xargs --no-run-if-empty -I COMMIT -o sh -c 'git commit --fixup COMMIT && git rebase -i --autosquash COMMIT~'";
33 | };
34 |
35 | ignores = [
36 | "*.swp"
37 | "*.save"
38 | "*.fasl"
39 | "*~"
40 | ".DS_Store"
41 | ".claude/"
42 | ".dir-locals-2.el"
43 | ".aider*"
44 | "TAGS"
45 | ".neotree"
46 | ".direnv"
47 | ".devenv"
48 | ".pre-commit-config.yaml"
49 | ".markdown-preview.html"
50 | ];
51 |
52 | userName = "takeokunn";
53 | userEmail = "bararararatty@gmail.com";
54 |
55 | signing = {
56 | key = "0B10DAA7BA0236D7382287660F79C0AB03FD7A1C";
57 | format = "openpgp";
58 | signByDefault = true;
59 | };
60 |
61 | includes = [
62 | { path = "~/.config/git/config.d/maintenance.conf"; }
63 | ];
64 |
65 | extraConfig = {
66 | core = {
67 | quotepath = "off";
68 | ignorecase = false;
69 | safecrlf = true;
70 | autocrlf = false;
71 | precomposeunicode = true;
72 | untrackedCache = true;
73 | fsmonitor = true;
74 | preloadindex = true;
75 | };
76 |
77 | commit = {
78 | template = "~/.config/git/message";
79 | };
80 |
81 | ghq = {
82 | root = "~/ghq";
83 | };
84 |
85 | fetch = {
86 | prune = true;
87 | pruneTags = true;
88 | all = true;
89 | writeCommitGraph = true;
90 | };
91 |
92 | pull = {
93 | rebase = false;
94 | };
95 |
96 | push = {
97 | default = "nothing";
98 | };
99 |
100 | github = {
101 | user = "takeokunn";
102 | };
103 |
104 | gpg = {
105 | program = "gpg";
106 | };
107 |
108 | diff = {
109 | patience = true;
110 | };
111 |
112 | # thanks https://github.com/dracula/git/blob/master/config/gitconfig
113 | color = {
114 | ui = "auto";
115 | status = {
116 | added = "green";
117 | changed = "yellow";
118 | header = "";
119 | localBranch = "";
120 | nobranch = "";
121 | remoteBranch = "cyan bold";
122 | unmerged = "magenta bold reverse";
123 | untracked = "red";
124 | updated = "green bold";
125 | };
126 |
127 | diff = {
128 | commit = "";
129 | func = "cyan";
130 | plain = "";
131 | whitespace = "magenta reverse";
132 | meta = "white";
133 | frag = "cyan bold reverse";
134 | old = "red";
135 | new = "green";
136 | };
137 |
138 | branch = {
139 | current = "cyan bold reverse";
140 | local = "white";
141 | plain = "";
142 | remote = "cyan";
143 | };
144 |
145 | interactive = {
146 | error = "";
147 | header = "";
148 | help = "";
149 | prompt = "";
150 | };
151 |
152 | grep = {
153 | context = "";
154 | filename = "";
155 | function = "";
156 | linenumber = "white";
157 | match = "";
158 | selected = "";
159 | separator = "";
160 | };
161 | };
162 |
163 | url = {
164 | "git@github.com:".insteadOf = "https://github.com/";
165 | };
166 |
167 | init = {
168 | defaultBranch = "main";
169 | };
170 |
171 | rerere = {
172 | enabled = true;
173 | };
174 |
175 | rebase = {
176 | autoStash = true;
177 | abbreviateCommands = false;
178 | };
179 |
180 | merge = {
181 | conflictStyle = "diff3";
182 | };
183 |
184 | secrets = {
185 | providers = "git secrets --aws-provider";
186 | patterns = [
187 | "(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"
188 | "(\"|')?(AWS|aws|Aws)?_?(SECRET|secret|Secret)?_?(ACCESS|access|Access)?_?(KEY|key|Key)(\"|')?\\s*(:|=>|=)\\s*(\"|')?[A-Za-z0-9/\\+=]{40}(\"|')?"
189 | "(\"|')?(AWS|aws|Aws)?_?(ACCOUNT|account|Account)_?(ID|id|Id)?(\"|')?\\s*(:|=>|=)\\s*(\"|')?[0-9]{4}\\-?[0-9]{4}\\-?[0-9]{4}(\"|')?"
190 | ];
191 | };
192 | };
193 | };
194 | }
195 |
--------------------------------------------------------------------------------
/home-manager/programs/git/message:
--------------------------------------------------------------------------------
1 |
2 |
3 | # ==== Emojis ====
4 | # :bug: バグ修正
5 | # :+1: 機能改善
6 | # :sparkles: 部分的な機能追加
7 | # :tada: 盛大に祝うべき大きな機能追加
8 | # :recycle: リファクタリング
9 | # :shower: 不要な機能・使われなくなった機能の削除
10 | # :green_heart: テストやCIの修正・改善
11 | # :shirt: Lintエラーの修正やコードスタイルの修正
12 | # :rocket: パフォーマンス改善
13 | # :up: 依存パッケージなどのアップデート
14 | # :lock: 新機能の公開範囲の制限
15 | # :cop: セキュリティ関連の改善
16 |
17 | # ==== Format ====
18 | # :emoji: Subject
19 | #
20 | # Commit body...
21 |
--------------------------------------------------------------------------------
/home-manager/programs/gnupg/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.gpg = {
3 | enable = true;
4 | mutableKeys = false;
5 | mutableTrust = false;
6 | };
7 | }
8 |
--------------------------------------------------------------------------------
/home-manager/programs/jq/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.jq = {
3 | enable = true;
4 |
5 | colors = {
6 | null = "0;36";
7 | false = "0;31";
8 | true = "0;35";
9 | numbers = "0;32";
10 | strings = "0;36";
11 | arrays = "1;35";
12 | objects = "1;37";
13 | objectKeys = "1;34";
14 | };
15 | };
16 | }
17 |
--------------------------------------------------------------------------------
/home-manager/programs/kitty/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.kitty = {
3 | enable = true;
4 |
5 | settings = {
6 | font_size = 14.0;
7 | font_family = "monospace";
8 |
9 | # thanks. https://github.com/dracula/kitty/blob/master/dracula.conf
10 | foreground = "#f8f8f2";
11 | background = "#282a36";
12 | selection_foreground = "#ffffff";
13 | selection_background = "#44475a";
14 | url_color = "#8be9fd";
15 |
16 | # black
17 | color0 = "#21222c";
18 | color8 = "#6272a4";
19 |
20 | # red
21 | color1 = "#ff5555";
22 | color9 = "#ff6e6e";
23 |
24 | # green
25 | color2 = "#50fa7b";
26 | color10 = "#69ff94";
27 |
28 | # yellow
29 | color3 = "#f1fa8c";
30 | color11 = "#ffffa5";
31 |
32 | # blue
33 | color4 = "#bd93f9";
34 | color12 = "#d6acff";
35 |
36 | # magenta
37 | color5 = "#ff79c6";
38 | color13 = "#ff92df";
39 |
40 | # cyan
41 | color6 = "#8be9fd";
42 | color14 = "#a4ffff";
43 |
44 | # white
45 | color7 = "#f8f8f2";
46 | color15 = "#ffffff";
47 |
48 | # Cursor colors
49 | cursor = "#f8f8f2";
50 | cursor_text_color = "background";
51 |
52 | # Tab bar colors
53 | active_tab_foreground = "#282a36";
54 | active_tab_background = "#f8f8f2";
55 | inactive_tab_foreground = "#282a36";
56 | inactive_tab_background = "#6272a4";
57 |
58 | # Marks
59 | mark1_foreground = "#282a36";
60 | mark1_background = "#ff5555";
61 |
62 | # Splits/Windows
63 | active_border_color = "#f8f8f2";
64 | inactive_border_color = "#6272a4";
65 | };
66 | };
67 | }
68 |
--------------------------------------------------------------------------------
/home-manager/programs/lnav/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | programs.lnav = {
4 | enable = true;
5 | package = pkgs.lnav;
6 | config = {
7 | ui.theme = "dracula";
8 | format-repos = [
9 | "https://github.com/hagfelsh/lnav_formats.git"
10 | "https://github.com/PaulWay/lnav-formats.git"
11 | "https://github.com/penntaylor/lnav-ruby-logger-format.git"
12 | "https://github.com/aspiers/lnav-formats.git"
13 | ];
14 | };
15 | };
16 |
17 | xdg.configFile."lnav/formats/installed/" = {
18 | source = ./formats;
19 | recursive = true;
20 | };
21 | }
22 |
--------------------------------------------------------------------------------
/home-manager/programs/lnav/formats/laravel_log.json:
--------------------------------------------------------------------------------
1 | {
2 | "laravellogger": {
3 | "title": "Laravel logger format",
4 | "description": "Log format used by Laravel logger class",
5 | "url": "",
6 | "regex": {
7 | "main": {
8 | "pattern": "\\[(?.*)\\]\\s(?\\w+)\\.(?\\w+):(?.*)"
9 | }
10 | },
11 | "timestamp-format": ["%Y-%m-%d %H:%M:%S"],
12 | "level-field": "level",
13 | "level": {
14 | "critical": "CRITICAL",
15 | "error": "ERROR",
16 | "warning": "WARNING",
17 | "info": "INFO",
18 | "debug": "DEBUG"
19 | },
20 | "value": {
21 | "level": {
22 | "kind": "string",
23 | "identifier": true
24 | },
25 | "env": {
26 | "kind": "string",
27 | "identifier": true
28 | },
29 | "body": {
30 | "kind": "string"
31 | }
32 | },
33 | "sample": [
34 | {
35 | "line": "[2021-11-04 21:25:12] test.DEBUG: A problem occurred"
36 | }
37 | ]
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/home-manager/programs/man/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.man = {
3 | enable = true;
4 | generateCaches = true;
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/home-manager/programs/misc/config/.chromemacs:
--------------------------------------------------------------------------------
1 | # Insert your preferred key mappings here.
2 |
3 | map scrollPageUp
4 | map removeTab
5 | map goBack
6 | map goForward
7 |
--------------------------------------------------------------------------------
/home-manager/programs/misc/config/.gemrc:
--------------------------------------------------------------------------------
1 | update_sources: true
2 | backtrace: true
3 | install: --no-document --verbose
4 | update: --no-document --verbose
5 | gemsrc_use_ghq: true
6 | jobs: 4
7 |
--------------------------------------------------------------------------------
/home-manager/programs/misc/config/cargo_config:
--------------------------------------------------------------------------------
1 | [net]
2 | git-fetch-with-cli = true
3 |
--------------------------------------------------------------------------------
/home-manager/programs/misc/config/composer_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "config": {
3 | "sort-packages": true,
4 | "process-timeout": 600
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/home-manager/programs/misc/config/sourcekit-lsp.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "backgroundIndexing": true,
3 | "backgroundPreparationMode": true
4 | }
5 |
--------------------------------------------------------------------------------
/home-manager/programs/misc/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | home.file = {
3 | ".config/chromemacs/.chromemacs".source = ./config/.chromemacs;
4 | ".config/cargo/config".source = ./config/cargo_config;
5 | ".gemrc".source = ./config/.gemrc;
6 | ".composer/config.json".source = ./config/composer_config.json;
7 | ".sourcekit-lsp/config.json".source = ./config/sourcekit-lsp.config.json;
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/home-manager/programs/mu/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | programs.mu = {
4 | enable = true;
5 | package = pkgs.mu;
6 | };
7 |
8 | accounts.email.accounts = {
9 | Gmail = {
10 | mu.enable = true;
11 | };
12 | };
13 | }
14 |
--------------------------------------------------------------------------------
/home-manager/programs/neovim/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, sources }:
2 | {
3 | programs.neovim = {
4 | enable = true;
5 | withNodeJs = false;
6 | withRuby = false;
7 | withPython3 = false;
8 | plugins = import ./plugins { inherit pkgs sources; };
9 |
10 | extraLuaConfig = builtins.readFile ./init.lua;
11 | };
12 |
13 | programs.fish = {
14 | interactiveShellInit = ''
15 | set -x MANPAGER "nvim -c ASMANPAGER -"
16 | '';
17 | };
18 | }
19 |
--------------------------------------------------------------------------------
/home-manager/programs/neovim/init.lua:
--------------------------------------------------------------------------------
1 | -- basic
2 |
3 | vim.opt.number = false
4 | vim.opt.relativenumber = false
5 | vim.opt.encoding = "utf-8"
6 | vim.opt.fileencodings = "utf-8,euc-jp,cp932"
7 | vim.opt.clipboard:append("unnamed")
8 | vim.opt.backspace = "indent,eol,start"
9 | vim.opt.tabstop = 2
10 | vim.opt.shiftwidth = 2
11 | vim.opt.laststatus = 3
12 | vim.opt.statusline = "%y"
13 | vim.opt.showmatch = true
14 | vim.opt.wrapscan = true
15 | vim.opt.hlsearch = true
16 | vim.opt.showcmd = true
17 | vim.opt.title = true
18 | vim.opt.foldenable = false
19 | vim.opt.swapfile = false
20 | vim.opt.expandtab = true
21 | vim.opt.splitbelow = true
22 | vim.opt.splitright = true
23 | vim.opt.incsearch = true
24 | vim.opt.ignorecase = true
25 | vim.opt.smartcase = true
26 | vim.opt.termguicolors = true
27 |
28 | -- syntax
29 |
30 | vim.cmd.syntax("on")
31 |
32 | -- basic keymap
33 |
34 | vim.g.mapleader = ","
35 |
36 | vim.keymap.set("n", "/", "/\\v", { remap = false })
37 | vim.keymap.set("n", "U", "", { remap = false })
38 | vim.keymap.set("n", "", "V", { remap = false })
39 | vim.keymap.set("n", "", "nohlsearch", { remap = false })
40 | vim.keymap.set("i", "", "")
41 |
42 | -- window keymap
43 |
44 | vim.keymap.set("n", "sj", "j", { noremap = true, silent = true })
45 | vim.keymap.set("n", "sk", "k", { noremap = true, silent = true })
46 | vim.keymap.set("n", "sl", "l", { noremap = true, silent = true })
47 | vim.keymap.set("n", "sh", "h", { noremap = true, silent = true })
48 | vim.keymap.set("n", "sJ", "J", { noremap = true, silent = true })
49 | vim.keymap.set("n", "sK", "K", { noremap = true, silent = true })
50 | vim.keymap.set("n", "sL", "L", { noremap = true, silent = true })
51 | vim.keymap.set("n", "sH", "H", { noremap = true, silent = true })
52 | vim.keymap.set("n", "sw", "w", { noremap = true, silent = true })
53 |
--------------------------------------------------------------------------------
/home-manager/programs/neovim/plugins/basic/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, sources }:
2 | let
3 | plugins = pkgs.callPackage ./plugins.nix { inherit sources; };
4 | in
5 | with pkgs.vimPlugins;
6 | [
7 | vim-gnupg
8 | editorconfig-nvim
9 | vim-suda
10 |
11 | # cursor
12 | {
13 | type = "lua";
14 | plugin = hop-nvim;
15 | config = ''
16 | require('hop').setup { }
17 | vim.keymap.set('n', 'f', 'HopChar1')
18 | '';
19 | }
20 |
21 | # clipboard
22 | vim-bracketed-paste
23 |
24 | # file tree
25 | {
26 | type = "lua";
27 | plugin = plugins.vim-fern;
28 | config = ''
29 | vim.keymap.set('n', 'e', 'Fern . -drawer')
30 | '';
31 | }
32 | {
33 | type = "lua";
34 | plugin = plugins.vim-nerdfont;
35 | }
36 | {
37 | type = "lua";
38 | plugin = plugins.vim-fern-renderer-nerdfont;
39 | config = ''
40 | vim.g["fern#renderer"] = "nerdfont"
41 | '';
42 | }
43 |
44 | # history tree
45 | {
46 | type = "lua";
47 | plugin = undotree;
48 | config = ''
49 | vim.g.undotree_WindowLayout = 3
50 | vim.api.nvim_create_user_command('UndotreeToggleAndFocus', ':UndotreeToggle | :UndotreeFocus', {})
51 | vim.keymap.set('n', 'u', vim.cmd.UndotreeToggleAndFocus)
52 | '';
53 | }
54 |
55 | # indent
56 | vim-table-mode
57 | vim-textobj-entire
58 |
59 | # docs
60 | vim-manpager
61 | plugins.vimdoc-ja
62 |
63 | # utils
64 | auto-pairs
65 | {
66 | type = "lua";
67 | plugin = rainbow;
68 | config = ''
69 | vim.g.rainbow_active = 1
70 | '';
71 | }
72 | {
73 | type = "lua";
74 | plugin = vim-sandwich;
75 | config = ''
76 | vim.call('operator#sandwich#set', 'add', 'char', 'skip_space', 1)
77 | '';
78 | }
79 |
80 | # denops
81 | denops-vim
82 |
83 | # dashboard
84 | dashboard-nvim
85 | ]
86 |
--------------------------------------------------------------------------------
/home-manager/programs/neovim/plugins/basic/plugins.nix:
--------------------------------------------------------------------------------
1 | { vimUtils, sources }:
2 | {
3 | vimdoc-ja = vimUtils.buildVimPlugin {
4 | pname = sources.vimdoc-ja.pname;
5 | version = sources.vimdoc-ja.date;
6 | src = sources.vimdoc-ja.src;
7 | };
8 | vim-nerdfont = vimUtils.buildVimPlugin {
9 | pname = sources.vim-nerdfont.pname;
10 | version = sources.vim-nerdfont.date;
11 | src = sources.vim-nerdfont.src;
12 | };
13 | vim-fern = vimUtils.buildVimPlugin {
14 | pname = sources.vim-fern.pname;
15 | version = sources.vim-fern.date;
16 | src = sources.vim-fern.src;
17 | };
18 | vim-fern-renderer-nerdfont = vimUtils.buildVimPlugin {
19 | pname = sources.vim-fern-renderer-nerdfont.pname;
20 | version = sources.vim-fern-renderer-nerdfont.date;
21 | src = sources.vim-fern-renderer-nerdfont.src;
22 | };
23 | }
24 |
--------------------------------------------------------------------------------
/home-manager/programs/neovim/plugins/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, sources }:
2 | let
3 | basic = import ./basic { inherit pkgs sources; };
4 | git = import ./git { inherit pkgs sources; };
5 | language = import ./language { inherit pkgs; };
6 | lsp = import ./lsp { inherit pkgs; };
7 | skk = import ./skk { inherit pkgs sources; };
8 | themes = import ./themes { inherit pkgs; };
9 | telescope = import ./telescope { inherit pkgs; };
10 | treeSitter = import ./tree-sitter { inherit pkgs; };
11 | in
12 | basic ++ git ++ language ++ lsp ++ skk ++ themes ++ telescope ++ treeSitter
13 |
--------------------------------------------------------------------------------
/home-manager/programs/neovim/plugins/git/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, sources }:
2 | let
3 | plugins = pkgs.callPackage ./plugins.nix { inherit sources; };
4 | in
5 | with pkgs.vimPlugins;
6 | [
7 | {
8 | type = "lua";
9 | plugin = gitsigns-nvim;
10 | config = ''
11 | require('gitsigns').setup()
12 | '';
13 | }
14 | # git-blame-nvim
15 | plugins.vim-gin
16 | ]
17 |
--------------------------------------------------------------------------------
/home-manager/programs/neovim/plugins/git/plugins.nix:
--------------------------------------------------------------------------------
1 | { vimUtils, sources }:
2 | {
3 | vim-gin = vimUtils.buildVimPlugin {
4 | pname = sources.vim-gin.pname;
5 | version = sources.vim-gin.date;
6 | src = sources.vim-gin.src;
7 | };
8 | }
9 |
--------------------------------------------------------------------------------
/home-manager/programs/neovim/plugins/language/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | with pkgs.vimPlugins;
3 | [
4 | vim-markdown
5 | # {
6 | # type = "lua";
7 | # plugin = orgmode;
8 | # config = ''
9 | # require('orgmode').setup({
10 | # org_agenda_files = '~/ghq/github.com/takeokunn/private/**/*.org',
11 | # org_default_notes_file = '~/ghq/github.com/takeokunn/private/memo.org',
12 | # })
13 | # '';
14 | # }
15 | ]
16 |
--------------------------------------------------------------------------------
/home-manager/programs/neovim/plugins/lsp/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | with pkgs.vimPlugins;
3 | [
4 | {
5 | type = "lua";
6 | plugin = nvim-cmp;
7 | config = ''
8 | local cmp = require("cmp")
9 |
10 | cmp.setup({
11 | snippet = {
12 | expand = function(args)
13 | vim.fn["vsnip#anonymous"](args.body)
14 | end,
15 | },
16 | sources = {
17 | { name = "nvim_lsp" },
18 | { name = "path" },
19 | },
20 | mapping = cmp.mapping.preset.insert({
21 | [""] = cmp.mapping.select_prev_item(),
22 | [""] = cmp.mapping.select_next_item(),
23 | [''] = cmp.mapping.complete(),
24 | [''] = cmp.mapping.abort(),
25 | [""] = cmp.mapping.confirm { select = true },
26 | }),
27 | experimental = {
28 | ghost_text = true,
29 | },
30 | })
31 | '';
32 | }
33 | {
34 | type = "lua";
35 | plugin = nvim-lspconfig;
36 | config = ''
37 | local lspconfig = require('lspconfig')
38 |
39 | vim.keymap.set('n', 'gd', 'lua vim.lsp.buf.definition()', { silent = true, buffer = buffer })
40 |
41 | if vim.fn.executable('nil') == 1 then
42 | lspconfig.nil_ls.setup {
43 | settings = {
44 | ['nil'] = {
45 | formatting = {
46 | command = { 'nixfmt' }
47 | }
48 | }
49 | }
50 | }
51 | end
52 |
53 | if vim.fn.executable('typescript-language-server') == 1 then
54 | lspconfig.ts_ls.setup { }
55 | end
56 |
57 | if vim.fn.executable('intelephense') == 1 then
58 | lspconfig.intelephense.setup { }
59 | end
60 | '';
61 | }
62 | {
63 | type = "lua";
64 | plugin = lspsaga-nvim;
65 | config = ''
66 | require('lspsaga').setup({
67 | code_action = {
68 | extend_gitsigns = true,
69 | },
70 | finder = {
71 | max_height = 0.7,
72 | left_width = 0.3,
73 | right_width = 0.6,
74 | keys = {
75 | shuttle = "w",
76 | toggle_or_open = ""
77 | }
78 | },
79 | lightbulb = {
80 | enable = false,
81 | }
82 | })
83 |
84 | vim.keymap.set('n', 'K', 'Lspsaga hover_doc')
85 | vim.keymap.set({ 'n', 'i' }, '', "Lspsaga rename", opts)
86 | vim.keymap.set('n', '', "Lspsaga finder def+ref", opts)
87 | vim.keymap.set('n', '', "Lspsaga peek_definition", opts)
88 | vim.keymap.set('n', '', "Lspsaga diagnostic_jump_next", opts)
89 | vim.keymap.set('n', '', "Lspsaga diagnostic_jump_prev", opts)
90 | '';
91 | }
92 | ]
93 |
--------------------------------------------------------------------------------
/home-manager/programs/neovim/plugins/skk/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, sources }:
2 | let
3 | plugins = pkgs.callPackage ./plugins.nix { inherit sources; };
4 | in
5 | [
6 | {
7 | type = "lua";
8 | plugin = plugins.skkeleton;
9 | config = ''
10 | vim.fn['skkeleton#config']({
11 | eggLikeNewline = true,
12 | keepState = true,
13 | sources = { "skk_server" }
14 | })
15 | vim.keymap.set({ 'i', 'c' }, '', '(skkeleton-toggle)', { silent = true })
16 | '';
17 | }
18 | {
19 | type = "lua";
20 | plugin = plugins.skkeleton-azik;
21 | config = ''
22 | vim.fn['skkeleton#azik#add_table']('us')
23 | vim.fn['skkeleton#config']({
24 | kanaTable = 'azik'
25 | })
26 | vim.call("skkeleton#register_kanatable", "azik", {
27 | ss = { "せい" },
28 | })
29 | '';
30 | }
31 | ]
32 |
--------------------------------------------------------------------------------
/home-manager/programs/neovim/plugins/skk/plugins.nix:
--------------------------------------------------------------------------------
1 | { vimUtils, sources }:
2 | {
3 |
4 | skkeleton = vimUtils.buildVimPlugin {
5 | pname = sources.vim-skkeleton.pname;
6 | version = sources.vim-skkeleton.date;
7 | src = sources.vim-skkeleton.src;
8 | };
9 |
10 | skkeleton-azik = vimUtils.buildVimPlugin {
11 | pname = sources.vim-skkeleton-azik.pname;
12 | version = sources.vim-skkeleton-azik.date;
13 | src = sources.vim-skkeleton-azik.src;
14 | };
15 | }
16 |
--------------------------------------------------------------------------------
/home-manager/programs/neovim/plugins/telescope/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | with pkgs.vimPlugins;
3 | [
4 | {
5 | type = "lua";
6 | plugin = telescope-nvim;
7 | config = ''
8 | local actions = require("telescope.actions")
9 |
10 | require('telescope').setup {
11 | defaults = {
12 | mappings = {
13 | n = { ["q"] = actions.close }
14 | }
15 | },
16 | extensions = {
17 | fzf = {
18 | fuzzy = true,
19 | override_generic_sorter = true,
20 | override_file_sorter = true,
21 | case_mode = "smart_case",
22 | }
23 | }
24 | }
25 |
26 | local builtin = require('telescope.builtin')
27 | vim.keymap.set('n', 'f', builtin.git_files)
28 | vim.keymap.set('n', 'o', builtin.current_buffer_fuzzy_find)
29 | vim.keymap.set('n', 'g', builtin.live_grep)
30 | vim.keymap.set('n', 'b', builtin.buffers)
31 | vim.keymap.set('n', 'h', builtin.help_tags)
32 | vim.keymap.set('n', 'r', builtin.registers)
33 | '';
34 | }
35 | telescope-ui-select-nvim
36 | telescope-file-browser-nvim
37 | telescope-fzf-native-nvim
38 | ]
39 |
--------------------------------------------------------------------------------
/home-manager/programs/neovim/plugins/themes/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | with pkgs.vimPlugins;
3 | [
4 | {
5 | type = "lua";
6 | plugin = dracula-nvim;
7 | config = ''
8 | vim.cmd[[colorscheme dracula]]
9 | '';
10 | }
11 | {
12 | type = "lua";
13 | plugin = lualine-nvim;
14 | config = ''
15 | require('lualine').setup {
16 | options = {
17 | icons_enabled = false,
18 | section_separators = "",
19 | component_separators = ""
20 | }
21 | }
22 | '';
23 | }
24 | ]
25 |
--------------------------------------------------------------------------------
/home-manager/programs/neovim/plugins/tree-sitter/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | with pkgs.vimPlugins;
3 | [
4 | # nvim-treesitter.withAllGrammars
5 | ]
6 |
--------------------------------------------------------------------------------
/home-manager/programs/nix-index/default.nix:
--------------------------------------------------------------------------------
1 | { programs.nix-index.enable = true; }
2 |
--------------------------------------------------------------------------------
/home-manager/programs/nix-init/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.nix-init = {
3 | enable = true;
4 | settings = {
5 | maintainers = [ "takeokunn" ];
6 | };
7 | };
8 | }
9 |
--------------------------------------------------------------------------------
/home-manager/programs/nyxt/config.lisp:
--------------------------------------------------------------------------------
1 | (define-configuration web-buffer
2 | ((default-modes
3 | (pushnew 'nyxt/mode/blocker:blocker-mode %slot-value%))))
4 |
--------------------------------------------------------------------------------
/home-manager/programs/nyxt/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | programs.nyxt.enable = pkgs.stdenv.isLinux;
4 |
5 | xdg.configFile."nyxt/config.lisp".source = ./config.lisp;
6 | }
7 |
--------------------------------------------------------------------------------
/home-manager/programs/offlineimap/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.offlineimap = {
3 | enable = true;
4 | extraConfig.general = {
5 | accounts = "Gmail";
6 | maxsyncaccounts = 1;
7 | };
8 | };
9 |
10 | accounts.email.accounts = {
11 | Gmail = {
12 | offlineimap = {
13 | enable = true;
14 | extraConfig.remote = {
15 | maxconnections = 10;
16 | };
17 | };
18 | passwordCommand = [
19 | "pass"
20 | "show"
21 | "private/develop/google/offlineimap"
22 | ];
23 | imap.tls.enable = true;
24 | };
25 | };
26 | }
27 |
--------------------------------------------------------------------------------
/home-manager/programs/pandoc/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.pandoc = {
3 | enable = true;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/home-manager/programs/password-store/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | programs.password-store = {
4 | enable = true;
5 | package = pkgs.pass.withExtensions (exts: [ exts.pass-otp ]);
6 | settings = {
7 | PASSWORD_STORE_DIR = "$HOME/ghq/github.com/takeokunn/private/password-store/current";
8 | PASSWORD_STORE_ENABLE_EXTENSIONS = "true";
9 | PASSWORD_STORE_CLIP_TIME = "60";
10 | };
11 | };
12 | }
13 |
--------------------------------------------------------------------------------
/home-manager/programs/peco/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | programs.peco = {
4 | enable = true;
5 | config = {
6 | Use256Color = true;
7 | StickySelection = true;
8 | Prompt = "[peco] >";
9 | Keymap = {
10 | "C-k" = "peco.KillEndOfLine";
11 | "M-v" = "peco.ScrollPageUp";
12 | "C-v" = "peco.ScrollPageDown";
13 | "C-x,C-c" = "peco.Cancel";
14 | };
15 | };
16 | };
17 | }
18 |
--------------------------------------------------------------------------------
/home-manager/programs/readline/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.readline = {
3 | enable = true;
4 | extraConfig = ''
5 | # [prompt]
6 | set show-mode-in-prompt on
7 | set vi-ins-mode-string \1\e[6 q\2
8 | set vi-cmd-mode-string \1\e[2 q\2
9 |
10 | # [color]
11 | set colored-stats on
12 | set visible-stats on
13 | set mark-symlinked-directories on
14 | set colored-completion-prefix on
15 | set menu-complete-display-prefix on
16 | '';
17 | };
18 | }
19 |
--------------------------------------------------------------------------------
/home-manager/programs/ripgrep/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.ripgrep = {
3 | enable = true;
4 | arguments = [
5 | "--max-columns-preview"
6 | "--colors=line:style:bold"
7 | ];
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/home-manager/programs/rofi/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | home.file.".config/rofi/themes/dracula.rasi".source = ./themes/dracula.rasi;
4 | programs.rofi = {
5 | enable = pkgs.stdenv.isLinux;
6 | font = "Cica 16";
7 | plugins = with pkgs; [
8 | rofi-calc
9 | rofi-power-menu
10 | ];
11 |
12 | pass = {
13 | enable = pkgs.stdenv.isLinux;
14 | stores = [ "$HOME/ghq/github.com/takeokunn/private/password-store" ];
15 | };
16 |
17 | extraConfig = {
18 | modi = "window,run,drun";
19 | show-icons = true;
20 | icon-theme = "Nordzy-dark";
21 | sidebar-mode = true;
22 | display-window = " Window";
23 | display-run = " Run";
24 | display-drun = " Application";
25 | display-filebrowser = " Filebrowser";
26 | # timeout = {
27 | # action = "kb-cancel";
28 | # delay = 60;
29 | # };
30 | # filebrowser = {
31 | # directory = "$HOME";
32 | # directories-first = true;
33 | # sorting-method = "name";
34 | # };
35 | };
36 | theme = "dracula";
37 | };
38 | }
39 |
--------------------------------------------------------------------------------
/home-manager/programs/rofi/themes/dracula.rasi:
--------------------------------------------------------------------------------
1 | /*Dracula theme based on the Purple official rofi theme*/
2 |
3 | configuration {
4 | show-icons: true;
5 | display-drun: "";
6 | disable-history: false;
7 | }
8 |
9 | * {
10 | font: "Jetbrains Mono 12";
11 | foreground: #f8f8f2;
12 | background-color: #282a36;
13 | active-background: #6272a4;
14 | urgent-background: #ff5555;
15 | urgent-foreground: #282a36;
16 | selected-background: @active-background;
17 | selected-urgent-background: @urgent-background;
18 | selected-active-background: @active-background;
19 | separatorcolor: @active-background;
20 | bordercolor: @active-background;
21 | }
22 |
23 | #window {
24 | background-color: @background-color;
25 | border: 3;
26 | border-radius: 6;
27 | border-color: @bordercolor;
28 | padding: 15;
29 | }
30 | #mainbox {
31 | border: 0;
32 | padding: 0;
33 | }
34 | #message {
35 | border: 0px;
36 | border-color: @separatorcolor;
37 | padding: 1px;
38 | }
39 | #textbox {
40 | text-color: @foreground;
41 | }
42 | #listview {
43 | fixed-height: 0;
44 | border: 0px;
45 | border-color: @bordercolor;
46 | spacing: 2px ;
47 | scrollbar: false;
48 | padding: 2px 0px 0px ;
49 | }
50 | #element {
51 | border: 0;
52 | padding: 3px ;
53 | }
54 | #element.normal.normal {
55 | background-color: @background-color;
56 | text-color: @foreground;
57 | }
58 | #element.normal.urgent {
59 | background-color: @urgent-background;
60 | text-color: @urgent-foreground;
61 | }
62 | #element.normal.active {
63 | background-color: @active-background;
64 | text-color: @foreground;
65 | }
66 | #element.selected.normal {
67 | background-color: @selected-background;
68 | text-color: @foreground;
69 | }
70 | #element.selected.urgent {
71 | background-color: @selected-urgent-background;
72 | text-color: @foreground;
73 | }
74 | #element.selected.active {
75 | background-color: @selected-active-background;
76 | text-color: @foreground;
77 | }
78 | #element.alternate.normal {
79 | background-color: @background-color;
80 | text-color: @foreground;
81 | }
82 | #element.alternate.urgent {
83 | background-color: @urgent-background;
84 | text-color: @foreground;
85 | }
86 | #element.alternate.active {
87 | background-color: @active-background;
88 | text-color: @foreground;
89 | }
90 | #scrollbar {
91 | width: 2px ;
92 | border: 0;
93 | handle-width: 8px ;
94 | padding: 0;
95 | }
96 | #sidebar {
97 | border: 2px dash 0px 0px ;
98 | border-color: @separatorcolor;
99 | }
100 | #button.selected {
101 | background-color: @selected-background;
102 | text-color: @foreground;
103 | }
104 | #inputbar {
105 | spacing: 0;
106 | text-color: @foreground;
107 | padding: 1px ;
108 | }
109 | #case-indicator {
110 | spacing: 0;
111 | text-color: @foreground;
112 | }
113 | #entry {
114 | spacing: 0;
115 | text-color: @foreground;
116 | }
117 | #prompt {
118 | spacing: 0;
119 | text-color: @foreground;
120 | }
121 | #inputbar {
122 | children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
123 | }
124 | #textbox-prompt-colon {
125 | expand: false;
126 | str: ">";
127 | margin: 0px 0.3em 0em 0em ;
128 | text-color: @foreground;
129 | }
130 | element-text, element-icon {
131 | background-color: inherit;
132 | text-color: inherit;
133 | }
134 |
--------------------------------------------------------------------------------
/home-manager/programs/sketchybar/default.nix:
--------------------------------------------------------------------------------
1 | let
2 | makeConfigFile = filePath: {
3 | source = filePath;
4 | executable = true;
5 | };
6 | in
7 | {
8 | xdg.configFile = {
9 | "sketchybar/sketchybarrc" = makeConfigFile ./sketchybarrc;
10 |
11 | # plugins
12 | "sketchybar/plugins/date.sh" = makeConfigFile ./plugins/date.sh;
13 | "sketchybar/plugins/power.sh" = makeConfigFile ./plugins/power.sh;
14 | "sketchybar/plugins/time.sh" = makeConfigFile ./plugins/time.sh;
15 | "sketchybar/plugins/window_title.sh" = makeConfigFile ./plugins/window_title.sh;
16 | };
17 | }
18 |
--------------------------------------------------------------------------------
/home-manager/programs/sketchybar/plugins/date.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | sketchybar --set $NAME label="$(date '+%Y-%m-%d')"
4 |
--------------------------------------------------------------------------------
/home-manager/programs/sketchybar/plugins/power.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | PERCENTAGE=$(pmset -g batt | grep -Eo "[0-9]+%" | cut -d% -f1)
4 | CHARGING=$(pmset -g batt | grep 'AC Power')
5 |
6 | case ${PERCENTAGE} in
7 | 100)
8 | ICON=""
9 | ;;
10 | 9[0-9])
11 | ICON=""
12 | ;;
13 | 8[0-9])
14 | ICON=""
15 | ;;
16 | 7[0-9])
17 | ICON=""
18 | ;;
19 | 6[0-9])
20 | ICON=""
21 | ;;
22 | 5[0-9])
23 | ICON=""
24 | ;;
25 | 4[0-9])
26 | ICON=""
27 | ;;
28 | 3[0-9])
29 | ICON=""
30 | ;;
31 | 2[0-9])
32 | ICON=""
33 | ;;
34 | 1[0-9])
35 | ICON=""
36 | ;;
37 | 0[0-9])
38 | ICON=""
39 | ;;
40 | *) ICON="" ;;
41 | esac
42 |
43 | if [[ $CHARGING != "" ]]; then
44 | ICON=""
45 | fi
46 |
47 | sketchybar --set power_logo icon="$ICON" --set battery label="${PERCENTAGE}%"
48 |
--------------------------------------------------------------------------------
/home-manager/programs/sketchybar/plugins/time.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | sketchybar --set $NAME label="$(date '+%H:%M:%S')"
4 |
--------------------------------------------------------------------------------
/home-manager/programs/sketchybar/plugins/window_title.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | sketchybar --set $NAME label="$INFO"
4 |
--------------------------------------------------------------------------------
/home-manager/programs/sketchybar/sketchybarrc:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | PLUGIN_DIR="$CONFIG_DIR/plugins"
4 |
5 | ##### Color #####
6 |
7 | WHITE=0xffffffff
8 | BAR_COLOR=1xff140c42
9 | BAR_COLOR=0x12181825
10 | ITEM_BG_COLOR=1xff2b1c84
11 | ACCENT_COLOR=1xffeb46f9
12 |
13 | ############## BAR ##############
14 |
15 | sketchybar --bar height=45 \
16 | y_offset=0 \
17 | blur_radius=0 \
18 | position=top \
19 | padding_left=4 \
20 | padding_right=4 \
21 | margin=0 \
22 | corner_radius=0 \
23 | color=0xff1e1d2e \
24 | shadow=on
25 |
26 | ############## GLOBAL DEFAULTS ##############
27 |
28 | sketchybar --default updates=when_shown \
29 | icon.font="Hack Nerd Font:Bold:12.0" \
30 | icon.color=0xffECEFF4 \
31 | icon.highlight_color=0xffE48FA8 \
32 | label.font="Hack Nerd Font:Bold:12.0" \
33 | label.color=0xffECEFF4 \
34 | background.corner_radius=5 \
35 | background.height=20
36 |
37 | sketchybar --add item logo left \
38 | --set logo icon= \
39 | icon.color=0xff010101 \
40 | icon.padding_left=16 \
41 | icon.padding_right=16 \
42 | background.color=0xffA5E0D5 \
43 | background.padding_right=8 \
44 | background.padding_left=4 \
45 | click_script="sketchybar --update"
46 |
47 | sketchybar --add item space_separator left \
48 | --set space_separator icon= \
49 | background.padding_left=23 \
50 | background.padding_right=23 \
51 | label.drawing=off \
52 | icon.color=0xff92B3F5
53 |
54 | sketchybar --add item window_title left \
55 | --set window_title script="$PLUGIN_DIR/window_title.sh" \
56 | icon.drawing=off \
57 | label.color=0xffffff \
58 | --subscribe window_title front_app_switched
59 |
60 | ############## ITEM DEFAULTS ###############
61 |
62 | sketchybar --default label.padding_left=6 \
63 | label.padding_right=6 \
64 | icon.padding_left=6 \
65 | icon.padding_right=6 \
66 | icon.font="Hack Nerd Font:Bold:20.0" \
67 | background.height=30 \
68 | background.padding_right=4 \
69 | background.padding_left=4 \
70 | background.corner_radius=5
71 |
72 | ############## RIGHT ITEMS ##############
73 |
74 | sketchybar --add item time right \
75 | --set time update_freq=1 \
76 | icon.drawing=off \
77 | script="$PLUGIN_DIR/time.sh" \
78 | background.color=0xff3C3E4F \
79 | background.padding_left=0
80 |
81 | sketchybar --add item time_logo right\
82 | --set time_logo icon= \
83 | label.drawing=off \
84 | icon.color=0xff121219 \
85 | label.drawing=off \
86 | background.color=0xffF5E3B5
87 |
88 | sketchybar --add item date right \
89 | --set date update_freq=1000 \
90 | icon.drawing=off \
91 | script="$PLUGIN_DIR/date.sh" \
92 | background.color=0xff3C3E4F \
93 | background.padding_left=0
94 |
95 | sketchybar --add item clock_logo right\
96 | --set clock_logo icon= \
97 | icon.color=0xff121219\
98 | label.drawing=off \
99 | background.color=0xff92B3F5
100 |
101 | sketchybar --add item battery right \
102 | --set battery update_freq=3 \
103 | icon.drawing=off \
104 | script="$PLUGIN_DIR/power.sh" \
105 | background.color=0xff3C3E4F \
106 | background.padding_left=0
107 |
108 | sketchybar --add item power_logo right \
109 | --set power_logo icon= \
110 | icon.color=0xff121219 \
111 | label.drawing=off \
112 | background.color=0xffB3E1A7
113 |
114 | ############## UPDATE ##############
115 |
116 | sketchybar --update
117 |
--------------------------------------------------------------------------------
/home-manager/programs/sops/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.sops.enable = true;
3 |
4 | programs.fish = {
5 | shellInit = ''
6 | set -x SOPS_PGP_FP 0F79C0AB03FD7A1C
7 | '';
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/home-manager/programs/ssh/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.ssh = {
3 | enable = true;
4 | compression = true;
5 | serverAliveInterval = 15;
6 | includes = [ "config.d/*" ];
7 | };
8 | }
9 |
--------------------------------------------------------------------------------
/home-manager/programs/sway/config:
--------------------------------------------------------------------------------
1 | include $HOME/.config/sway/config.d/*
2 | include /etc/sway/config.d/*
3 |
--------------------------------------------------------------------------------
/home-manager/programs/sway/config.d/basic.conf:
--------------------------------------------------------------------------------
1 | ### Variables
2 | #
3 | # Logo key. Use Mod1 for Alt.
4 | set $mod Mod4
5 |
6 | # Home row direction keys, like vim
7 | set $left h
8 | set $down j
9 | set $up k
10 | set $right l
11 |
12 | # Your preferred terminal emulator
13 | set $term foot
14 |
15 | # Your preferred application launcher
16 | # Note: pass the final command to swaymsg so that the resulting window can be opened
17 | # on the original workspace that the command was run on.
18 |
19 | set $menu 'rofi -modi run, drun, window -show drun'
20 |
21 | ### Output configuration
22 | #
23 | # Default wallpaper (more resolutions are available in /run/current-system/sw/share/backgrounds/sway/)
24 | output * bg $HOME/.config/sway/wallpaper.png fill
25 |
26 | # notification
27 | exec mako
28 |
--------------------------------------------------------------------------------
/home-manager/programs/sway/config.d/bindkey.conf:
--------------------------------------------------------------------------------
1 | ### Key bindings
2 | #
3 | # Basics:
4 | #
5 | # Start a terminal
6 | bindsym $mod+Return exec $term
7 |
8 | # Kill focused window
9 | bindsym $mod+Shift+q kill
10 |
11 | # Start your launcher
12 | bindsym $mod+d exec $menu
13 |
14 | # Drag floating windows by holding down $mod and left mouse button.
15 | # Resize them with right mouse button + $mod.
16 | # Despite the name, also works for non-floating windows.
17 | # Change normal to inverse to use left mouse button for resizing and right
18 | # mouse button for dragging.
19 | floating_modifier $mod normal
20 |
21 | # Reload the configuration file
22 | bindsym $mod+Shift+c reload
23 |
24 | # Exit sway (logs you out of your Wayland session)
25 | bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
26 |
27 | # Reload the configuration file
28 | bindsym $mod+Shift+p exec grim screenshot.png
29 |
30 | #
31 | # Moving around:
32 | #
33 | # Move your focus around
34 | bindsym $mod+$left focus left
35 | bindsym $mod+$down focus down
36 | bindsym $mod+$up focus up
37 | bindsym $mod+$right focus right
38 | # Or use $mod+[up|down|left|right]
39 | bindsym $mod+Left focus left
40 | bindsym $mod+Down focus down
41 | bindsym $mod+Up focus up
42 | bindsym $mod+Right focus right
43 |
44 | # Move the focused window with the same, but add Shift
45 | bindsym $mod+Shift+$left move left
46 | bindsym $mod+Shift+$down move down
47 | bindsym $mod+Shift+$up move up
48 | bindsym $mod+Shift+$right move right
49 | # Ditto, with arrow keys
50 | bindsym $mod+Shift+Left move left
51 | bindsym $mod+Shift+Down move down
52 | bindsym $mod+Shift+Up move up
53 | bindsym $mod+Shift+Right move right
54 | #
55 | # Workspaces:
56 | #
57 | # Switch to workspace
58 | bindsym $mod+1 workspace number 1
59 | bindsym $mod+2 workspace number 2
60 | bindsym $mod+3 workspace number 3
61 | bindsym $mod+4 workspace number 4
62 | bindsym $mod+5 workspace number 5
63 | bindsym $mod+6 workspace number 6
64 | bindsym $mod+7 workspace number 7
65 | bindsym $mod+8 workspace number 8
66 | bindsym $mod+9 workspace number 9
67 | bindsym $mod+0 workspace number 10
68 | # Move focused container to workspace
69 | bindsym $mod+Shift+1 move container to workspace number 1
70 | bindsym $mod+Shift+2 move container to workspace number 2
71 | bindsym $mod+Shift+3 move container to workspace number 3
72 | bindsym $mod+Shift+4 move container to workspace number 4
73 | bindsym $mod+Shift+5 move container to workspace number 5
74 | bindsym $mod+Shift+6 move container to workspace number 6
75 | bindsym $mod+Shift+7 move container to workspace number 7
76 | bindsym $mod+Shift+8 move container to workspace number 8
77 | bindsym $mod+Shift+9 move container to workspace number 9
78 | bindsym $mod+Shift+0 move container to workspace number 10
79 | # Note: workspaces can have any name you want, not just numbers.
80 | # We just use 1-10 as the default.
81 | #
82 | # Layout stuff:
83 | #
84 | # You can "split" the current object of your focus with
85 | # $mod+b or $mod+v, for horizontal and vertical splits
86 | # respectively.
87 | bindsym $mod+b splith
88 | bindsym $mod+v splitv
89 |
90 | # Switch the current container between different layout styles
91 | bindsym $mod+s layout stacking
92 | bindsym $mod+w layout tabbed
93 | bindsym $mod+e layout toggle split
94 |
95 | # Make the current focus fullscreen
96 | bindsym $mod+f fullscreen
97 |
98 | # Toggle the current focus between tiling and floating mode
99 | bindsym $mod+Shift+space floating toggle
100 |
101 | # Swap focus between the tiling area and the floating area
102 | bindsym $mod+space focus mode_toggle
103 |
104 | # Move focus to the parent container
105 | bindsym $mod+a focus parent
106 | #
107 | # Scratchpad:
108 | #
109 | # Sway has a "scratchpad", which is a bag of holding for windows.
110 | # You can send windows there and get them back later.
111 |
112 | # Move the currently focused window to the scratchpad
113 | bindsym $mod+Shift+minus move scratchpad
114 |
115 | # Show the next scratchpad window or hide the focused scratchpad window.
116 | # If there are multiple scratchpad windows, this command cycles through them.
117 | bindsym $mod+minus scratchpad show
118 |
119 | #
120 | # Resizing containers:
121 | #
122 | mode "resize" {
123 | # left will shrink the containers width
124 | # right will grow the containers width
125 | # up will shrink the containers height
126 | # down will grow the containers height
127 | bindsym $left resize shrink width 10px
128 | bindsym $down resize grow height 10px
129 | bindsym $up resize shrink height 10px
130 | bindsym $right resize grow width 10px
131 |
132 | # Ditto, with arrow keys
133 | bindsym Left resize shrink width 10px
134 | bindsym Down resize grow height 10px
135 | bindsym Up resize shrink height 10px
136 | bindsym Right resize grow width 10px
137 |
138 | # Return to default mode
139 | bindsym Return mode "default"
140 | bindsym Escape mode "default"
141 | }
142 | bindsym $mod+r mode "resize"
143 |
--------------------------------------------------------------------------------
/home-manager/programs/sway/config.d/input.conf:
--------------------------------------------------------------------------------
1 | input * {
2 | xkb_layout "jp"
3 | }
4 |
5 | for_window [app_id="FloatingVim"] floating enable
6 | bindsym $mod+i exec XMODIFIERS=@im= ~/.config/sway/ime.sh
7 |
--------------------------------------------------------------------------------
/home-manager/programs/sway/config.d/style.conf:
--------------------------------------------------------------------------------
1 | bar {
2 | swaybar_command waybar
3 | position top
4 |
5 | colors {
6 | #Dracula
7 | background #1d212a
8 | statusline #B0B0B0
9 | separator #44475A
10 |
11 | # border bckgrnd text
12 | focused_workspace #01d6b6 #1d212a #F8F8F2
13 | active_workspace #44475A #44475A #F8F8F2
14 | inactive_workspace #1d212a #1d212a #BFBFBF
15 | urgent_workspace #f05c8e #f05c8e #F8F8F2
16 | binding_mode #f05c8e #f05c8e #F8F8F2
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/home-manager/programs/sway/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | home.file = {
3 | ".config/sway/wallpaper.png".source = ./wallpaper.png;
4 | ".config/sway/config".source = ./config;
5 | ".config/sway/ime.sh" = {
6 | source = ./ime.sh;
7 | executable = true;
8 | };
9 | ".config/sway/config.d/" = {
10 | source = ./config.d;
11 | recursive = true;
12 | };
13 | };
14 | }
15 |
--------------------------------------------------------------------------------
/home-manager/programs/sway/ime.sh:
--------------------------------------------------------------------------------
1 | #!/run/current-system/sw/bin/bash
2 |
3 | FloatingVim=$(swaymsg -t get_tree | jq -c '.. | .floating_nodes? | arrays[] | select(.app_id=="FloatingVim")')
4 |
5 | if [ -z $FloatingVim ]; then
6 | wezterm \
7 | --config initial_rows=10 --config initial_cols=70 \
8 | --config enable_tab_bar=false --config window_background_opacity=0.4 \
9 | --config text_background_opacity=0.4 \
10 | start \
11 | --class FloatingVim nvim
12 | else
13 | if [ "$(echo $FloatingVim | jq .focused)" = 'true' ]; then
14 | swaymsg "move window to scratchpad"
15 | else
16 | swaymsg '[app_id="FloatingVim"] focus'
17 | fi
18 | fi
19 |
--------------------------------------------------------------------------------
/home-manager/programs/sway/wallpaper.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takeokunn/nixos-configuration/8b87ccd49f25d87cd26241295ca2f7eb0900a911/home-manager/programs/sway/wallpaper.png
--------------------------------------------------------------------------------
/home-manager/programs/swaylock/default.nix:
--------------------------------------------------------------------------------
1 | { lib, pkgs }:
2 | {
3 | home.packages = with pkgs; lib.optionals pkgs.stdenv.isLinux [ swayidle ];
4 |
5 | programs.swaylock = {
6 | enable = pkgs.stdenv.isLinux;
7 | settings = {
8 | daemonize = true;
9 | show-failed-attempts = true;
10 | clock = true;
11 | screenshot = true;
12 | effect-blur = "13x13";
13 | effect-vignette = "0.5:0.5";
14 | color = "6272A4";
15 | font = "Inter";
16 | indicator = true;
17 | indicator-radius = 200;
18 | indicator-thickness = 20;
19 | line-color = "282A36";
20 | ring-color = "BD93F9";
21 | inside-color = "282A36";
22 | key-hl-color = "50FA7B";
23 | separator-color = "00000000";
24 | text-color = "F8F8F2";
25 | text-caps-lock-color = "";
26 | line-ver-color = "BD93F9";
27 | ring-ver-color = "BD93F9";
28 | inside-ver-color = "282A36";
29 | text-ver-color = "8BE9FD";
30 | ring-wrong-color = "FF5555";
31 | text-wrong-color = "FF5555";
32 | inside-wrong-color = "282A36";
33 | inside-clear-color = "282A36";
34 | text-clear-color = "8BE9FD";
35 | ring-clear-color = "8BE9FD";
36 | line-clear-color = "8BE9FD";
37 | line-wrong-color = "282A36";
38 | bs-hl-color = "8BE9FD";
39 | grace = 2;
40 | grace-no-mouse = true;
41 | grace-no-touch = true;
42 | datestr = "%Y/%m/%d";
43 | timestr = "%H:%m";
44 | fade-in = 0.4;
45 | ignore-empty-password = true;
46 | };
47 | };
48 | }
49 |
--------------------------------------------------------------------------------
/home-manager/programs/tig/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, sources }:
2 | {
3 | home.file = {
4 | ".tig/dracula/".source = sources.dracula-tig.src;
5 | };
6 |
7 | programs.tig = {
8 | enable = true;
9 | config = ''
10 | # config
11 |
12 | set main-view = id date author:email-user commit-title:graph=yes,refs=yes
13 | set blame-view = date:default author:email-user id:yes,color line-number:yes,interval=1 text
14 |
15 | set log-view = line-number:yes,interval=1 text
16 | set blob-view = line-number:yes,interval=1 text
17 | set diff-view = line-number:yes,interval=1 text:yes,commit-title-overflow=no
18 | set pager-view = line-number:yes,interval=1 text
19 | set stage-view = line-number:yes,interval=1 text
20 |
21 | set blob-view-line-number = yes
22 | set blame-view-line-number = yes
23 |
24 | set mouse = true
25 | set tab-size = 4
26 | set ignore-case = true
27 | set refresh-mode = auto
28 | set ignore-space = at-eol
29 | set line-graphics = utf-8
30 | set diff-options = -m --first-parent
31 | set diff-highlight = true
32 |
33 | # keybind
34 |
35 | bind generic g move-first-line
36 | bind generic E view-grep
37 | bind generic G move-last-line
38 |
39 | bind main G move-last-line
40 | bind main g :toggle commit-title-graph
41 |
42 | bind generic move-page-down
43 | bind generic v move-page-up
44 | bind generic refresh
45 |
46 | bind generic f :toggle file-name
47 | bind main f :toggle commit-title-refs
48 |
49 | bind status P !git push origin
50 | bind branch L !git pull origin %(branch)
51 |
52 | # plugins
53 | source ~/.tig/dracula/config
54 | '';
55 | };
56 | }
57 |
--------------------------------------------------------------------------------
/home-manager/programs/tmux/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | programs.tmux = {
4 | enable = true;
5 | terminal = "xterm-256color";
6 | baseIndex = 1;
7 | escapeTime = 1;
8 | historyLimit = 999999999;
9 | keyMode = "vi";
10 | prefix = "C-q";
11 | secureSocket = true;
12 | shell = "${pkgs.fish}/bin/fish";
13 | newSession = true;
14 | customPaneNavigationAndResize = true;
15 | resizeAmount = 5;
16 |
17 | plugins = with pkgs; [
18 | tmuxPlugins.open
19 | tmuxPlugins.sensible
20 | tmuxPlugins.urlview
21 | tmuxPlugins.pain-control
22 | tmuxPlugins.jump
23 | {
24 | plugin = tmuxPlugins.dracula;
25 | extraConfig = ''
26 | set -g clock-mode-colour "#81a2be"
27 | set-option -g @dracula-plugins "battery"
28 | '';
29 | }
30 | ];
31 |
32 | extraConfig = ''
33 | set-option -g default-command $SHELL
34 | set-option -g display-panes-time 15000
35 | set-option -g status-position top
36 | set-option -g status-right '[%Y-%m-%d(%a) %H:%M]'
37 | set-option -g status-interval 1
38 | set-option -g status-justify centre
39 | set-option -g status-bg "colour238"
40 | set-option -g status-fg "colour255"
41 |
42 | bind-key C-g display-panes
43 |
44 | bind | split-window -h -c '#{pane_current_path}'
45 | bind - split-window -v -c '#{pane_current_path}'
46 |
47 | bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
48 |
49 | bind-key -T copy-mode-vi v send-keys -X begin-selection
50 | bind-key -T copy-mode-vi y send-keys -X copy-pipe "pbcopy"
51 | bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
52 | '';
53 | };
54 | }
55 |
--------------------------------------------------------------------------------
/home-manager/programs/vim/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | programs.vim = {
4 | enable = true;
5 | packageConfigurable = pkgs.vim;
6 | extraConfig = ''
7 | set encoding=utf-8
8 | set fileencodings=utf-8,euc-jp,cp932
9 | set clipboard+=unnamed
10 | set backspace=2
11 | set tabstop=2
12 | set shiftwidth=2
13 | set laststatus=2
14 | set statusline=%y
15 | set showmatch
16 | set wrapscan
17 | set hlsearch
18 | set showcmd
19 | set title
20 | set number relativenumber
21 | set cursorline
22 | set nofoldenable
23 | set noswapfile
24 | set expandtab
25 | set splitbelow
26 | set splitright
27 | set incsearch
28 | set ignorecase
29 | set smartcase
30 |
31 | nnoremap / /\v
32 | nnoremap V
33 | nnoremap :nohlsearch
34 |
35 | syntax on
36 | filetype plugin indent on
37 | '';
38 | };
39 | }
40 |
--------------------------------------------------------------------------------
/home-manager/programs/waybar/colors.css:
--------------------------------------------------------------------------------
1 | @define-color background-darker rgba(30, 31, 41, 230);
2 | @define-color background #282a36;
3 | @define-color selection #44475a;
4 | @define-color foreground #f8f8f2;
5 | @define-color comment #6272a4;
6 | @define-color cyan #8be9fd;
7 | @define-color green #50fa7b;
8 | @define-color orange #ffb86c;
9 | @define-color pink #ff79c6;
10 | @define-color purple #bd93f9;
11 | @define-color red #ff5555;
12 | @define-color yellow #f1fa8c;
13 |
--------------------------------------------------------------------------------
/home-manager/programs/waybar/config:
--------------------------------------------------------------------------------
1 | {
2 | "layer": "top",
3 | "position": "top",
4 | "modules-left": [
5 | "sway/workspaces",
6 | "custom/right-arrow-dark"
7 | ],
8 | "modules-center": [
9 | "custom/left-arrow-dark",
10 | "clock#1",
11 | "custom/left-arrow-light",
12 | "custom/left-arrow-dark",
13 | "clock#2",
14 | "custom/right-arrow-dark",
15 | "custom/right-arrow-light",
16 | "clock#3",
17 | "custom/right-arrow-dark"
18 | ],
19 | "modules-right": [
20 | "custom/left-arrow-dark",
21 | "pulseaudio",
22 | "custom/left-arrow-light",
23 | "custom/left-arrow-dark",
24 | "memory",
25 | "custom/left-arrow-light",
26 | "custom/left-arrow-dark",
27 | "cpu",
28 | "custom/left-arrow-light",
29 | "custom/left-arrow-dark",
30 | "battery",
31 | "custom/left-arrow-light",
32 | "custom/left-arrow-dark",
33 | "disk",
34 | "custom/left-arrow-light",
35 | "custom/left-arrow-dark",
36 | "tray"
37 | ],
38 | "custom/left-arrow-dark": {
39 | "format": "",
40 | "tooltip": false
41 | },
42 | "custom/left-arrow-light": {
43 | "format": "",
44 | "tooltip": false
45 | },
46 | "custom/right-arrow-dark": {
47 | "format": "",
48 | "tooltip": false
49 | },
50 | "custom/right-arrow-light": {
51 | "format": "",
52 | "tooltip": false
53 | },
54 | "sway/workspaces": {
55 | "disable-scroll": true,
56 | "format": "{name}"
57 | },
58 | "clock#1": {
59 | "format": "{:%a}",
60 | "tooltip": false
61 | },
62 | "clock#2": {
63 | "format": "{:%Y-%m-%d}",
64 | "tooltip": false
65 | },
66 | "clock#3": {
67 | "format": "{:%H:%M}",
68 | "tooltip": false
69 | },
70 | "pulseaudio": {
71 | "format": "{icon} {volume:2}%",
72 | "format-bluetooth": "{icon} {volume}%",
73 | "format-muted": "MUTE",
74 | "format-icons": {
75 | "headphones": " ",
76 | "default": [
77 | " ",
78 | " "
79 | ]
80 | },
81 | "scroll-step": 5,
82 | "on-click": "pamixer -t",
83 | "on-click-right": "pavucontrol"
84 | },
85 | "memory": {
86 | "interval": 5,
87 | "format": "Mem {}%"
88 | },
89 | "cpu": {
90 | "interval": 5,
91 | "format": "CPU {usage:2}%"
92 | },
93 | "battery": {
94 | "states": {
95 | "good": 95,
96 | "warning": 30,
97 | "critical": 15
98 | },
99 | "format": "{icon} {capacity}%",
100 | "format-icons": [
101 | " ",
102 | " ",
103 | " ",
104 | " ",
105 | " "
106 | ]
107 | },
108 | "disk": {
109 | "interval": 5,
110 | "format": "Disk {percentage_used:2}%",
111 | "path": "/"
112 | },
113 | "tray": {
114 | "icon-size": 20
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/home-manager/programs/waybar/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | home.file = {
4 | ".config/waybar/colors.css".source = ./colors.css;
5 | ".config/waybar/style.css".source = ./style.css;
6 | ".config/waybar/config".source = ./config;
7 | };
8 |
9 | programs.waybar.enable = pkgs.stdenv.isLinux;
10 | }
11 |
--------------------------------------------------------------------------------
/home-manager/programs/waybar/style.css:
--------------------------------------------------------------------------------
1 | @import url("./colors.css");
2 | * {
3 | border: none;
4 | border-radius: 0;
5 | font-family: Iosevka;
6 | font-size: 11pt;
7 | min-height: 0;
8 | }
9 |
10 | window#waybar {
11 | opacity: 0.9;
12 | background: @background-darker;
13 | color: @foreground;
14 | border-bottom: 2px solid @background;
15 | }
16 |
17 | #workspaces button {
18 | padding: 0 10px;
19 | background: @background;
20 | color: @foreground;
21 | }
22 |
23 | #workspaces button:hover {
24 | box-shadow: inherit;
25 | text-shadow: inherit;
26 | background-image: linear-gradient(0deg, @selection, @background-darker);
27 | }
28 |
29 | #workspaces button.active {
30 | background-image: linear-gradient(0deg, @purple, @selection);
31 | }
32 |
33 | #workspaces button.urgent {
34 | background-image: linear-gradient(0deg, @red, @background-darker);
35 | }
36 |
37 | #taskbar button.active {
38 | background-image: linear-gradient(0deg, @selection, @background-darker);
39 | }
40 |
41 | #clock {
42 | padding: 0 4px;
43 | background: @background;
44 | }
45 |
46 | #custom-right-arrow-dark,
47 | #custom-left-arrow-dark {
48 | color: @background-darker;
49 | }
50 | #custom-right-arrow-light,
51 | #custom-left-arrow-light {
52 | color: @background;
53 | background: @background-darker;
54 | }
55 |
56 | #workspaces,
57 | #clock.1,
58 | #clock.2,
59 | #clock.3,
60 | #pulseaudio,
61 | #memory,
62 | #cpu,
63 | #battery,
64 | #disk,
65 | #tray {
66 | background: @background-darker;
67 | }
68 |
69 | #workspaces button {
70 | padding: 0 2px;
71 | color: @foreground;
72 | }
73 |
74 | #workspaces button.focused {
75 | color: @cyan;
76 | }
77 |
78 | #workspaces button:hover {
79 | box-shadow: inherit;
80 | text-shadow: inherit;
81 | }
82 |
83 | #workspaces button:hover {
84 | background: @background-darker;
85 | border: @background-darker;
86 | padding: 0 3px;
87 | }
88 |
89 | #clock,
90 | #pulseaudio,
91 | #memory,
92 | #cpu,
93 | #battery,
94 | #disk {
95 | padding: 0 10px;
96 | }
97 |
--------------------------------------------------------------------------------
/home-manager/programs/wget/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | programs.wget = {
4 | enable = true;
5 | checkCertificate = "off";
6 | timestamping = "on";
7 | noParent = "on";
8 | timeout = 60;
9 | tries = 3;
10 | retryConnrefused = "on";
11 | trustServerNames = "on";
12 | followFtp = "on";
13 | adjustExtension = "on";
14 | localEncoding = "UTF-8";
15 | robots = "off";
16 | serverResponse = "on";
17 | };
18 | }
19 |
--------------------------------------------------------------------------------
/home-manager/programs/zellij/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs.zellij = {
3 | enable = false;
4 | attachExistingSession = true;
5 | exitShellOnExit = true;
6 | enableFishIntegration = true;
7 | settings = {
8 | theme = "dracula";
9 | default_layout = "compact";
10 | simplified_ui = true;
11 | default_shell = "fish";
12 | mouse_mode = false;
13 | scroll_buffer_size = 100000;
14 | show_startup_tips = false;
15 | show_release_notes = false;
16 | };
17 | };
18 | }
19 |
--------------------------------------------------------------------------------
/home-manager/services/advanced.nix:
--------------------------------------------------------------------------------
1 | { pkgs, emacsPkg }:
2 | let
3 | emacs = import ./emacs { inherit pkgs emacsPkg; };
4 | mako = import ./mako { inherit pkgs; };
5 | ollama = import ./ollama { inherit pkgs; };
6 | gpg-agent = import ./gpg-agent;
7 | swayidle = import ./swayidle { inherit pkgs; };
8 | swaync = import ./swaync { inherit pkgs; };
9 | swayosd = import ./swayosd { inherit pkgs; };
10 | in
11 | [
12 | emacs
13 | mako
14 | ollama
15 | gpg-agent
16 | swayidle
17 | swaync
18 | swayosd
19 | ]
20 |
--------------------------------------------------------------------------------
/home-manager/services/autorandr/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | services.autorandr = {
4 | enable = pkgs.stdenv.isLinux;
5 | ignoreLid = false;
6 | };
7 | }
8 |
--------------------------------------------------------------------------------
/home-manager/services/basic.nix:
--------------------------------------------------------------------------------
1 | let
2 | nix-gc = import ./nix-gc;
3 | in
4 | [ nix-gc ]
5 |
--------------------------------------------------------------------------------
/home-manager/services/emacs/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, emacsPkg, ... }:
2 | {
3 | services.emacs = {
4 | enable = pkgs.stdenv.isLinux;
5 | package = emacsPkg;
6 | client.enable = true;
7 | defaultEditor = true;
8 | };
9 |
10 | programs.fish = {
11 | interactiveShellInit = ''
12 | set -x EDITOR 'emacsclient -nw --alternate-editor=""'
13 | '';
14 | };
15 | }
16 |
--------------------------------------------------------------------------------
/home-manager/services/gpg-agent/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | services.gpg-agent = {
3 | enable = true;
4 | defaultCacheTtl = 60 * 60 * 24;
5 | defaultCacheTtlSsh = 60 * 60 * 24;
6 | maxCacheTtl = 60 * 60 * 24;
7 | maxCacheTtlSsh = 60 * 60 * 24;
8 | enableSshSupport = true;
9 | enableExtraSocket = true;
10 | };
11 |
12 | programs.fish = {
13 | interactiveShellInit = ''
14 | set -x SSH_AUTH_SOCK $(gpgconf --list-dirs agent-ssh-socket)
15 | '';
16 | };
17 | }
18 |
--------------------------------------------------------------------------------
/home-manager/services/mako/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | services.mako = {
4 | enable = pkgs.stdenv.isLinux;
5 | settings = {
6 | backgroundColor = "#282a36";
7 | textColor = "#44475a";
8 | borderColor = "#282a36";
9 | };
10 | # settings = ''
11 | # [urgency=low]
12 | # border-color=#282a36
13 |
14 | # [urgency=normal]
15 | # border-color=#f1fa8c
16 |
17 | # [urgency=high]
18 | # border-color=#ff5555
19 | # '';
20 | };
21 | }
22 |
--------------------------------------------------------------------------------
/home-manager/services/nix-gc/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | nix.gc = {
3 | automatic = true;
4 | frequency = "monthly";
5 | options = "--delete-older-than 3d";
6 | };
7 | }
8 |
--------------------------------------------------------------------------------
/home-manager/services/ollama/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | services.ollama = {
4 | enable = true;
5 | host = "0.0.0.0";
6 | };
7 | }
8 |
--------------------------------------------------------------------------------
/home-manager/services/swayidle/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | services.swayidle = {
4 | # enable = pkgs.stdenv.isLinux;
5 | enable = false;
6 | timeouts = [
7 | {
8 | timeout = 60;
9 | command = "${pkgs.swaylock}/bin/swaylock -fF";
10 | }
11 | {
12 | timeout = 90;
13 | command = "${pkgs.systemd}/bin/systemctl suspend";
14 | }
15 | ];
16 | };
17 | }
18 |
--------------------------------------------------------------------------------
/home-manager/services/swaync/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | services.swaync = {
4 | enable = pkgs.stdenv.isLinux;
5 | settings = {
6 | positionX = "right";
7 | positionY = "top";
8 | layer = "overlay";
9 | control-center-layer = "top";
10 | layer-shell = true;
11 | cssPriority = "application";
12 | control-center-margin-top = 0;
13 | control-center-margin-bottom = 0;
14 | control-center-margin-right = 0;
15 | control-center-margin-left = 0;
16 | notification-2fa-action = true;
17 | notification-inline-replies = false;
18 | notification-icon-size = 64;
19 | notification-body-image-height = 100;
20 | notification-body-image-width = 200;
21 | };
22 | };
23 | }
24 |
--------------------------------------------------------------------------------
/home-manager/services/swayosd/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | services.swayosd = {
4 | enable = pkgs.stdenv.isLinux;
5 | display = null;
6 | };
7 | }
8 |
--------------------------------------------------------------------------------
/hosts/OPL2212-2/default.nix:
--------------------------------------------------------------------------------
1 | { inputs }:
2 | let
3 | inherit (inputs) nix-darwin home-manager;
4 | inherit (inputs) nixpkgs sops-nix;
5 |
6 | system = "aarch64-darwin";
7 | pkgs = import nixpkgs { inherit system; };
8 |
9 | username = "obara";
10 | configuration =
11 | { ... }:
12 | {
13 | users.users.${username}.home = "/Users/${username}";
14 | };
15 | in
16 | nix-darwin.lib.darwinSystem {
17 | inherit pkgs system;
18 | inherit (inputs.nixpkgs) lib;
19 | specialArgs = {
20 | inherit username pkgs;
21 | };
22 | modules = [
23 | configuration
24 | ../../nix-darwin
25 | home-manager.darwinModules.home-manager
26 | {
27 | home-manager = {
28 | useUserPackages = true;
29 | sharedModules = [ sops-nix.homeManagerModules.sops ];
30 | users."${username}" = import ../../home-manager/advanced.nix;
31 | extraSpecialArgs = {
32 | inherit system username;
33 | inherit (inputs) nixpkgs;
34 | inherit (inputs) mcp-servers-nix;
35 | inherit (inputs) emacs-overlay org-babel;
36 | };
37 | };
38 | }
39 | ];
40 | }
41 |
--------------------------------------------------------------------------------
/hosts/OPPO-A79/default.nix:
--------------------------------------------------------------------------------
1 | { inputs }:
2 | let
3 | inherit (inputs) nixpkgs nix-on-droid;
4 | system = "aarch64-linux";
5 | in
6 | nix-on-droid.lib.nixOnDroidConfiguration {
7 | modules = [ ../../nix-on-droid ];
8 | pkgs = import nixpkgs { inherit system; };
9 | extraSpecialArgs = {
10 | inherit nixpkgs system;
11 | };
12 | }
13 |
--------------------------------------------------------------------------------
/hosts/X13Gen2/default.nix:
--------------------------------------------------------------------------------
1 | { inputs }:
2 | let
3 | inherit (inputs) nixpkgs xremap;
4 | inherit (inputs) sops-nix home-manager;
5 |
6 | username = "take";
7 | system = "x86_64-linux";
8 | in
9 | nixpkgs.lib.nixosSystem {
10 | inherit system;
11 | specialArgs = {
12 | inherit username xremap;
13 | };
14 |
15 | modules = [
16 | ../../nixos
17 | ./hardware-configuration.nix
18 | sops-nix.nixosModules.sops
19 | home-manager.nixosModules.home-manager
20 | {
21 | home-manager.useUserPackages = true;
22 | sharedModules = [ sops-nix.homeManagerModules.sops ];
23 | home-manager.users."${username}" = import ../../home-manager/advanced.nix;
24 | extraSpecialArgs = {
25 | inherit system;
26 | inherit (inputs) nixpkgs;
27 | inherit (inputs) mcp-servers-nix;
28 | inherit (inputs) emacs-overlay org-babel;
29 | };
30 | }
31 | ];
32 | }
33 |
--------------------------------------------------------------------------------
/hosts/X13Gen2/hardware-configuration.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | lib,
4 | modulesPath,
5 | ...
6 | }:
7 | {
8 | imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
9 |
10 | services.xserver.videoDrivers = [ "amdgpu" ];
11 |
12 | boot = {
13 | initrd = {
14 | availableKernelModules = [
15 | "nvme"
16 | "xhci_pci"
17 | "usb_storage"
18 | "sd_mod"
19 | "amdgpu"
20 | ];
21 | kernelModules = [ ];
22 | };
23 | kernelModules = [ "kvm-amd" ];
24 | extraModulePackages = [ ];
25 | };
26 |
27 | fileSystems = {
28 | "/" = {
29 | device = "/dev/disk/by-uuid/643f028c-88a5-45af-b7b8-52d78f05a501";
30 | fsType = "ext4";
31 | };
32 | "/boot" = {
33 | device = "/dev/disk/by-uuid/A44D-7A24";
34 | fsType = "vfat";
35 | options = [
36 | "fmask=0022"
37 | "dmask=0022"
38 | ];
39 | };
40 | };
41 |
42 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
43 | networking.useDHCP = lib.mkDefault true;
44 | hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
45 | }
46 |
--------------------------------------------------------------------------------
/nix-darwin/config/fonts.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | fonts.packages = with pkgs; [
4 | monaspace
5 | noto-fonts
6 | noto-fonts-lgc-plus
7 | noto-fonts-cjk-sans
8 | noto-fonts-cjk-serif
9 | noto-fonts-color-emoji
10 | noto-fonts-emoji-blob-bin
11 | noto-fonts-monochrome-emoji
12 | hackgen-font
13 | hackgen-nf-font
14 | nerd-fonts.fira-code
15 | emacs-all-the-icons-fonts
16 | font-awesome
17 | font-awesome_5
18 | iosevka
19 | (iosevka-bin.override { variant = "Aile"; })
20 | (iosevka-bin.override { variant = "Etoile"; })
21 | ];
22 | }
23 |
--------------------------------------------------------------------------------
/nix-darwin/config/homebrew.nix:
--------------------------------------------------------------------------------
1 | {
2 | homebrew = {
3 | enable = true;
4 | onActivation = {
5 | autoUpdate = true;
6 | upgrade = true;
7 | cleanup = "uninstall";
8 | };
9 | brews = [
10 | "pdfpc"
11 | "pinentry-mac"
12 | "terminal-notifier"
13 | ];
14 | casks = [
15 | "aquaskk"
16 | "chatgpt"
17 | "claude"
18 | "cleanshot"
19 | "font-hack-nerd-font"
20 | "font-sketchybar-app-font"
21 | "google-chrome"
22 | "keycastr"
23 | "obs"
24 | "orbstack"
25 | "raycast"
26 | "sequel-ace"
27 | "sf-symbols"
28 | "sublime-text"
29 | ];
30 | };
31 | }
32 |
--------------------------------------------------------------------------------
/nix-darwin/config/keyboard.nix:
--------------------------------------------------------------------------------
1 | {
2 | system.keyboard = {
3 | enableKeyMapping = true;
4 | remapCapsLockToControl = true;
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/nix-darwin/config/networking.nix:
--------------------------------------------------------------------------------
1 | {
2 | networking = {
3 | knownNetworkServices = [
4 | "Wi-Fi"
5 | "Ethernet Adaptor"
6 | "Thunderbolt Ethernet"
7 | ];
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/nix-darwin/config/nix.nix:
--------------------------------------------------------------------------------
1 | {
2 | nix = {
3 | optimise.automatic = true;
4 | settings = {
5 | experimental-features = "nix-command flakes";
6 | max-jobs = 8;
7 | };
8 | extraOptions = ''
9 | extra-substituters = https://devenv.cachix.org
10 | extra-trusted-public-keys = devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=
11 | '';
12 | };
13 | }
14 |
--------------------------------------------------------------------------------
/nix-darwin/config/power.nix:
--------------------------------------------------------------------------------
1 | {
2 | power = {
3 | restartAfterFreeze = true;
4 | sleep.allowSleepByPowerButton = true;
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/nix-darwin/config/security.nix:
--------------------------------------------------------------------------------
1 | { username }:
2 | {
3 | security = {
4 | sudo.extraConfig = ''
5 | ${username} ALL=NOPASSWD: ALL
6 | '';
7 | pam.services.sudo_local = {
8 | touchIdAuth = true;
9 | reattach = true;
10 | };
11 | };
12 | }
13 |
--------------------------------------------------------------------------------
/nix-darwin/config/services/aerospace/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | services.aerospace = {
3 | enable = true;
4 | settings = {
5 | enable-normalization-flatten-containers = true;
6 | enable-normalization-opposite-orientation-for-nested-containers = true;
7 | accordion-padding = 0;
8 | on-focused-monitor-changed = [ "move-mouse monitor-lazy-center" ];
9 | exec-on-workspace-change = [
10 | "/bin/bash"
11 | "-c"
12 | "sketchybar --trigger aerospace_workspace_change FOCUSED_WORKSPACE=$(aerospace list-workspaces --focused)"
13 | ];
14 |
15 | gaps = {
16 | inner = {
17 | horizontal = 0;
18 | vertical = 0;
19 | };
20 | outer = {
21 | left = 0;
22 | bottom = 0;
23 | top = 0;
24 | right = 0;
25 | };
26 | };
27 |
28 | mode = {
29 | main = {
30 | binding = {
31 | alt-h = "focus left";
32 | alt-l = "focus right";
33 |
34 | alt-shift-h = "move left";
35 | alt-shift-l = "move right";
36 |
37 | alt-shift-space = "layout floating tiling";
38 |
39 | alt-1 = "workspace 1";
40 | alt-2 = "workspace 2";
41 | alt-3 = "workspace 3";
42 | alt-4 = "workspace 4";
43 | alt-5 = "workspace 5";
44 | alt-6 = "workspace 6";
45 | alt-7 = "workspace 7";
46 | alt-8 = "workspace 8";
47 | alt-9 = "workspace 9";
48 | alt-0 = "workspace 10";
49 |
50 | alt-shift-1 = [
51 | "move-node-to-workspace 1"
52 | "workspace 1"
53 | ];
54 | alt-shift-2 = [
55 | "move-node-to-workspace 2"
56 | "workspace 2"
57 | ];
58 | alt-shift-3 = [
59 | "move-node-to-workspace 3"
60 | "workspace 3"
61 | ];
62 | alt-shift-4 = [
63 | "move-node-to-workspace 4"
64 | "workspace 4"
65 | ];
66 | alt-shift-5 = [
67 | "move-node-to-workspace 5"
68 | "workspace 5"
69 | ];
70 | alt-shift-6 = [
71 | "move-node-to-workspace 6"
72 | "workspace 6"
73 | ];
74 | alt-shift-7 = [
75 | "move-node-to-workspace 7"
76 | "workspace 7"
77 | ];
78 | alt-shift-8 = [
79 | "move-node-to-workspace 8"
80 | "workspace 8"
81 | ];
82 | alt-shift-9 = [
83 | "move-node-to-workspace 9"
84 | "workspace 9"
85 | ];
86 | alt-shift-0 = [
87 | "move-node-to-workspace 10"
88 | "workspace 10"
89 | ];
90 |
91 | alt-r = "mode resize";
92 | };
93 | };
94 |
95 | resize = {
96 | binding = {
97 | h = "resize width -50";
98 | j = "resize height +50";
99 | k = "resize height -50";
100 | l = "resize width +50";
101 | enter = "mode main";
102 | esc = "mode main";
103 | };
104 | };
105 | };
106 |
107 | workspace-to-monitor-force-assignment = {
108 | "1" = "main";
109 | "2" = "main";
110 | "3" = "main";
111 | "4" = "main";
112 | "5" = "secondary";
113 | "6" = "secondary";
114 | "7" = "secondary";
115 | "8" = "secondary";
116 | "9" = "secondary";
117 | "10" = "main";
118 | };
119 |
120 | on-window-detected = [
121 | {
122 | "if".app-id = "com.google.Chrome";
123 | run = [
124 | "layout floating"
125 | "move-node-to-workspace 1"
126 | ];
127 | }
128 | {
129 | "if".app-id = "com.apple.Terminal";
130 | run = [ "move-node-to-workspace 2" ];
131 | }
132 | {
133 | "if".app-id = "com.raphaelamorim.rio";
134 | run = [ "move-node-to-workspace 2" ];
135 | }
136 | {
137 | "if".app-id = "net.kovidgoyal.kitty";
138 | run = [ "move-node-to-workspace 2" ];
139 | }
140 | {
141 | "if".app-id = "org.gnu.Emacs";
142 | run = [ "move-node-to-workspace 3" ];
143 | }
144 | {
145 | "if".app-id = "com.jgraph.drawio.desktop";
146 | run = [ "move-node-to-workspace 4" ];
147 | }
148 | {
149 | "if".app-id = "io.flutterflow.prod.mac";
150 | run = [ "move-node-to-workspace 4" ];
151 | }
152 | {
153 | "if".app-id = "com.sequel-ace.sequel-ace";
154 | run = [ "move-node-to-workspace 4" ];
155 | }
156 | {
157 | "if".app-id = "com.microsoft.VSCode";
158 | run = [ "move-node-to-workspace 5" ];
159 | }
160 | {
161 | "if".app-id = "com.obsproject.obs-studio";
162 | run = [ "move-node-to-workspace 7" ];
163 | }
164 | {
165 | "if".app-id = "com.github.tattn.VCam";
166 | run = [ "move-node-to-workspace 7" ];
167 | }
168 | {
169 | "if".app-id = "com.hnc.Discord";
170 | run = [ "move-node-to-workspace 8" ];
171 | }
172 | {
173 | "if".app-id = "com.anthropic.claudefordesktop";
174 | run = [ "move-node-to-workspace 9" ];
175 | }
176 | {
177 | "if".app-id = "com.openai.chat";
178 | run = [ "move-node-to-workspace 9" ];
179 | }
180 | {
181 | "if".app-id = "com.tinyspeck.slackmacgap";
182 | run = [ "move-node-to-workspace 10" ];
183 | }
184 | ];
185 | };
186 | };
187 | }
188 |
--------------------------------------------------------------------------------
/nix-darwin/config/services/default.nix:
--------------------------------------------------------------------------------
1 | let
2 | aerospace = import ./aerospace;
3 | sketchybar = import ./sketchybar;
4 | in
5 | {
6 | imports = [
7 | aerospace
8 | sketchybar
9 | ];
10 |
11 | services.nextdns = {
12 | enable = true;
13 | arguments = [
14 | "-profile"
15 | "2c6735"
16 | ];
17 | };
18 | }
19 |
--------------------------------------------------------------------------------
/nix-darwin/config/services/sketchybar/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | services = {
3 | sketchybar.enable = true;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/nix-darwin/config/startup.nix:
--------------------------------------------------------------------------------
1 | {
2 | system.startup = {
3 | chime = false;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/nix-darwin/config/system.nix:
--------------------------------------------------------------------------------
1 | { pkgs, username }:
2 | {
3 | system = {
4 | primaryUser = username;
5 | stateVersion = 5;
6 | defaults = {
7 | SoftwareUpdate.AutomaticallyInstallMacOSUpdates = true;
8 | LaunchServices.LSQuarantine = false;
9 | NSGlobalDomain = {
10 | _HIHideMenuBar = true;
11 | AppleShowAllExtensions = true;
12 | };
13 | finder = {
14 | AppleShowAllFiles = true;
15 | AppleShowAllExtensions = true;
16 | _FXShowPosixPathInTitle = true;
17 | };
18 | dock = {
19 | autohide = true;
20 | show-recents = false;
21 | launchanim = false;
22 | orientation = "bottom";
23 | };
24 | trackpad = {
25 | Clicking = true;
26 | Dragging = true;
27 | };
28 | };
29 |
30 | activationScripts.extraActivation.text = ''
31 | softwareupdate --all --install
32 | '';
33 | };
34 | }
35 |
--------------------------------------------------------------------------------
/nix-darwin/config/time.nix:
--------------------------------------------------------------------------------
1 | {
2 | time.timeZone = "Asia/Tokyo";
3 | }
4 |
--------------------------------------------------------------------------------
/nix-darwin/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, username, ... }:
2 | let
3 | fonts = import ./config/fonts.nix { inherit pkgs; };
4 | homebrew = import ./config/homebrew.nix;
5 | networking = import ./config/networking.nix;
6 | nix = import ./config/nix.nix;
7 | security = import ./config/security.nix { inherit username; };
8 | services = import ./config/services;
9 | system = import ./config/system.nix { inherit pkgs username; };
10 | time = import ./config/time.nix;
11 | keyboard = import ./config/keyboard.nix;
12 | startup = import ./config/startup.nix;
13 | power = import ./config/power.nix;
14 | in
15 | {
16 | imports = [
17 | fonts
18 | homebrew
19 | networking
20 | nix
21 | security
22 | services
23 | system
24 | time
25 | keyboard
26 | startup
27 | power
28 | ];
29 | }
30 |
--------------------------------------------------------------------------------
/nix-on-droid/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | nixpkgs,
3 | pkgs,
4 | system,
5 | ...
6 | }:
7 | {
8 | environment.packages = with pkgs; [ git ];
9 |
10 | time.timeZone = "Asia/Tokyo";
11 |
12 | system.stateVersion = "24.05";
13 |
14 | user.shell = "${pkgs.fish}/bin/fish";
15 |
16 | home-manager = {
17 | backupFileExtension = "hm-bak";
18 | useGlobalPkgs = true;
19 | config = import ../home-manager/basic.nix {
20 | inherit system nixpkgs;
21 | };
22 | };
23 | }
24 |
--------------------------------------------------------------------------------
/nixos/config/boot.nix:
--------------------------------------------------------------------------------
1 | {
2 | boot = {
3 | hardwareScan = true;
4 | tmp = {
5 | useTmpfs = true;
6 | cleanOnBoot = true;
7 | tmpfsSize = "95%";
8 | };
9 | loader = {
10 | systemd-boot = {
11 | enable = true;
12 | graceful = true;
13 | };
14 | efi.canTouchEfiVariables = true;
15 | };
16 | };
17 | }
18 |
--------------------------------------------------------------------------------
/nixos/config/fonts.nix:
--------------------------------------------------------------------------------
1 | { pkgs }:
2 | {
3 | fonts = {
4 | fontDir.enable = true;
5 | packages = with pkgs; [
6 | noto-fonts
7 | noto-fonts-lgc-plus
8 | noto-fonts-cjk-sans
9 | noto-fonts-cjk-serif
10 | noto-fonts-color-emoji
11 | noto-fonts-emoji-blob-bin
12 | noto-fonts-monochrome-emoji
13 | hackgen-font
14 | hackgen-nf-font
15 | nerd-fonts.fira-code
16 | emacs-all-the-icons-fonts
17 | font-awesome
18 | font-awesome_5
19 | iosevka
20 | (iosevka-bin.override { variant = "Aile"; })
21 | (iosevka-bin.override { variant = "Etoile"; })
22 | ];
23 | };
24 | }
25 |
--------------------------------------------------------------------------------
/nixos/config/hardware.nix:
--------------------------------------------------------------------------------
1 | {
2 | hardware = {
3 | pulseaudio.enable = false;
4 | bluetooth.enable = true;
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/nixos/config/i18n.nix:
--------------------------------------------------------------------------------
1 | {
2 | i18n = {
3 | defaultLocale = "en_US.UTF-8";
4 | extraLocaleSettings = {
5 | LC_ADDRESS = "ja_JP.UTF-8";
6 | LC_IDENTIFICATION = "ja_JP.UTF-8";
7 | LC_MEASUREMENT = "ja_JP.UTF-8";
8 | LC_MONETARY = "ja_JP.UTF-8";
9 | LC_NAME = "ja_JP.UTF-8";
10 | LC_NUMERIC = "ja_JP.UTF-8";
11 | LC_PAPER = "ja_JP.UTF-8";
12 | LC_TELEPHONE = "ja_JP.UTF-8";
13 | LC_TIME = "ja_JP.UTF-8";
14 | };
15 | };
16 | }
17 |
--------------------------------------------------------------------------------
/nixos/config/networking.nix:
--------------------------------------------------------------------------------
1 | { config }:
2 | {
3 | networking = {
4 | hostName = "nixos";
5 | networkmanager = {
6 | enable = true;
7 | ensureProfiles.profiles = {
8 | # environmentFiles = config.sops.secrets.home-wifi-psk.path;
9 | home-wifi = {
10 | connection = {
11 | id = "Buffalo-G-90E0";
12 | type = "wifi";
13 | };
14 | wifi = {
15 | mode = "infrastructure";
16 | ssid = "Buffalo-G-90E0";
17 | };
18 | wifi-security = {
19 | auth-alg = "open";
20 | key-mgmt = "wpa-psk";
21 | psk = "uengspy3bwdkb"; # $HOME_WIFI_PASSWORD
22 | };
23 | };
24 | };
25 | };
26 | enableIPv6 = true;
27 | firewall.enable = true;
28 | nameservers = [
29 | "8.8.8.8"
30 | "8.8.4.4"
31 | "1.1.1.1"
32 | "1.0.0.1"
33 | "2001:4860:4860::8888"
34 | "2001:4860:4860::8844"
35 | "2606:4700:4700::1111"
36 | "2606:4700:4700::1001"
37 | ];
38 | };
39 | }
40 |
--------------------------------------------------------------------------------
/nixos/config/nix.nix:
--------------------------------------------------------------------------------
1 | {
2 | nix = {
3 | settings.cores = 8;
4 | optimise.automatic = true;
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/nixos/config/programs.nix:
--------------------------------------------------------------------------------
1 | {
2 | programs = {
3 | fish.enable = true;
4 | firefox.enable = true;
5 | noisetorch.enable = true;
6 |
7 | chromium = {
8 | enable = true;
9 | extensions = [
10 | "gppongmhjkpfnbhagpmjfkannfbllamg" # Wappalyzer
11 | "kfdibhbheajeacnkkakomaliggbgndcf" # Chromemacs
12 | "gighmmpiobklfepjocnamgkkbiglidom" # Adblock
13 | "hkgfoiooedgoejojocmhlaklaeopbecg" # Picture-in-Picture
14 | "gfapcejdoghpoidkfodoiiffaaibpaem" # Dracula Chrome Theme
15 | "cejijldbedfmdehondfmoadlkhgjcmkd" # Sheets Row Highlighter
16 | ];
17 | };
18 |
19 | gnupg.agent = {
20 | enable = true;
21 | enableSSHSupport = true;
22 | };
23 |
24 | sway = {
25 | enable = true;
26 | xwayland.enable = true;
27 | wrapperFeatures.gtk = true;
28 | };
29 | };
30 | }
31 |
--------------------------------------------------------------------------------
/nixos/config/security.nix:
--------------------------------------------------------------------------------
1 | { username }:
2 | {
3 | security = {
4 | rtkit.enable = true;
5 | tpm2.enable = true;
6 | audit.enable = true;
7 | sudo.extraConfig = ''
8 | ${username} ALL=NOPASSWD: ALL
9 | '';
10 | };
11 | }
12 |
--------------------------------------------------------------------------------
/nixos/config/services.nix:
--------------------------------------------------------------------------------
1 | { username }:
2 | {
3 | services = {
4 | ntp.enable = true;
5 | cachix-agent.enable = true;
6 |
7 | ollama = {
8 | enable = true;
9 | acceleration = "rocm";
10 | };
11 | offlineimap.enable = true;
12 | openssh.enable = true;
13 |
14 | xserver = {
15 | enable = true;
16 | xkb.layout = "jp";
17 | displayManager.gdm.enable = true;
18 | };
19 |
20 | displayManager.autoLogin = {
21 | enable = true;
22 | user = username;
23 | };
24 |
25 | pipewire = {
26 | enable = true;
27 | alsa = {
28 | enable = true;
29 | support32Bit = true;
30 | };
31 | pulse.enable = true;
32 | jack.enable = true;
33 | };
34 |
35 | xremap = {
36 | userName = username;
37 | serviceMode = "system";
38 | config = {
39 | modmap = [
40 | {
41 | name = "CapsLock to Ctrl";
42 | remap = {
43 | CapsLock = "Ctrl_L";
44 | };
45 | }
46 | ];
47 | };
48 | };
49 |
50 | tlp = {
51 | enable = true;
52 | settings = {
53 | CPU_SCALING_GOVERNOR_ON_AC = "performance";
54 | CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
55 |
56 | CPU_HWP_DYN_BOOST_ON_AC = 1;
57 | CPU_HWP_DYN_BOOST_ON_BAT = 0;
58 |
59 | CPU_BOOST_ON_AC = 1;
60 | CPU_BOOST_ON_BAT = 0;
61 |
62 | CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
63 | CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
64 |
65 | RUNTIME_PM_ON_AC = "auto";
66 | RUNTIME_PM_ON_BAT = "auto";
67 |
68 | PLATFORM_PROFILE_ON_AC = "performance";
69 | PLATFORM_PROFILE_ON_BAT = "low-power";
70 |
71 | SATA_LINKPWR_ON_AC = "max_performance";
72 | SATA_LINKPWR_ON_BAT = "min_power";
73 |
74 | SOUND_POWER_SAVE_ON_AC = 0;
75 | SOUND_POWER_SAVE_ON_BAT = 1;
76 | };
77 | };
78 | };
79 | }
80 |
--------------------------------------------------------------------------------
/nixos/config/systemd.nix:
--------------------------------------------------------------------------------
1 | {
2 | systemd.services = {
3 | "getty@tty1".enable = false;
4 | "autovt@tty1".enable = false;
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/nixos/config/time.nix:
--------------------------------------------------------------------------------
1 | {
2 | time = {
3 | timeZone = "Asia/Tokyo";
4 | hardwareClockInLocalTime = true;
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/nixos/config/users.nix:
--------------------------------------------------------------------------------
1 | { pkgs, username }:
2 | {
3 | users.users.${username} = {
4 | isNormalUser = true;
5 | extraGroups = [
6 | "networkmanager"
7 | "wheel"
8 | "video"
9 | "audio"
10 | "docker"
11 | ];
12 | shell = pkgs.fish;
13 | useDefaultShell = true;
14 | packages = with pkgs; [
15 | alsa-utils
16 | wl-clipboard
17 | grim
18 | ];
19 | };
20 | }
21 |
--------------------------------------------------------------------------------
/nixos/config/virtualisation.nix:
--------------------------------------------------------------------------------
1 | { virtualisation.docker.enable = true; }
2 |
--------------------------------------------------------------------------------
/nixos/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | config,
4 | xremap,
5 | username,
6 | ...
7 | }:
8 | let
9 | boot = import ./config/boot.nix;
10 | fonts = import ./config/fonts.nix { inherit pkgs; };
11 | hardware = import ./config/hardware.nix;
12 | i18n = import ./config/i18n.nix;
13 | networking = import ./config/networking.nix { inherit config; };
14 | nix = import ./config/nix.nix;
15 | programs = import ./config/programs.nix;
16 | security = import ./config/security.nix { inherit username; };
17 | services = import ./config/services.nix { inherit username; };
18 | systemd = import ./config/systemd.nix;
19 | time = import ./config/time.nix;
20 | users = import ./config/users.nix { inherit pkgs username; };
21 | virtualisation = import ./config/virtualisation.nix;
22 | in
23 | {
24 | system.stateVersion = "24.11";
25 |
26 | imports = [
27 | xremap.nixosModules.default
28 | boot
29 | fonts
30 | hardware
31 | i18n
32 | networking
33 | nix
34 | programs
35 | security
36 | services
37 | systemd
38 | time
39 | users
40 | virtualisation
41 | ];
42 | }
43 |
--------------------------------------------------------------------------------
/node2nix/default.nix:
--------------------------------------------------------------------------------
1 | # This file has been generated by node2nix 1.11.1. Do not edit!
2 |
3 | {
4 | pkgs ? import {
5 | inherit system;
6 | },
7 | system ? builtins.currentSystem,
8 | nodejs ? pkgs."nodejs_14",
9 | }:
10 |
11 | let
12 | nodeEnv = import ./node-env.nix {
13 | inherit (pkgs)
14 | stdenv
15 | lib
16 | python2
17 | runCommand
18 | writeTextFile
19 | writeShellScript
20 | ;
21 | inherit pkgs nodejs;
22 | libtool = if pkgs.stdenv.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null;
23 | };
24 | in
25 | import ./node-packages.nix {
26 | inherit (pkgs)
27 | fetchurl
28 | nix-gitignore
29 | stdenv
30 | lib
31 | fetchgit
32 | ;
33 | inherit nodeEnv;
34 | }
35 |
--------------------------------------------------------------------------------
/node2nix/node-packages.json:
--------------------------------------------------------------------------------
1 | ["@github/copilot-language-server", "@anthropic-ai/claude-code", "sitemcp"]
2 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "test": "echo \"Error: no test specified\" && exit 1",
5 | "lint": "npx secretlint --secretlintignore .gitignore \"**/*\""
6 | },
7 | "devDependencies": {
8 | "@secretlint/secretlint-rule-preset-recommend": "^9.3.4",
9 | "secretlint": "^9.3.4"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/sops/default.nix:
--------------------------------------------------------------------------------
1 | { homeDirectory }:
2 | {
3 | sops = {
4 | defaultSopsFile = ./password.yaml;
5 | gnupg = {
6 | home = "${homeDirectory}/.gnupg";
7 | };
8 | secrets = {
9 | home-wifi-psk = { };
10 | brave-api-token = { };
11 | };
12 | };
13 | }
14 |
--------------------------------------------------------------------------------
/sops/password.yaml:
--------------------------------------------------------------------------------
1 | home-wifi-psk: ENC[AES256_GCM,data:Ct2EtolzqN6mAf3fPA==,iv:jOXxyREKTF9litk7uQoCWoHxPGDtx3aeJfzSUR/bDB8=,tag:Ydzr5IFv+sLOTl8x/mxxmw==,type:str]
2 | brave-api-token: ENC[AES256_GCM,data:z1M7K/wAOE2smRwYGj0N5mDIO6Vze7PyH5VUpWRqWnv2y82uUniU1wXY8zpo,iv:5f/h4vmgq0KWDPsQBvPjKwaPAcXzPJXLyYezFJjDWSU=,tag:9gl+y8X5AZ9TMnkYLMINDQ==,type:str]
3 | sops:
4 | lastmodified: "2025-04-08T06:21:40Z"
5 | mac: ENC[AES256_GCM,data:zP2E/RisHMGedNWETLvg7lbAJUHR4LMKWvBFKxcNf4OLqC1X6yub/n7KlGod9TBdpxIYi0c6VHg7vjYLHcP1g5sYSXhT1Wg9X2pN57rV8Oo0KcjY3qEnCpb3b1hhngqXnqTRJ7jTJjP0X1jEF+EdgZ4vfsyZODfx8no96JK705U=,iv:MZbwlC13NQTfYOtmdikSt6iwggJA8D+WI+tVUYlaWYg=,tag:wG5GLX1oLX8aVz81AWFQuw==,type:str]
6 | pgp:
7 | - created_at: "2025-04-08T06:21:40Z"
8 | enc: |-
9 | -----BEGIN PGP MESSAGE-----
10 |
11 | hQIMA6smtgkkGn+yAQ/9GFS95r7Ydh/aYK2lhEM7DRTYxAjVo29jrQZFX+tUYbBQ
12 | 5LOXgsVO0ldgy+VqG+so5VwXTxs06O/dBvdOD2hPhd0oor/snUxUTu5YWt8KUt2V
13 | UavpLh1+z5r1Vbsfru0OqUVoEDuiMa3MSOX/XJ5wZBWOr6DKDelw7DK7exOr65kY
14 | N/LPjSXW1yXk4q25958SpYPzwpfqSFj6sS04WTQZqvSeaJFwGNmS0sbpfUjmZGw7
15 | F6Z33lgvNzZ3AIaaJZ5E+unWRVYFj7VR6/1QuS5WuzKyT4BZv0tEt8WMqHu+WgfV
16 | jSVkrg4mvtnOOnb9KXgK/OXlxyu/DJz5xm17raXRbX86TbUrj4Vs6WwSb1mzZC1C
17 | 0hXj57TmZaVXM7Ir0np/beI09CM9lkawccpZL2WT6nPgCskBCH9B68PrADAPRMVn
18 | UZaLKnwKZDhbers3MClHdkLS9rgC3LEbhE+J7iHHiMjRmqbWi4mmLGkUYn3Wg1FM
19 | Jg4EvFUtP/YzKT96QkmDZi9v3acaxuKWVhwvR4e0LL14yhub6epeicc9EEqpdlzy
20 | fLZ2rhyuE828SxIVYzVOdXB+VEM+rjv6KZPzDXyHGuiCqy+JF8LHc4jAf7iRg91S
21 | 4nJctZuJlYLdzFpGMQNAse1xjgcZOwYljUmD0iau8Ap+AVd31oH/7u6QcgTxSKHS
22 | XAGpcvxE8ykLAHFf/rKJDq4etWibv+NRRAYyYOpMGj77cNCVRmcFPko/CkolApPF
23 | OEcsAI/HO2U+W2KKrSuU0ELcwH6ia5L8j/paqQv5hxNxilt/5KTwW/Grze4D
24 | =OT94
25 | -----END PGP MESSAGE-----
26 | fp: 0F79C0AB03FD7A1C
27 | unencrypted_suffix: _unencrypted
28 | version: 3.10.1
29 |
--------------------------------------------------------------------------------