-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: cleanup nix cli configs [WIP]
- Loading branch information
1 parent
ae88773
commit 74159c5
Showing
14 changed files
with
66 additions
and
244 deletions.
There are no files selected for viewing
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ config, lib, pkgs, ... }: { | ||
# https://nixos.wiki/wiki/Ca-derivations | ||
# https://www.tweag.io/blog/2020-09-10-nix-cas/ | ||
# https://edolstra.github.io/pubs/phd-thesis.pdf#page=143 | ||
# https://discourse.nixos.org/t/tweag-nix-dev-update-12/13185/3 | ||
# nixpkgs.config.contentAddressedByDefault = lib.mkDefault false; | ||
|
||
nix = { | ||
package = lib.mkDefault pkgs.nixVersions.latest; | ||
settings = { | ||
accept-flake-config = true; | ||
auto-allocate-uids = lib.mkIf pkgs.stdenv.isLinux true; | ||
use-cgroups = lib.mkIf pkgs.stdenv.isLinux true; | ||
experimental-features = ["nix-command" "flakes"]; | ||
extra-experimental-features = [ | ||
"ca-derivations" | ||
"dynamic-derivations" | ||
"fetch-closure" "parse-toml-timestamps" "read-only-local-store" | ||
#"git-hashing" # Note: Allow creating (content-addressed) store objects which are hashed via Git's hashing algorithm. These store objects will not be understandable by older versions of Nix. | ||
"impure-derivations" "configurable-impure-env" | ||
"recursive-nix" | ||
"verified-fetches" | ||
] ++ (lib.optionals pkgs.stdenv.isLinux [ "auto-allocate-uids" "cgroups" ]); | ||
extra-substituters = ["https://cache.ngi0.nixos.org/"]; # content-address derivations cache | ||
extra-trusted-public-keys = ["cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA="]; | ||
}; | ||
|
||
# --- Experimental Features --- | ||
# See: https://nixos.org/manual/nix/stable/contributing/experimental-features#xp-feature-auto-allocate-uids | ||
# auto-allocate-uids = true; # # Allow Nix to automatically pick builder UIDs, rather than creating `nixbld*` user accounts | ||
# ca-derivations = true; # # Allow content-addressed derivations. Prevent rebuild if derivation changes dont affect output (https://nixos.org/manual/nix/stable/language/advanced-attributes#adv-attr-__contentAddressed) | ||
# cgroups = true; # # Allow Nix to execute builds inside cgroups. See setting: `use-cgroups` (https://nixos.org/manual/nix/stable/contributing/experimental-features#conf-use-cgroups) | ||
# daemon-trust-override = false; # # Allow forcing trusting/not-trusting clients w/ nix-daemon. | ||
# dynamic-derivations = true; # # Allow "text hashing" derivation outputs, to build `.drv` files. Deps in derivations on the outputs of derivations that are themselves derivations outputs | ||
# fetch-closure = true; # # Allow use of the `fetchClosure` builtin function in the Nix language. | ||
# flakes = true; # # Enable flakes | ||
# git-hashing = true; # # Allow creating (content-addressed) store objects hashed via Git's hashing algo. | ||
# impure-derivations = false; # # Allow derivations to produce non-fixed outputs by setting derivation attr: `__impure=true` | ||
# mounted-ssh-store = false; # # Allow use of the mounted SSH store (https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-help-stores#experimental-ssh-store-with-filesytem-mounted)kj | ||
# nix-command = true; # # Enable new `nix` subcommands. | ||
# no-url-literals = false; # # Disallow unquoted URLs as part of Nix language syntax. | ||
# parse-toml-timestamps = true; # # Allow parsing of timestamps in `builtins.fromTOML` | ||
# read-only-local-store = true; # # Allow the use of the `read-only` parameter in local store URIs. | ||
# recursive-nix = true; # # Allow derivation builders to call Nix, thus building derivations recursively. | ||
# verified-fetches = true; # # Enables verification of git commit signatures through the fetchGit built-in. | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters