🎨 move to nixfmt-rfc-style

This commit is contained in:
2024-12-07 20:46:15 -05:00
parent 9ea7912596
commit a53ad5a5ae
36 changed files with 412 additions and 193 deletions

View File

@ -41,9 +41,15 @@ in
};
"Pleroma.Web.Endpoint" = {
secret_key_base = { _secret = secrets.akkoma-secret-key-base.path; };
signing_salt = { _secret = secrets.akkoma-signing-salt.path; };
live_view.signing_salt = { _secret = secrets.akkoma-signing-salt.path; };
secret_key_base = {
_secret = secrets.akkoma-secret-key-base.path;
};
signing_salt = {
_secret = secrets.akkoma-signing-salt.path;
};
live_view.signing_salt = {
_secret = secrets.akkoma-signing-salt.path;
};
url = {
host = "walkah.social";
scheme = "https";
@ -57,12 +63,18 @@ in
};
":web_push_encryption" = {
":vapid_details" = {
private_key = { _secret = secrets.akkoma-vapid-private-key.path; };
public_key = { _secret = secrets.akkoma-vapid-public-key.path; };
private_key = {
_secret = secrets.akkoma-vapid-private-key.path;
};
public_key = {
_secret = secrets.akkoma-vapid-public-key.path;
};
};
};
":joken" = {
":default_signer" = { _secret = secrets.akkoma-joken-signer.path; };
":default_signer" = {
_secret = secrets.akkoma-joken-signer.path;
};
};
};
nginx = null; # doing this manually

View File

