From 9b58ab0da55baa3dc088205ab8f9728b4a769a9b Mon Sep 17 00:00:00 2001 From: Jake Hillion Date: Tue, 25 Oct 2022 19:56:22 +0100 Subject: [PATCH] initial flake setup --- flake.lock | 44 ++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 21 +++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..4bca208 --- /dev/null +++ b/flake.lock @@ -0,0 +1,44 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1666610816, + "narHash": "sha256-q4F2VNe5bpxXOvp16DyLwE1SgNZMbNO29ZQJPIomedg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "6107f97012a0c134c5848125b5aa1b149b76d2c9", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-22.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1666703756, + "narHash": "sha256-GwpMJ1hT+z1fMAUkaGtvbvofJQwdVFDEGVhfE82+AUk=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "f994293d1eb8812f032e8919e10a594567cf6ef7", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..85c73a3 --- /dev/null +++ b/flake.nix @@ -0,0 +1,21 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + }; + + description = "Hillion Nix flake"; + + outputs = { self, nixpkgs, nixpkgs-unstable }@inputs: { + nixosConfigurations."vm.strangervm.ts.hillion.co.uk" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = inputs; + modules = [ + ./hosts/vm.strangervm.ts.hillion.co.uk/default.nix + { + system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; + } + ]; + }; + }; +}