MiniNix/configuration-systemd.nix

56 lines
1.2 KiB
Nix
Raw Normal View History

2024-07-06 22:38:39 -05:00
# This is a small config that can be used to bootstrap a system with ZFS.
{ config, lib, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
# Generate a hostId for ZFS
# head -c4 /dev/urandom | od -A none -t x4
networking.hostId = "f35c6293";
networking.hostName = "MiniNix";
2024-07-07 02:50:07 -05:00
2024-07-06 22:38:39 -05:00
boot = {
initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
initrd.kernelModules = [ ];
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
loader = {
2024-07-07 02:50:07 -05:00
systemd-boot.enable = true;
2024-07-07 02:08:59 -05:00
efi = {
canTouchEfiVariables = true;
};
2024-07-06 22:38:39 -05:00
};
};
fileSystems."/" = {
device = "zroot/root";
fsType = "zfs";
};
fileSystems."/nix" = {
device = "zroot/nix";
fsType = "zfs";
};
fileSystems."/var" = {
device = "zroot/var";
fsType = "zfs";
};
fileSystems."/home" = {
device = "zroot/home";
fsType = "zfs";
};
swapDevices = [ ];
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
system.stateVersion = "24.05";
2024-07-07 09:19:37 -05:00
services.openssh = {
enable = true;
};
2024-07-06 22:38:39 -05:00
}