Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

wip: simple nixos test #22

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,21 @@
mv logfile $out
'';

simpleNixosTest = pkgs.nixosTest {
name = "simple-nixos-test";
nodes.machine = {
users.users.nixos = {
isNormalUser = true;
initialHashedPassword = "nixos";
};
};
testScript = ''
start_all();

machine.succeed("sudo -u nixos whoami")
'';
};

in rec {
# The list of all packages that can be built with 'nix build'. The list
# of names that can be used can be shown with 'nix flake show'
Expand All @@ -335,6 +350,7 @@
checks = {
psql_14 = makeCheckHarness basePackages.psql_14.bin;
psql_15 = makeCheckHarness basePackages.psql_15.bin;
inherit simpleNixosTest;
};

# Apps is a list of names of things that can be executed with 'nix run';
Expand Down
Loading