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

View file

@ -5,7 +5,6 @@
smartmontools
hddtemp
lm_sensors
cachix
pinentry-curses
gnupg
foot.terminfo

View file

@ -0,0 +1,9 @@
{ config, ... }: {
nix = {
binaryCaches = [ "https://arm.cachix.org/" ];
binaryCachePublicKeys = [ "arm.cachix.org-1:5BZ2kjoL1q6nWhlnrbAl+G7ThY7+HaBRD9PZzqZkbnM=" ];
};
boot.binfmt = {
emulatedSystems = [ "armv6l-linux" ];
};
}

View file

@ -3,4 +3,7 @@
binaryCaches = [ "https://arm.cachix.org/" ];
binaryCachePublicKeys = [ "arm.cachix.org-1:5BZ2kjoL1q6nWhlnrbAl+G7ThY7+HaBRD9PZzqZkbnM=" ];
};
boot.binfmt = {
emulatedSystems = [ "armv7l-linux" ];
};
}

View file

@ -1,6 +1,7 @@
rec {
common = ./armvcommon.nix;
armv7-base = ./armv7.nix;
armv6-base = ./armv6.nix;
aarch64-base = ./aarch64.nix;
@ -30,6 +31,7 @@ rec {
};
imports = [
common
armv6-base
];
};
}

View file

@ -1,17 +1,8 @@
{ config, pkgs, lib, ... }:
{
home.packages = with pkgs; [
git-crypt
gitAndTools.gitRemoteGcrypt
gitAndTools.gitAnnex
git-revise
gitAndTools.git-annex-remote-b2
];
programs.git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
userName = "kat witch";
userEmail = "kat@kittywit.ch";
extraConfig = {

View file

@ -8,7 +8,7 @@
sd
duc
bat
exa
exa-noman
socat
rsync
wget
@ -19,7 +19,6 @@
zstd
file
whois
niv
dnsutils
borgbackup
neofetch

View file

@ -20,7 +20,7 @@ let katUser = { lib }:
lib.genAttrs profileNames userImport // {
services = lib.genAttrs serviceNames serviceImport;
base = { imports = [ ./nixos.nix (userImport "base") ]; };
server = { imports = [ personal ]; };
server = { };
guiFull = { imports = [ gui sway dev media personal ]; };
};
in

View file

@ -3,6 +3,8 @@
{
imports = [
./gpg.nix
./git.nix
./packages.nix
./weechat.nix
./email.nix
./shell.nix

View file

@ -0,0 +1,14 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
git-crypt
gitAndTools.gitRemoteGcrypt
gitAndTools.gitAnnex
git-revise
gitAndTools.git-annex-remote-b2
];
programs.git = {
package = pkgs.gitAndTools.gitFull;
};
}

View file

@ -1,5 +1,8 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [ pinentry.gtk2 ];
home.packages = with pkgs; [
pinentry.gtk2
niv
];
}

View file

@ -2,8 +2,6 @@
{
programs.zsh = {
shellAliases = genAttrs ["radio" "tv"] (attr: {
"abby${attr}" = "mpv $(bitw get secrets/abby -f ${attr})";
});
shellAliases = mapListToAttrs (attr: nameValuePair "abby${attr}" "mpv $(bitw get secrets/abby -f ${attr})") ["radio" "tv"];
};
}