nix-config/flake.nix

27 lines
738 B
Nix
Raw Normal View History

2021-02-05 16:25:39 +01:00
{
description = "Nixos configuration with flakes";
inputs = {
2021-02-05 16:35:33 +01:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2021-02-05 16:43:30 +01:00
nur.url = "github:nix-community/NUR";
2021-02-05 16:25:39 +01:00
};
2021-02-05 16:43:30 +01:00
outputs = { self, nixpkgs, nur }: {
2021-02-05 16:25:39 +01:00
nixosConfigurations.porthos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules =
[
({ pkgs, ... }: {
# Let 'nixos-version --json' know about the Git revision
# of this flake.
system.configurationRevision =
if self ? rev
then self.rev
else throw "Refusing to build from a dirty Git tree!";
})
2021-02-05 16:43:30 +01:00
{ nixpkgs.overlays = [ nur.overlay ]; }
2021-02-05 16:25:39 +01:00
./configuration.nix
];
};
};
}