forked from fediversity/fediversity
Compare commits
No commits in common. "de33e888c765fdfc2f18aeca2240c9355f1e570e" and "c98663ae719830b8a20a8364b7218a7b4c963ecd" have entirely different histories.
de33e888c7
...
c98663ae71
2 changed files with 2 additions and 34 deletions
|
|
@ -27,9 +27,3 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: nix build .#checks.x86_64-linux.peertube -L
|
- run: nix build .#checks.x86_64-linux.peertube -L
|
||||||
|
|
||||||
check-panel:
|
|
||||||
runs-on: native
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- run: cd panel && nix-build -A tests
|
|
||||||
|
|
|
||||||
|
|
@ -56,14 +56,8 @@ let
|
||||||
--property "User=${name}" \
|
--property "User=${name}" \
|
||||||
--property "Group=${name}" \
|
--property "Group=${name}" \
|
||||||
--property "WorkingDirectory=/var/lib/${name}" \
|
--property "WorkingDirectory=/var/lib/${name}" \
|
||||||
--property "Environment=''
|
--property "Environment=DATABASE_URL=${database-url} USER_SETTINGS_FILE=${configFile}" \
|
||||||
+ (toString [
|
''
|
||||||
"NIX_BIN=${lib.getExe pkgs.nix}"
|
|
||||||
"REPO_DIR=${../..}"
|
|
||||||
"DATABASE_URL=${database-url}"
|
|
||||||
"USER_SETTINGS_FILE=${configFile}"
|
|
||||||
])
|
|
||||||
+ "\" \\\n"
|
|
||||||
+ optionalString (credentials != [ ]) (
|
+ optionalString (credentials != [ ]) (
|
||||||
(concatStringsSep " \\\n" (map (cred: "--property 'LoadCredential=${cred}'") credentials)) + " \\\n"
|
(concatStringsSep " \\\n" (map (cred: "--property 'LoadCredential=${cred}'") credentials)) + " \\\n"
|
||||||
)
|
)
|
||||||
|
|
@ -196,29 +190,9 @@ in
|
||||||
RuntimeDirectory = name;
|
RuntimeDirectory = name;
|
||||||
LogsDirectory = name;
|
LogsDirectory = name;
|
||||||
} // lib.optionalAttrs (credentials != [ ]) { LoadCredential = credentials; };
|
} // lib.optionalAttrs (credentials != [ ]) { LoadCredential = credentials; };
|
||||||
|
|
||||||
# TODO(@fricklerhandwerk):
|
|
||||||
# Unify handling of runtime settings.
|
|
||||||
# Right now we have four(!) places where we need to set environment variables, each in its own format:
|
|
||||||
# - Django's `settings.py` declaring the setting
|
|
||||||
# - the development environment
|
|
||||||
# - the `manage` command
|
|
||||||
# - here, the service configuration
|
|
||||||
# Ideally we'd set them in two places (development environment and service configuration) but in the same format.
|
|
||||||
#
|
|
||||||
# For that we need to take into account
|
|
||||||
# - the different types of settings
|
|
||||||
# - secrets, which must not end up in the store
|
|
||||||
# - other values, which can be world-readable
|
|
||||||
# - ergonomics
|
|
||||||
# - manipulation should be straightforward in both places; e.g. dumping secrets to a directory that is not git-tracked and adding values to an attrset otherwise
|
|
||||||
# - error detection and correction; it should be clear where and why one messed up so it can be fixed immediately
|
|
||||||
# We may also want to test the development environment in CI in order to make sure that we don't break it inadvertently, because misconfiguration due to multiplpe sources of truth wastes a lot of time.
|
|
||||||
environment = {
|
environment = {
|
||||||
USER_SETTINGS_FILE = "${configFile}";
|
USER_SETTINGS_FILE = "${configFile}";
|
||||||
DATABASE_URL = database-url;
|
DATABASE_URL = database-url;
|
||||||
NIX_BIN = lib.getExe pkgs.nix;
|
|
||||||
REPO_DIR = ../..;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue