flake/flake.nix

58 lines
1.8 KiB
Nix
Raw Normal View History

{
description = "Lyns flake";
inputs = {
2024-10-19 01:36:05 +02:00
microvm.url = "github:astro/microvm.nix";
inputs.microvm.inputs.nixpkgs.follows = "nixpkgs";
lanzaboote.url = "github:nix-community/lanzaboote/v0.4.1";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
2024-08-31 00:23:59 +02:00
sops-nix.url = "github:Mic92/sops-nix";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
};
2024-10-19 01:36:05 +02:00
outputs = {self, nixpkgs, nixpkgs-unstable, sops-nix, lanzaboote, microvm}@inputs: let
2024-09-16 00:10:42 +02:00
imports = [
];
passInputs = ({lib,config,...}:{
2024-09-17 02:46:45 +02:00
options.flakePath = lib.mkOption {type = lib.types.path;};
config.flakePath = ./.;
options.inputs = lib.mkOption {type = lib.types.attrs;};
config.inputs = inputs;
2024-09-17 02:46:45 +02:00
options.pkgsInstances = lib.mkOption {type = lib.types.attrs;};
config.pkgsInstances = {
2024-09-17 02:46:45 +02:00
unstable = import inputs.nixpkgs-unstable {system = config.nixpkgs.system;};
};
});
2024-09-17 02:46:45 +02:00
inherit (nixpkgs) lib;
mkLocalMods = import ./meta/mkLocalMods.nix {inherit lib;};
2024-10-16 17:07:23 +02:00
mkLocalModsInput = (mkLocalMods {prefix = ["lyn"]; dir = ./modules;});
in {
nixosConfigurations = {
2024-09-17 03:12:01 +02:00
"forgenite" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/forgenite
2024-08-31 00:23:59 +02:00
sops-nix.nixosModules.sops
2024-10-16 17:04:21 +02:00
passInputs mkLocalModsInput
];
};
"forgejo-ci" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/forgejo-ci
sops-nix.nixosModules.sops
2024-10-16 17:04:21 +02:00
passInputs mkLocalModsInput
];
2024-10-16 17:16:05 +02:00
};
2024-10-16 17:04:21 +02:00
"supernova" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/supernova
sops-nix.nixosModules.sops
passInputs mkLocalModsInput
lanzaboote.nixosModules.lanzaboote
microvm.nixosModules.host
];
};
};
};
}