mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
hosts/shinmyoumaru: init, cross: armv6+v7 emulated, stripped base, exprs
This commit is contained in:
parent
c7d8d0b3d4
commit
37950bc59a
19 changed files with 153 additions and 28 deletions
|
|
@ -15,8 +15,8 @@ in
|
|||
profiles.gui
|
||||
profiles.vfio
|
||||
profiles.cross.aarch64
|
||||
profiles.cross.armv7l
|
||||
profiles.cross.armv6l
|
||||
profiles.cross.armv7l
|
||||
users.kat.guiFull
|
||||
users.kat.services.weechat
|
||||
services.nginx
|
||||
|
|
|
|||
5
config/hosts/shinmyoumaru/image.nix
Normal file
5
config/hosts/shinmyoumaru/image.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ modulesPath, ... }: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/sd-card/sd-image-raspberrypi.nix")
|
||||
];
|
||||
}
|
||||
93
config/hosts/shinmyoumaru/nixos.nix
Normal file
93
config/hosts/shinmyoumaru/nixos.nix
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
{ config, meta, pkgs, lib, ... }: with lib;
|
||||
|
||||
{
|
||||
# Imports
|
||||
|
||||
imports = [
|
||||
./image.nix
|
||||
];
|
||||
|
||||
# Weird Shit
|
||||
|
||||
nixpkgs.localSystem = systems.examples.raspberryPi // {
|
||||
system = "armv6l-linux";
|
||||
};
|
||||
|
||||
nix = {
|
||||
binaryCaches = lib.mkForce [ "https://app.cachix.org/cache/thefloweringash-armv7" ];
|
||||
binaryCachePublicKeys = [ "thefloweringash-armv7.cachix.org-1:v+5yzBD2odFKeXbmC+OPWVqx4WVoIVO6UXgnSAWFtso=" ];
|
||||
};
|
||||
|
||||
# Terraform
|
||||
|
||||
deploy.tf = {
|
||||
resources.shinmyoumaru = {
|
||||
provider = "null";
|
||||
type = "resource";
|
||||
connection = {
|
||||
port = head config.services.openssh.ports;
|
||||
host = config.network.addresses.private.nixos.ipv4.address;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Bootloader
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
consoleLogLevel = lib.mkDefault 7;
|
||||
kernelPackages = pkgs.linuxPackages_rpi1;
|
||||
};
|
||||
|
||||
# File Systems and Swap
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
};
|
||||
};
|
||||
|
||||
# Networking
|
||||
|
||||
networking = {
|
||||
useDHCP = true;
|
||||
interfaces.eno1.ipv4.addresses = singleton {
|
||||
inherit (config.network.addresses.private.nixos.ipv4) address;
|
||||
prefixLength = 24;
|
||||
};
|
||||
defaultGateway = config.network.privateGateway;
|
||||
};
|
||||
|
||||
network = {
|
||||
addresses = {
|
||||
private = {
|
||||
enable = true;
|
||||
nixos = {
|
||||
ipv4.address = "192.168.1.33";
|
||||
# TODO ipv6.address
|
||||
};
|
||||
};
|
||||
};
|
||||
yggdrasil = {
|
||||
enable = true;
|
||||
pubkey = "0000000000000000000000000000000000000000000000000000";
|
||||
listen.enable = false;
|
||||
listen.endpoints = [ "tcp://0.0.0.0:0" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Firewall
|
||||
|
||||
network.firewall = {
|
||||
private.interfaces = singleton "yggdrasil";
|
||||
public.interfaces = singleton "eno1";
|
||||
};
|
||||
|
||||
# State
|
||||
|
||||
system.stateVersion = "21.11";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue