fix VMs on nixos-22.05
This commit is contained in:
parent
f52ff8fdb5
commit
15e7b32c2d
4 changed files with 15 additions and 6 deletions
|
|
@ -13,19 +13,21 @@ rec {
|
|||
|
||||
vm = (import "${nixpkgs}/nixos" {
|
||||
inherit system;
|
||||
configuration = { lib, ... }: {
|
||||
configuration = { config, lib, modulesPath, ... }: {
|
||||
imports = [
|
||||
nix-bitcoin.nixosModules.default
|
||||
"${nix-bitcoin}/modules/presets/secure-node.nix"
|
||||
"${modulesPath}/virtualisation/qemu-vm.nix"
|
||||
];
|
||||
|
||||
virtualisation.graphics = false;
|
||||
|
||||
nix-bitcoin.generateSecrets = true;
|
||||
services.clightning.enable = true;
|
||||
# For faster startup in offline VMs
|
||||
services.clightning.extraConfig = "disable-dns";
|
||||
|
||||
nixpkgs.pkgs = pkgs;
|
||||
virtualisation.graphics = false;
|
||||
services.getty.autologinUser = "root";
|
||||
nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
|
||||
|
||||
|
|
@ -42,8 +44,10 @@ rec {
|
|||
systemd.services."serial-getty@".preStop = ''
|
||||
echo o >/proc/sysrq-trigger
|
||||
'';
|
||||
|
||||
system.stateVersion = config.system.nixos.release;
|
||||
};
|
||||
}).vm;
|
||||
}).config.system.build.vm;
|
||||
|
||||
runVM = mkVMScript vm;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
{ modulesPath, ... }:
|
||||
{
|
||||
# Disable the hardened preset to improve VM performance
|
||||
disabledModules = [ <nix-bitcoin/modules/presets/hardened.nix> ];
|
||||
|
||||
imports = [ "${modulesPath}/virtualisation/qemu-vm.nix" ];
|
||||
|
||||
config = {
|
||||
virtualisation.graphics = false;
|
||||
services.getty.autologinUser = "root";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue