From 70e608a8f7f7de5c92690833b135c11002be272e Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Wed, 10 Jul 2024 17:17:18 +0200 Subject: [PATCH] common: provide a pinned nixpkgs on all infra machines --- common/default.nix | 7 ++++--- common/nix.nix | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 common/nix.nix diff --git a/common/default.nix b/common/default.nix index 9af4a43..f178e2f 100644 --- a/common/default.nix +++ b/common/default.nix @@ -1,10 +1,11 @@ { imports = [ ./admins.nix - ./raito-vm.nix - ./raito-proxy-aware-nginx.nix ./base-server.nix - ./sysadmin ./hardening.nix + ./nix.nix + ./raito-proxy-aware-nginx.nix + ./raito-vm.nix + ./sysadmin ]; } diff --git a/common/nix.nix b/common/nix.nix new file mode 100644 index 0000000..9bb1c91 --- /dev/null +++ b/common/nix.nix @@ -0,0 +1,14 @@ +{ lib, pkgs, ... }: +{ + nix.extraOptions = '' + experimental-features = nix-command flakes + ''; + + # Provision a useful nixpkgs in NIX_PATH and flake registry on infra + # machines. + nixpkgs.flake = { + source = lib.cleanSource pkgs.path; + setNixPath = true; + setFlakeRegistry = true; + }; +}