Add 'here' VM

And justfile as well
This commit is contained in:
Sridhar Ratnakumar 2024-02-20 16:24:35 -05:00
parent 6545764534
commit fac4275980
4 changed files with 77 additions and 0 deletions

34
systems/disko/vm.nix Normal file
View file

@ -0,0 +1,34 @@
{
disk = {
main = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
}

27
systems/here.nix Normal file
View file

@ -0,0 +1,27 @@
# My Linux VM running on macOS
{ flake, modulesPath, ... }: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
flake.inputs.disko.nixosModules.disko
];
system.stateVersion = "23.11";
services.openssh.enable = true;
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
binfmt.emulatedSystems = [ "x86_64-linux" ]; # For cross-compiling
swraid.mdadmConf = ''
MAILADDR srid@srid.ca
'';
};
nixpkgs.hostPlatform = "aarch64-linux";
networking = {
hostName = "here";
networkmanager.enable = true;
};
time.timeZone = "America/New_York";
disko.devices = import ./disko/vm.nix;
}