fix: imported in setup from hardware
This commit is contained in:
parent
a1297745d7
commit
b929026302
2 changed files with 58 additions and 11 deletions
|
@ -16,13 +16,14 @@ let
|
||||||
ip_pub = "193.1.99.72";
|
ip_pub = "193.1.99.72";
|
||||||
ip_priv = "172.20.20.1";
|
ip_priv = "172.20.20.1";
|
||||||
# hostname = "${name}.skynet.ie";
|
# hostname = "${name}.skynet.ie";
|
||||||
hostname = ip_priv;
|
hostname = ip_pub;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
# applications for this particular server
|
# applications for this particular server
|
||||||
../applications/firewall.nix
|
../applications/firewall.nix
|
||||||
../applications/dns.nix
|
../applications/dns.nix
|
||||||
|
./hardware/agentjones.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
deployment = {
|
deployment = {
|
||||||
|
@ -38,26 +39,30 @@ in {
|
||||||
cname = [];
|
cname = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.hostName = name;
|
||||||
# this has to be defined for any physical servers
|
# this has to be defined for any physical servers
|
||||||
# vms are defined by teh vm host
|
# vms are defined by teh vm host
|
||||||
networking.interfaces = {
|
networking.interfaces = {
|
||||||
en01 = {
|
eno1 = {
|
||||||
ipv4.routes = [
|
ipv4.routes = [
|
||||||
{
|
# {
|
||||||
address = "${ip_pub}";
|
# address = "193.1.99.72";
|
||||||
prefixLength = 32;
|
# prefixLength = 26;
|
||||||
# ITD skynet router
|
# via = "193.1.99.65";
|
||||||
via = "193.1.99.65/32";
|
# }
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
en02 = {
|
eno2 = {
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
ipv4.addresses = [
|
ipv4.addresses = [
|
||||||
{
|
{
|
||||||
address = "${ip_priv}";
|
address = "193.1.99.72";
|
||||||
prefixLength = 32;
|
prefixLength = 26;
|
||||||
}
|
}
|
||||||
|
#{
|
||||||
|
# address = "172.20.20.1";
|
||||||
|
# prefixLength = 24;
|
||||||
|
#}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
42
machines/hardware/agentjones.nix
Normal file
42
machines/hardware/agentjones.nix
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
# 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, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/9b177e4a-726e-4e68-a0e1-53837a8cae2e";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/41AD-70AF";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/c5990c64-077f-45b1-96b5-44ec93e6651f"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.eno2.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp0s29u1u1.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
Loading…
Reference in a new issue