We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我第一次使用nixos,我尝试在nixos下使用Steam++加速github和google翻译,由于没有提供nix packages,我尝试通过fhs环境运行Steam++, fhs配置如下:
(let base = pkgs.appimageTools.defaultFhsEnvArgs; in pkgs.buildFHSUserEnv (base // { name = "fhs"; targetPkgs = pkgs: (base.targetPkgs pkgs) ++ (with pkgs; [ pkg-config ncurses icu fakeroot ] ); profile = "export FHS=1"; runScript = "bash"; extraOutputsToInstall = ["dev"]; }))
程序能够正常启动,但由于在nixos中hosts文件由系统生成,hosts使用了只读文件系统,即使使用root权限也无法修改。我尝试修改我的configuration.nix,添加了以下内容:
environment.etc."hosts" = { enable = true; source = lib.mkForce "/var/custom/hosts/custom-hosts"; mode = "0666"; };
通过这个方法,我可以在普通模式下修改hosts文件,但在fhs环境下hosts文件仍然是只读的。 请问我应该通过什么方法才能在nixos下使用hosts加速?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
🧐 问题描述
我第一次使用nixos,我尝试在nixos下使用Steam++加速github和google翻译,由于没有提供nix packages,我尝试通过fhs环境运行Steam++, fhs配置如下:
程序能够正常启动,但由于在nixos中hosts文件由系统生成,hosts使用了只读文件系统,即使使用root权限也无法修改。我尝试修改我的configuration.nix,添加了以下内容:
通过这个方法,我可以在普通模式下修改hosts文件,但在fhs环境下hosts文件仍然是只读的。
请问我应该通过什么方法才能在nixos下使用hosts加速?
The text was updated successfully, but these errors were encountered: