forked from fediversity/fediversity
Compare commits
2 commits
1fcba0942d
...
350245c097
Author | SHA1 | Date | |
---|---|---|---|
350245c097 | |||
631ce8a92d |
6 changed files with 32 additions and 15 deletions
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; # consumed by flake-parts
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
git-hooks.url = "github:cachix/git-hooks.nix";
|
||||
nixops4.follows = "nixops4-nixos/nixops4";
|
||||
|
@ -11,9 +10,11 @@
|
|||
inputs@{ flake-parts, ... }:
|
||||
let
|
||||
sources = import ./npins;
|
||||
inherit (import "${flake-inputs}/lib.nix") import-flake;
|
||||
inherit (sources) git-hooks agenix;
|
||||
nixpkgs = import-flake sources.nixpkgs;
|
||||
in
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
flake-parts.lib.mkFlake { inputs = inputs // { inherit nixpkgs; }; } {
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
|
|
|
@ -25,6 +25,22 @@
|
|||
"url": null,
|
||||
"hash": "1w2gsy6qwxa5abkv8clb435237iifndcxq0s79wihqw11a5yb938"
|
||||
},
|
||||
"flake-inputs": {
|
||||
"type": "GitRelease",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "fricklerhandwerk",
|
||||
"repo": "flake-inputs"
|
||||
},
|
||||
"pre_releases": false,
|
||||
"version_upper_bound": null,
|
||||
"release_prefix": null,
|
||||
"submodules": false,
|
||||
"version": "1.1",
|
||||
"revision": "6461d0b56e790bf289af07c5e5261abbf4f536af",
|
||||
"url": "https://api.github.com/repos/fricklerhandwerk/flake-inputs/tarball/1.1",
|
||||
"hash": "03mwisvr1mc3nd33nvg4bvcyxjxpm4lwhwym39r0768cm1007ixl"
|
||||
},
|
||||
"flake-parts": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
|
|
|
@ -9,10 +9,4 @@ in
|
|||
{
|
||||
REPO_DIR = toString ../.;
|
||||
# explicitly use nix, as e.g. lix does not have configurable-impure-env
|
||||
BIN_PATH = lib.makeBinPath [
|
||||
# explicitly use nix, as e.g. lix does not have configurable-impure-env
|
||||
pkgs.nix
|
||||
# nixops error maybe due to our flake git hook: executing 'git': No such file or directory
|
||||
pkgs.git
|
||||
];
|
||||
}
|
||||
|
|
|
@ -178,10 +178,18 @@ in
|
|||
description = "${name} ASGI server";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [
|
||||
path =
|
||||
[
|
||||
python-environment
|
||||
manage-service
|
||||
];
|
||||
]
|
||||
++ (
|
||||
with pkgs;
|
||||
lib.mkBinPath [
|
||||
nix
|
||||
git
|
||||
]
|
||||
);
|
||||
preStart = ''
|
||||
# Auto-migrate on first run or if the package has changed
|
||||
versionFile="/var/lib/${name}/package-version"
|
||||
|
|
|
@ -240,8 +240,6 @@ if user_settings_file is not None:
|
|||
# The correct thing to do here would be using a helper function such as with `get_secret()` that will catch the exception and explain what's wrong and where to put the right values.
|
||||
# Replacing the `USER_SETTINGS_FILE` mechanism following the comment there would probably be a good thing.
|
||||
|
||||
# PATH to expose to launch button
|
||||
bin_path=env['BIN_PATH']
|
||||
# path of the root flake to trigger nixops from, see #94.
|
||||
# to deploy this should be specified, for dev just use a relative path.
|
||||
repo_dir = env["REPO_DIR"]
|
||||
|
|
|
@ -89,7 +89,7 @@ class DeploymentStatus(ConfigurationForm):
|
|||
|
||||
def deployment(self, config: BaseModel):
|
||||
env = {
|
||||
"PATH": settings.bin_path,
|
||||
"PATH": os.environ.get("PATH"),
|
||||
# pass in form info to our deployment
|
||||
"DEPLOYMENT": config.json()
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue