Kiana Sheibani
475017cf87
The `_module.args` option can't be used to pass modules to import, since it can only be used during the config phase, not the import phase.
50 lines
1.3 KiB
Nix
50 lines
1.3 KiB
Nix
{
|
|
description = "Aether - web server configuration";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
rpi5-kernel.url = "gitlab:vriska/nix-rpi5";
|
|
rpi5-kernel.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
agenix.url = "github:ryantm/agenix";
|
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
|
agenix.inputs.darwin.follows = "";
|
|
};
|
|
|
|
outputs = inputs@{ self, nixpkgs, agenix, rpi5-kernel, ... }:
|
|
let
|
|
inherit (nixpkgs) lib;
|
|
|
|
moduleNames =
|
|
let sub = builtins.readDir ./modules;
|
|
in builtins.filter
|
|
(d: sub.${d} == "directory")
|
|
(builtins.attrNames sub);
|
|
|
|
modules = lib.genAttrs moduleNames (name: ./modules/${name});
|
|
in {
|
|
nixosModules =
|
|
modules
|
|
// {
|
|
aether.imports = lib.attrValues modules;
|
|
deploy-rpi5 = {
|
|
imports = [ ./deploy/rpi5 ];
|
|
aether.deploy.rpi5.kernelPackages =
|
|
rpi5-kernel.legacyPackages.aarch64-linux.linuxPackages_rpi5;
|
|
};
|
|
};
|
|
|
|
nixosConfigurations."toki-aether" =
|
|
nixpkgs.lib.nixosSystem {
|
|
specialArgs.aether = self.nixosModules;
|
|
modules = [
|
|
agenix.nixosModules.default
|
|
./aether/hardware-configuration.nix
|
|
./aether/config.nix
|
|
];
|
|
};
|
|
nixosConfigurations.default = self.nixosConfigurations."toki-aether";
|
|
};
|
|
}
|