Skip to content

Commit dd148fd

Browse files
committed
flake: move extra-substituters settings to flake.nix
1 parent 410146d commit dd148fd

5 files changed

Lines changed: 24 additions & 33 deletions

File tree

Justfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
default: switch
22

33
inspect:
4-
nix run github:bluskript/nix-inspect -- -p .
4+
nix --accept-flake-config run github:bluskript/nix-inspect -- -p .
55

66
install hostname target:
7-
nix run github:nix-community/nixos-anywhere -- \
7+
nix --accept-flake-config run github:nix-community/nixos-anywhere -- \
88
--flake .#{{ hostname }} \
99
--target-host {{ target }} \
1010
--copy-host-keys \
1111
--disko-mode disko \
1212

1313
bootstrap hostname disk:
14-
nix --extra-experimental-features "nix-command flakes" run 'github:nix-community/disko#disko-install' -- --flake .#{{ hostname }} --disk main {{ disk }}
14+
nix --extra-experimental-features "nix-command flakes" --accept-flake-config run 'github:nix-community/disko#disko-install' -- --flake .#{{ hostname }} --disk main {{ disk }}
1515

1616
build:
17-
nh os build .
17+
nh os build . --accept-flake-config
1818

1919
switch:
20-
nh os switch .
20+
nh os switch . --accept-flake-config
2121

2222
boot:
23-
nh os boot .
23+
nh os boot . --accept-flake-config
2424

2525
dryrun:
26-
nixos-rebuild dry-run --flake . --sudo -v --log-format internal-json |& nom --json
26+
nixos-rebuild dry-run --flake . --sudo --accept-flake-config -v --log-format internal-json |& nom --json
2727

2828
darwin-switch:
29-
nh darwin switch .
29+
nh darwin switch . --accept-flake-config
3030

3131
gc:
3232
# remove all generations older than 7 days

darwin/nix.nix

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,6 @@
2828
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"
2929
"https://mirrors.ustc.edu.cn/nix-channels/store"
3030
];
31-
extra-substituters = [
32-
"https://nix-community.cachix.org"
33-
"https://cache.garnix.io"
34-
"https://renna42.cachix.org"
35-
];
36-
extra-trusted-public-keys = [
37-
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
38-
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
39-
"renna42.cachix.org-1:AqHSiL2lFKYHYJ0U2YFiW1kjItvFMmyyc6loFZR3/X8="
40-
];
4131
warn-dirty = false;
4232
use-xdg-base-directories = true;
4333
# Disable the built-in flake registry to speed up evaluation

flake.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
{
22
description = "Renna's System Flake";
33

4+
nixConfig = {
5+
extra-substituters = [
6+
"https://nix-community.cachix.org"
7+
"https://attic.xuyh0120.win/lantian"
8+
"https://cache.garnix.io"
9+
"https://renna42.cachix.org"
10+
];
11+
extra-trusted-public-keys = [
12+
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
13+
"lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc="
14+
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
15+
"renna42.cachix.org-1:AqHSiL2lFKYHYJ0U2YFiW1kjItvFMmyyc6loFZR3/X8="
16+
];
17+
};
18+
419
inputs = {
520
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
621
flake-parts.url = "github:hercules-ci/flake-parts";

lib/with-offline-installer.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,10 @@ in
5757
"https://mirror.sjtu.edu.cn/nix-channels/store"
5858
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"
5959
"https://mirrors.ustc.edu.cn/nix-channels/store"
60-
];
61-
extra-substituters = [
6260
"https://nix-community.cachix.org"
6361
"https://cache.garnix.io"
6462
];
65-
extra-trusted-public-keys = [
63+
trusted-public-keys = [
6664
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
6765
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
6866
];

nixos/common/nix.nix

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,6 @@
4646
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"
4747
"https://mirrors.ustc.edu.cn/nix-channels/store"
4848
];
49-
extra-substituters = [
50-
"https://nix-community.cachix.org"
51-
"https://attic.xuyh0120.win/lantian"
52-
"https://cache.garnix.io"
53-
"https://renna42.cachix.org"
54-
];
55-
extra-trusted-public-keys = [
56-
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
57-
"lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc="
58-
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
59-
"renna42.cachix.org-1:AqHSiL2lFKYHYJ0U2YFiW1kjItvFMmyyc6loFZR3/X8="
60-
];
6149
warn-dirty = false;
6250
system-features = [
6351
"kvm"

0 commit comments

Comments
 (0)