{ description = "Zentralwerk network"; inputs = { nixpkgs.url = "github:nixos/nixpkgs"; zentralwerk-network-key.url = "git+https://gitea.c3d2.de/zentralwerk/network.git?dir=nix/key&ref=nix"; }; outputs = { self, nixpkgs, zentralwerk-network-key }: let system = "x86_64-linux"; systems = [ system ]; forAllSystems = nixpkgs.lib.genAttrs systems; nixosConfig = name: nixpkgs.lib.nixosSystem { inherit system; modules = [ self.nixosModule ]; extraModules = [ ({ ... }: { networking.hostName = name; }) ]; }; in rec { lib = import ./nix/lib { inherit self nixpkgs; inherit (zentralwerk-network-key.lib) gpgKey; }; packages = forAllSystems (system: import ./nix/pkgs { inherit self nixpkgs system; } ); nixosModule = { ... }: { imports = [ ./nix/nixos-module ]; }; nixosConfigurations = builtins.mapAttrs (hostName: _: nixosConfig hostName) ( nixpkgs.lib.filterAttrs (_: { role, ... }: builtins.elem role [ "server" "container" ] ) lib.config.site.hosts ); # nixosConfigurations.test_vm = # nixpkgs.lib.nixosSystem { # inherit system; # modules = [ nixosModule ]; # extraModules = [ ({ ... }: { # networking.hostName = "test_vm"; # }) ]; # }; }; }