From b08ed7b544c1198941089a6d44de521fbb6fef4c Mon Sep 17 00:00:00 2001 From: Grisha Shipunov Date: Fri, 3 Jan 2025 00:30:55 +0100 Subject: [PATCH] reformat and add hydra jobs back --- flake.nix | 47 ++++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/flake.nix b/flake.nix index 49d22a5..9596718 100644 --- a/flake.nix +++ b/flake.nix @@ -41,28 +41,28 @@ , nixpkgs-unstable , sops-nix , ... - }: + }: - { - nixosConfigurations = { - toaster = nixpkgs-unstable.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - modules = [ - sops-nix.nixosModules.sops - lanzaboote.nixosModules.lanzaboote - nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen3 + { + nixosConfigurations = { + toaster = nixpkgs-unstable.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ + sops-nix.nixosModules.sops + lanzaboote.nixosModules.lanzaboote + nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen3 - ./hosts/toaster + ./hosts/toaster - ./modules/basic-tools - ./modules/binary-caches.nix - ./modules/devtools.nix - ./modules/gnome.nix - ./modules/gnupg.nix - ./modules/radio.nix - ./modules/science.nix - ./modules/tlp.nix + ./modules/basic-tools + ./modules/binary-caches.nix + ./modules/devtools.nix + ./modules/gnome.nix + ./modules/gnupg.nix + ./modules/radio.nix + ./modules/science.nix + ./modules/tlp.nix # ./modules/virtualization.nix ./hosts/toaster/secure-boot.nix ./modules/chromium.nix @@ -95,5 +95,10 @@ ]; }; }; - }; - } + hydraJobs = + let + get-toplevel = (host: nixSystem: nixSystem.config.microvm.declaredRunner or nixSystem.config.system.build.toplevel); + in + nixpkgs-stable.lib.mapAttrs get-toplevel self.nixosConfigurations; + }; + }