aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpacien2022-11-13 01:45:06 +0100
committerpacien2022-11-13 01:45:06 +0100
commitdc10af1d930929277505971ce54ec856f91ed7dc (patch)
treee729716d4d73737942ef6de445fe2652c78dc150
parentfae2859c4ebcb5c25025cdbd1dffb294a2b9e38e (diff)
downloadflaky-utils-dc10af1d930929277505971ce54ec856f91ed7dc.tar.gz
mkSandboxSystem: qualify lib calls
-rw-r--r--lib/mk-sandbox-system.nix27
1 files changed, 13 insertions, 14 deletions
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
21 21
22in rec { 22in rec {
23 23
24 nixosConfigurations.${name} = pkgs.nixos 24 nixosConfigurations.${name} = pkgs.nixos ({ modulesPath, lib, pkgs, ... }: {
25 ({ modulesPath, lib, pkgs, ... }: with lib; {
26 imports = [ 25 imports = [
27 (modulesPath + "/profiles/minimal.nix") 26 (modulesPath + "/profiles/minimal.nix")
28 { environment.noXlibs = false; } # avoid mass rebuild 27 { environment.noXlibs = false; } # avoid mass rebuild
@@ -33,32 +32,32 @@ in rec {
33 config 32 config
34 ]; 33 ];
35 34
36 system.stateVersion = mkDefault trivial.release; 35 system.stateVersion = lib.mkDefault lib.trivial.release;
37 36
38 networking = { 37 networking = {
39 hostName = name; 38 hostName = name;
40 firewall.enable = mkDefault false; 39 firewall.enable = lib.mkDefault false;
41 }; 40 };
42 41
43 users.users.${user} = { 42 users.users.${user} = {
44 isNormalUser = mkDefault true; 43 isNormalUser = lib.mkDefault true;
45 password = mkDefault ""; 44 password = lib.mkDefault "";
46 extraGroups = mkDefault [ "wheel" ]; 45 extraGroups = lib.mkDefault [ "wheel" ];
47 }; 46 };
48 47
49 security.sudo.wheelNeedsPassword = mkDefault false; 48 security.sudo.wheelNeedsPassword = lib.mkDefault false;
50 49
51 services.getty = { 50 services.getty = {
52 autologinUser = mkDefault user; 51 autologinUser = lib.mkDefault user;
53 helpLine = mkDefault '' 52 helpLine = lib.mkDefault ''
54 Press <CTRL-a> <x> to terminate the virtual machine. 53 Press <CTRL-a> <x> to terminate the virtual machine.
55 The working directory on the host is mounted to /mnt. 54 The working directory on the host is mounted to /mnt.
56 ''; 55 '';
57 }; 56 };
58 57
59 virtualisation = { 58 virtualisation = {
60 graphics = mkDefault false; 59 graphics = lib.mkDefault false;
61 diskImage = mkDefault "$(mktemp).qcow2"; 60 diskImage = lib.mkDefault "$(mktemp).qcow2";
62 61
63 sharedDirectories.host = { 62 sharedDirectories.host = {
64 source = "$SHARED_CWD"; 63 source = "$SHARED_CWD";
@@ -67,9 +66,9 @@ in rec {
67 66
68 # Uncomment when this is merged: 67 # Uncomment when this is merged:
69 # https://github.com/NixOS/nixpkgs/pull/200225 68 # https://github.com/NixOS/nixpkgs/pull/200225
70 #restrictNetwork = mkDefault true; 69 #restrictNetwork = lib.mkDefault true;
71 70
72 qemu.package = mkDefault 71 qemu.package = lib.mkDefault
73 (if patchQemu9p then qemu_kvm_patched_9p else pkgs.qemu_kvm); 72 (if patchQemu9p then qemu_kvm_patched_9p else pkgs.qemu_kvm);
74 }; 73 };
75 }); 74 });