depot/third_party/home-manager/tests/modules/systemd/slices.nix
Default email 75fa0ae5af Project import generated by Copybara.
GitOrigin-RevId: c3ab5ea047e6dc73df530948f7367455749d8906
2023-08-08 12:19:01 +02:00

27 lines
518 B
Nix

{ ... }:
{
systemd.user.slices.app-test = {
Unit = { Description = "Slice for a test app"; };
Slice = {
MemoryHigh = "30%";
MemoryMax = "40%";
};
};
nmt.script = ''
sliceFile=home-files/.config/systemd/user/app-test.slice
assertFileExists $sliceFile
assertFileContent $sliceFile ${
builtins.toFile "app-test-expected.conf" ''
[Slice]
MemoryHigh=30%
MemoryMax=40%
[Unit]
Description=Slice for a test app
''
}
'';
}