forked from fediversity/fediversity
Compare commits
7 commits
eb26d7c607
...
0da4c76336
| Author | SHA1 | Date | |
|---|---|---|---|
| 0da4c76336 | |||
| 653d8b7cf8 | |||
| f3d3c95540 | |||
| 375180748d | |||
| f1dbec8e60 | |||
| c4a8e70253 | |||
| 221c61955f |
8 changed files with 5 additions and 74 deletions
|
|
@ -25,9 +25,7 @@ jobs:
|
||||||
runs-on: native
|
runs-on: native
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: build_path=$(nix-build services -A tests.peertube)
|
- run: nix-build services -A tests.peertube
|
||||||
- run: echo $build_path
|
|
||||||
- run: attic push demo $build_path
|
|
||||||
|
|
||||||
check-panel:
|
check-panel:
|
||||||
runs-on: native
|
runs-on: native
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,6 @@ in
|
||||||
pkgs.httpie
|
pkgs.httpie
|
||||||
pkgs.jq
|
pkgs.jq
|
||||||
pkgs.nix-unit
|
pkgs.nix-unit
|
||||||
pkgs.attic-client
|
|
||||||
test-loop
|
test-loop
|
||||||
nixops4.packages.${system}.default
|
nixops4.packages.${system}.default
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -24,14 +24,6 @@ in
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nix.settings = {
|
|
||||||
substituters = [
|
|
||||||
"https://attic.fediversity.net/demo"
|
|
||||||
];
|
|
||||||
trusted-public-keys = [
|
|
||||||
"demo:N3CAZ049SeBVqBM+OnhLMrxWJ9altbD/aoJtHrY19KM="
|
|
||||||
];
|
|
||||||
};
|
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,8 @@
|
||||||
{
|
{ pkgs, config, ... }:
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
sources,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
_class = "nixos";
|
_class = "nixos";
|
||||||
|
|
||||||
imports = with sources; [
|
|
||||||
(import "${home-manager}/nixos")
|
|
||||||
"${vars}/options.nix"
|
|
||||||
"${vars}/backends/on-machine.nix"
|
|
||||||
];
|
|
||||||
|
|
||||||
services.gitea-actions-runner = {
|
services.gitea-actions-runner = {
|
||||||
package = pkgs.forgejo-actions-runner;
|
package = pkgs.forgejo-actions-runner;
|
||||||
|
|
||||||
|
|
@ -56,39 +44,4 @@
|
||||||
|
|
||||||
## For the Docker mode of the runner.
|
## For the Docker mode of the runner.
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
vars.settings.on-machine.enable = true;
|
|
||||||
vars.generators."templates" = rec {
|
|
||||||
dependencies = [ "attic" ];
|
|
||||||
runtimeInputs = [
|
|
||||||
pkgs.coreutils
|
|
||||||
pkgs.gnused
|
|
||||||
];
|
|
||||||
script = lib.concatStringsSep "\n" (
|
|
||||||
lib.mapAttrsToList (template: _: ''
|
|
||||||
cp "$templates/${template}" "$out/${template}"
|
|
||||||
echo "filling placeholders in template ${template}..."
|
|
||||||
sed -i "s/${placeholder}/$(cat "${config.age.secrets.wiki-password.path}")/g" "$out/${template}"
|
|
||||||
'') files
|
|
||||||
);
|
|
||||||
|
|
||||||
files."attic.toml" = {
|
|
||||||
secret = true;
|
|
||||||
template = pkgs.writeText "attic.toml" ''
|
|
||||||
default-server = "fediversity"
|
|
||||||
|
|
||||||
[servers.fediversity]
|
|
||||||
endpoint = "http://localhost:8080"
|
|
||||||
token = "${config.vars.generators.attic.files.token.placeholder}"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
users.gitea-runner.home = {
|
|
||||||
stateVersion = "25.05";
|
|
||||||
file.".config/attic/config.toml".source =
|
|
||||||
config.vars.generators."templates".files."attic.toml".path;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -24,7 +24,6 @@ concatMapAttrs
|
||||||
## are able to decrypt them.
|
## are able to decrypt them.
|
||||||
|
|
||||||
{
|
{
|
||||||
attic-ci-token = [ forgejo-ci ];
|
|
||||||
forgejo-database-password = [ vm02116 ];
|
forgejo-database-password = [ vm02116 ];
|
||||||
forgejo-email-password = [ vm02116 ];
|
forgejo-email-password = [ vm02116 ];
|
||||||
forgejo-runner-token = [ forgejo-ci ];
|
forgejo-runner-token = [ forgejo-ci ];
|
||||||
|
|
|
||||||
|
|
@ -103,9 +103,9 @@ in
|
||||||
files."attic.env" = {
|
files."attic.env" = {
|
||||||
secret = true;
|
secret = true;
|
||||||
template = pkgs.writeText "attic.env" ''
|
template = pkgs.writeText "attic.env" ''
|
||||||
ATTIC_SERVER_TOKEN_RS256_SECRET_BASE64="${config.vars.generators.attic.files.token.placeholder}"
|
ATTIC_SERVER_TOKEN_RS256_SECRET_BASE64=${config.vars.generators.attic.files.token.placeholder}
|
||||||
AWS_ACCESS_KEY_ID="$(cat ${config.fediversity.attic.s3AccessKeyFile})"
|
AWS_ACCESS_KEY_ID=$(cat ${config.fediversity.attic.s3AccessKeyFile})
|
||||||
AWS_SECRET_ACCESS_KEY="$(cat ${config.fediversity.attic.s3SecretKeyFile})"
|
AWS_SECRET_ACCESS_KEY=$(cat ${config.fediversity.attic.s3SecretKeyFile})
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -66,14 +66,4 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
|
||||||
## FIXME: This should clearly go somewhere else; and we should have a
|
|
||||||
## `staging` vs. `production` setting somewhere.
|
|
||||||
security.acme = {
|
|
||||||
acceptTerms = true;
|
|
||||||
defaults.email = "something@fediversity.net";
|
|
||||||
# defaults.server = "https://acme-staging-v02.api.letsencrypt.org/directory";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue