Skip to content

Commit e49e9a9

Browse files
committed
packet: init
1 parent 5d291f4 commit e49e9a9

File tree

7 files changed

+213
-0
lines changed

7 files changed

+213
-0
lines changed

packet/configuration.nix

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Edit this configuration file to define what should be installed on
2+
# your system. Help is available in the configuration.nix(5) man page
3+
# and in the NixOS manual (accessible by running ‘nixos-help’).
4+
5+
{ config, pkgs, ... }:
6+
7+
{
8+
imports =
9+
[ # Include the results of the hardware scan.
10+
./packet.nix
11+
];
12+
13+
# Use the GRUB 2 boot loader.
14+
boot.loader.grub.enable = true;
15+
boot.loader.grub.version = 2;
16+
# boot.loader.grub.efiSupport = true;
17+
# boot.loader.grub.efiInstallAsRemovable = true;
18+
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
19+
# Define on which hard drive you want to install Grub.
20+
# boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
21+
22+
# networking.hostName = "nixos"; # Define your hostname.
23+
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
24+
25+
# Configure network proxy if necessary
26+
# networking.proxy.default = "http://user:password@proxy:port/";
27+
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
28+
29+
# Select internationalisation properties.
30+
# i18n = {
31+
# consoleFont = "Lat2-Terminus16";
32+
# consoleKeyMap = "us";
33+
# defaultLocale = "en_US.UTF-8";
34+
# };
35+
36+
# Set your time zone.
37+
# time.timeZone = "Europe/Amsterdam";
38+
39+
# List packages installed in system profile. To search, run:
40+
# $ nix search wget
41+
# environment.systemPackages = with pkgs; [
42+
# wget vim
43+
# ];
44+
45+
# Some programs need SUID wrappers, can be configured further or are
46+
# started in user sessions.
47+
# programs.mtr.enable = true;
48+
# programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
49+
50+
# List services that you want to enable:
51+
52+
# Enable the OpenSSH daemon.
53+
# services.openssh.enable = true;
54+
55+
# Open ports in the firewall.
56+
# networking.firewall.allowedTCPPorts = [ ... ];
57+
# networking.firewall.allowedUDPPorts = [ ... ];
58+
# Or disable the firewall altogether.
59+
# networking.firewall.enable = false;
60+
61+
# Enable CUPS to print documents.
62+
# services.printing.enable = true;
63+
64+
# Enable sound.
65+
# sound.enable = true;
66+
# hardware.pulseaudio.enable = true;
67+
68+
# Enable the X11 windowing system.
69+
# services.xserver.enable = true;
70+
# services.xserver.layout = "us";
71+
# services.xserver.xkbOptions = "eurosign:e";
72+
73+
# Enable touchpad support.
74+
# services.xserver.libinput.enable = true;
75+
76+
# Enable the KDE Desktop Environment.
77+
# services.xserver.displayManager.sddm.enable = true;
78+
# services.xserver.desktopManager.plasma5.enable = true;
79+
80+
# Define a user account. Don't forget to set a password with ‘passwd’.
81+
# users.users.jane = {
82+
# isNormalUser = true;
83+
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
84+
# };
85+
86+
# This value determines the NixOS release with which your system is to be
87+
# compatible, in order to avoid breaking some software such as database
88+
# servers. You should change this only after NixOS release notes say you
89+
# should.
90+
system.stateVersion = "19.03"; # Did you read the comment?
91+
92+
}

packet/packet.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{ imports = [
2+
./packet/f4c36jygs5lzylc068ar4dc2fnr28avm-standard.nix
3+
./packet/1n1hfficljybycq3q1a3cw0p3izprz8x-installed.nix
4+
./packet/metadata.nix
5+
./packet/host-id.nix
6+
./packet/j6x8sp1l2gbc9nix39c6ssfrvplix34g-hardware.nix
7+
]; }
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
boot.loader.grub.devices = [ "/dev/sda" ];
3+
boot.loader.grub.extraConfig = ''
4+
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
5+
terminal_output serial console
6+
terminal_input serial console
7+
'';
8+
9+
fileSystems = {
10+
"/" = {
11+
device = "/dev/disk/by-label/nixos";
12+
fsType = "ext4";
13+
};
14+
};
15+
16+
swapDevices = [
17+
{
18+
label = "swap";
19+
}
20+
];
21+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
boot.kernelModules = [ "dm_multipath" "dm_round_robin" "ipmi_watchdog" ];
3+
services.openssh.enable = true;
4+
}

packet/packet/host-id.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ networking.hostId = "4726b5d9"; }
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
nixpkgs.config.allowUnfree = true;
3+
4+
boot.initrd.availableKernelModules = [
5+
"ehci_pci" "ahci" "usbhid" "sd_mod"
6+
];
7+
8+
boot.kernelModules = [ "kvm-intel" ];
9+
boot.kernelParams = [ "console=ttyS1,115200n8" ];
10+
boot.extraModulePackages = [ ];
11+
12+
hardware.enableAllFirmware = true;
13+
14+
nix.maxJobs = 4;
15+
}

