flake: init configuration
This commit is contained in:
parent
d79538e1ab
commit
34548c28ec
27
flake.lock
Normal file
27
flake.lock
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1612433293,
|
||||
"narHash": "sha256-p9vbZBJE8BqLr4uOC+RP12Kg6v6u/gpi8jJ2v1iBAk4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2b9daa020d40aac9d6ff3d1941d22acf4a3e9229",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-20.09",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
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…
Reference in a new issue