IF YOU ARE NOT ME: I would not use this configuration. In the past I would feel confident telling you to drop in your own host and be off to the races, but right now users are in a state which required hard coding some of my nominal preferences. Read on for more specifics Completely refactors the flake.nix part of the repo. This removes my strange legacy code for directory-based hosts+users in favor of using easy-host and flake-parts. As a result of this some specialArgs were lost, namely the list of users and the username being passed. I think this is the right way to go in the short term, but it has lead to some hardcoded values. Namely "pan" is created as a user regardless of configuration In tandem with this is the deprecation of some modules which had inputs in flake which I wasn't using. I'm sure there is a better way to do this, but I didn't like downloading and caching them every time when I knew I wasn't using them. I'm currently very unhappy with the users part of this change, but that wasn't the goal of this branch. I will revisit in a larger commit.
106 lines
2.5 KiB
Nix
106 lines
2.5 KiB
Nix
{ config, ... }:
|
|
let
|
|
email = "admin@woach.me";
|
|
in {
|
|
imports = [
|
|
./hardware.nix ];
|
|
system.stateVersion = "24.11";
|
|
system.timezone = "America/Los_Angeles";
|
|
system.users.bigWheels = [ "pan" ];
|
|
|
|
sops-nix = {
|
|
enable = true;
|
|
keyFile = "/etc/sops/age/keys.txt";
|
|
sopsFile = ./secrets.yaml;
|
|
secrets = {
|
|
pdsEnv = {};
|
|
forgejoPassword = {
|
|
owner = "forgejo";
|
|
};
|
|
caddyApi = {};
|
|
};
|
|
};
|
|
|
|
caddy = {
|
|
enable = true;
|
|
adminEmail = email;
|
|
environmentFile = config.sops.secrets.caddyApi.path;
|
|
vhosts = {
|
|
"juri.woach.me" = {
|
|
extraConfig = ''
|
|
reverse_proxy :3000
|
|
'';
|
|
serverAliases = [ "*.juri.woach.me" ];
|
|
};
|
|
"winry.woach.me" = {
|
|
extraConfig = ''
|
|
reverse_proxy :${builtins.toString config.forgejo.server.port}
|
|
'';
|
|
};
|
|
"ginko.woach.me" = {
|
|
extraConfig = ''
|
|
reverse_proxy :${builtins.toString config.headscale.server.port}
|
|
'';
|
|
serverAliases = [ "*.dns.ginko.woach.me" ];
|
|
};
|
|
"juri.${config.services.headscale.settings.dns.base_domain}" = {
|
|
extraConfig = ''
|
|
reverse_proxy :${builtins.toString config.fava.port}
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
pds = {
|
|
enable = true;
|
|
hostname = "juri.woach.me";
|
|
adminEmail = email;
|
|
environmentFile = config.sops.secrets.pdsEnv.path;
|
|
};
|
|
|
|
forgejo = {
|
|
enable = true;
|
|
server.domain = "winry.woach.me";
|
|
users.admin = {
|
|
enable = true;
|
|
username = "Julia";
|
|
passwordFile = config.sops.secrets.forgejoPassword.path;
|
|
};
|
|
};
|
|
|
|
headscale = {
|
|
enable = true;
|
|
server.domain = "ginko.woach.me";
|
|
};
|
|
|
|
fava = {
|
|
enable = true;
|
|
port = 5128;
|
|
};
|
|
|
|
syncthing = {
|
|
enable = true;
|
|
devices = {
|
|
"homura".id = "NEP24DB-DVXAHTZ-TCCNREQ-Q5TSC7K-ZXPWC4L-5ELGKQX-4I2P47O-2FT5QAU";
|
|
"onizuka".id = "5S6QMND-MHD2HYR-DR6KQD4-6AWJTRL-FQUCR7W-FD2KBT3-AF6RE6R-F47KBQC";
|
|
"kobayashi".id = "4JPJHO4-RZHZZYE-ZUDFCZ4-KLBTMLJ-CNZBWWB-NTESYNA-X3EDAZ6-OMKHQAT";
|
|
"jibril".id = "EWGTILX-AJPLRZ7-UNGM3DJ-5EXGBTB-SHEZKMB-7A6QSER-H6O73FH-JSXCZQL";
|
|
};
|
|
|
|
folders = {
|
|
"wiki" = {
|
|
path = "/var/lib/wiki";
|
|
devices = [ "homura" "onizuka" "kobayashi" "jibril" ];
|
|
};
|
|
};
|
|
};
|
|
systemd.tmpfiles.rules = [ "d /var/lib/wiki 0755 syncthing syncthing -" ];
|
|
|
|
postgres.enable = true;
|
|
|
|
shell.enabledShells = [ "fish" ];
|
|
shell.defaultShell = "fish";
|
|
|
|
tailscale.enable = true;
|
|
sshd.enable = true;
|
|
}
|