Skip to content

hushin/dotfiles2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

日常

chezmoi コマンド

Setup

macOS

/bin/bash -c "$(curl -fsSL https://raw.github.com/Homebrew/install/HEAD/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv)"
brew install chezmoi
chezmoi init --apply hushin/dotfiles2

Windows

Win-X Alt-A ターミナル(管理者)を立ち上げて実行

# 「シンボリックリンクの作成」権限に「Authenticated Users」を追加する
$tempCfg = [System.IO.Path]::GetTempFileName()
secedit /export /cfg $tempCfg | Out-Null

$content = Get-Content $tempCfg
$newContent = $content | ForEach-Object {
    if ($_ -like "SeCreateSymbolicLinkPrivilege*") {
        $current = ($_ -split "=")[1].Trim()
        if ($current -notlike "*S-1-5-11*") {
            if ($current) {
                "SeCreateSymbolicLinkPrivilege = *S-1-5-11,$current"
            } else {
                "SeCreateSymbolicLinkPrivilege = *S-1-5-11"
            }
        } else {
            $_
        }
    } else {
        $_
    }
}

$newContent | Out-File $tempCfg -Encoding Unicode
secedit /configure /db secedit.sdb /cfg $tempCfg /areas USER_RIGHTS | Out-Null
gpupdate /force | Out-Null
Remove-Item $tempCfg

Write-Host "再起動してください。" -ForegroundColor Green
# secpol.msc で ローカルポリシー > ユーザー権利の割り当て > シンボリックリンクの作成 で確認できます
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
winget install -e --id Git.Git --source winget
winget install -e --id twpayne.chezmoi --source winget

chezmoi のパス解決のため新しいタブを開いて実行

git config --global core.autocrlf false
chezmoi init --apply hushin/dotfiles2
# PSFzf のエラーが出ているときは手動で実行する
Install-Module PSFzf -Scope CurrentUser

以降の Windows 設定

Ubuntu

sh -c "$(curl -fsLS get.chezmoi.io)" -- -b $HOME/.local/bin
# WSL は chezmoi パス解決のためshellを新しく開く
chezmoi init --apply hushin/dotfiles2

手動設定

1Password

  • セキュリティ
    • システムがアイドル状態になるとロックの時間をお好みで変更
  • 開発者
    • SSH エージェントの設定
    • CLI と連携

Chrome

  • Surfingkeys
  • Tampermonkey
    • chrome://extensions/
      • ユーザースクリプトを許可する
    • ダッシュボード → ユーティリティ → クラウド → Google Drive からインポート
  • Stylebot
    • Google ドライブを介した手動同期
  • Mouse Dictionary
    • 英辞郎 の 辞書データをインポート
  • uBlock Origin Lite
    • 開発者モード をオン
    • 開発で以下を設定(デフォルトはフィルタリングなし)
フィルタリングなし:
  - all-urls
基本:
最適:
完全:

VSCode

  • Setting Sync

gh CLI

gh auth login
? Where do you use GitHub? github.com
? What is your preferred protocol for Git operations on this host? SSH
? Generate a new SSH key to add to your GitHub account? No

Emacs

Emacs 起動して実行

M-x nerd-icons-install-fonts

Windows は適当なフォルダを指定、 NFM.ttf を開いて手動でインストールする。

Emacs トラブルシューティング

Dropbox memo

Dropbox の設定が終わったら設定

macOS

ln -s "/Users/$(whoami)/Library/CloudStorage/Dropbox" ~/Dropbox
ln -s ~/Dropbox/memo ~/Documents/memo

Windows

New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\Documents\memo" -Value "$env:USERPROFILE\Dropbox\memo"

WSL

mkdir -p ~/Documents && ln -s /mnt/c/Users/$(whoami)/Documents/memo ~/Documents/memo

tmux(Ubuntu)

tmux を起動し、Ctrl-t I で プラグインインストール

その後 tmux-mem-cpu-load をビルド

cd ~/.config/tmux/plugins/tmux-mem-cpu-load && cmake . && make

このリポジトリ

chezmoi デフォルトだと https なので init 時に --ssh をつけたいが、1Password など初期設定が面倒なのでやっていない。 push する前に remote を ssh のものに変更する。

# chezmoi cd してから
git remote set-url origin git@github.com:hushin/dotfiles2.git

SSH

push 時こういったエラーが出たら ~/.ssh/known_hosts にホストキーを追加する

No ED25519 host key is known for github.com and you have requested strict checking. Host key verification failed.

ssh-keyscan -t ed25519 github.com >> ~/.ssh/known_hosts

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •