Skip to content

Commit

Permalink
hosts/zachune-nixos: init
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Sep 22, 2023
1 parent b126f8b commit 84a3e0b
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
(mkNixOSConfig { hostname = "mirai-vps"; })
(mkNixOSConfig { hostname = "sankyuu-nixos"; })
(mkNixOSConfig { hostname = "zatsune-nixos"; })
(mkNixOSConfig { hostname = "zachune-nixos"; })

# Home-Manager configs
(mkHomeConfig { hostname = "home-linux"; })
Expand Down
82 changes: 82 additions & 0 deletions hosts/zachune-nixos/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ ... }:

{
imports = [
../../nixos
];

nixos.home.imports = [
../../home-manager/minimal.nix
];

device.type = "server";

nixos = {
server = {
iperf3.enable = true;
ssh.enable = true;
tailscale.enable = true;
};
system.smart.enable = false;
};

networking.hostName = "zachune-nixos";

swapDevices = [
{ device = "/swapfile"; }
];

# Does not support boot.growPartition yet
boot.initrd.systemd.enable = false;

nixpkgs.hostPlatform = "x86_64-linux";

# TODO: once this is merged we can just:
# imports = [ "${modulesPath}/virtualisation/oci-common.nix" ];
# https://github.com/NixOS/nixpkgs/pull/119856
boot.kernelParams = [
"nvme.shutdown_timeout=10"
"nvme_core.shutdown_timeout=10"
"libiscsi.debug_libiscsi_eh=1"
"crash_kexec_post_notifiers"

# VNC console
"console=tty1"

# x86_64-linux
"console=ttyS0"

# aarch64-linux
"console=ttyAMA0,115200"
];

boot.growPartition = true;

fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
autoResize = true;
};

fileSystems."/boot" = {
device = "/dev/disk/by-label/ESP";
fsType = "vfat";
};

boot.loader.efi.canTouchEfiVariables = false;
boot.loader.grub = {
device = "nodev";
splashImage = null;
extraConfig = ''
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
terminal_input --append serial
terminal_output --append serial
'';
efiInstallAsRemovable = true;
efiSupport = true;
};
}

0 comments on commit 84a3e0b

Please sign in to comment.