92 lines
2.3 KiB
Nix
92 lines
2.3 KiB
Nix
{
|
|
description = "Lyns flake";
|
|
inputs = {
|
|
microvm.url = "github:astro/microvm.nix";
|
|
microvm.inputs.nixpkgs.follows = "nixpkgs";
|
|
lanzaboote.url = "github:nix-community/lanzaboote/v0.4.1";
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
|
sops-nix.url = "github:Mic92/sops-nix";
|
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
fenix-monthly = {
|
|
url = "github:nix-community/fenix/monthly";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
nixpkgs-unstable,
|
|
sops-nix,
|
|
lanzaboote,
|
|
microvm,
|
|
fenix-monthly,
|
|
} @ inputs: let
|
|
imports = {
|
|
imports = [
|
|
sops-nix.nixosModules.sops
|
|
passInputs
|
|
mkLocalModsInput
|
|
lanzaboote.nixosModules.lanzaboote
|
|
inputs.microvm.nixosModules.host
|
|
./hosts/network.nix
|
|
./meta/wgautomesh
|
|
];
|
|
};
|
|
overlays = {
|
|
default = import ./pkgs/overlay.nix inputs;
|
|
};
|
|
passInputs = {
|
|
lib,
|
|
config,
|
|
...
|
|
}: {
|
|
options.flakePath = lib.mkOption {type = lib.types.path;};
|
|
config.flakePath = ./.;
|
|
options.inputs = lib.mkOption {type = lib.types.attrs;};
|
|
config.inputs = inputs;
|
|
options.pkgsInstances = lib.mkOption {type = lib.types.attrs;};
|
|
config.pkgsInstances = {
|
|
unstable = import inputs.nixpkgs-unstable {system = config.nixpkgs.system;};
|
|
};
|
|
config.nixpkgs.overlays = lib.attrValues overlays;
|
|
};
|
|
inherit (nixpkgs) lib;
|
|
|
|
mkLocalMods = import ./meta/mkLocalMods.nix {inherit lib;};
|
|
mkLocalModsInput = mkLocalMods {
|
|
prefix = ["lyn"];
|
|
dir = ./modules;
|
|
};
|
|
in {
|
|
nixosConfigurations = {
|
|
"forgenite" = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
./hosts/forgenite
|
|
imports
|
|
];
|
|
};
|
|
"forgejo-ci" = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
./hosts/forgejo-ci
|
|
imports
|
|
];
|
|
};
|
|
"supernova" = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
./hosts/supernova
|
|
imports
|
|
];
|
|
};
|
|
"wg-gateway" = nixpkgs.lib.nixosSystem {
|
|
system = "aarch64-linux";
|
|
modules = [
|
|
./hosts/wg-gateway
|
|
imports
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|