From e43a2f14c5e33cbcb3ab4d188658365d7b47d257 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 16 Jun 2025 19:33:33 +0300 Subject: feat(configuration): Add proper virtualisation settings Set all normal user passwords to "john" and make the virtual machine a bit more powerfull --- configuration.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/configuration.nix b/configuration.nix index edf504a..4eb161a 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: { +{ config, pkgs, lib, ... }: { # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It's perfectly fine and recommended to leave @@ -16,4 +16,17 @@ nix.settings.experimental-features = [ "nix-command" "flakes" ]; nixpkgs.config.allowUnfree = true; + + virtualisation.vmVariant = { + users.users = lib.pipe config.users.users [ + (lib.filterAttrs (n: u: u.isNormalUser)) + (builtins.mapAttrs + (_: userattr: lib.mkForce (userattr // { password = lib.mkForce "john"; }))) + ]; + + virtualisation = { + memorySize = 2048; # В мегабайти + cores = 2; + }; + }; } -- cgit v1.3.1-26-gb76a