2026-01-31 20:14:35 -08:00
|
|
|
{ config, lib, pkgs, forEachUser, inputs, orgAgendaApiContainer ? null, orgAgendaApiImageName ? "org-agenda-api", ... }:
|
2023-11-17 14:24:56 -08:00
|
|
|
{
|
|
|
|
|
imports = [
|
|
|
|
|
../configuration.nix
|
2026-01-30 09:40:19 -08:00
|
|
|
inputs.agenix.nixosModules.default
|
2023-11-17 14:24:56 -08:00
|
|
|
];
|
|
|
|
|
|
2023-11-17 15:31:32 -07:00
|
|
|
networking.hostName = "railbird-sf";
|
|
|
|
|
|
2026-01-30 09:40:19 -08:00
|
|
|
# org-agenda-api hosting with nginx + Let's Encrypt
|
2026-01-31 20:14:35 -08:00
|
|
|
# Separate secrets for org-agenda-api: auth password (env format) and SSH key (raw file)
|
|
|
|
|
age.secrets.org-api-auth-password = {
|
|
|
|
|
file = ../secrets/org-api-auth-password.age;
|
|
|
|
|
};
|
|
|
|
|
age.secrets.org-api-ssh-key = {
|
|
|
|
|
file = ../secrets/org-api-ssh-key.age;
|
|
|
|
|
mode = "0400"; # Restrictive permissions for SSH key
|
2026-01-30 09:40:19 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.org-agenda-api-host = {
|
|
|
|
|
enable = true;
|
|
|
|
|
domain = "rbsf.tplinkdns.com";
|
2026-01-31 22:43:02 -08:00
|
|
|
extraDomains = [ "org-agenda-api.rbsf.railbird.ai" ];
|
2026-01-31 20:14:35 -08:00
|
|
|
containerImage = orgAgendaApiImageName;
|
2026-01-30 09:40:19 -08:00
|
|
|
containerImageFile = orgAgendaApiContainer;
|
2026-01-31 20:14:35 -08:00
|
|
|
secretsFile = config.age.secrets.org-api-auth-password.path;
|
|
|
|
|
sshKeyFile = config.age.secrets.org-api-ssh-key.path;
|
2026-01-30 09:40:19 -08:00
|
|
|
};
|
|
|
|
|
|
2023-11-17 15:31:32 -07:00
|
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
|
|
|
|
boot.initrd.kernelModules = [ ];
|
|
|
|
|
boot.kernelModules = [ "kvm-amd" ];
|
|
|
|
|
boot.extraModulePackages = [ ];
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
2025-08-23 21:02:15 +00:00
|
|
|
myModules.postgres.enable = true;
|
|
|
|
|
features.full.enable = true;
|
2023-11-17 15:31:32 -07:00
|
|
|
|
2024-10-02 21:55:36 -06:00
|
|
|
services.k3s.role = "agent";
|
2024-10-02 22:03:01 -06:00
|
|
|
services.k3s.extraFlags = lib.mkForce ["--node-label nixos-nvidia-cdi=enabled"];
|
2023-11-17 14:24:56 -08:00
|
|
|
|
|
|
|
|
hardware.nvidia = {
|
|
|
|
|
powerManagement.enable = false;
|
|
|
|
|
# Fine-grained power management. Turns off GPU when not in use.
|
|
|
|
|
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
|
|
|
|
powerManagement.finegrained = false;
|
|
|
|
|
|
|
|
|
|
# Enable the Nvidia settings menu,
|
2025-08-23 21:02:15 +00:00
|
|
|
# accessible via `nvidia-settings`.
|
2023-11-17 14:24:56 -08:00
|
|
|
nvidiaSettings = true;
|
|
|
|
|
};
|
|
|
|
|
|
2024-09-26 14:15:27 -06:00
|
|
|
myModules.base.enable = true;
|
|
|
|
|
myModules.desktop.enable = true;
|
|
|
|
|
myModules.code.enable = true;
|
|
|
|
|
myModules.syncthing.enable = true;
|
|
|
|
|
myModules.fonts.enable = true;
|
2024-10-01 00:38:01 +00:00
|
|
|
myModules.plasma.enable = true;
|
|
|
|
|
myModules.nvidia.enable = true;
|
2024-09-26 14:15:27 -06:00
|
|
|
myModules.gitea-runner.enable = true;
|
2024-09-30 20:47:12 -06:00
|
|
|
myModules.railbird-k3s = {
|
2024-10-08 13:17:26 -06:00
|
|
|
enable = false;
|
2024-09-30 20:47:12 -06:00
|
|
|
serverAddr = "https://dev.railbird.ai:6443";
|
|
|
|
|
};
|
2023-11-17 14:24:56 -08:00
|
|
|
|
2023-11-17 15:31:32 -07:00
|
|
|
fileSystems."/" =
|
2023-11-17 14:24:56 -08:00
|
|
|
{ device = "/dev/disk/by-uuid/a317d456-6f84-41ee-a149-8e466e414aae";
|
2023-11-17 15:31:32 -07:00
|
|
|
fsType = "ext4";
|
2023-11-17 14:24:56 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/boot" =
|
|
|
|
|
{ device = "/dev/disk/by-uuid/B875-39D4";
|
|
|
|
|
fsType = "vfat";
|
2023-11-17 15:31:32 -07:00
|
|
|
};
|
2023-11-17 14:24:56 -08:00
|
|
|
|
|
|
|
|
swapDevices =
|
|
|
|
|
[ { device = "/dev/disk/by-uuid/129345f3-e1e1-4d45-9db9-643160c6d564"; }
|
|
|
|
|
];
|
|
|
|
|
|
2023-11-18 01:06:39 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
android-studio
|
|
|
|
|
];
|
2023-11-17 14:24:56 -08:00
|
|
|
|
|
|
|
|
networking.useDHCP = lib.mkDefault true;
|
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
2023-11-17 15:31:32 -07:00
|
|
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
2024-10-01 00:38:01 +00:00
|
|
|
|
2023-11-17 14:24:56 -08:00
|
|
|
home-manager.users = forEachUser {
|
2023-11-17 15:31:32 -07:00
|
|
|
home.stateVersion = "23.11";
|
2023-11-17 14:24:56 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
system.stateVersion = "23.11";
|
|
|
|
|
}
|