octo: init

This commit is contained in:
Aaron Bieber 2023-09-19 05:35:12 -06:00
parent 0d88f4f297
commit cccdfe3d6a
No known key found for this signature in database
4 changed files with 91 additions and 0 deletions

View File

@ -13,6 +13,9 @@ iso)
reform)
nix build .#nixosConfigurations.reformInstall.config.system.build.sdImage
;;
octo)
nix build .#nixosConfigurations.octo.config.system.build.sdImage
;;
*)
echo "Usage: boot [iso|arm64|arm|hass|reform]"
;;

View File

@ -209,6 +209,7 @@
pwntie = buildSys "x86_64-linux" stable [ ] "pwntie";
stan = buildSys "x86_64-linux" unstable [ ] "stan";
weather = buildSys "aarch64-linux" stable [ ] "weather";
octo = buildSys "aarch64-linux" stable [ ] "octo";
faf = buildSys "x86_64-linux" stable [ ./configs/hardened.nix ] "faf";
box = buildSys "x86_64-linux" stable [ ./configs/hardened.nix ] "box";

50
hosts/octo/default.nix Normal file
View File

@ -0,0 +1,50 @@
{ config
, pkgs
, lib
, ...
}:
let
pubKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO7v+/xS8832iMqJHCWsxUZ8zYoMWoZhjj++e26g1fLT europa"
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBB/V8N5fqlSGgRCtLJMLDJ8Hd3JcJcY8skI0l+byLNRgQLZfTQRxlZ1yymRs36rXj+ASTnyw5ZDv+q2aXP7Lj0= hosts@secretive.plq.local"
];
userBase = {
openssh.authorizedKeys.keys = pubKeys ++ config.myconf.managementPubKeys;
};
in
{
_module.args.isUnstable = false;
imports = [ ./hardware-configuration.nix ];
boot = {
initrd.availableKernelModules = [ "usbhid" "usb_storage" ];
kernelPackages = pkgs.linuxPackages_latest;
kernelModules = [ "raspberrypi_ts" ];
loader = {
grub.enable = false;
generic-extlinux-compatible.enable = true;
};
};
networking = {
hostName = "octo";
networkmanager = { enable = true; };
wireless.userControlled.enable = true;
};
preDNS.enable = false;
systemd.services.NetworkManager-wait-online.serviceConfig.ExecStart =
lib.mkForce [ "" "${pkgs.networkmanager}/bin/nm-online -q" ];
users.users = {
root = userBase;
qbit = userBase;
};
services.octoprint = {
enable = true;
openFirewall = true;
};
system.stateVersion = "21.11";
}

View File

@ -0,0 +1,37 @@
{ ... }: {
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
};
"/tmp" = {
device = "/dev/disk/by-label/nix-extra";
fsType = "ext4";
};
};
hardware.enableRedistributableFirmware = true;
#hardware.deviceTree = {
# overlays = [
# #"${pkgs.raspberrypifw}/share/raspberrypi/boot/overlays/rpi-ft5406.dtbo"
# {
# name = "rpi4-cma-overlay";
# dtsText = ''
# // SPDX-License-Identifier: GPL-2.0
# /dts-v1/;
# /plugin/;
# / {
# compatible = "brcm,bcm2711";
# fragment@0 {
# target = <&cma>;
# __overlay__ {
# size = <(512 * 1024 * 1024)>;
# };
# };
# };
# '';
# }
# ];
#};
}