forked from Fediversity/Fediversity
pass flake path as inputs.self.outPath?
This commit is contained in:
parent
5355e57378
commit
2a8ae9d320
3 changed files with 18 additions and 21 deletions
|
@ -141,22 +141,20 @@ 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 =
|
nixops4Deployments = genAttrs machines makeDeployment' // {
|
||||||
builtins.trace (builtins.attrNames inputs) genAttrs machines makeDeployment'
|
default = makeDeployment machines;
|
||||||
// {
|
test = makeTestDeployment (
|
||||||
default = makeDeployment machines;
|
fromJSON (
|
||||||
test = makeTestDeployment (
|
let
|
||||||
fromJSON (
|
env = builtins.getEnv "DEPLOYMENT";
|
||||||
let
|
in
|
||||||
env = builtins.getEnv "DEPLOYMENT";
|
if env != "" then
|
||||||
in
|
env
|
||||||
if env != "" then
|
else
|
||||||
env
|
builtins.trace "env var DEPLOYMENT not set, falling back to ./test-machines/configuration.json!" (readFile ./test-machines/configuration.json)
|
||||||
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);
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
# builtins.trace args.pkgs
|
|
||||||
{
|
{
|
||||||
fediversityVm = {
|
fediversityVm = {
|
||||||
vmId = 201;
|
vmId = 201;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
config,
|
config,
|
||||||
# pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -19,7 +19,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
inputs
|
inputs.self.outPath
|
||||||
panel
|
panel
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.services.${name}.environment = {
|
systemd.services.${name}.environment = {
|
||||||
REPO_DIR = inputs;
|
REPO_DIR = inputs.self.outPath;
|
||||||
# NIX_DIR = pkgs.nix;
|
NIX_DIR = pkgs.nix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue