network/nix/nixos-module/server/server1.nix

53 lines
1.2 KiB
Nix
Raw Normal View History

2022-03-22 18:13:17 +01:00
{ config, ... }:
2021-08-20 23:49:04 +02:00
{
2022-07-11 23:41:27 +02:00
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
2021-08-20 23:49:04 +02:00
networking.hostName = "server1"; # Define your hostname.
2022-07-11 23:41:27 +02:00
networking.hostId = "01010101";
2021-08-20 23:49:04 +02:00
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "hpsa" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.extraModulePackages = [ ];
nixpkgs.config.allowBroken = true;
boot.zfs.enableUnstable = true;
2021-08-20 23:49:04 +02:00
boot.supportedFilesystems = [ "zfs" ];
boot.initrd.supportedFilesystems = [ "zfs" ];
# Required for Broadcom NICs
hardware.enableRedistributableFirmware = true;
fileSystems."/" =
{ device = "server1/root";
fsType = "zfs";
};
fileSystems."/var" =
{ device = "server1/root/var";
fsType = "zfs";
};
fileSystems."/nix" =
{ device = "server1/root/nix";
fsType = "zfs";
};
fileSystems."/nix/store" =
{ device = "server1/root/nix/store";
fsType = "zfs";
};
fileSystems."/nix/var" =
{ device = "server1/root/nix/var";
fsType = "zfs";
};
fileSystems."/boot" =
2022-07-11 23:34:51 +02:00
{ device = "/dev/disk/by-label/ESP";
2022-07-12 00:17:22 +02:00
fsType = "vfat";
2021-08-20 23:49:04 +02:00
};
swapDevices = [ ];
}