0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

paretosecurity: 0.0.89 -> 0.0.91,, nixos/paretosecurity: add trayIcon option

(cherry picked from commit 8dbf318cea)
This commit is contained in:
Neyts Zupan 2025-03-20 23:32:49 +00:00 committed by github-actions[bot]
parent e10fbdc9f6
commit 22dae4e700
3 changed files with 53 additions and 12 deletions

View file

@ -3,20 +3,43 @@
name = "paretosecurity";
meta.maintainers = [ lib.maintainers.zupo ];
nodes.machine =
nodes.terminal =
{ config, pkgs, ... }:
{
services.paretosecurity.enable = true;
imports = [ ./common/user-account.nix ];
users.users.alice = {
isNormalUser = true;
};
services.paretosecurity.enable = true;
};
testScript = ''
machine.succeed(
"su -- alice -c 'paretosecurity check"
nodes.xfce =
{ config, pkgs, ... }:
{
imports = [ ./common/user-account.nix ];
services.paretosecurity = {
enable = true;
trayIcon = true;
};
services.xserver.enable = true;
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.xfce.enable = true;
services.displayManager.autoLogin = {
enable = true;
user = "alice";
};
environment.systemPackages = [ pkgs.xdotool ];
environment.variables.XAUTHORITY = "/home/alice/.Xauthority";
};
enableOCR = true;
testScript = ''
terminal.succeed(
"su -- alice -c 'paretosecurity check"
# Disable some checks that need intricate test setup so that this test
# remains simple and fast. Tests for all checks and edge cases available
# at https://github.com/ParetoSecurity/agent/tree/main/test/integration
@ -27,5 +50,11 @@
+ " --skip f962c423-fdf5-428a-a57a-827abc9b253e" # Password manager installed
+ "'"
)
xfce.wait_for_x()
xfce.succeed("xdotool mousemove 850 10")
xfce.wait_for_text("Pareto Security")
xfce.succeed("xdotool click 1")
xfce.wait_for_text("Run Checks")
'';
}