add examples and test VM
This commit is contained in:
49
flake.nix
49
flake.nix
@@ -1,13 +1,50 @@
|
||||
{
|
||||
description = "Panoptikon - Website and command output monitoring";
|
||||
description = "Panoptikon – Watch the world from NixOS";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = inputs: {
|
||||
nixosModules.default = ./module.nix;
|
||||
overlays.default = ./overlay.nix;
|
||||
};
|
||||
}
|
||||
outputs =
|
||||
inputs:
|
||||
let
|
||||
eachSupportedSystem = inputs.nixpkgs.lib.genAttrs inputs.nixpkgs.lib.systems.flakeExposed;
|
||||
inherit (inputs.nixpkgs) lib;
|
||||
in
|
||||
{
|
||||
nixosModules.default = import nix/module.nix;
|
||||
overlays.default = import nix/overlay.nix;
|
||||
|
||||
apps = eachSupportedSystem (
|
||||
system:
|
||||
let
|
||||
nixosSystem = lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
inputs.self.nixosModules.default
|
||||
{
|
||||
nixpkgs.overlays = [ inputs.self.overlay ];
|
||||
}
|
||||
{
|
||||
virtualisation.vmVariant = {
|
||||
virtualisation.graphics = false;
|
||||
};
|
||||
services.getty.autologinUser = "root";
|
||||
system.stateVersion = lib.trivial.release;
|
||||
}
|
||||
./examples/simple.nix
|
||||
./examples/bitcoin.nix
|
||||
./examples/nixos.nix
|
||||
./examples/system.nix
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
panoptikon-vm = {
|
||||
type = "app";
|
||||
program = lib.getExe nixosSystem.config.system.build.vm;
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user