mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 20:39:18 -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";
|
||||
}
|
||||
|
|
@ -5,7 +5,6 @@
|
|||
smartmontools
|
||||
hddtemp
|
||||
lm_sensors
|
||||
cachix
|
||||
pinentry-curses
|
||||
gnupg
|
||||
foot.terminfo
|
||||
|
|
|
|||
9
config/profiles/cross/armv6.nix
Normal file
9
config/profiles/cross/armv6.nix
Normal 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" ];
|
||||
};
|
||||
}
|
||||
|
|
@ -3,4 +3,7 @@
|
|||
binaryCaches = [ "https://arm.cachix.org/" ];
|
||||
binaryCachePublicKeys = [ "arm.cachix.org-1:5BZ2kjoL1q6nWhlnrbAl+G7ThY7+HaBRD9PZzqZkbnM=" ];
|
||||
};
|
||||
boot.binfmt = {
|
||||
emulatedSystems = [ "armv7l-linux" ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
sd
|
||||
duc
|
||||
bat
|
||||
exa
|
||||
exa-noman
|
||||
socat
|
||||
rsync
|
||||
wget
|
||||
|
|
@ -19,7 +19,6 @@
|
|||
zstd
|
||||
file
|
||||
whois
|
||||
niv
|
||||
dnsutils
|
||||
borgbackup
|
||||
neofetch
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
{
|
||||
imports = [
|
||||
./gpg.nix
|
||||
./git.nix
|
||||
./packages.nix
|
||||
./weechat.nix
|
||||
./email.nix
|
||||
./shell.nix
|
||||
|
|
|
|||
14
config/users/kat/personal/git.nix
Normal file
14
config/users/kat/personal/git.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ pinentry.gtk2 ];
|
||||
home.packages = with pkgs; [
|
||||
pinentry.gtk2
|
||||
niv
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue