network/flake.nix

46 lines
1.1 KiB
Nix

{
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;
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.test_vm =
nixpkgs.lib.nixosSystem {
inherit system;
modules = [ nixosModule ];
extraModules = [ ({ ... }: {
networking.hostName = "test_vm";
}) ];
};
nixosConfigurations.server1 =
nixpkgs.lib.nixosSystem {
inherit system;
modules = [];
};
};
}