diff options
| author | Quentin Aristote <quentin@aristote.fr> | 2022-11-13 21:21:00 +0100 |
|---|---|---|
| committer | Quentin Aristote <quentin@aristote.fr> | 2022-11-13 21:21:00 +0100 |
| commit | 2e8711a58820fa84b4a14c6b6e754a614f22bc0e (patch) | |
| tree | 36fa01118d9a6db41dbbec3e80d70b8cb85e7740 | |
| parent | 87b4abe94d627c3aac572259310250a4c8b865c9 (diff) | |
use flakes
| -rw-r--r-- | flake.lock | 84 | ||||
| -rw-r--r-- | flake.nix | 21 | ||||
| -rw-r--r-- | tests/configuration.nix (renamed from tests/vm.nix) | 0 | ||||
| -rwxr-xr-x | tests/run-tests.sh | 2 |
4 files changed, 106 insertions, 1 deletions
diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..eb376cd --- /dev/null +++ b/flake.lock @@ -0,0 +1,84 @@ +{ + "nodes": { + "data": { + "inputs": { + "flake-utils": [ + "personal-webpage" + ], + "nixpkgs": [ + "personal-webpage" + ] + }, + "locked": { + "lastModified": 1668340813, + "narHash": "sha256-S3rKgiJqBGsH69zU/A3tlogMC/jpICHtSAzd/CBTVUI=", + "owner": "qaristote", + "repo": "info", + "rev": "946290203abdc6075b01a40672509bbaabd260d5", + "type": "github" + }, + "original": { + "owner": "qaristote", + "repo": "info", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1668266328, + "narHash": "sha256-+nAW+XR8nswyEnt5IkQlkrz9erTcQWBVLkhtNHxckFw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5ca8e2e9e1fa5e66a749b39261ad6bd0e07bc87f", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "personal-webpage": { + "inputs": { + "data": "data", + "flake-utils": "flake-utils", + "nixpkgs": [] + }, + "locked": { + "lastModified": 1668369630, + "narHash": "sha256-aaXUpBgOhMjDYDSsnGs28MExA4o0cXn7tV5ndfxpikU=", + "owner": "qaristote", + "repo": "webpage", + "rev": "b0cb171f641dca185cad98506d6c0e104c67dab0", + "type": "github" + }, + "original": { + "owner": "qaristote", + "repo": "webpage", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "personal-webpage": "personal-webpage" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..d02d308 --- /dev/null +++ b/flake.nix @@ -0,0 +1,21 @@ +{ + inputs.personal-webpage = { + url = "github:qaristote/webpage"; + inputs.nixpkgs.follows = ""; + }; + + outputs = { self, nixpkgs, ... }@attrs: { + nixosConfigurations = { + hermes = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = attrs; + modules = [ ./configuration.nix ]; + }; + hermes-test = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = attrs; + modules = [ ./tests/configuration.nix ]; + }; + }; + }; +} diff --git a/tests/vm.nix b/tests/configuration.nix index e878c12..e878c12 100644 --- a/tests/vm.nix +++ b/tests/configuration.nix diff --git a/tests/run-tests.sh b/tests/run-tests.sh index a55e282..b74a6fe 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -8,7 +8,7 @@ function cleanup { } sudo nixos-container stop hermes || exit 2 -sudo nixos-container update hermes --config-file ./vm.nix || exit 2 +sudo nixos-container update hermes --flake ..#hermes-test || exit 2 echo Starting container ... sudo nixos-container start hermes || exit 2 |
