nixos-server/flake.nix
2025-08-11 15:17:54 +02:00

29 lines
832 B
Nix
Executable file

{
inputs = {
# get pinned version of nixpkgs. update with `nix flake update nixpkgs` or `nix flake update` for all inputs
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# home manager
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{ self, nixpkgs, ... }@inputs:
{
# configuration name matches hostname, so this system is chosen by default
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
# pass along all the inputs and stuff to the system function
specialArgs = { inherit inputs; };
modules = [
# import configuration
./configuration.nix
# home manager part 2
inputs.home-manager.nixosModules.default
];
};
};
}