nixos-module/server: unify server1 and server2
This commit is contained in:
parent
6166d1ee3b
commit
ee2db449fd
|
@ -17,15 +17,7 @@ in {
|
|||
./collectd
|
||||
] ++
|
||||
optionals (hostConfig.role == "server") [
|
||||
./server/lxc-containers.nix
|
||||
./server/network.nix
|
||||
./server/qemu.nix
|
||||
] ++
|
||||
optionals (hostName == "server1") [
|
||||
./server/server1.nix
|
||||
] ++
|
||||
optionals (hostName == "server2") [
|
||||
./server/server2.nix
|
||||
./server/default.nix
|
||||
] ++
|
||||
optionals (hostConfig.role == "container") [
|
||||
./container/defaults.nix
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
{ hostName, ... }:
|
||||
{
|
||||
imports = [
|
||||
./defaults.nix
|
||||
./network.nix
|
||||
./lxc-containers.nix
|
||||
./qemu.nix
|
||||
# host-specific configuration
|
||||
(./. + "/${hostName}.nix")
|
||||
];
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
boot.kernelModules = [ "kvm-intel" "pppoe" ];
|
||||
boot.kernelParams = [ "nomodeset" ];
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget vim git screen
|
||||
];
|
||||
services.openssh.enable = true;
|
||||
services.openssh.permitRootLogin = "prohibit-password";
|
||||
}
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
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" ];
|
||||
|
@ -51,13 +50,4 @@
|
|||
};
|
||||
|
||||
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";
|
||||
}
|
||||
|
|
|
@ -3,10 +3,7 @@
|
|||
{
|
||||
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "usbhid" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" "pppoe" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.kernelParams = [ "nomodeset" ];
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
fileSystems."/" =
|
||||
{ device = "server2/root";
|
||||
fsType = "zfs";
|
||||
|
@ -43,13 +40,4 @@
|
|||
|
||||
networking.hostName = "server2"; # Define your hostname.
|
||||
networking.hostId = "52525252";
|
||||
|
||||
# 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