From dc10af1d930929277505971ce54ec856f91ed7dc Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 13 Nov 2022 01:45:06 +0100 Subject: mkSandboxSystem: qualify lib calls --- lib/mk-sandbox-system.nix | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'lib') diff --git a/lib/mk-sandbox-system.nix b/lib/mk-sandbox-system.nix index 232fc4c..e579183 100644 --- a/lib/mk-sandbox-system.nix +++ b/lib/mk-sandbox-system.nix @@ -21,8 +21,7 @@ let in rec { - nixosConfigurations.${name} = pkgs.nixos - ({ modulesPath, lib, pkgs, ... }: with lib; { + nixosConfigurations.${name} = pkgs.nixos ({ modulesPath, lib, pkgs, ... }: { imports = [ (modulesPath + "/profiles/minimal.nix") { environment.noXlibs = false; } # avoid mass rebuild @@ -33,32 +32,32 @@ in rec { config ]; - system.stateVersion = mkDefault trivial.release; + system.stateVersion = lib.mkDefault lib.trivial.release; networking = { hostName = name; - firewall.enable = mkDefault false; + firewall.enable = lib.mkDefault false; }; users.users.${user} = { - isNormalUser = mkDefault true; - password = mkDefault ""; - extraGroups = mkDefault [ "wheel" ]; + isNormalUser = lib.mkDefault true; + password = lib.mkDefault ""; + extraGroups = lib.mkDefault [ "wheel" ]; }; - security.sudo.wheelNeedsPassword = mkDefault false; + security.sudo.wheelNeedsPassword = lib.mkDefault false; services.getty = { - autologinUser = mkDefault user; - helpLine = mkDefault '' + autologinUser = lib.mkDefault user; + helpLine = lib.mkDefault '' Press to terminate the virtual machine. The working directory on the host is mounted to /mnt. ''; }; virtualisation = { - graphics = mkDefault false; - diskImage = mkDefault "$(mktemp).qcow2"; + graphics = lib.mkDefault false; + diskImage = lib.mkDefault "$(mktemp).qcow2"; sharedDirectories.host = { source = "$SHARED_CWD"; @@ -67,9 +66,9 @@ in rec { # Uncomment when this is merged: # https://github.com/NixOS/nixpkgs/pull/200225 - #restrictNetwork = mkDefault true; + #restrictNetwork = lib.mkDefault true; - qemu.package = mkDefault + qemu.package = lib.mkDefault (if patchQemu9p then qemu_kvm_patched_9p else pkgs.qemu_kvm); }; }); -- cgit v1.2.3