Files
thiloho.github.io/flake.nix
2025-10-24 11:21:28 +02:00

57 lines
1.1 KiB
Nix

{
description = "NixOS configuration";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
outputs =
inputs@{ nixpkgs, home-manager, ... }:
let
systems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems =
f:
builtins.listToAttrs (
map (system: {
name = system;
value = f system;
}) systems
);
in
{
devShells = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.mkShell {
packages = with pkgs; [
nixd
nixfmt
];
};
}
);
nixosConfigurations =
let
mkSystem =
entrypoint:
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
entrypoint
{ nix.registry.nixpkgs.flake = nixpkgs; }
];
};
in
{
server = mkSystem ./server;
};
};
}