62 lines
1.7 KiB
Nix
62 lines
1.7 KiB
Nix
{
|
|
description = "NixOS Machine Configurations by manuth";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs/38c01297e7ec11f7b9e3f2cae7d6fcec6cc767ec";
|
|
flake-utils.url = "github:numtide/flake-utils?ref=b1d9ab70662946ef0850d488da1c9019f3a9752a";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils }: (
|
|
flake-utils.lib.eachDefaultSystem (
|
|
system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
in {
|
|
devShells.default = pkgs.mkShellNoCC (
|
|
with pkgs;
|
|
{
|
|
packages = [
|
|
nixos-rebuild
|
|
];
|
|
});
|
|
}
|
|
) // {
|
|
nixosConfigurations =
|
|
let
|
|
systems = [
|
|
{
|
|
name = "nixos";
|
|
}
|
|
];
|
|
in
|
|
builtins.listToAttrs (
|
|
builtins.map (
|
|
{ name, system ? "x86_64-linux", ... }@config: {
|
|
inherit name;
|
|
|
|
value = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
|
|
modules = [
|
|
({ ... }: { config._module.args = { machineConfig = config; }; })
|
|
./lib/configuration.nix
|
|
|
|
(
|
|
let
|
|
configCandidate = ./lib/machines/${name}.nix;
|
|
|
|
machineConfigPath =
|
|
if builtins.pathExists configCandidate
|
|
then
|
|
configCandidate
|
|
else
|
|
./lib/hardware/base.nix;
|
|
in
|
|
machineConfigPath)
|
|
];
|
|
};
|
|
})
|
|
systems);
|
|
});
|
|
}
|