2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

"No space left on device"で Haskell (in NixOS) のビルドがコケた時の対処

Last updated at Posted at 2017-12-28

環境

  • NixOS 17.09
  • Stack lts-10.0
  • GHC 8.2.2
  • intero 0.1.24

状況

lts-10.0 が出て GHC 8.2.2が使えるようになったということで軽く試してみようと
Emacs(intero)を立ち上げたところ Cabal のビルドで
"No space left on device"というメッセージが出てエラーになった
nix-collect-garbage -dnix-store --optimize 等を実行し
dfコマンド で見ても容量に余裕がありそうだがエラーが解消されなかった

原因

/run/user/1000 にマウントされているtmpfsの容量が足りていなかった(200Mになってた)
https://www.freedesktop.org/software/systemd/man/logind.conf.html
どうやらsystemdの機能によるものっぽい

解消

configuration.nix
  ...

  services.logind.extraConfig = "RuntimeDirectorySize=1024M";

  ...
 $ sudo nixos-rebuild switch
 $ sudo reboot

無事ビルド出来た

2
2
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?