1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-03 15:41:02 +01:00
home-manager/tests/modules/programs/ashell/systemd-service.nix
Austin Horstman 650a38ebe8 ashell: support yaml and toml config
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-05 00:26:25 -05:00

33 lines
948 B
Nix

{ pkgs, ... }:
let
ashellPackage = pkgs.runCommand "ashell-0.5.0" { } ''
mkdir -p $out/bin
echo '#!/bin/sh' > $out/bin/ashell
chmod +x $out/bin/ashell
'';
in
{
programs.ashell = {
enable = true;
package = ashellPackage;
settings = {
modules = {
left = [ "Workspaces" ];
};
};
systemd = {
enable = true;
target = "hyprland-session.target";
};
};
nmt.script = ''
assertFileExists home-files/.config/ashell/config.toml
assertFileExists home-files/.config/systemd/user/ashell.service
# Check that the service file contains the expected content
assertFileRegex home-files/.config/systemd/user/ashell.service "ExecStart=.*ashell-0.5.0.*/bin/ashell"
assertFileRegex home-files/.config/systemd/user/ashell.service "WantedBy=hyprland-session.target"
assertFileRegex home-files/.config/systemd/user/ashell.service "Description=ashell status bar"
'';
}