Skip to content

Commit f7e3e9a

Browse files
committed
feat: prepare for Determinate Nix installation
1 parent da8ea5c commit f7e3e9a

File tree

4 files changed

+233
-33
lines changed

4 files changed

+233
-33
lines changed

default.nix

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,12 @@
22

33
{
44
imports = [
5+
modules/nix-conf.nix
56
modules/snmp
67
];
78

89
system.primaryUser = "aiotter";
910

10-
nix = {
11-
package = pkgs.nixVersions.stable;
12-
registry = {
13-
nixpkgs.flake = flakeInputs.nixpkgs;
14-
};
15-
settings = {
16-
sandbox = true;
17-
substituters = [
18-
"https://nix-community.cachix.org"
19-
"https://aiotter.cachix.org"
20-
];
21-
trusted-public-keys = [
22-
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
23-
"aiotter.cachix.org-1:YaYTZbiaiBIUYsJPwhcgG9yXXWd15xPtGmvq7DEmKnE="
24-
];
25-
trusted-users = [ "@admin" ];
26-
experimental-features = "nix-command flakes pipe-operators";
27-
bash-prompt = ''[nix]\W$ '';
28-
warn-dirty = false;
29-
};
30-
};
31-
3211
environment.shellInit = ''
3312
# Load HomeManager
3413
[ -e ~/.nix-profile/etc/profile.d/hm-session-vars.sh ] \

flake.lock

Lines changed: 201 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
description = "aiotter's system settings for macOS";
33

44
inputs = {
5-
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
5+
determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/3";
6+
nixpkgs.follows = "determinate/nixpkgs";
67
flake-utils.url = "github:numtide/flake-utils";
78
darwin = {
89
url = "github:lnl7/nix-darwin/master";
@@ -14,15 +15,19 @@
1415
};
1516
};
1617

17-
outputs = inputs@{ self, nixpkgs, flake-utils, darwin, mac-app-util, ... }:
18+
outputs = inputs@{ self, nixpkgs, flake-utils, darwin, determinate, mac-app-util, ... }:
1819
let
1920
darwinSystems = with flake-utils.lib.system; [ x86_64-darwin aarch64-darwin ];
2021
in
2122
flake-utils.lib.eachSystem darwinSystems (system: rec {
2223
darwinConfigurations.default = darwin.lib.darwinSystem
2324
{
2425
inherit system;
25-
modules = [ ./. mac-app-util.darwinModules.default ];
26+
modules = [
27+
determinate.darwinModules.default
28+
mac-app-util.darwinModules.default
29+
./.
30+
];
2631
specialArgs = { flakeInputs = inputs; };
2732
};
2833

modules/nix-conf.nix

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{ lib, flakeInputs, ... }:
2+
3+
{
4+
# Let Determinate Nix handle Nix configuration
5+
nix.enable = false;
6+
7+
determinate-nix.customSettings = {
8+
extra-substituters = [
9+
"https://nix-community.cachix.org"
10+
"https://aiotter.cachix.org"
11+
];
12+
13+
extra-trusted-public-keys = [
14+
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
15+
"aiotter.cachix.org-1:YaYTZbiaiBIUYsJPwhcgG9yXXWd15xPtGmvq7DEmKnE="
16+
];
17+
18+
extra-trusted-users = [ "@admin" ];
19+
experimental-features = "nix-command flakes pipe-operators";
20+
bash-prompt = ''[nix]\W$ '';
21+
warn-dirty = false;
22+
};
23+
}

0 commit comments

Comments
 (0)