feat: Move kif from hardware to VM

This commit is contained in:
Kyle Brown 2024-04-28 11:52:59 -07:00
parent fb7c0c49b2
commit 922c608acc
2 changed files with 21 additions and 34 deletions

View file

@ -4,14 +4,13 @@
pkgs,
inputs,
outputs,
home-manager,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
../../common/nixos/baremetal.nix
# ./zfs.nix
../../common/nixos/remoteBuild.nix
../../common/nixos/common.nix
../../common/networking/zerotier.nix
../../common/editors/emacs.nix
../../common/nixos/docker.nix
@ -19,11 +18,9 @@
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/disk/by-id/ata-INTEL_SSDSC2KW256G8_BTLA733601VG256CGN";
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
boot.loader.grub.configurationLimit = 10;
networking.hostName = "kif"; # Define your hostname.
networking.hostName = "kif";
# Enable networking
networking.networkmanager.enable = true;
@ -31,11 +28,7 @@
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# Rips audio CD's
environment.systemPackages = [
pkgs.cdparanoia
pkgs.flac
];
services.earlyoom.enable = true;
# Latest stable kernel
boot.kernelPackages = pkgs.linuxPackages_latest;

View file

@ -6,44 +6,38 @@
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sr_mod"];
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/b3cf68fd-67a0-4507-af4f-9cee9efc76fb";
device = "/dev/disk/by-uuid/b8f1e3d1-b2d7-4100-a1af-01b1f63f8e5a";
fsType = "ext4";
};
swapDevices = [
{
device = "/var/lib/swapfile";
size = 8 * 1024;
randomEncryption.enable = true;
}
];
zramSwap = {
enable = true;
memoryPercent = 40;
priority = 10;
};
boot.tmp.useTmpfs = true;
swapDevices = [];
# 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.enp1s0f0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0f1.useDHCP = lib.mkDefault true;
# networking.interfaces.enp3s0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp6s0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp9s0f0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp9s0f1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
zramSwap = {
enable = true;
memoryPercent = 25;
priority = 10;
};
boot.tmp.useTmpfs = true;
}