Compare commits

...

13 commits

Author SHA1 Message Date
Chandler Swift 3379ea34d7
bert: Remove misplaced bigbird note from README
Don't write documentation tired, kids! I thought I was missing this, so
I had added it…to the wrong file, while similar notes were already
present in the file where they belonged!
2024-11-19 23:37:55 -06:00
Chandler Swift 690f64ae80
bert: Update README 2024-11-18 22:25:48 -06:00
Chandler Swift 40b86fb6d4
oscar: Set home-manager backupFileExtension
This was used for atuin, where I wanted to install a new config file
over an old one, but atuin kept recreating the old one if I removed it.
2024-11-18 19:43:18 -06:00
Chandler Swift b1f686c397
oscar: Add git-absorb 2024-11-18 19:43:11 -06:00
Chandler Swift 1f83c03b4f
oscar: Add prusa-slicer 2024-11-18 19:43:01 -06:00
Chandler Swift 6aa5a4a901
oscar: Add gnome-sound-recorder
Was used for recording Trahan/Brosh wedding, worked nicely. I wasn't
able to get any equivalent KDE utilities working. I should probably take
a look at that sometime.
2024-11-18 19:42:52 -06:00
Chandler Swift 0ebcaee45d
bert: Add isaacswift.com and isaac user 2024-11-18 19:42:40 -06:00
Chandler Swift 41648800ab
bigbird: Make Makefile consistent with other machines' 2024-11-13 00:43:48 -06:00
Chandler Swift b508306c66
oscar: Add forgejo git url substitution rule 2024-11-13 00:43:48 -06:00
Chandler Swift a9f501b137
oscar: Add chandler to plugdev group 2024-11-13 00:43:48 -06:00
Chandler Swift 554d5f952b
bigbird: Pass pkgs param for kathe
I'm not entirely sure how this made it past testing!
2024-11-13 00:43:48 -06:00
Chandler Swift 4a5c10849c
bert: Add preview.chandlerswift.com forwarder 2024-11-13 00:43:48 -06:00
Chandler Swift 90dff7f8f0
bigbird: Remove NetworkManager
As far as I can tell, this is just never used.
2024-11-13 00:43:45 -06:00
9 changed files with 67 additions and 14 deletions

View file

@ -1,13 +1,20 @@
# Installation
# `bert`
## Installation
1. Install NixOS minimal
2. `ssh-keygen -N "" -f /etc/secrets/initrd/ssh_host_ed25519_key`
2. Enable SSH server and add root SSH key
3. Deploy updated config with `make`
4. Set up [Remote Disk Unlocking](https://nixos.wiki/wiki/Remote_disk_unlocking)
1. mkdir -p /etc/secrets/initrd && ssh-keygen -N "" -f /etc/secrets/initrd/ssh_host_25519_key
5. Deploy content to web services
5. Deploy content:
- websites in /srv
- factorio world at /var/lib/factorio/saves/default.zip
- git/forgejo in /var/lib/forgejo
- navidrome DB/etc in /var/lib/navidrome
6. Set up Grafana users (log in with default admin/admin; change creds; configure)
# Notes on Caddy
## Notes on Caddy
Until 2.8 is released with 24.11, Caddy has a pretty limited sense of what
content-types should be compressed:

View file

@ -58,6 +58,14 @@
services.openssh.settings.PasswordAuthentication = false;
users.users.root.openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEhPyyqS3BGYor3zLbjc8hZuhem3mS8TNmvWogXcnz/b chandler@chandlerswift.com'' ];
users.users.isaac = {
isNormalUser = true;
description = "Isaac Swift";
openssh.authorizedKeys.keys = [
# TODO
];
};
networking.firewall.allowedTCPPorts = [
80 # Caddy
443 # Caddy

View file

@ -5,9 +5,11 @@
./git.chandlerswift.com.nix
./harborpaperco.com.nix
./home.chandlerswift.com.nix
./isaacswift.com.nix
./katherineandchandler.com.nix
./maps.chandlerswift.com.nix
./music.chandlerswift.com.nix
./preview.chandlerswift.com.nix
./stjohnscccc.org.nix
./swiftgang.net.nix
];

