home-manager
Nixを使用して、packageやdotfilesを管理する
github
manual
wiki
Configuraion Options
home.nixに書く諸々の設定が全部このページに書いてる
なんで1ページにしてるんだ?mrsekut.icon
各packageの設定をする
Home Manager Option Searchを使うと便利
home-managerでrollback
home-managerのupgrade
Managing dotfiles with Nix - Alex Pearce
home-managerでdotfilesを管理する入門
かなり丁寧
Tutorial: Getting started with Home Manager for Nix | Mattia Gheda
home-managerでdotfilesを管理する入門
記事最後にいくつかリンクがあるのでそれも参考になる
#WIP
https://apribase.net/2023/08/22/nix-home-manager-qa/
https://blog.ryota-ka.me/posts/2021/12/31/home-manager
https://docs.google.com/presentation/d/1WABhHUJtuY08_nMwjMnmiZw1MC605iT018t6sBleHto/edit#slide=id.p
brewからnixへ移行する
https://www.softinio.com/post/moving-from-homebrew-to-nix-package-manager/
https://alexpearce.me/2021/07/managing-dotfiles-with-nix/#:~:text=Putting%20it%20all%20together%3A%20migrating%20from%20Homebrew
$ brew bundle tap
$ brew listより見やすい
できること
user環境を宣言的に管理する
dotfilesの管理をする
~/.config/nixpkgs/home.nixに設定を書いていく
これもdotfiles repoからaliasでやっていくと良いmrsekut.icon
$ home-manager switch
変更を適用する
具体的には
ユーザー環境の設定
globalに入れるpackageの管理
~/.profile, ~/.bashrc, ~/config/fishなどの設定ファイルのせってい
zshのplugin
emailの管理
home-managerのmodulesってなに?
https://github.com/nix-community/home-manager/tree/master/modules
nixpkgsとは違うもんね?mrsekut.icon
https://ghedam.at/24353/tutorial-getting-started-with-home-manager-for-nix#:~:text=files%20and%20packages.-,Using%20Home%20Manager%20modules,-Using%20the%20home
https://nix-community.github.io/home-manager/index.html#ch-writing-modules
?
portできるようにする設定ってことか?
そういえば、どうやってportingしているんだろう
https://stephank.nl/p/2020-06-01-a-nix-primer-by-a-newcomer.html#:~:text=in%20/etc/profiles.-,Modules,-Nix%20expressions%20that
portって何のこと言っているのかと思ったらやりとりのことか
Elmのportと同じような概念
FFI的な
gitの設定を、Nix言語で書けるよ、見たいなノリのことをportingと呼んでる
外部の設定ファイルを読み込む ref
xdg.configFile."hoge".source = ..という感じで書く
例えば
code:starship.nix
xdg.configFile."starship.toml".source = ./starship.toml;
これ以外の追加の設定をする必要はない
例えばhome.packagesにxdgを追加したりする必要はない
https://rycee.net/posts/2017-07-02-manage-your-home-with-nix.html