mirror of
https://github.com/sstent/vmimages.git
synced 2025-12-06 06:01:51 +00:00
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
# This is just an example, you should generate yours with nixos-generate-config and put it in here.
|
|
{
|
|
config,
|
|
lib,
|
|
modulesPath,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
# Set your system kind (needed for flakes)
|
|
nixpkgs.hostPlatform = "x86_64-linux";
|
|
virtualisation.hypervGuest.videoMode = "1920x1080";
|
|
|
|
boot.initrd.availableKernelModules = [ "sd_mod" "sr_mod" ];
|
|
boot.initrd.kernelModules = [ ];
|
|
boot.kernelModules = ["hv_sock"];
|
|
|
|
|
|
# fileSystems."/" = {
|
|
# device = "/dev/disk/by-label/nixos";
|
|
# autoResize = true;
|
|
# fsType = "ext4";
|
|
# };
|
|
|
|
# fileSystems."/boot" = {
|
|
# device = "/dev/disk/by-label/ESP";
|
|
# fsType = "vfat";
|
|
# };
|
|
|
|
fileSystems."/mnt/Public" = {
|
|
device = "//192.168.1.109/Public";
|
|
fsType = "cifs";
|
|
options = let
|
|
# this line prevents hanging on network split
|
|
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
|
|
# in ["${automount_opts},credentials=/etc/nixos/smb-secrets"];
|
|
in ["${automount_opts}"];
|
|
};
|
|
|
|
}
|