Flake lock file updates: • Removed input 'actual' • Removed input 'actual/nixpkgs' • Updated input 'home-manager': 'github:nix-community/home-manager/d5f1f641b289553927b3801580598d200a501863' (2025-05-19) → 'github:nix-community/home-manager/83665c39fa688bd6a1f7c43cf7997a70f6a109f9' (2025-05-26) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/f09dede81861f3a83f7f06641ead34f02f37597f' (2025-05-23) → 'github:NixOS/nixpkgs/7c43f080a7f28b2774f3b3f43234ca11661bf334' (2025-05-25) • Updated input 'nixpkgs-small': 'github:NixOS/nixpkgs/8c092804de127b5617972052ea46d499fb2fd424' (2025-05-27) → 'github:NixOS/nixpkgs/d90ebe5aafcdd79dc9d4210aacf1ff21d4ca31c3' (2025-05-27)
71 lines
1.9 KiB
Nix
71 lines
1.9 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
imports = [
|
|
./hardware-configuration.nix
|
|
./networking.nix
|
|
];
|
|
|
|
nixpkgs.hostPlatform = "x86_64-linux";
|
|
networking.hostName = "orm";
|
|
networking.hostId = "00000000";
|
|
networking.domain = "birdsong.network";
|
|
|
|
fountain.users.qenya.enable = true;
|
|
fountain.admins = [ "qenya" ];
|
|
qenya.base-server.enable = true;
|
|
|
|
qenya.services.distributed-builds = {
|
|
enable = true;
|
|
keyFile = "/etc/ssh/ssh_host_ed25519_key";
|
|
builders = [ "kilgharrah" ];
|
|
};
|
|
nix.settings.max-jobs = 0;
|
|
|
|
randomcat.services.zfs.datasets = {
|
|
"rpool_orm/state" = { mountpoint = "none"; };
|
|
"rpool_orm/state/actual" = { mountpoint = "/var/lib/private/actual"; };
|
|
"rpool_orm/state/postgresql" = { mountpoint = "/var/lib/postgresql"; };
|
|
};
|
|
|
|
services.sanoid.datasets."rpool_orm/state" = {
|
|
useTemplate = [ "production" ];
|
|
recursive = "zfs";
|
|
};
|
|
|
|
services.postgresql = {
|
|
enable = true;
|
|
package = pkgs.postgresql_17;
|
|
dataDir = "/var/lib/postgresql/17";
|
|
# managing imperatively instead of using ensureDatabases/ensureUsers
|
|
|
|
enableTCPIP = true;
|
|
settings = {
|
|
port = 5432;
|
|
# TODO: fix SSL
|
|
# ssl = true;
|
|
};
|
|
# only allow remote connections from within birdsong vpn
|
|
# TODO: don't hardcode the IP addresses
|
|
authentication = pkgs.lib.mkOverride 10 ''
|
|
#type database DBuser auth-method
|
|
local all all trust # used by nixos for local monitoring
|
|
host sameuser all 10.127.0.0/16 scram-sha-256
|
|
host sameuser all fd70:81ca:f8f::/48 scram-sha-256
|
|
'';
|
|
};
|
|
networking.firewall.interfaces."wg-birdsong".allowedTCPPorts = [ 5432 ];
|
|
|
|
qenya.services.actual = {
|
|
enable = true;
|
|
domain = "actual.unspecified.systems";
|
|
};
|
|
fountain.services.web-redirect = {
|
|
enable = true;
|
|
domains = {
|
|
"actual.qenya.tel" = "actual.unspecified.systems";
|
|
};
|
|
};
|
|
|
|
system.stateVersion = "23.11";
|
|
}
|