packet/packet/metadata.nix

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
networking.hostName = "nixos";
3+
networking.dhcpcd.enable = false;
4+
networking.defaultGateway = {
5+
address = "147.75.38.112";
6+
interface = "bond0";
7+
};
8+
networking.defaultGateway6 = {
9+
address = "2604:1380:0:3e00::";
10+
interface = "bond0";
11+
};
12+
networking.nameservers = [
13+
"147.75.207.207"
14+
"147.75.207.208"
15+
];
16+
17+
networking.bonds.bond0 = {
18+
driverOptions = {
19+
mode = "balance-tlb";
20+
xmit_hash_policy = "layer3+4";
21+
downdelay = "200";
22+
updelay = "200";
23+
miimon = "100";
24+
};
25+
26+
interfaces = [
27+
"enp0s20f0" "enp0s20f1"
28+
];
29+
};
30+
31+
networking.interfaces.bond0 = {
32+
useDHCP = false;
33+
34+
ipv4 = {
35+
routes = [
36+
{
37+
address = "10.0.0.0";
38+
prefixLength = 8;
39+
via = "10.99.19.0";
40+
}
41+
];
42+
addresses = [
43+
{
44+
address = "147.75.38.113";
45+
prefixLength = 31;
46+
}
47+
{
48+
address = "10.99.19.1";
49+
prefixLength = 31;
50+
}
51+
];
52+
};
53+
54+
ipv6 = {
55+
addresses = [
56+
{
57+
address = "2604:1380:0:3e00::1";
58+
prefixLength = 127;
59+
}
60+
];
61+
};
62+
};
63+
64+
users.users.root.openssh.authorizedKeys.keys = [
65+
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC19+d/67xRzzlzETcbM9ICHvzaCSxhovQDxXggs+ub8E8gC2vDImYoqoaefybHiGHXhOCPHuDRPWU4ZQTDjZxDEm7YgpCpFIQHZmxm3DxPb36hQOxCDcvUCmxKeyUacBe6IHu+PMuxf4nQuL1cFVtG076cuoFBOqgYsBpnQID6zfUQ1RIWgkIlKy/dCtCyILIcTbK6dOulC23IT0tGUF2gdkAuiglPO0SJTGL+cQQSdv86ZMoGczmnaeC8DFLczQ+m+PvfxYu/m6P14pUaLPo+46Ieb/w70QgzdnrZCFJpvZBo9ENqGcCiSNoS4K2OhIBF5bCs7XtypSzoQ92X6Ia9HLELLcHcfwD1qIiTzGHEAWjvWUMpH7W9bUQlC9kyYFPgLeHd3KQnfd7PetQD7efGhtLp0x3gUsSnBhUOeQQ8oVWF5MXihBeswzLPHO5SomNv7dh8cmRe6LUY/1Y7M/n3DGaJElQqPAC5KrQP9pHuT159N0aSRi5OknWTujE983+EJBgUtVbAMf4qg42odzvTkAcoNeuY2r7cMpskxnH30u6RneHYwaCyRB22kdLpUzgULHkwhsF1tWgkpyi99GSvO2yt0547ivxc/pUWPVedFOEsw45h3c2MOlT8deAQc7dnUYohI+J5+igyr4wVMng7IsXWAcP94pbeuudr7fX93w== vaibhav.sagar@zalora.com"
66+
67+
68+
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC61ymPYXnye/dljemtu6g7x97CssxdoKDqirJjH4Fmu/dw98+oDLspeyELH0FgIb+vbAVbXUv4KBqR7jDepGrA+OsgAOUooO6iOf+c+YvcaedNHmsWIKONrgY0w99d08dQ0uWe8IR/4ekeYhbqDNtHqo5rhYpR2YlH0kUo8fyRHERX95g/88a/o8oNCR8cAPrgHhShAL/AgSWU7rqg0cK2vei70RMInTSVT3usp1jSHCNhRaCJASgADMI06tWO/JbHT4iQYRWNMRAcJnCQKADQBE31uU99b+wHantfLwZ9z5H+Oj6OL4M7WpaiyBXulwPMhjP8ajfKUAUydI1HOGIqEXGwBi7f19UjGzwbaprZFPmh1fNVJ9BVkXlLLsro/Acd4GlcgVcapdm9ZEC4rKatG8Xcbkur1KAMSWSsjHCosEPIdAvARIDkpvNGp0/SSLwHbvb15bZjMiOZ9X5mXqo4MltLQx48GWcNoxH1R5jtYinUC1QTKEJLlQLiWcemOrLoh5TL8NuHCp5ic19NjaHuGgL82NQ9HG4Gs4+e2QvUKJLnVZZlf1QwcTOlQdzG9cNxH/fkvUuBDu3f2hb6lyK28ICM1iVKodJ6fzSU30E1FW8Snu0BQ+q+IgPMCp8oFvxz2AUoHA47TOMOn9xWHqf+Nh63RXaYEF5HDAGWeDQl/w== vaibhavsagar@gmail.com"
69+
70+
];
71+
72+
users.users.root.initialHashedPassword = "$6$FjnEegAHdlvZYeWg$s2sXhCpkS.kJzECO51B.9/d2xq8YfxTpc01hl0YwoNlgSqaTJ4JMHW0YK3vJmJyA0quZqoFrOwFj6sN0wxQhV/";
73+
}

0 commit comments

Comments
 (0)