about summary refs log tree commit diff stats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--flake.nix13
-rw-r--r--system/services/nix/default.nix12
2 files changed, 14 insertions, 11 deletions
diff --git a/flake.nix b/flake.nix
index e7906724..35fc36b2 100644
--- a/flake.nix
+++ b/flake.nix
@@ -88,11 +88,14 @@
     sysLib = import ./lib {inherit pkgs shell-library;};
     system = "x86_64-linux";
     pkgs = import inputs.nixpkgs {
-      config.allowUnfreePredicate = pkg:
-        builtins.elem (inputs.nixpkgs.lib.getName pkg) [
-          "steam"
-          "steam-original"
-        ];
+      config = {
+        contentAddressedByDefault = true;
+        config.allowUnfreePredicate = pkg:
+          builtins.elem (inputs.nixpkgs.lib.getName pkg) [
+            "steam"
+            "steam-original"
+          ];
+      };
       inherit system;
     };
   in {
diff --git a/system/services/nix/default.nix b/system/services/nix/default.nix
index 28fc251f..946ba56c 100644
--- a/system/services/nix/default.nix
+++ b/system/services/nix/default.nix
@@ -8,10 +8,7 @@
   ...
 }: {
   nix = {
-    # Flakes settings
-    package = pkgs.nixVersions.stable;
-    # this can't be in nix settings because of some "type error". See:
-    # https://discourse.nixos.org/t/flakes-error-error-attribute-outpath-missing/18044
+    package = pkgs.nixUnstable;
 
     registry = {
       nixpkgs.flake = nixpkgs;
@@ -26,8 +23,11 @@
     };
     settings = {
       auto-optimise-store = true;
-      experimental-features = ["nix-command" "flakes"];
-      fallback = true;
+      experimental-features = ["nix-command" "flakes" "ca-derivations"];
+
+      substituters = "https://cache.ngi0.nixos.org/";
+      trusted-public-keys = "cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA=";
+      fallback = true; # TODO what does this do?
 
       keep-failed = true; #keep failed tmp build dirs
       pure-eval = true; # restrict file system and network access to  hash