mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-07 09:31:04 +01:00
protonmail-bridge: init module
This commit is contained in:
parent
8275e5d315
commit
1daeb0638a
5 changed files with 119 additions and 0 deletions
|
|
@ -0,0 +1,19 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.protonmail-bridge = {
|
||||
enable = true;
|
||||
package = pkgs.protonmail-bridge-gui;
|
||||
extraPackages = with pkgs; [
|
||||
gnome-keyring
|
||||
];
|
||||
logLevel = "info";
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
local service="home-files/.config/systemd/user/protonmail-bridge.service"
|
||||
|
||||
assertFileExists $service
|
||||
assertFileRegex $service 'Environment=PATH=.*gnome-keyring.*'
|
||||
assertFileRegex $service 'ExecStart=.*/protonmail-bridge-gui --noninteractive --log-level info'
|
||||
'';
|
||||
}
|
||||
5
tests/modules/services/protonmail-bridge/default.nix
Normal file
5
tests/modules/services/protonmail-bridge/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ lib, pkgs, ... }:
|
||||
lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
|
||||
protonmail-bridge-basic-configuration = ./basic-configuration.nix;
|
||||
protonmail-bridge-empty-settings = ./empty-settings.nix;
|
||||
}
|
||||
11
tests/modules/services/protonmail-bridge/empty-settings.nix
Normal file
11
tests/modules/services/protonmail-bridge/empty-settings.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
services.protonmail-bridge.enable = true;
|
||||
|
||||
nmt.script = ''
|
||||
local service="home-files/.config/systemd/user/protonmail-bridge.service"
|
||||
|
||||
assertFileExists $service
|
||||
assertFileNotRegex $service 'Environment=PATH=.*'
|
||||
assertFileRegex $service 'ExecStart=.*/protonmail-bridge --noninteractive'
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue