nixos-module/server/server1: init
This commit is contained in:
parent
28cc8e480d
commit
6166d1ee3b
|
@ -21,6 +21,9 @@ in {
|
|||
./server/network.nix
|
||||
./server/qemu.nix
|
||||
] ++
|
||||
optionals (hostName == "server1") [
|
||||
./server/server1.nix
|
||||
] ++
|
||||
optionals (hostName == "server2") [
|
||||
./server/server2.nix
|
||||
] ++
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.version = 2;
|
||||
boot.loader.grub.devices = [
|
||||
"/dev/disk/by-path/pci-0000:05:00.0-scsi-0:1:0:0"
|
||||
"/dev/disk/by-path/pci-0000:05:00.0-scsi-0:1:0:1"
|
||||
];
|
||||
|
||||
networking.hostName = "server1"; # Define your hostname.
|
||||
networking.hostId = "12345678";
|
||||
|
||||
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "hpsa" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
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" =
|
||||
{ device = "/dev/disk/by-uuid/23f17e88-ab7e-4dcc-a119-2ed1b9c2c91d";
|
||||
fsType = "ext2";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget vim git screen
|
||||
];
|
||||
services.openssh.enable = true;
|
||||
services.openssh.permitRootLogin = "prohibit-password";
|
||||
}
|
Loading…
Reference in New Issue