Initial commit
This commit is contained in:
commit
0a787952dc
5 changed files with 180 additions and 0 deletions
29
eddieValiant-hw.nix
Normal file
29
eddieValiant-hw.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/5e36fdaf-5e80-45dd-a764-5f5bc917628a";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@root" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/CE4C-CEC1";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nix.maxJobs = lib.mkDefault 2;
|
||||
}
|
29
jessicaRabbit-hw.nix
Normal file
29
jessicaRabbit-hw.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/4f6ef2e4-f58a-4cff-adf8-152a15d37c5e";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@root" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/2F5A-D6D1";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nix.maxJobs = lib.mkDefault 2;
|
||||
}
|
82
lan-network.nix
Normal file
82
lan-network.nix
Normal file
|
@ -0,0 +1,82 @@
|
|||
let common =
|
||||
{
|
||||
boot.loader.grub.devices = [ "/dev/sda" ];
|
||||
|
||||
i18n = {
|
||||
consoleFont = "Lat2-Terminus16";
|
||||
consoleKeyMap = "fr-bepo";
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
services = {
|
||||
openssh = {
|
||||
enable = true;
|
||||
permitRootLogin = "yes";
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
|
||||
};
|
||||
in
|
||||
{
|
||||
network.description = "DJL machines";
|
||||
|
||||
# TF2 server
|
||||
rogerRabbit = { config, pkgs, lib, ... }:
|
||||
lib.recursiveUpdate common {
|
||||
imports = [ ./rogerRabbit-hw.nix ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
steam-run
|
||||
];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
};
|
||||
|
||||
# 0ad server?
|
||||
jessicaRabbit = { config, pkgs, lib, ... }:
|
||||
lib.recursiveUpdate common {
|
||||
imports = [ ./jessicaRabbit-hw.nix ];
|
||||
};
|
||||
|
||||
# DHCP/DNS server
|
||||
eddieValiant = { config, pkgs, lib, ... }:
|
||||
lib.recursiveUpdate common {
|
||||
imports = [ ./eddieValiant-hw.nix ];
|
||||
|
||||
services = {
|
||||
dhcpd4 = {
|
||||
enable = true;
|
||||
interfaces = [ "enp2s0" ];
|
||||
machines = [
|
||||
{ ethernetAddress = "28:80:23:00:2f:45";
|
||||
hostName = "era";
|
||||
ipAddress = "10.42.0.254"; }
|
||||
{ ethernetAddress = "00:23:ae:82:82:7a";
|
||||
hostName = "rogerRabbit";
|
||||
ipAddress = "10.42.0.2"; }
|
||||
{ ethernetAddress = "00:23:ae:88:fb:b9";
|
||||
hostName = "jessicaRabbit";
|
||||
ipAddress = "10.42.0.3"; }
|
||||
];
|
||||
extraConfig = ''
|
||||
subnet 10.42.0.0 netmask 255.255.0.0 {
|
||||
authoritative;
|
||||
range 10.42.0.50 10.42.0.200;
|
||||
default-lease-time 3600;
|
||||
max-lease-time 3600;
|
||||
option subnet-mask 255.255.0.0;
|
||||
option broadcast-address 10.42.255.255;
|
||||
option routers 10.42.0.0;
|
||||
#option domain-name-servers 10.42.0.1;
|
||||
#option domain-name "djl.local";
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
networking = {
|
||||
dhcpcd.enable = false;
|
||||
interfaces."enp2s0".ipAddress = "10.42.0.1";
|
||||
interfaces."enp2s0".prefixLength = 16;
|
||||
};
|
||||
};
|
||||
}
|
11
metal.nix
Normal file
11
metal.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
let mkMachine = ip:
|
||||
{ deployment.targetEnv = "none";
|
||||
deployment.targetHost = ip;
|
||||
deployment.hasFastConnection = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
eddieValiant = mkMachine "10.42.0.1";
|
||||
rogerRabbit = mkMachine "10.42.0.2";
|
||||
jessicaRabbit = mkMachine "10.42.0.3";
|
||||
}
|
29
rogerRabbit-hw.nix
Normal file
29
rogerRabbit-hw.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/685956cf-b884-47f2-9e84-464d5537ce4d";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@root" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/DEDD-8974";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nix.maxJobs = lib.mkDefault 2;
|
||||
}
|
Loading…
Reference in a new issue