diff --git a/modules/base/nix.nix b/modules/base/nix.nix index cdd58f01..82f32f0f 100644 --- a/modules/base/nix.nix +++ b/modules/base/nix.nix @@ -39,8 +39,4 @@ ]; builders-use-substitutes = true; }; - - nix.extraOptions = '' - !include ${config.age.secrets.nix-access-tokens.path} - ''; } diff --git a/modules/darwin/nix-core.nix b/modules/darwin/nix-core.nix index 0b12ea73..419ccaed 100644 --- a/modules/darwin/nix-core.nix +++ b/modules/darwin/nix-core.nix @@ -1,4 +1,4 @@ -{ +{config, ...}: { ################################################################################### # # Core configuration for nix-darwin @@ -24,4 +24,8 @@ nix.gc.automatic = false; system.stateVersion = 5; + + nix.extraOptions = '' + !include ${config.age.secrets.nix-access-tokens.path} + ''; } diff --git a/modules/nixos/base/nix.nix b/modules/nixos/base/nix.nix index 12f5dad0..5e7c28e3 100644 --- a/modules/nixos/base/nix.nix +++ b/modules/nixos/base/nix.nix @@ -1,6 +1,6 @@ { + config, lib, - nixpkgs, ... }: { # to install chrome, you need to enable unfree packages @@ -18,4 +18,8 @@ nix.settings.auto-optimise-store = true; nix.channel.enable = false; # remove nix-channel related tools & configs, we use flakes instead. + + nix.extraOptions = '' + !include ${config.age.secrets.nix-access-tokens.path} + ''; } diff --git a/nixos-installer/README.md b/nixos-installer/README.md index 62f35647..8a41a00a 100644 --- a/nixos-installer/README.md +++ b/nixos-installer/README.md @@ -179,8 +179,8 @@ Filename Type Size Used Priority Clone this repository: ```bash -# enter an shell with git/vim/ssh-agent/gnumake available -nix-shell -p git vim gnumake +# enter an shell with git/vim/ssh-agent available +nix-shell -p git vim just # clone this repository git clone https://github.com/ryan4yin/nix-config.git @@ -211,7 +211,7 @@ nixos-install --root /mnt --flake .#ai --no-root-password --show-trace --verbose # if you want to use a cache mirror, run this command instead # replace the mirror url with your own -nixos-install --root /mnt --flake .#ai --no-root-password --show-trace --verbose --option substituters "https://mirror.sjtu.edu.cn/nix-channels/store" # install-2 +nixos-install --root /mnt --flake .#shoukei --no-root-password --show-trace --verbose --option substituters "https://mirrors.ustc.edu.cn/nix-channels/store https://cache.nixos.org/" # install-2 # enter into the installed system, check password & users # `su ryan` => `sudo -i` => enter ryan's password => successfully login diff --git a/nixos-installer/README.shoukei.md b/nixos-installer/README.shoukei.md index 60f1a22f..d1cd8200 100755 --- a/nixos-installer/README.shoukei.md +++ b/nixos-installer/README.shoukei.md @@ -254,7 +254,7 @@ nixos-install --root /mnt --flake .#shoukei --no-root-password --show-trace --ve # if you want to use a cache mirror, run this command instead # replace the mirror url with your own -nixos-install --root /mnt --flake .#shoukei --no-root-password --show-trace --verbose --option substituters "https://mirrors.ustc.edu.cn/nix-channels/store" # install-2 +nixos-install --root /mnt --flake .#shoukei --no-root-password --show-trace --verbose --option substituters "https://mirrors.ustc.edu.cn/nix-channels/store https://cache.nixos.org/" # install-2 # enter into the installed system, check password & users # `su ryan` => `sudo -i` => enter ryan's password => successfully login