fix: nixos-installer - attribute 'age' missing

This commit is contained in:
Ryan Yin
2025-07-12 23:35:53 +08:00
parent db82d2d8c5
commit a1014361a3
5 changed files with 14 additions and 10 deletions

View File

@@ -39,8 +39,4 @@
];
builders-use-substitutes = true;
};
nix.extraOptions = ''
!include ${config.age.secrets.nix-access-tokens.path}
'';
}

View File

@@ -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}
'';
}

View File

@@ -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}
'';
}

View File

@@ -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

View File

@@ -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