diff --git a/README.md b/README.md index 7512a55..16831d1 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,12 @@ just b 尝试在`wezterm.lua`中配置`front_end = "WebGpu"`。 +### `Operation not permitted`? + +![](assets/imgs/README_2024-09-19_01-08-46.png) + +给nix完整的磁盘访问权限 + # 部署 > 在本地部署其他机器 diff --git a/assets/imgs/README_2024-09-19_01-08-46.png b/assets/imgs/README_2024-09-19_01-08-46.png new file mode 100644 index 0000000..9d5da37 Binary files /dev/null and b/assets/imgs/README_2024-09-19_01-08-46.png differ diff --git a/justfile b/justfile index ca9dd9e..6386c04 100644 --- a/justfile +++ b/justfile @@ -180,7 +180,7 @@ rebuild-debug host=profile: rebuild-debug target=profile: set-proxy #!/usr/bin/env bash config_target=".#darwinConfigurations.{{target}}.system" - nom build $config_target --extra-experimental-features "nix-command flakes" -v + nix build $config_target --extra-experimental-features "nix-command flakes" -v # 交互式源码查看 repl: diff --git a/lib/macosSystem.nix b/lib/macosSystem.nix index 615b63a..52cea40 100644 --- a/lib/macosSystem.nix +++ b/lib/macosSystem.nix @@ -19,13 +19,6 @@ in ++ [ ({lib, ...}: { nixpkgs.pkgs = import nixpkgs {inherit system;}; - # make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake. - nix.registry.nixpkgs.flake = nixpkgs; - - environment.etc."nix/inputs/nixpkgs".source = "${nixpkgs}"; - # make `nix repl ''` use the same nixpkgs as the one used by this flake. - # discard all the default paths, and only use the one from this flake. - nix.nixPath = lib.mkForce ["/etc/nix/inputs"]; }) ] ++ ( diff --git a/modules/base.nix b/modules/base.nix index 6def09e..66368d7 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -1,6 +1,8 @@ { pkgs, myvars, + nixpkgs, + lib, ... } @ args: { nixpkgs.overlays = @@ -84,4 +86,14 @@ ]; builders-use-substitutes = true; }; + + # make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake. + nix.registry.nixpkgs.flake = nixpkgs; + + environment.etc."nix/inputs/nixpkgs".source = "${nixpkgs}"; + # make `nix repl ''` use the same nixpkgs as the one used by this flake. + # discard all the default paths, and only use the one from this flake. + nix.nixPath = lib.mkForce ["/etc/nix/inputs"]; + # https://github.com/NixOS/nix/issues/9574 + nix.settings.nix-path = lib.mkForce "nixpkgs=/etc/nix/inputs/nixpkgs"; }