add host Remilia

This commit is contained in:
2021-05-31 02:48:14 +05:30
parent 8952fafe65
commit 02fa695a0f
25 changed files with 98 additions and 32 deletions

15
hosts/servers/marisa/boot.nix Executable file
View File

@@ -0,0 +1,15 @@
{config, ...}:
{
boot = {
initrd.availableKernelModules = [ "xhci_pci" "usb_storage" "usbhid" "uas" "pcie-brcmstb"];
loader = {
grub.enable = false;
generic-extlinux-compatible.enable= true;
raspberryPi= {
version = 4;
firmwareConfig = "dtparam=sd_poll_once=on";
enable = true;
};
};
};
}

View File

@@ -0,0 +1,14 @@
# WARN: this file will get overwritten by $ cachix use <name>
{ pkgs, lib, ... }:
let
folder = ./cachix;
toImport = name: value: folder + ("/" + name);
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key;
imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder));
in {
inherit imports;
nix.binaryCaches = ["https://cache.nixos.org/"];
}

View File

@@ -0,0 +1,12 @@
{
nix = {
binaryCaches = [
"https://rpi4.cachix.org"
];
binaryCachePublicKeys = [
"rpi4.cachix.org-1:fMaYBuIlj/Sa9YTXnXMXoXnVZEoVhnFxOkxseKKlku8="
];
};
}

View File

@@ -0,0 +1,28 @@
# 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, ... }:
{
fileSystems."/" =
{ device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
fsType = "ext4";
};
fileSystems."/nix/store" =
{ device = "/nix/store";
fsType = "none";
options = [ "bind" ];
};
swapDevices = [
{
device = "/swapfile";
priority = 0;
size = 10240;
}
];
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
hardware.firmware = [ pkgs.raspberrypiWirelessFirmware ];
}

View File

@@ -0,0 +1,22 @@
{config, ...}:
{
networking = {
hostName = "Marisa";
firewall.allowedTCPPorts = [ 22 80 ];
wireless = {
enable = false;
iwd.enable = true;
};
interfaces = {
wlan0 = {
useDHCP = false;
ipv4.addresses = [ {
prefixLength = 24;
address = "192.168.0.159";
} ];
};
};
defaultGateway = "192.168.0.1";
nameservers = [ "1.1.1.1" "8.8.8.8" ];
};
}

View File

@@ -0,0 +1,10 @@
{config, ...}:
{
services = {
openssh = {
enable = true;
permitRootLogin = "yes";
};
tailscale.enable = true;
};
}