WIP: feat/automated-account-deletion #174
|
@ -18,14 +18,20 @@ jobs:
|
||||||
# Prevent cache garbage collection by creating GC roots
|
# Prevent cache garbage collection by creating GC roots
|
||||||
mkdir -p /var/lib/gitea-runner/tankstelle/.local/state/nix/results
|
mkdir -p /var/lib/gitea-runner/tankstelle/.local/state/nix/results
|
||||||
|
|
||||||
for target in $(nix flake show --json --all-systems | jq '
|
for target in $(nix flake show --json --all-systems | jq --raw-output '
|
||||||
.["nixosConfigurations"] |
|
.["nixosConfigurations"] |
|
||||||
to_entries[] |
|
to_entries[] |
|
||||||
.key
|
.key'
|
||||||
' | tr -d '"'
|
|
||||||
); do
|
); do
|
||||||
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' \
|
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' \
|
||||||
build --out-link /var/lib/gitea-runner/tankstelle/.local/state/nix/results/"$target" ".#nixosConfigurations.${target}.config.system.build.toplevel"
|
build --out-link /var/lib/gitea-runner/tankstelle/.local/state/nix/results/"$target" ".#nixosConfigurations.${target}.config.system.build.toplevel"
|
||||||
done
|
done
|
||||||
|
|
||||||
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' flake check
|
for check in $(nix flake show --json --all-systems | jq --raw-output '
|
||||||
|
.checks."x86_64-linux" |
|
||||||
|
to_entries[] |
|
||||||
|
.key'
|
||||||
|
); do
|
||||||
|
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' \
|
||||||
|
build --out-link /var/lib/gitea-runner/tankstelle/.local/state/nix/results/"$check" ".#checks.x86_64-linux.${check}"
|
||||||
|
done
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
master = import inputs.master { inherit system; };
|
master = import inputs.master { inherit system; };
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = import ./tests ({ inherit inputs self; } // args);
|
checks = import ./tests ({ inherit inputs self; } // args);
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
|
|
|
@ -59,11 +59,16 @@
|
||||||
database-password-file = config.age.secrets.keycloak-database-password.path;
|
database-password-file = config.age.secrets.keycloak-database-password.path;
|
||||||
};
|
};
|
||||||
|
|
||||||
pub-solar-os.backups.stores.storagebox = {
|
pub-solar-os.backups.repos.storagebox = {
|
||||||
passwordFile = config.age.secrets."restic-repo-storagebox".path;
|
passwordFile = config.age.secrets."restic-repo-storagebox".path;
|
||||||
repository = "sftp:u377325@u377325.your-storagebox.de:/backups";
|
repository = "sftp:u377325@u377325.your-storagebox.de:/backups";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.postgresql = {
|
||||||
|
after = [ "var-lib-postgresql.mount" ];
|
||||||
|
requisite = [ "var-lib-postgresql.mount" ];
|
||||||
|
};
|
||||||
|
|
||||||
# This value determines the NixOS release with which your system is to be
|
# This value determines the NixOS release with which your system is to be
|
||||||
# compatible, in order to avoid breaking some software such as database
|
# compatible, in order to avoid breaking some software such as database
|
||||||
# servers. You should change this only after NixOS release notes say you
|
# servers. You should change this only after NixOS release notes say you
|
||||||
|
|
|
@ -13,14 +13,18 @@ let
|
||||||
};
|
};
|
||||||
# Type for a valid systemd unit option. Needed for correctly passing "timerConfig" to "systemd.timers"
|
# Type for a valid systemd unit option. Needed for correctly passing "timerConfig" to "systemd.timers"
|
||||||
inherit (utils.systemdUtils.unitOptions) unitOption;
|
inherit (utils.systemdUtils.unitOptions) unitOption;
|
||||||
|
inherit (lib)
|
||||||
|
literalExpression
|
||||||
|
mkOption
|
||||||
|
mkPackageOption
|
||||||
|
types
|
||||||
|
;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.pub-solar-os.backups = {
|
options.pub-solar-os.backups = {
|
||||||
stores =
|
repos = mkOption {
|
||||||
with lib;
|
|
||||||
mkOption {
|
|
||||||
description = ''
|
description = ''
|
||||||
Periodic backups to create with Restic.
|
Configuration of Restic repositories.
|
||||||
'';
|
'';
|
||||||
type = types.attrsOf (
|
type = types.attrsOf (
|
||||||
types.submodule (
|
types.submodule (
|
||||||
|
@ -57,9 +61,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
backups =
|
backups = mkOption {
|
||||||
with lib;
|
|
||||||
mkOption {
|
|
||||||
description = ''
|
description = ''
|
||||||
Periodic backups to create with Restic.
|
Periodic backups to create with Restic.
|
||||||
'';
|
'';
|
||||||
|
@ -253,17 +255,17 @@ in
|
||||||
config = {
|
config = {
|
||||||
services.restic.backups =
|
services.restic.backups =
|
||||||
let
|
let
|
||||||
stores = config.pub-solar-os.backups.stores;
|
repos = config.pub-solar-os.backups.repos;
|
||||||
backups = config.pub-solar-os.backups.backups;
|
backups = config.pub-solar-os.backups.backups;
|
||||||
|
|
||||||
storeNames = builtins.attrNames stores;
|
storeNames = builtins.attrNames repos;
|
||||||
backupNames = builtins.attrNames backups;
|
backupNames = builtins.attrNames backups;
|
||||||
|
|
||||||
createBackups =
|
createBackups =
|
||||||
backupName:
|
backupName:
|
||||||
map (storeName: {
|
map (storeName: {
|
||||||
name = "${backupName}-${storeName}";
|
name = "${backupName}-${storeName}";
|
||||||
value = stores."${storeName}" // backups."${backupName}";
|
value = repos."${storeName}" // backups."${backupName}";
|
||||||
}) storeNames;
|
}) storeNames;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
|
@ -83,9 +83,12 @@ in
|
||||||
wmClass = su "${gdbus} ${gseval} global.display.focus_window.wm_class";
|
wmClass = su "${gdbus} ${gseval} global.display.focus_window.wm_class";
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
|
<<<<<<< HEAD
|
||||||
def puppeteer_run(cmd):
|
def puppeteer_run(cmd):
|
||||||
client.succeed(f'puppeteer-run \'{cmd}\' ')
|
client.succeed(f'puppeteer-run \'{cmd}\' ')
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> main
|
||||||
start_all()
|
start_all()
|
||||||
|
|
||||||
nachtigall.wait_for_unit("system.slice")
|
nachtigall.wait_for_unit("system.slice")
|
||||||
|
@ -96,6 +99,7 @@ in
|
||||||
nachtigall.wait_until_succeeds("curl https://auth.test.pub.solar/")
|
nachtigall.wait_until_succeeds("curl https://auth.test.pub.solar/")
|
||||||
|
|
||||||
client.wait_for_unit("system.slice")
|
client.wait_for_unit("system.slice")
|
||||||
|
<<<<<<< HEAD
|
||||||
client.wait_for_file("/tmp/puppeteer.sock")
|
client.wait_for_file("/tmp/puppeteer.sock")
|
||||||
puppeteer_run('page.goto("https://auth.test.pub.solar")')
|
puppeteer_run('page.goto("https://auth.test.pub.solar")')
|
||||||
puppeteer_run('page.waitForNetworkIdle()')
|
puppeteer_run('page.waitForNetworkIdle()')
|
||||||
|
@ -114,5 +118,10 @@ in
|
||||||
puppeteer_run('page.locator("button::-p-text(Register)").click()')
|
puppeteer_run('page.locator("button::-p-text(Register)").click()')
|
||||||
puppeteer_run('page.waitForNetworkIdle()')
|
puppeteer_run('page.waitForNetworkIdle()')
|
||||||
client.screenshot("after-register")
|
client.screenshot("after-register")
|
||||||
|
=======
|
||||||
|
client.sleep(30)
|
||||||
|
# client.wait_until_succeeds("${wmClass} | grep -q 'firefox'")
|
||||||
|
client.screenshot("screen")
|
||||||
|
>>>>>>> main
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue