machine-config/sam/hardware-configuration.nix
Chandler Swift ff4f0a88fa
sam: Mount UTM host share
This requires that I explicitly specify `chandler`'s UID and GID.
2025-12-22 13:10:03 -06:00

64 lines
1.9 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" "usb_storage" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/9f5ccd27-a09e-41d0-88a5-142d5cfb89fe";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/0FF4-D39B";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/mnt/utm" = {
device = "share";
fsType = "9p";
options = [
"trans=virtio"
"version=9p2000.L"
"rw"
"_netdev"
"nofail"
"auto"
];
};
fileSystems."/home/chandler/shared_with_host" = {
device = "/mnt/utm";
fsType = "fuse.bindfs";
options = [
"map=502/${builtins.toString config.users.users.chandler.uid}:@20/@${builtins.toString config.users.groups.users.gid}"
"x-systemd.requires=/mnt/utm"
"_netdev"
"nofail"
"auto"
];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/6c923fd7-5b0a-4dd5-b1ce-6cd4ea144275"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}