hosts/shinmyoumaru: init, cross: armv6+v7 emulated, stripped base, exprs

This commit is contained in:
kat witch 2021-09-02 21:17:59 +01:00
parent c7d8d0b3d4
commit 37950bc59a
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
19 changed files with 153 additions and 28 deletions

View file

@ -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

View file

@ -0,0 +1,5 @@
{ modulesPath, ... }: {
imports = [
(modulesPath + "/installer/sd-card/sd-image-raspberrypi.nix")
];
}

View 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";
}