diff --git a/deployment/check/basic/flake-part.nix b/deployment/check/basic/flake-part.nix index 24d23c40..6344f0f0 100644 --- a/deployment/check/basic/flake-part.nix +++ b/deployment/check/basic/flake-part.nix @@ -17,6 +17,8 @@ let in { + _class = "flake"; + perSystem = { pkgs, ... }: { diff --git a/deployment/check/basic/nixosTest.nix b/deployment/check/basic/nixosTest.nix index fe9bda09..a5a23be7 100644 --- a/deployment/check/basic/nixosTest.nix +++ b/deployment/check/basic/nixosTest.nix @@ -1,6 +1,8 @@ { inputs, ... }: { + _class = "nixosTest"; + name = "deployment-basic"; nodes.deployer = diff --git a/deployment/check/cli/flake-part.nix b/deployment/check/cli/flake-part.nix index 7d71526b..70b1a268 100644 --- a/deployment/check/cli/flake-part.nix +++ b/deployment/check/cli/flake-part.nix @@ -20,6 +20,8 @@ let in { + _class = "flake"; + perSystem = { pkgs, ... }: { diff --git a/deployment/check/cli/nixosTest.nix b/deployment/check/cli/nixosTest.nix index 52defcf0..9bce082e 100644 --- a/deployment/check/cli/nixosTest.nix +++ b/deployment/check/cli/nixosTest.nix @@ -7,6 +7,8 @@ let in { + _class = "nixosTest"; + name = "deployment-cli"; nodes.deployer = diff --git a/deployment/check/common/deployerNode.nix b/deployment/check/common/deployerNode.nix index 7236fc26..048bba5a 100644 --- a/deployment/check/common/deployerNode.nix +++ b/deployment/check/common/deployerNode.nix @@ -18,6 +18,8 @@ let in { + _class = "nixos"; + imports = [ ./sharedOptions.nix ]; options.system.extraDependenciesFromModule = mkOption { diff --git a/deployment/check/common/nixosTest.nix b/deployment/check/common/nixosTest.nix index aa91ae2e..fc0e935f 100644 --- a/deployment/check/common/nixosTest.nix +++ b/deployment/check/common/nixosTest.nix @@ -42,6 +42,8 @@ let in { + _class = "nixosTest"; + imports = [ ./sharedOptions.nix ]; diff --git a/deployment/check/common/sharedOptions.nix b/deployment/check/common/sharedOptions.nix index 9aad8aeb..7201a8f5 100644 --- a/deployment/check/common/sharedOptions.nix +++ b/deployment/check/common/sharedOptions.nix @@ -11,6 +11,7 @@ let inherit (lib) mkOption types; in +# `config` not set and imported from multiple places: no fixed module class { options = { targetMachines = mkOption { diff --git a/deployment/check/common/targetNode.nix b/deployment/check/common/targetNode.nix index 16eacb94..a346d873 100644 --- a/deployment/check/common/targetNode.nix +++ b/deployment/check/common/targetNode.nix @@ -12,6 +12,8 @@ let in { + _class = "nixos"; + imports = [ (modulesPath + "/profiles/qemu-guest.nix") (modulesPath + "/../lib/testing/nixos-test-base.nix") diff --git a/deployment/check/common/targetResource.nix b/deployment/check/common/targetResource.nix index 9d33a8fb..37d47458 100644 --- a/deployment/check/common/targetResource.nix +++ b/deployment/check/common/targetResource.nix @@ -12,6 +12,8 @@ let in { + _class = "nixops4Resource"; + imports = [ ./sharedOptions.nix ]; options = { diff --git a/deployment/check/panel/flake-part.nix b/deployment/check/panel/flake-part.nix index 24a3d695..b722b07c 100644 --- a/deployment/check/panel/flake-part.nix +++ b/deployment/check/panel/flake-part.nix @@ -23,6 +23,8 @@ let in { + _class = "flake"; + perSystem = { pkgs, ... }: { diff --git a/deployment/check/panel/nixosTest.nix b/deployment/check/panel/nixosTest.nix index 39bd7930..da1a438f 100644 --- a/deployment/check/panel/nixosTest.nix +++ b/deployment/check/panel/nixosTest.nix @@ -121,6 +121,8 @@ let in { + _class = "nixosTest"; + name = "deployment-panel"; ## The panel's module sets `nixpkgs.overlays` which clashes with diff --git a/deployment/data-model-test.nix b/deployment/data-model-test.nix index 17c85f77..a988122d 100644 --- a/deployment/data-model-test.nix +++ b/deployment/data-model-test.nix @@ -11,6 +11,8 @@ let }).config; in { + _class = "nix-unit"; + test-eval = { expr = let diff --git a/deployment/data-model.nix b/deployment/data-model.nix index af867d55..fd89cb4f 100644 --- a/deployment/data-model.nix +++ b/deployment/data-model.nix @@ -7,6 +7,8 @@ let in with types; { + _class = "nixops4Deployment"; + options = { runtime-environments = mkOption { description = "Collection of runtime environments into which applications can be deployed"; diff --git a/deployment/default.nix b/deployment/default.nix index dbfa4610..c76489bd 100644 --- a/deployment/default.nix +++ b/deployment/default.nix @@ -65,6 +65,8 @@ let cfg = config.deployment; in { + _class = "nixops4Deployment"; + options = { deployment = lib.mkOption { description = '' diff --git a/deployment/flake-part.nix b/deployment/flake-part.nix index 4f31f2eb..b4a1e0be 100644 --- a/deployment/flake-part.nix +++ b/deployment/flake-part.nix @@ -1,4 +1,6 @@ { + _class = "flake"; + imports = [ ./check/basic/flake-part.nix ./check/cli/flake-part.nix diff --git a/deployment/options.nix b/deployment/options.nix index 0c5fa078..c0a5e8d7 100644 --- a/deployment/options.nix +++ b/deployment/options.nix @@ -17,6 +17,8 @@ let inherit (lib) types mkOption; in { + _class = "nixops4Deployment"; + options = { enable = lib.mkEnableOption "Fediversity configuration"; domain = mkOption { diff --git a/infra/common/nixos/default.nix b/infra/common/nixos/default.nix index b870ab03..20a77cb8 100644 --- a/infra/common/nixos/default.nix +++ b/infra/common/nixos/default.nix @@ -5,6 +5,8 @@ let in { + _class = "nixos"; + imports = [ ./hardware.nix ./networking.nix diff --git a/infra/common/nixos/hardware.nix b/infra/common/nixos/hardware.nix index c01ced2f..4b241e59 100644 --- a/infra/common/nixos/hardware.nix +++ b/infra/common/nixos/hardware.nix @@ -1,6 +1,8 @@ { modulesPath, ... }: { + _class = "nixos"; + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; boot = { diff --git a/infra/common/nixos/networking.nix b/infra/common/nixos/networking.nix index 7b2b2fee..80d3114e 100644 --- a/infra/common/nixos/networking.nix +++ b/infra/common/nixos/networking.nix @@ -5,6 +5,8 @@ let in { + _class = "nixos"; + config = { services.openssh = { enable = true; diff --git a/infra/common/nixos/users.nix b/infra/common/nixos/users.nix index 77433ec0..936a0bd1 100644 --- a/infra/common/nixos/users.nix +++ b/infra/common/nixos/users.nix @@ -1,4 +1,6 @@ { + _class = "nixos"; + users.users = { procolix = { isNormalUser = true; diff --git a/infra/common/options.nix b/infra/common/options.nix index 230eea5d..14d94d89 100644 --- a/infra/common/options.nix +++ b/infra/common/options.nix @@ -6,6 +6,8 @@ let in { + _class = "nixops4Resource"; + options.fediversityVm = { ########################################################################## diff --git a/infra/common/resource.nix b/infra/common/resource.nix index ebaea6c6..46f0834d 100644 --- a/infra/common/resource.nix +++ b/infra/common/resource.nix @@ -18,6 +18,8 @@ let in { + _class = "nixops4Resource"; + imports = [ ./options.nix ]; fediversityVm.hostPublicKey = mkDefault keys.systems.${config.fediversityVm.name}; diff --git a/infra/flake-part.nix b/infra/flake-part.nix index 068bf6a6..31cdc5a3 100644 --- a/infra/flake-part.nix +++ b/infra/flake-part.nix @@ -155,6 +155,8 @@ let in { + _class = "flake"; + ## - Each normal or test machine gets a NixOS configuration. ## - Each normal or test machine gets a VM options entry. ## - Each normal machine gets a deployment. diff --git a/machines/dev/fedi200/default.nix b/machines/dev/fedi200/default.nix index bdea3217..23ba6de8 100644 --- a/machines/dev/fedi200/default.nix +++ b/machines/dev/fedi200/default.nix @@ -1,4 +1,6 @@ { + _class = "nixops4Resource"; + fediversityVm = { vmId = 200; proxmox = "fediversity"; diff --git a/machines/dev/fedi201/default.nix b/machines/dev/fedi201/default.nix index 2f8978d7..bb5058b8 100644 --- a/machines/dev/fedi201/default.nix +++ b/machines/dev/fedi201/default.nix @@ -1,4 +1,6 @@ { + _class = "nixops4Resource"; + fediversityVm = { vmId = 201; proxmox = "fediversity"; diff --git a/machines/dev/fedi201/fedipanel.nix b/machines/dev/fedi201/fedipanel.nix index 5c4236fc..494212de 100644 --- a/machines/dev/fedi201/fedipanel.nix +++ b/machines/dev/fedi201/fedipanel.nix @@ -6,6 +6,8 @@ let name = "panel"; in { + _class = "nixos"; + imports = [ (import ../../../panel { }).module ]; diff --git a/machines/dev/vm02116/default.nix b/machines/dev/vm02116/default.nix index be461038..e9338028 100644 --- a/machines/dev/vm02116/default.nix +++ b/machines/dev/vm02116/default.nix @@ -1,4 +1,6 @@ { + _class = "nixops4Resource"; + fediversityVm = { vmId = 2116; proxmox = "procolix"; diff --git a/machines/dev/vm02116/forgejo.nix b/machines/dev/vm02116/forgejo.nix index e345e6d8..1db0be80 100644 --- a/machines/dev/vm02116/forgejo.nix +++ b/machines/dev/vm02116/forgejo.nix @@ -5,6 +5,8 @@ let in { + _class = "nixos"; + services.forgejo = { enable = true; diff --git a/machines/dev/vm02187/default.nix b/machines/dev/vm02187/default.nix index b389efb2..2f91d753 100644 --- a/machines/dev/vm02187/default.nix +++ b/machines/dev/vm02187/default.nix @@ -1,4 +1,6 @@ { + _class = "nixops4Resource"; + fediversityVm = { vmId = 2187; proxmox = "procolix"; diff --git a/machines/dev/vm02187/wiki.nix b/machines/dev/vm02187/wiki.nix index afb44648..7e0a9b5b 100644 --- a/machines/dev/vm02187/wiki.nix +++ b/machines/dev/vm02187/wiki.nix @@ -1,6 +1,8 @@ { config, ... }: { + _class = "nixos"; + services.phpfpm.pools.mediawiki.phpOptions = '' upload_max_filesize = 1024M; post_max_size = 1024M; diff --git a/machines/operator/test01/default.nix b/machines/operator/test01/default.nix index 434d7ea5..fd5dc710 100644 --- a/machines/operator/test01/default.nix +++ b/machines/operator/test01/default.nix @@ -1,4 +1,6 @@ { + _class = "nixops4Resource"; + fediversityVm = { vmId = 7001; proxmox = "fediversity"; diff --git a/machines/operator/test02/default.nix b/machines/operator/test02/default.nix index a800de18..c7e8fc04 100644 --- a/machines/operator/test02/default.nix +++ b/machines/operator/test02/default.nix @@ -1,4 +1,6 @@ { + _class = "nixops4Resource"; + fediversityVm = { vmId = 7002; proxmox = "fediversity"; diff --git a/machines/operator/test03/default.nix b/machines/operator/test03/default.nix index e6a31c87..55b86f59 100644 --- a/machines/operator/test03/default.nix +++ b/machines/operator/test03/default.nix @@ -1,4 +1,6 @@ { + _class = "nixops4Resource"; + fediversityVm = { vmId = 7003; proxmox = "fediversity"; diff --git a/machines/operator/test04/default.nix b/machines/operator/test04/default.nix index e7c3b991..78f9ee09 100644 --- a/machines/operator/test04/default.nix +++ b/machines/operator/test04/default.nix @@ -1,4 +1,6 @@ { + _class = "nixops4Resource"; + fediversityVm = { vmId = 7004; proxmox = "fediversity"; diff --git a/machines/operator/test05/default.nix b/machines/operator/test05/default.nix index 8b6de173..277c7067 100644 --- a/machines/operator/test05/default.nix +++ b/machines/operator/test05/default.nix @@ -1,4 +1,6 @@ { + _class = "nixops4Resource"; + fediversityVm = { vmId = 7005; proxmox = "fediversity"; diff --git a/machines/operator/test06/default.nix b/machines/operator/test06/default.nix index f23a83f8..42a40dc3 100644 --- a/machines/operator/test06/default.nix +++ b/machines/operator/test06/default.nix @@ -1,4 +1,6 @@ { + _class = "nixops4Resource"; + fediversityVm = { vmId = 7006; proxmox = "fediversity"; diff --git a/machines/operator/test11/default.nix b/machines/operator/test11/default.nix index 3f3de58c..fe955029 100644 --- a/machines/operator/test11/default.nix +++ b/machines/operator/test11/default.nix @@ -1,4 +1,6 @@ { + _class = "nixops4Resource"; + fediversityVm = { vmId = 7011; proxmox = "fediversity"; diff --git a/machines/operator/test12/default.nix b/machines/operator/test12/default.nix index dcc8530f..cfed2f84 100644 --- a/machines/operator/test12/default.nix +++ b/machines/operator/test12/default.nix @@ -1,4 +1,6 @@ { + _class = "nixops4Resource"; + fediversityVm = { vmId = 7012; proxmox = "fediversity"; diff --git a/machines/operator/test13/default.nix b/machines/operator/test13/default.nix index 4a4d7b3d..1d71b6b7 100644 --- a/machines/operator/test13/default.nix +++ b/machines/operator/test13/default.nix @@ -1,4 +1,6 @@ { + _class = "nixops4Resource"; + fediversityVm = { vmId = 7013; proxmox = "fediversity"; diff --git a/machines/operator/test14/default.nix b/machines/operator/test14/default.nix index ed8ccc46..6832b2c7 100644 --- a/machines/operator/test14/default.nix +++ b/machines/operator/test14/default.nix @@ -1,4 +1,6 @@ { + _class = "nixops4Resource"; + fediversityVm = { vmId = 7014; proxmox = "fediversity"; diff --git a/panel/nix/configuration.nix b/panel/nix/configuration.nix index ccc6506a..429a6b73 100644 --- a/panel/nix/configuration.nix +++ b/panel/nix/configuration.nix @@ -76,6 +76,8 @@ in # https://git.dgnum.eu/mdebray/djangonix/ # unlicensed at the time of writing, but surely worth taking some inspiration from... { + _class = "nixos"; + options.services.${name} = { enable = mkEnableOption "Service configuration for `${name}`"; production = mkOption { diff --git a/panel/nix/package.nix b/panel/nix/package.nix index 42440261..76d726d0 100644 --- a/panel/nix/package.nix +++ b/panel/nix/package.nix @@ -60,6 +60,8 @@ let ]; in python3.pkgs.buildPythonPackage { + _class = "package"; + pname = name; inherit (pyproject.project) version; pyproject = true; diff --git a/panel/nix/python-packages/django-pydantic-field/default.nix b/panel/nix/python-packages/django-pydantic-field/default.nix index 2648a0db..a1779961 100644 --- a/panel/nix/python-packages/django-pydantic-field/default.nix +++ b/panel/nix/python-packages/django-pydantic-field/default.nix @@ -8,6 +8,8 @@ }: buildPythonPackage rec { + _class = "package"; + pname = "django-pydantic-field"; version = "v0.3.12"; pyproject = true; diff --git a/panel/nix/python-packages/drf-pydantic/default.nix b/panel/nix/python-packages/drf-pydantic/default.nix index 2fb017a6..08f25c8c 100644 --- a/panel/nix/python-packages/drf-pydantic/default.nix +++ b/panel/nix/python-packages/drf-pydantic/default.nix @@ -10,6 +10,8 @@ }: buildPythonPackage rec { + _class = "package"; + pname = "drf-pydantic"; version = "v2.7.1"; pyproject = true; diff --git a/services/fediversity/default.nix b/services/fediversity/default.nix index ec30419c..6baf00fa 100644 --- a/services/fediversity/default.nix +++ b/services/fediversity/default.nix @@ -6,6 +6,8 @@ let in { + _class = "nixos"; + imports = [ ./garage ./mastodon diff --git a/services/fediversity/garage/default.nix b/services/fediversity/garage/default.nix index c8133b75..7b1bdffa 100644 --- a/services/fediversity/garage/default.nix +++ b/services/fediversity/garage/default.nix @@ -97,6 +97,8 @@ let in { + _class = "nixos"; + imports = [ ./options.nix ]; config = mkIf config.fediversity.garage.enable { diff --git a/services/fediversity/garage/options.nix b/services/fediversity/garage/options.nix index e5281582..0f2f793f 100644 --- a/services/fediversity/garage/options.nix +++ b/services/fediversity/garage/options.nix @@ -5,6 +5,8 @@ let in { + _class = "nixos"; + options.fediversity.garage = { enable = mkEnableOption "Enable a Garage server on the machine"; diff --git a/services/fediversity/mastodon/default.nix b/services/fediversity/mastodon/default.nix index 8c022ea7..ca8416eb 100644 --- a/services/fediversity/mastodon/default.nix +++ b/services/fediversity/mastodon/default.nix @@ -11,6 +11,8 @@ let in { + _class = "nixos"; + imports = [ ./options.nix ]; config = mkMerge [ diff --git a/services/fediversity/mastodon/options.nix b/services/fediversity/mastodon/options.nix index 841284b0..72141045 100644 --- a/services/fediversity/mastodon/options.nix +++ b/services/fediversity/mastodon/options.nix @@ -1,6 +1,8 @@ { config, lib, ... }: { + _class = "nixos"; + options.fediversity.mastodon = (import ../sharedOptions.nix { inherit config lib; diff --git a/services/fediversity/peertube/default.nix b/services/fediversity/peertube/default.nix index 9fa86cf3..ea0c28ee 100644 --- a/services/fediversity/peertube/default.nix +++ b/services/fediversity/peertube/default.nix @@ -5,6 +5,8 @@ let in { + _class = "nixos"; + imports = [ ./options.nix ]; config = mkMerge [ diff --git a/services/fediversity/peertube/options.nix b/services/fediversity/peertube/options.nix index 21eaa021..4163e732 100644 --- a/services/fediversity/peertube/options.nix +++ b/services/fediversity/peertube/options.nix @@ -6,6 +6,8 @@ let in { + _class = "nixos"; + options.fediversity.peertube = (import ../sharedOptions.nix { inherit config lib; diff --git a/services/fediversity/pixelfed/default.nix b/services/fediversity/pixelfed/default.nix index 9080e6ba..1819c9f8 100644 --- a/services/fediversity/pixelfed/default.nix +++ b/services/fediversity/pixelfed/default.nix @@ -15,6 +15,8 @@ let in { + _class = "nixos"; + imports = [ ./options.nix ]; config = mkMerge [ diff --git a/services/fediversity/pixelfed/options.nix b/services/fediversity/pixelfed/options.nix index 4248c019..7aec35aa 100644 --- a/services/fediversity/pixelfed/options.nix +++ b/services/fediversity/pixelfed/options.nix @@ -1,6 +1,8 @@ { config, lib, ... }: { + _class = "nixos"; + options.fediversity.pixelfed = (import ../sharedOptions.nix { inherit config lib; diff --git a/services/fediversity/sharedOptions.nix b/services/fediversity/sharedOptions.nix index 413e2a7d..464cb7a3 100644 --- a/services/fediversity/sharedOptions.nix +++ b/services/fediversity/sharedOptions.nix @@ -14,6 +14,8 @@ let in { + _class = "nixos"; + enable = mkEnableOption "Enable a ${serviceDocName} server on the machine"; s3AccessKeyFile = mkOption { diff --git a/services/tests/rebuildableTest.nix b/services/tests/rebuildableTest.nix index ec32193c..2e3397a5 100644 --- a/services/tests/rebuildableTest.nix +++ b/services/tests/rebuildableTest.nix @@ -127,6 +127,8 @@ let preOverride = pkgs.nixosTest ( test // { + _class = "nixosTest"; + interactive = (test.interactive or { }) // { # no need to // with test.interactive.nodes here, since we are iterating # over all of them, and adding back in the config via `imports` diff --git a/services/vm/garage-vm.nix b/services/vm/garage-vm.nix index 51892131..c24e562d 100644 --- a/services/vm/garage-vm.nix +++ b/services/vm/garage-vm.nix @@ -10,6 +10,8 @@ let in { + _class = "nixos"; + imports = [ (modulesPath + "/virtualisation/qemu-vm.nix") ]; fediversity.garage.enable = true; diff --git a/services/vm/interactive-vm.nix b/services/vm/interactive-vm.nix index 738f5801..a3583803 100644 --- a/services/vm/interactive-vm.nix +++ b/services/vm/interactive-vm.nix @@ -1,6 +1,8 @@ # customize nixos-rebuild build-vm to be a bit more convenient { pkgs, ... }: { + _class = "nixos"; + # let us log in users.mutableUsers = false; users.users.root.hashedPassword = ""; diff --git a/services/vm/mastodon-vm.nix b/services/vm/mastodon-vm.nix index 095f822e..10a35202 100644 --- a/services/vm/mastodon-vm.nix +++ b/services/vm/mastodon-vm.nix @@ -6,6 +6,7 @@ ... }: { + _class = "nixos"; imports = [ (modulesPath + "/virtualisation/qemu-vm.nix") ]; diff --git a/services/vm/peertube-vm.nix b/services/vm/peertube-vm.nix index 7aedbc3d..9ab29aa4 100644 --- a/services/vm/peertube-vm.nix +++ b/services/vm/peertube-vm.nix @@ -5,6 +5,8 @@ }: { + _class = "nixos"; + imports = [ (modulesPath + "/virtualisation/qemu-vm.nix") ]; fediversity = { diff --git a/services/vm/pixelfed-vm.nix b/services/vm/pixelfed-vm.nix index 8c35aeec..ba7c9ec8 100644 --- a/services/vm/pixelfed-vm.nix +++ b/services/vm/pixelfed-vm.nix @@ -11,6 +11,8 @@ let in { + _class = "nixos"; + imports = [ (modulesPath + "/virtualisation/qemu-vm.nix") ]; fediversity = {