Skip to content

Commit

Permalink
hosts/zatsune-nixos: init
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Sep 19, 2023
1 parent c74ce3e commit 6684dfb
Show file tree
Hide file tree
Showing 3 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 @@ -130,6 +130,7 @@
(mkNixOSConfig { hostname = "miku-nixos"; })
(mkNixOSConfig { hostname = "mirai-vps"; })
(mkNixOSConfig { hostname = "sankyuu-nixos"; })
(mkNixOSConfig { hostname = "zatsune-nixos"; system = "aarch64-linux"; })

# Home-Manager configs
(mkHomeConfig { hostname = "home-linux"; })
Expand Down
44 changes: 44 additions & 0 deletions hosts/zatsune-nixos/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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 =
[
# Include the results of the hardware scan.
./hardware-configuration.nix
../../nixos/home.nix
../../nixos/minimal.nix
../../nixos/server
];

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

device.type = "server";

nixos = {
server = {
enable = true;
iperf3.enable = true;
ssh.enable = true;
tailscale.enable = true;
duckdns-updater = {
enable = true;
domain = "zatsune-nixos.duckdns.org";
onCalendar = "daily"; # fixed IP, mostly for health checking
certs.enable = true;
};
};
system.smart.enable = false;
};

# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;

networking.hostName = "zatsune-nixos";
}
38 changes: 38 additions & 0 deletions hosts/zatsune-nixos/hardware-configuration.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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 + "/profiles/qemu-guest.nix")
];

boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "virtio_scsi" "usbhid" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];

fileSystems."/" =
{ device = "/dev/disk/by-uuid/2359ed05-7d97-49d8-91a6-434641449b95";
fsType = "xfs";
};

fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/5BED-71B7";
fsType = "vfat";
};

swapDevices =
[ { device = "/dev/disk/by-uuid/280b8949-4eb5-436e-8c5f-82c7602e89b4"; }
];

# 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.enp0s6.useDHCP = lib.mkDefault true;

nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}

0 comments on commit 6684dfb

Please sign in to comment.