Merge pull request 'test workflow' (#1) from workflows into main
Some checks failed
/ lint (push) Waiting to run
/ build (push) Has been cancelled

Reviewed-on: #1
This commit is contained in:
jana 2025-08-20 12:06:54 +02:00
commit 393c6b9ad2
13 changed files with 173 additions and 85 deletions

11
.github/workflows/deploy.yml vendored Normal file
View file

@ -0,0 +1,11 @@
on:
push:
branches:
- main
jobs:
build:
runs-on: nix
steps:
- uses: actions/checkout@v4
- run: nix develop
- run: colmena build -v --on @fili

7
.github/workflows/lint.yml vendored Normal file
View file

@ -0,0 +1,7 @@
on: [push]
jobs:
lint:
runs-on: nix
steps:
- uses: actions/checkout@v4
- run: nix fmt -- --check .

View file

@ -16,7 +16,6 @@ _: {
networkmanager.enable = true; networkmanager.enable = true;
}; };
nix.settings = { nix.settings = {
# users that can interact with nix # users that can interact with nix
trusted-users = [ trusted-users = [

View file

@ -1,4 +1,5 @@
{ baseUrl, clientId }: { { baseUrl, clientId }:
{
inherit clientId; inherit clientId;
userAuthUrl = "${baseUrl}/ui/oauth2"; userAuthUrl = "${baseUrl}/ui/oauth2";

View file

@ -1,9 +1,11 @@
{pkgs, config, ...}: let { pkgs, config, ... }:
let
lib = pkgs.lib; lib = pkgs.lib;
domain = "auth.donsz.nl"; domain = "auth.donsz.nl";
port = 3013; port = 3013;
backupsDir = "/var/lib/kanidm/backup"; backupsDir = "/var/lib/kanidm/backup";
in { in
{
services.kanidm.enableServer = true; services.kanidm.enableServer = true;
services.kanidm.package = pkgs.kanidm_1_6; services.kanidm.package = pkgs.kanidm_1_6;
services.kanidm.serverSettings = { services.kanidm.serverSettings = {
@ -26,8 +28,7 @@ in {
mkdir -p "${backupsDir}" mkdir -p "${backupsDir}"
''; '';
serviceConfig = { serviceConfig = {
SupplementaryGroups = SupplementaryGroups = [ config.security.acme.certs.${domain}.group ];
[ config.security.acme.certs.${domain}.group ];
}; };
}; };

View file

@ -1,12 +1,17 @@
{pkgs, config, ...}: { { pkgs, config, ... }:
{
sops.secrets.oauth2-proxy = { sops.secrets.oauth2-proxy = {
sopsFile = ../../../secrets/oauth2-proxy.env; sopsFile = ../../../secrets/oauth2-proxy.env;
}; };
services.oauth2-proxy = services.oauth2-proxy =
let let
auth = import ../../lib/auth.nix { baseUrl = "https://auth.donsz.nl"; clientId = "homeserver"; }; auth = import ../../lib/auth.nix {
in { baseUrl = "https://auth.donsz.nl";
clientId = "homeserver";
};
in
{
enable = true; enable = true;
provider = "oidc"; provider = "oidc";

View file

@ -1,4 +1,9 @@
{ lib, pkgs, config, ... }: {
lib,
pkgs,
config,
...
}:
let let
cfg = config.services.forgejo; cfg = config.services.forgejo;
srv = cfg.settings.server; srv = cfg.settings.server;
@ -73,4 +78,56 @@ in
}; };
mailerPasswordFile = config.sops.secrets.forgejo.path; mailerPasswordFile = config.sops.secrets.forgejo.path;
}; };
users.groups.forgejo-runner = { };
users.users.forgejo-runner = {
isSystemUser = true;
group = "forgejo-runner";
};
sops.secrets.forgejo-runner = {
sopsFile = ../../secrets/forgejo-runner.env;
};
services.gitea-actions-runner = {
package = pkgs.forgejo-runner;
instances.fili = {
enable = true;
name = "forgejo-runner-01";
tokenFile = config.sops.secrets.forgejo-runner.path;
url = "https://git.donsz.nl/";
labels = [
"nix:host"
"docker:docker://node:16-bullseye"
"ubuntu-latest:docker://node:16-bullseye"
];
settings = { };
hostPackages = with pkgs; [
# default ones
bash
coreutils
curl
gawk
gitMinimal
gnused
nodejs
wget
# used in deployments
lix
openssh
];
};
};
virtualisation.docker = {
daemon.settings = {
fixed-cidr-v6 = "fd00::/80";
ipv6 = true;
};
};
networking.firewall.trustedInterfaces = [ "br-+" ];
} }

View file

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

View file

@ -1,4 +1,5 @@
{flakes, pkgs, ...}: { { flakes, pkgs, ... }:
{
services.nginx = { services.nginx = {
virtualHosts."donsz.nl" = { virtualHosts."donsz.nl" = {
forceSSL = true; forceSSL = true;

View file

@ -1,4 +1,5 @@
{flakes,...}: { { flakes, ... }:
{
# imports = [ # imports = [
# flakes.mapf.nixosModules.default # flakes.mapf.nixosModules.default
# ]; # ];

View file

@ -1,8 +1,6 @@
{ flakes, pkgs, ... }: { flakes, pkgs, ... }:
let let
totpal = totpal = flakes.totpal.packages.${pkgs.system}.default;
flakes.totpal.packages.${pkgs.system}.default
;
in in
{ {
services.nginx = { services.nginx = {
@ -17,8 +15,7 @@ in
}; };
}; };
systemd.services.totpal = systemd.services.totpal = {
{
description = "totpal"; description = "totpal";
serviceConfig = { serviceConfig = {
Type = "simple"; Type = "simple";

View file

@ -0,0 +1,7 @@
TOKEN=ENC[AES256_GCM,data:5WnyyafhDtizIzL4VjXYsMFxLTKikS4Lg6rNGoeVbMqXbquutotfcQ==,iv:2QknXqH8eHft9NHy6K17uv2WvSfvDE8HJsaBDfzUlws=,tag:jw0ffCsfhBNBy++W7cyJsg==,type:str]
sops_age__list_0__map_enc=-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBHaTZNTmxkMVVuWER0dTZN\nL3N0cDF2bHdpZUNLQWdJMHVjVk5LbnY1OGlVClpya1VhcHdRUW0yUW5CL21mSUJN\nMDU5cFZ1QUppaHZ2dXkwUjgrVFloS3cKLS0tIGNzRWUxSFlXUnR5eFhEQkNOWmRY\nV0dNWWRXVnJCU0duU2dGcWZRWFhMUm8K9dsrIrABcLRZ4pfduYrIaSiEVF+e2OA0\nOGY2eYWAxbgtqBXEX+vLn0eNtoAptpQi2WgOWwVPr1M1+07w7jExBA==\n-----END AGE ENCRYPTED FILE-----\n
sops_age__list_0__map_recipient=age1ygkcl4ss92z5ptzt3w5g4n98qx2c4kagyssm96m5z4c7t299c5wszjchxw
sops_lastmodified=2025-08-20T10:03:18Z
sops_mac=ENC[AES256_GCM,data:Su4KI/pxc1hqNzEYoA1iPU2a5Fp9o/SEf2DW+hx0T5sNL8UvUFDELqYUoGvNNuz1/59ZR8cEmNWhao9euBoF0eVoUAVuS6ADKkX8EjXXJY8qR3M7aseweYxRYXADcWLTlrXsK4xWU6z+NKwmdvYzir9N1XEeR+w3fJLBBNPBnZI=,iv:z3e0kJuJsCLrBGDXZZiYERA48bdvxTxCsPnSdUFgtT8=,tag:rW0zsoEKnKRTpJN8pkJ4/A==,type:str]
sops_unencrypted_suffix=_unencrypted
sops_version=3.10.2