@ -1,5 +1,4 @@
_:
{
_: {
services.nginx = {
enable = true;
virtualHosts = {

View File

@ -1,6 +1,10 @@
{ ... }: {
{ ... }:
{
imports = [ ./common.nix ../../users ];
imports = [
./common.nix
../../users
];
nix = {
configureBuildUsers = true;
@ -18,7 +22,10 @@
options = "--delete-older-than 30d";
};
settings = {
trusted-users = [ "root" "@admin" ];
trusted-users = [
"root"
"@admin"
];
};
};

View File

@ -1,6 +1,11 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
imports = [ ./common.nix ../monitoring ../../users ];
imports = [
./common.nix
../monitoring
../../users
];
documentation = {
enable = false;
@ -22,7 +27,10 @@
settings = {
auto-optimise-store = true;
trusted-users = [ "root" "walkah" ];
trusted-users = [
"root"
"walkah"
];
};
};
@ -40,7 +48,11 @@
enable = true;
flake = "github:walkah/athens#${config.networking.hostName}";
dates = "hourly";
flags = [ "--option" "tarball-ttl" "0" ];
flags = [
"--option"
"tarball-ttl"
"0"
];
};
stateVersion = "23.05";
};

View File

@ -4,9 +4,16 @@ _: {
buildMachines = [
{
hostName = "plato";
systems = [ "x86_64-linux" "aarch64-linux" ];
systems = [
"x86_64-linux"
"aarch64-linux"
];
maxJobs = 6;
supportedFeatures = [ "benchmark" "big-parallel" "kvm" ];
supportedFeatures = [
"benchmark"
"big-parallel"
"kvm"
];
}
];
extraOptions = ''

View File

@ -1,7 +1,8 @@
{ config, lib, ... }:
with lib;
let cfg = config.walkah.coredns;
let
cfg = config.walkah.coredns;
in
{
options.walkah.coredns = {

View File

@ -6,6 +6,6 @@
cachix
nixd
nixf
nixpkgs-fmt
nixfmt-rfc-style
];
}

View File

@ -1,4 +1,5 @@
{ pkgs, config, ... }: {
{ pkgs, config, ... }:
{
sops.secrets.drone = {
owner = "drone";
};

View File

@ -1,4 +1,5 @@
{ pkgs, config, ... }: {
{ pkgs, config, ... }:
{
systemd.services.drone-runner-docker = {
wantedBy = [ "multi-user.target" ];
serviceConfig = {

View File

@ -36,14 +36,14 @@
"/etc/passwd:/etc/passwd"
"/etc/group:/etc/group"
"/nix/var/nix/profiles/system/etc/nix:/etc/nix"
"${config.environment.etc."ssl/certs/ca-certificates.crt".source}:/etc/ssl/certs/ca-certificates.crt"
"${config.environment.etc."ssh/ssh_known_hosts".source}:/etc/ssh/ssh_known_hosts"
"${
builtins.toFile "ssh_config" ''
Host eve.thalheim.io
ForwardAgent yes
''
}:/etc/ssh/ssh_config"
config.environment.etc."ssl/certs/ca-certificates.crt".source
}:/etc/ssl/certs/ca-certificates.crt"
"${config.environment.etc."ssh/ssh_known_hosts".source}:/etc/ssh/ssh_known_hosts"
"${builtins.toFile "ssh_config" ''
Host eve.thalheim.io
ForwardAgent yes
''}:/etc/ssh/ssh_config"
"/etc/machine-id"
# channels are dynamic paths in the nix store, therefore we need to bind mount the whole thing
"/nix/"

View File

@ -1,6 +1,7 @@
{ config, ... }:
let cfg = config.services.gitea;
let
cfg = config.services.gitea;
in
{
users.users.git = {
@ -20,9 +21,15 @@ in
lfs.enable = true;
settings = {
log = { LEVEL = "Error"; };
other = { SHOW_FOOTER_VERSION = false; };
repository = { DEFAULT_BRANCH = "main"; };
log = {
LEVEL = "Error";
};
other = {
SHOW_FOOTER_VERSION = false;
};
repository = {
DEFAULT_BRANCH = "main";
};
server = {
DOMAIN = "walkah.dev";
HTTP_ADDR = "0.0.0.0";
@ -30,8 +37,12 @@ in
ROOT_URL = "https://walkah.dev/";
SSH_DOMAIN = "git.walkah.dev";
};
service = { DISABLE_REGISTRATION = true; };
session = { COOKIE_SECURE = true; };
service = {
DISABLE_REGISTRATION = true;
};
session = {
COOKIE_SECURE = true;
};
};
dump.enable = false;

View File

@ -10,7 +10,11 @@
kubo = {
enable = true;
settings = {
Discovery = { MDNS = { Enabled = true; }; };
Discovery = {
MDNS = {
Enabled = true;
};
};
Swarm = {
AddrFilters = null;
ConnMgr = {

View File

@ -17,8 +17,14 @@ _:
"/ip6/::/udp/4001/quic"
];
};
API = { HTTPHeaders = { Access-Control-Allow-Origin = [ "*" ]; }; };
Routing = { Type = "dht"; };
API = {
HTTPHeaders = {
Access-Control-Allow-Origin = [ "*" ];
};
};
Routing = {
Type = "dht";
};
};
};
};

View File

@ -40,9 +40,17 @@ in
kubo = {
enable = true;
settings = {
Discovery = { MDNS = { Enabled = false; }; };
Peering = { Peers = peers; };
Swarm = { AddrFilters = null; };
Discovery = {
MDNS = {
Enabled = false;
};
};
Peering = {
Peers = peers;
};
Swarm = {
AddrFilters = null;
};
};
};
nginx = {
@ -50,14 +58,18 @@ in
virtualHosts."walkah.cloud" = {
forceSSL = true;
enableACME = true;
locations."/" = { proxyPass = "http://127.0.0.1:8080"; };
locations."/" = {
proxyPass = "http://127.0.0.1:8080";
};
};
# Hosted Sites
virtualHosts."walkah.net" = {
forceSSL = true;
enableACME = true;
locations."/" = { proxyPass = "http://127.0.0.1:8080"; };
locations."/" = {
proxyPass = "http://127.0.0.1:8080";
};
serverAliases = [
"www.walkah.net"
];

View File

@ -17,7 +17,10 @@
LC_CTYPE = "C";
'';
};
postgresqlBackup.databases = [ "matrix" "matrix-syncv3" ];
postgresqlBackup.databases = [
"matrix"
"matrix-syncv3"
];
matrix-synapse = {
enable = true;
@ -28,21 +31,30 @@
enable_registration = false;
database = {
name = "psycopg2";
args = { database = "matrix"; };
args = {
database = "matrix";
};
};
listeners = [{
bind_addresses = [
"0.0.0.0"
];
port = 8008;
type = "http";
tls = false;
x_forwarded = true;
resources = [{
compress = false;
names = [ "client" "federation" ];
}];
}];
listeners = [
{
bind_addresses = [
"0.0.0.0"
];
port = 8008;
type = "http";
tls = false;
x_forwarded = true;
resources = [
{
compress = false;
names = [
"client"
"federation"
];
}
];
}
];
};
extraConfigFiles = [
config.sops.secrets.matrix-registration-secret.path

View File

@ -7,13 +7,17 @@
"matrix.walkah.chat" = {
forceSSL = true;
enableACME = true;
locations."/" = { proxyPass = "http://100.111.208.75:8008"; };
locations."/" = {
proxyPass = "http://100.111.208.75:8008";
};
};
"syncv3.walkah.chat" = {
forceSSL = true;
enableACME = true;
locations."/" = { proxyPass = "http://100.111.208.75:8088"; };
locations."/" = {
proxyPass = "http://100.111.208.75:8088";
};
};
"walkah.chat" = {
@ -21,7 +25,10 @@
enableACME = true;
locations = {
"= /.well-known/matrix/server".extraConfig =
let server = { "m.server" = "matrix.walkah.chat:443"; };
let
server = {
"m.server" = "matrix.walkah.chat:443";
};
in
''
default_type application/json;
@ -31,8 +38,12 @@
"= /.well-known/matrix/client".extraConfig =
let
client = {
"m.homeserver" = { "base_url" = "https://matrix.walkah.chat"; };
"org.matrix.msc3575.proxy" = { "url" = "https://syncv3.walkah.chat"; };
"m.homeserver" = {
"base_url" = "https://matrix.walkah.chat";
};
"org.matrix.msc3575.proxy" = {
"url" = "https://syncv3.walkah.chat";
};
};
in
''
@ -40,7 +51,9 @@
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON client}';
'';
"/" = { root = pkgs.element-web; };
"/" = {
root = pkgs.element-web;
};
};
};
};

View File

@ -1,4 +1,5 @@
{ pkgs, config, ... }: {
{ pkgs, config, ... }:
{
services = {
postgresql = {
enable = true;