feat: add base configuration and hardware-config files
This commit is contained in:
40
hardware-configuration.nix
Normal file
40
hardware-configuration.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
# 0x29a nixos hardware configuration
|
||||
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
# boot and initrd configs
|
||||
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" "cryptd" ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-label/nixcrypt";
|
||||
|
||||
# file systems
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-label/nixroot";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-label/nixboot";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-label/nixhome";
|
||||
fsType = "ext4";
|
||||
};
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-label/nixswap"; }
|
||||
];
|
||||
|
||||
# enable dhcp on all interfaces
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
# set host arch
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
Reference in New Issue
Block a user