View file

@ -0,0 +1,23 @@
{
services.caddy.virtualHosts."isaacswift.com" = {
serverAliases = ["www.isaacswift.com"];
extraConfig = ''
encode zstd gzip
file_server
root * /srv/www/isaacswift.com
# hide .git # ???
handle_errors {
respond "{err.status_code} {err.status_text}"
}
'';
};
systemd.tmpfiles.settings."10-isaacswift-com" = {
"/srv/www/isaacswift.com" = {
d = {
user = "isaac";
};
};
};
}

View file

@ -0,0 +1,9 @@
{config, ...}: {
services.caddy.virtualHosts."preview.chandlerswift.com".extraConfig = ''
reverse_proxy oscar:4000
handle_errors {
respond "{err.status_code} {err.status_text}"
}
'';
}

View file

@ -1,20 +1,20 @@
# https://stackoverflow.com/a/23324703
current_dir:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
.PHONY: remote-deploy
remote-deploy:
.PHONY: deploy
deploy:
rsync -av $(current_dir)/ root@bigbird:config/
ssh root@bigbird nixos-rebuild switch --fast -I nixos-config=/root/config/configuration.nix
## This probably doesn't work, since architectures are different?
# .PHONY: deploy
# deploy:
# .PHONY: local-build-deploy
# local-build-deploy:
# nixos-rebuild switch --fast -I nixos-config=./configuration.nix --build-host root@animal.chandlerswift.com --target-host root@animal.chandlerswift.com
.PHONY: remote-deploy-upgrade
remote-deploy-upgrade:
rsync -avz $(current_dir)/ root@animal.chandlerswift.com:config/
ssh root@animal.chandlerswift.com nixos-rebuild switch --upgrade-all --fast -I nixos-config=/root/config/configuration.nix
.PHONY: deploy-upgrade
deploy-upgrade:
rsync -avz $(current_dir)/ root@bigbird:config/
ssh root@bigbird nixos-rebuild switch --upgrade-all --fast -I nixos-config=/root/config/configuration.nix
# TODO: build an SD card?
#sd-image:

View file

@ -14,7 +14,6 @@
boot.loader.generic-extlinux-compatible.enable = true;
networking.hostName = "bigbird"; # Define your hostname.
networking.networkmanager.enable = true;
# Enable ZFS: https://openzfs.github.io/openzfs-docs/Getting%20Started/NixOS/index.html
boot.supportedFilesystems = [ "zfs" ];

View file

@ -1,4 +1,4 @@
{
{pkgs, ...}: {
users.users.kathe = {
isNormalUser = true;
description = "Käthe Swift";

View file

@ -119,7 +119,8 @@
# Define a user account. Don't forget to set a password with passwd.
users.users.chandler.isNormalUser = true;
users.users.chandler.description = "Chandler Swift";
users.users.chandler.extraGroups = [ "networkmanager" "wheel" "dialout" "cdrom" ];
users.users.chandler.extraGroups = [ "networkmanager" "wheel" "dialout" "cdrom" "plugdev" ];
home-manager.backupFileExtension = "backup";
home-manager.users.chandler = { pkgs, ... }: {
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
@ -133,11 +134,13 @@
freecad
frescobaldi
gimp
gnome-sound-recorder
josm
kate
kicad
libreoffice-qt
prismlauncher
prusa-slicer
qgis
# command line applications
@ -149,6 +152,7 @@
alsa-utils
dig
file
git-absorb
killall
pv
wl-clipboard
@ -201,6 +205,7 @@
url."https://aur.archlinux.org/".insteadOf = "aur:";
url."ssh://aur@aur.archlinux.org/".pushInsteadOf = "aur:";
url."ssh://git@github.com/ChandlerSwift/".insteadOf = "gh:";
url."ssh://forgejo@bert/chandlerswift/".insteadOf = "forgejo:";
push.autoSetupRemote = true;
rebase.autosquash = true;
rebase.autostash = true;