nixos configurations
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

135 lines
3.0 KiB

  1. rec {
  2. system = "x86_64-linux";
  3. timezone = "America/Chicago";
  4. locale = "en_US.UTF-8";
  5. packages = "stable";
  6. profile = "virtual-machine-host";
  7. hostId = (builtins.substring 0 8 (builtins.readFile "/etc/machine-id"));
  8. hostName = "nixos";
  9. videoDrivers = "unknown";
  10. disk = {
  11. device = "/dev/sda";
  12. swapSize = "8G";
  13. luks = false;
  14. };
  15. user = {
  16. name = "grmrgecko";
  17. description = "James Coleman";
  18. hashedPassword = "";
  19. openssh.authorizedKeys.keys = [];
  20. autoLogin = false;
  21. };
  22. root = {
  23. hashedPassword = user.hashedPassword;
  24. openssh.authorizedKeys.keys = user.openssh.authorizedKeys.keys;
  25. };
  26. git = {
  27. name = "GRMrGecko";
  28. email = "grmrgecko@gmail.com";
  29. };
  30. network.interface = "enp1s0";
  31. network.suffix = "2";
  32. networkmanager.profiles = {
  33. ${network.interface} = {
  34. connection = {
  35. id = network.interface;
  36. type = "ethernet";
  37. interface-name = network.interface;
  38. };
  39. ethernet = {
  40. mtu = 9000;
  41. };
  42. ipv4 = {
  43. method = "disabled";
  44. };
  45. ipv6 = {
  46. method = "disabled";
  47. };
  48. };
  49. "vlan-${network.interface}.1" = {
  50. connection = {
  51. id = "vlan-${network.interface}.1";
  52. type = "vlan";
  53. interface-name = "${network.interface}.1";
  54. master = "br0";
  55. slave-type = "bridge";
  56. };
  57. ethernet = {
  58. mtu = 1500;
  59. };
  60. vlan = {
  61. flags = 1;
  62. id = 1;
  63. parent = network.interface;
  64. };
  65. };
  66. "vlan-${network.interface}.10" = {
  67. connection = {
  68. id = "vlan-${network.interface}.10";
  69. type = "vlan";
  70. interface-name = "${network.interface}.10";
  71. master = "br1";
  72. slave-type = "bridge";
  73. };
  74. ethernet = {
  75. mtu = 1500;
  76. };
  77. vlan = {
  78. flags = 1;
  79. id = 10;
  80. parent = network.interface;
  81. };
  82. };
  83. "vlan-${network.interface}.100" = {
  84. connection = {
  85. id = "vlan-${network.interface}.100";
  86. type = "vlan";
  87. interface-name = "${network.interface}.100";
  88. };
  89. ethernet = {
  90. mtu = 9000;
  91. };
  92. vlan = {
  93. flags = 1;
  94. id = 100;
  95. parent = network.interface;
  96. };
  97. ipv4 = {
  98. address1 = "10.0.100.${network.suffix}/24";
  99. method = "manual";
  100. };
  101. ipv6 = {
  102. method = "disabled";
  103. };
  104. };
  105. "bridge-br0" = {
  106. connection = {
  107. id = "bridge-br0";
  108. type = "bridge";
  109. interface-name = "br0";
  110. };
  111. ipv4 = {
  112. address1 = "10.0.0.${network.suffix}/24,10.0.0.1";
  113. dns = "10.0.0.33;10.0.0.1;";
  114. method = "manual";
  115. };
  116. ipv6 = {
  117. addr-gen-mode = "stable-privacy";
  118. method = "auto";
  119. };
  120. };
  121. "bridge-br1" = {
  122. connection = {
  123. id = "bridge-br1";
  124. type = "bridge";
  125. interface-name = "br1";
  126. };
  127. ipv4 = {
  128. address1 = "10.0.10.${network.suffix}/24";
  129. method = "manual";
  130. };
  131. ipv6 = {
  132. method = "disabled";
  133. };
  134. };
  135. };
  136. }