Skip to content

Commit

Permalink
refactor: simplify amenities for interactive tests (#363)
Browse files Browse the repository at this point in the history
remove the additional font, it's is very much a matter of taste and
keeping the code minimal is more important right now.
  • Loading branch information
fricklerhandwerk authored Sep 19, 2024
1 parent bdcbe05 commit 4a56747
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions projects/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,33 +29,20 @@
else true;

nixosTest = test: let
# Amenities for interactive tests
tools = {pkgs, ...}: {
environment.systemPackages = with pkgs; [vim tmux jq];
};

# Use kmscon <https://www.freedesktop.org/wiki/Software/kmscon/>
# to provide a slightly nicer console, and while we're at it,
# also use a nice font.
# With kmscon, we can for example zoom in/out using [Ctrl] + [+]
# and [Ctrl] + [-]
niceConsoleAndAutologin = {pkgs, ...}: {
# Use kmscon <https://www.freedesktop.org/wiki/Software/kmscon/>
# to provide a slightly nicer console.
# kmscon allows zooming with [Ctrl] + [+] and [Ctrl] + [-]
services.kmscon = {
enable = true;
autologinUser = "root";
fonts = [
{
name = "Fira Code";
package = pkgs.fira-code;
}
];
};
};
debugging.interactive.nodes = mapAttrs (_: _: tools) test.nodes;
in
pkgs.nixosTest ({
# NOTE: Below configuration is for "interactive" (=developing/debugging) only.
interactive.nodes = mapAttrs (_: _: {imports = [niceConsoleAndAutologin tools];}) test.nodes;
}
// test);
pkgs.nixosTest (debugging // test);

hydrate = project:
recursiveUpdate
Expand Down

0 comments on commit 4a56747

Please sign in to comment.