dotfiles/.config/nixos/flake.nix

29 lines
717 B
Nix
Raw Normal View History

{
2025-08-31 23:33:58 -04:00
description = "System flake with automatic hostname detection";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
stylix.url = "github:danth/stylix";
stylix.inputs.nixpkgs.follows = "nixpkgs";
};
2025-08-31 23:33:58 -04:00
outputs = { self, nixpkgs, ... }@inputs: let
system = "x86_64-linux";
hostname = builtins.getEnv "HOSTNAME";
in
{
nixosConfigurations = {
2025-08-31 23:33:58 -04:00
"${hostname}" = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
2025-08-31 23:33:58 -04:00
./common.nix
./${hostname}/configuration.nix
./${hostname}/hardware-configuration.nix
inputs.stylix.nixosModules.stylix
];
};
};
};
}