Compare commits

..

2 commits

Author SHA1 Message Date
c0608d1064 Push builds to attic
Some checks failed
Buill NixOS Configurations / Build-NixOS-Configurations (carbon) (push) Failing after 6s
Buill NixOS Configurations / Build-NixOS-Configurations (git) (push) Failing after 5s
Buill NixOS Configurations / Build-NixOS-Configurations (gospel) (push) Failing after 5s
Buill NixOS Configurations / Build-NixOS-Configurations (node) (push) Failing after 5s
2026-02-14 22:47:31 -08:00
431a7e9767 Setup postgresql for atticd 2026-02-14 22:17:04 -08:00
2 changed files with 24 additions and 0 deletions

View file

@ -17,3 +17,7 @@ jobs:
- run: | - run: |
echo 'Building configuration for ${{ matrix.system }}' echo 'Building configuration for ${{ matrix.system }}'
nix build .#nixosConfigurations.${{ matrix.system }}.config.system.build.toplevel nix build .#nixosConfigurations.${{ matrix.system }}.config.system.build.toplevel
- name: Push build to attic
run: |
attic login gospel https://attic.kilonull.com ${{ secrets.ATTIC_PUSH_SECRET }}
attic push gospel ./result

View file

@ -5,6 +5,7 @@
... ...
}: }:
let let
attic_cfg = config.services.atticd;
cfg = config.${namespace}.services.atticd; cfg = config.${namespace}.services.atticd;
in in
{ {
@ -22,6 +23,7 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
age.secrets.atticd.file = ../../../../secrets/atticd.age; age.secrets.atticd.file = ../../../../secrets/atticd.age;
services.atticd = { services.atticd = {
enable = true; enable = true;
# ATTIC_SERVER_TOKEN_RS256_SECRET_BASE64: The base64-encoded RSA PEM PKCS1 of the RS256 JWT secret. Generate it with openssl genrsa -traditional 4096 | base64 -w0. # ATTIC_SERVER_TOKEN_RS256_SECRET_BASE64: The base64-encoded RSA PEM PKCS1 of the RS256 JWT secret. Generate it with openssl genrsa -traditional 4096 | base64 -w0.
@ -39,9 +41,27 @@ in
api-endpoint = "https://attic.kilonull.com/"; api-endpoint = "https://attic.kilonull.com/";
listen = "[::]:8080"; listen = "[::]:8080";
garbage-collection.retention-period = "30d"; garbage-collection.retention-period = "30d";
database.url = "postgresql://atticd/?host=/run/postgresql";
}; };
}; };
services.postgresql = {
enable = true;
ensureDatabases = [ "atticd" ];
ensureUsers = [
{
name = attic_cfg.user;
ensureDBOwnership = true;
}
];
identMap = ''
attic attic attic
'';
authentication = ''
local all attic peer map=attic
'';
};
services.nginx = { services.nginx = {
enable = true; enable = true;
virtualHosts."attic.kilonull.com" = { virtualHosts."attic.kilonull.com" = {