midori-config/flake.nix
2025-10-19 13:42:52 +02:00

70 lines
1.4 KiB
Nix
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
description = "Midori's NixOS configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
impermanence.url = "github:nix-community/impermanence";
disko = {
url = "github:nix-community/disko/latest";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
nixpkgs,
treefmt-nix,
self,
...
}@inputs:
let
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
in
{
nixosConfigurations.midori = nixpkgs.lib.nixosSystem {
modules = [
./hardware/DEDellEPYC2
./profiles
./services
];
specialArgs = inputs;
};
apps = forAllSystems (
system:
let
pkgs = import nixpkgs { inherit system; };
lib = pkgs.lib;
in
{
agenix = {
type = "app";
program = lib.getExe' inputs.agenix.packages.${system}.default "agenix";
};
}
);
formatter = forAllSystems (
system:
let
pkgs = import nixpkgs { inherit system; };
treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
in
treefmtEval.config.build.wrapper
);
};
}