flake/flake.nix

54 lines
1.7 KiB
Nix

{
description = "Lyns flake";
inputs = {
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";
};
outputs = {self, nixpkgs, nixpkgs-unstable, sops-nix }@inputs: let
imports = [
];
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;};
};
});
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
sops-nix.nixosModules.sops
passInputs mkLocalModsInput
];
};
"forgejo-ci" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/forgejo-ci
sops-nix.nixosModules.sops
passInputs mkLocalModsInput
];
};
"supernova" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/supernova
sops-nix.nixosModules.sops
passInputs mkLocalModsInput
lanzaboote.nixosModules.lanzaboote
];
};
};
};
}