mirror of
https://github.com/srid/nixos-config.git
synced 2026-05-11 17:36:07 +08:00
Add 'here' VM
And justfile as well
This commit is contained in:
parent
6545764534
commit
fac4275980
4 changed files with 77 additions and 0 deletions
34
systems/disko/vm.nix
Normal file
34
systems/disko/vm.nix
Normal 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
27
systems/here.nix
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue