Compare commits

...

2 Commits

Author SHA1 Message Date
coolneng 9ddf94f567
Add virtualization module 2021-03-15 12:08:59 +01:00
coolneng 4914c537cb
Add hardware configuration 2021-03-15 12:06:30 +01:00
3 changed files with 77 additions and 0 deletions

View File

@ -89,6 +89,7 @@
./modules/hardware-configuration.nix
./modules/networking.nix
./modules/datasync.nix
./modules/virtualization.nix
];
}

View File

@ -0,0 +1,65 @@
# 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 + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "system/stateful/root";
fsType = "zfs";
};
fileSystems."/nix" =
{ device = "system/ephemeral/nix";
fsType = "zfs";
};
fileSystems."/home" =
{ device = "system/stateful/home";
fsType = "zfs";
};
fileSystems."/tmp" =
{ device = "system/ephemeral/tmp";
fsType = "zfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/B314-22E9";
fsType = "vfat";
};
fileSystems."/vault" =
{ device = "vault";
fsType = "zfs";
};
fileSystems."/vault/samba" =
{ device = "vault/samba";
fsType = "zfs";
};
fileSystems."/vault/nextcloud" =
{ device = "vault/nextcloud";
fsType = "zfs";
};
fileSystems."/vault/sica" =
{ device = "vault/sica";
fsType = "zfs";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/8262a243-b6aa-49e8-bf72-d2b85864d1c0"; }
];
}

View File

@ -0,0 +1,11 @@
{ config, lib, pkgs, ... }:
{
# Enable virtualisation
virtualisation.libvirtd = {
enable = true;
onBoot = "ignore";
onShutdown = "shutdown";
qemuPackage = pkgs.qemu_kvm;
};
}