add compatibility with Nix PR #6530 (Source tree abstraction)
Avoid adding flake resource paths to the store (via string interpolation). This reduces performance and can lead to modules getting imported twice, once through a local path and once through a store path. This might not be needed in a future Nix release, in which case we can revert this.
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
# Import the secure-node preset, an opinionated config to enhance security
|
||||
# and privacy.
|
||||
#
|
||||
# "${nix-bitcoin}/modules/presets/secure-node.nix"
|
||||
# (nix-bitcoin + "/modules/presets/secure-node.nix")
|
||||
|
||||
{
|
||||
# Automatically generate all secrets required by services.
|
||||
|
||||
@@ -13,13 +13,13 @@ rec {
|
||||
QEMU_OPTS="-smp $(nproc) -m 1500" ${vm}/bin/run-*-vm
|
||||
'';
|
||||
|
||||
vm = (import "${nixpkgs}/nixos" {
|
||||
vm = (import (nixpkgs + "/nixos") {
|
||||
inherit system;
|
||||
configuration = { config, lib, modulesPath, ... }: {
|
||||
imports = [
|
||||
nix-bitcoin.nixosModules.default
|
||||
"${nix-bitcoin}/modules/presets/secure-node.nix"
|
||||
"${modulesPath}/virtualisation/qemu-vm.nix"
|
||||
(nix-bitcoin + "/modules/presets/secure-node.nix")
|
||||
(modulesPath + "/virtualisation/qemu-vm.nix")
|
||||
];
|
||||
|
||||
virtualisation.graphics = false;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Disable the hardened preset to improve VM performance
|
||||
disabledModules = [ <nix-bitcoin/modules/presets/hardened.nix> ];
|
||||
|
||||
imports = [ "${modulesPath}/virtualisation/qemu-vm.nix" ];
|
||||
imports = [ (modulesPath + "/virtualisation/qemu-vm.nix" ];
|
||||
|
||||
config = {
|
||||
virtualisation.graphics = false;
|
||||
|
||||
Reference in New Issue
Block a user