This commit is contained in:
parent
0761162e34
commit
21355d70be
@ -230,6 +230,7 @@
|
||||
{ hostname = "gendry"; hw-address = "18:c0:4d:35:60:1e"; }
|
||||
{ hostname = "phoenix"; hw-address = "a8:b8:e0:04:17:a5"; }
|
||||
{ hostname = "merlin"; hw-address = "b0:41:6f:13:20:14"; }
|
||||
{ hostname = "stinger"; hw-address = "7c:83:34:be:30:dd"; }
|
||||
]);
|
||||
}
|
||||
{
|
||||
|
69
hosts/stinger.pop.ts.hillion.co.uk/default.nix
Normal file
69
hosts/stinger.pop.ts.hillion.co.uk/default.nix
Normal file
@ -0,0 +1,69 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./disko.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
system.stateVersion = "24.05";
|
||||
|
||||
networking.hostName = "stinger";
|
||||
networking.domain = "pop.ts.hillion.co.uk";
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.kernelParams = [
|
||||
"ip=dhcp"
|
||||
|
||||
# zswap
|
||||
"zswap.enabled=1"
|
||||
"zswap.compressor=zstd"
|
||||
"zswap.max_pool_percent=20"
|
||||
];
|
||||
boot.initrd = {
|
||||
availableKernelModules = [ "r8169" ];
|
||||
network.enable = true;
|
||||
clevis = {
|
||||
enable = true;
|
||||
useTang = true;
|
||||
devices = {
|
||||
"disk0-crypt".secretFile = "/data/disk_encryption.jwe";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
custom.defaults = true;
|
||||
custom.locations.autoServe = true;
|
||||
custom.impermanence.enable = true;
|
||||
|
||||
# Networking
|
||||
networking = {
|
||||
interfaces.enp1s0.name = "eth0";
|
||||
};
|
||||
networking.nameservers = lib.mkForce [ ]; # Trust the DHCP nameservers
|
||||
|
||||
networking.firewall = {
|
||||
trustedInterfaces = [ "tailscale0" ];
|
||||
allowedTCPPorts = lib.mkForce [
|
||||
22 # SSH
|
||||
];
|
||||
allowedUDPPorts = lib.mkForce [ ];
|
||||
interfaces = {
|
||||
eth0 = {
|
||||
allowedTCPPorts = lib.mkForce [ ];
|
||||
allowedUDPPorts = lib.mkForce [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
## Tailscale
|
||||
age.secrets."tailscale/stinger.pop.ts.hillion.co.uk".file = ../../secrets/tailscale/stinger.pop.ts.hillion.co.uk.age;
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
authKeyFile = config.age.secrets."tailscale/stinger.pop.ts.hillion.co.uk".path;
|
||||
};
|
||||
};
|
||||
}
|
70
hosts/stinger.pop.ts.hillion.co.uk/disko.nix
Normal file
70
hosts/stinger.pop.ts.hillion.co.uk/disko.nix
Normal file
@ -0,0 +1,70 @@
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
disk0 = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
|
||||
disk0-crypt = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "disk0-crypt";
|
||||
settings = {
|
||||
allowDiscards = true;
|
||||
};
|
||||
|
||||
content = {
|
||||
type = "btrfs";
|
||||
|
||||
subvolumes = {
|
||||
"/data" = {
|
||||
mountpoint = "/data";
|
||||
mountOptions = [ "compress=zstd" "ssd" ];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [ "compress=zstd" "ssd" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
swap = {
|
||||
size = "64G";
|
||||
content = {
|
||||
type = "swap";
|
||||
randomEncryption = true;
|
||||
discardPolicy = "both";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nodev = {
|
||||
"/" = {
|
||||
fsType = "tmpfs";
|
||||
mountOptions = [
|
||||
"mode=755"
|
||||
"size=100%"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp0s20f0u2.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
1
hosts/stinger.pop.ts.hillion.co.uk/system
Normal file
1
hosts/stinger.pop.ts.hillion.co.uk/system
Normal file
@ -0,0 +1 @@
|
||||
x86_64-linux
|
@ -60,6 +60,7 @@ in
|
||||
"tailscale/phoenix.st.ts.hillion.co.uk.age".publicKeys = jake_users ++ [ ts.st.phoenix ];
|
||||
"tailscale/router.home.ts.hillion.co.uk.age".publicKeys = jake_users ++ [ ts.home.router ];
|
||||
"tailscale/sodium.pop.ts.hillion.co.uk.age".publicKeys = jake_users ++ [ ts.pop.sodium ];
|
||||
"tailscale/stinger.pop.ts.hillion.co.uk.age".publicKeys = jake_users ++ [ ];
|
||||
"tailscale/theon.storage.ts.hillion.co.uk.age".publicKeys = jake_users ++ [ ts.storage.theon ];
|
||||
|
||||
# WiFi Environment Files
|
||||
|
30
secrets/tailscale/stinger.pop.ts.hillion.co.uk.age
Normal file
30
secrets/tailscale/stinger.pop.ts.hillion.co.uk.age
Normal file
@ -0,0 +1,30 @@
|
||||
age-encryption.org/v1
|
||||
-> ssh-rsa JSzstA
|
||||
OFyO8m1+PowQ4tSfLI4FEYt5fl6yF+NIBh+KgG8QJYrR6XIPFCXQqcv2q4jD3i7Q
|
||||
sTT6G7Ofc/OThNgC4XO9mAA1PwQyfhFd1Eqc7JeQRjh/9kNXMGKheI5PMzvRf3jB
|
||||
rU4yqiB9ORXHJvUYUiCUAcC4AlzdoK+V6g+FRDkFY4qqsli2KFAOE+vHaDeQqpsO
|
||||
EEjVezmfDyHbzY14oqLXLNPkmF7XOyhAEAuSJsqVeIAiBvKJdoXoloM4WTn/8Pvd
|
||||
FabbB5dhWQozyytE29q8NmbQYmTeAbuq+okWEmnD2BKmdD3HUDYBLxS/yLGMReDU
|
||||
Y+ZaxBDrvp/fQHhHCGPSA/iS0LvVtxA1hiYIDhY7wT0i5vnicp9On5mkDPVcuxQY
|
||||
EKO5TUqbztGAqK3HF3iUjtXL7Af911Hpa/gMr/J/6gitLTaHsxJujbg/Qu+SIWdt
|
||||
ptlx4MA5JZW5Lgcf2ANjPmE12/xn+30bPL4CSccd9Lln1QTEbrDlEgc+fDiskKmz
|
||||
Yg4jixr2jzOnlrdSouw+kNEtYsasKFM0islyNvUpKJota+lokTkgjZXOqmAGPrMa
|
||||
iFXTb+LkTn1EL6TaeCZxUzkXxuQ9LNjQjX64LIm8VRdX6DLDeTX4CRn0LHgbPJQP
|
||||
bIOtKq+ULs16rg16ZXTl78xD3edYuA/XVa3BmQBR19A
|
||||
-> ssh-rsa GxPFJQ
|
||||
QSOSCLI3bhFgK7ZObXxy55GGDf+N1QTSzlVstOEAk3rW+lqtbstoHXBpeDr8vf60
|
||||
hhvgcpfmpMPnmSWQtwmbQDAejluFw9zBKbAIWUMUxeqBZ82aLC0/9lMzBVel5otU
|
||||
Bl8WqQBm/KjMHmlh5ecvbLoon9Fzwb70GJxxmo02DMYxSsvnO3zq+smEaVxjUCD3
|
||||
/RNwoDLnbx2MhjpoiZ6q2Kz+1skD8hKN8Xk9uBMP4mE5XTdxY1psK+sZstPO6JND
|
||||
LyaqJIUneQjl3D8WBQ7+KHCox6H27IsZpRBW4Xm1fbo/uQEca+hqdn/K3lr1ONvT
|
||||
gziVPZPZuwVWilq0MlnXHw
|
||||
-> ssh-rsa K9mW1w
|
||||
hxCZr9LW8BimTVHaJ0a6dyjyoWOkZcCtRTMHvqS1Ur3hJOyvoNKjEH121rkV43nK
|
||||
yU1k4To7UbQfGUT4VwQseHJpdsyh/4lCwSZ+EbSizTeMRXz2DWuZU5MxVYYiEKCX
|
||||
PYypZhCziujhDBFEYIwPclkj1QxkHEHK8XtAHrtQVcJ0H7t5qTaz3W+Lw8hOe9u9
|
||||
ph0KyVulYo4tVIRWzvUn8uDkh6ao6X9PtYRWd3pEYucr9G25czrF7ltXcVV4VU8g
|
||||
amh/tk4tvIaaenACK0ussiCS8wc7nex8sxwj6kcf0lYtaX3zA/1jna+A6qLfGakl
|
||||
0Da6jNypQHJEcVYMdwfccw
|
||||
--- CZv2pIBT5j+WdaGnFhudqlwoFQFqOeRWrGbgNz98b9A
|
||||
}©ÃuCa†3Â2Ã¥;Oº\Í
|
||||
zŽÈßQƒ>
|
Loading…
Reference in New Issue
Block a user