Some checks failed
deploy-infra / deploy (push) Failing after 3m57s
/ check-data-model (push) Successful in 30s
Nix flake checks / _complete (push) Successful in 30s
Nix flake checks / deployment-basic (push) Successful in 33s
Nix flake checks / deployment-cli (push) Successful in 44s
Nix flake checks / deployment-model-nixops4 (push) Successful in 31s
Nix flake checks / deployment-model-ssh (push) Successful in 22s
Nix flake checks / deployment-model-tf (push) Successful in 24s
Nix flake checks / deployment-model-tf-proxmox (push) Successful in 1m2s
Nix flake checks / deployment-panel (push) Successful in 1m47s
Nix flake checks / nixops-deployment-providers-default (push) Successful in 13s
Nix flake checks / nixops-deployment-providers-fedi200 (push) Successful in 12s
Nix flake checks / nixops-deployment-providers-fedi201 (push) Successful in 11s
Nix flake checks / nixops-deployment-providers-forgejo-ci (push) Successful in 12s
Nix flake checks / nixops-deployment-providers-test (push) Successful in 11s
Nix flake checks / nixops-deployment-providers-vm02116 (push) Successful in 12s
Nix flake checks / nixops-deployment-providers-vm02187 (push) Successful in 11s
Nix flake checks / nixosConfigurations-fedi200 (push) Successful in 19s
Nix flake checks / nixosConfigurations-fedi201 (push) Successful in 34s
Nix flake checks / nixosConfigurations-forgejo-ci (push) Successful in 18s
Nix flake checks / nixosConfigurations-test01 (push) Successful in 19s
Nix flake checks / nixosConfigurations-test02 (push) Successful in 17s
Nix flake checks / nixosConfigurations-test03 (push) Successful in 17s
Nix flake checks / nixosConfigurations-test04 (push) Successful in 17s
Nix flake checks / nixosConfigurations-test05 (push) Successful in 17s
Nix flake checks / nixosConfigurations-test06 (push) Successful in 17s
Nix flake checks / nixosConfigurations-test11 (push) Successful in 17s
Nix flake checks / nixosConfigurations-test12 (push) Successful in 16s
Nix flake checks / nixosConfigurations-test13 (push) Successful in 18s
Nix flake checks / nixosConfigurations-test14 (push) Successful in 18s
Nix flake checks / nixosConfigurations-vm02116 (push) Successful in 19s
Nix flake checks / nixosConfigurations-vm02187 (push) Successful in 18s
Nix flake checks / panel (push) Successful in 30s
Nix flake checks / pre-commit (push) Successful in 11s
Nix flake checks / proxmox-basic (push) Successful in 34s
Nix flake checks / test-mastodon-service (push) Successful in 22s
Nix flake checks / test-peertube-service (push) Successful in 22s
Nix flake checks / vmOptions-fedi200 (push) Successful in 7s
Nix flake checks / vmOptions-fedi201 (push) Successful in 6s
Nix flake checks / vmOptions-test01 (push) Successful in 5s
Nix flake checks / vmOptions-test02 (push) Successful in 6s
Nix flake checks / vmOptions-test03 (push) Successful in 6s
Nix flake checks / vmOptions-test04 (push) Successful in 9s
Nix flake checks / vmOptions-test05 (push) Successful in 5s
Nix flake checks / vmOptions-test06 (push) Successful in 4s
Nix flake checks / vmOptions-test11 (push) Successful in 5s
Nix flake checks / vmOptions-test12 (push) Successful in 5s
Nix flake checks / vmOptions-test13 (push) Successful in 5s
Nix flake checks / vmOptions-test14 (push) Successful in 7s
Nix flake checks / _checks (push) Successful in 1s
precursor to #116. Reviewed-on: #510
70 lines
1.9 KiB
Nix
70 lines
1.9 KiB
Nix
{
|
|
config,
|
|
system,
|
|
modulesPath,
|
|
inputs,
|
|
sources ? import ../../../npins,
|
|
...
|
|
}:
|
|
let
|
|
inherit (sources) nixpkgs;
|
|
pkgs = import nixpkgs { inherit system; };
|
|
inherit (pkgs) lib;
|
|
inherit (pkgs.callPackage ../common/utils.nix { inherit modulesPath; }) mkNixosConfiguration;
|
|
inherit (config)
|
|
nodeName
|
|
pathFromRoot
|
|
pathToRoot
|
|
;
|
|
in
|
|
(pkgs.callPackage ../../utils.nix { inherit inputs; }).evalModel (
|
|
{ config, modulesPath, ... }:
|
|
{
|
|
imports = [ ../common/model.nix ];
|
|
config = {
|
|
environments.default = environment: {
|
|
resources."operator-environment".login-shell.username = "operator";
|
|
implementation =
|
|
{
|
|
required-resources,
|
|
...
|
|
}:
|
|
{
|
|
nixops4 =
|
|
{ providers, ... }:
|
|
{
|
|
providers = {
|
|
inherit (inputs.nixops4.modules.nixops4Provider) local;
|
|
};
|
|
resources.${nodeName} = {
|
|
type = providers.local.exec;
|
|
imports = [
|
|
inputs.nixops4-nixos.modules.nixops4Resource.nixos
|
|
../common/targetResource.nix
|
|
];
|
|
nixos.module = {
|
|
imports = [
|
|
(mkNixosConfiguration environment required-resources)
|
|
"${modulesPath}/../lib/testing/nixos-test-base.nix"
|
|
];
|
|
};
|
|
_module.args = { inherit inputs sources modulesPath; };
|
|
inherit nodeName pathToRoot pathFromRoot;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
options.default =
|
|
let
|
|
env = config.environments.default;
|
|
in
|
|
lib.mkOption {
|
|
type = env.resource-mapping.output-type;
|
|
default = env.deployment {
|
|
deployment-name = "default";
|
|
configuration = config."example-configuration";
|
|
};
|
|
};
|
|
}
|
|
)
|