flake: init configuration
This commit is contained in:
parent
d79538e1ab
commit
34548c28ec
2 changed files with 51 additions and 0 deletions
24
flake.nix
Normal file
24
flake.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
description = "Nixos configuration with flakes";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-20.09";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }: {
|
||||
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!";
|
||||
})
|
||||
./configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue