forked from Fediversity/Fediversity
WIP: change env to environment
This commit is contained in:
parent
76ff180ca7
commit
5355e57378
3 changed files with 24 additions and 20 deletions
|
@ -141,20 +141,22 @@ in
|
||||||
## - Each normal machine gets a deployment.
|
## - Each normal machine gets a deployment.
|
||||||
## - We add a “default” deployment with all normal machines.
|
## - We add a “default” deployment with all normal machines.
|
||||||
## - We add a “test” deployment with all test machines.
|
## - We add a “test” deployment with all test machines.
|
||||||
nixops4Deployments = genAttrs machines makeDeployment' // {
|
nixops4Deployments =
|
||||||
default = makeDeployment machines;
|
builtins.trace (builtins.attrNames inputs) genAttrs machines makeDeployment'
|
||||||
test = makeTestDeployment (
|
// {
|
||||||
fromJSON (
|
default = makeDeployment machines;
|
||||||
let
|
test = makeTestDeployment (
|
||||||
env = builtins.getEnv "DEPLOYMENT";
|
fromJSON (
|
||||||
in
|
let
|
||||||
if env != "" then
|
env = builtins.getEnv "DEPLOYMENT";
|
||||||
env
|
in
|
||||||
else
|
if env != "" then
|
||||||
builtins.trace "env var DEPLOYMENT not set, falling back to ./test-machines/configuration.json!" (readFile ./test-machines/configuration.json)
|
env
|
||||||
)
|
else
|
||||||
);
|
builtins.trace "env var DEPLOYMENT not set, falling back to ./test-machines/configuration.json!" (readFile ./test-machines/configuration.json)
|
||||||
};
|
)
|
||||||
|
);
|
||||||
|
};
|
||||||
flake.nixosConfigurations =
|
flake.nixosConfigurations =
|
||||||
genAttrs machines (makeConfiguration false)
|
genAttrs machines (makeConfiguration false)
|
||||||
// genAttrs testMachines (makeConfiguration true);
|
// genAttrs testMachines (makeConfiguration true);
|
||||||
|
|
|
@ -3,8 +3,9 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}@args:
|
}:
|
||||||
builtins.trace args {
|
# builtins.trace args.pkgs
|
||||||
|
{
|
||||||
fediversityVm = {
|
fediversityVm = {
|
||||||
vmId = 201;
|
vmId = 201;
|
||||||
proxmox = "fediversity";
|
proxmox = "fediversity";
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
# pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
name = "panel";
|
name = "panel";
|
||||||
panel = (import ../../../panel/default.nix { }).package;
|
panel = (import ../../../panel/default.nix { }).package;
|
||||||
in
|
in
|
||||||
|
# builtins.trace args.pkgs
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../../panel/nix/configuration.nix
|
../../../panel/nix/configuration.nix
|
||||||
|
@ -43,8 +44,8 @@ in
|
||||||
STATIC_ROOT = "/var/lib/${name}/static";
|
STATIC_ROOT = "/var/lib/${name}/static";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.services.${name}.env = {
|
systemd.services.${name}.environment = {
|
||||||
REPO_DIR = builtins.trace inputs inputs;
|
REPO_DIR = inputs;
|
||||||
NIX_DIR = pkgs.nix;
|
# NIX_DIR = pkgs.nix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue