Compare commits
1 commit
main
...
protonmail
Author | SHA1 | Date | |
---|---|---|---|
eecbfec0ce |
5 changed files with 73 additions and 6 deletions
|
@ -10,6 +10,7 @@
|
|||
./tmux.nix
|
||||
./vim.nix
|
||||
./zsh
|
||||
../../modules/home-manager
|
||||
];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
|
|
|
@ -4,13 +4,8 @@
|
|||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# gtk = {
|
||||
# enable = true;
|
||||
# theme = {
|
||||
# name = "FlatColor";
|
||||
# };
|
||||
# };
|
||||
home.packages = with pkgs; [
|
||||
thunderbird
|
||||
betterdiscordctl
|
||||
gimp
|
||||
gparted
|
||||
|
@ -19,4 +14,9 @@
|
|||
schildichat-desktop-wayland
|
||||
sublime-music
|
||||
];
|
||||
|
||||
services.protonmail-bridge = {
|
||||
enable = true;
|
||||
nonInteractive = true;
|
||||
};
|
||||
}
|
||||
|
|
7
modules/home-manager/default.nix
Normal file
7
modules/home-manager/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./protonmail.nix
|
||||
];
|
||||
}
|
54
modules/home-manager/protonmail.nix
Normal file
54
modules/home-manager/protonmail.nix
Normal file
|
@ -0,0 +1,54 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.protonmail-bridge;
|
||||
#Still need to integrate more closely with the email management capabilities of home-manager
|
||||
in
|
||||
{
|
||||
##### interface
|
||||
options = {
|
||||
services.protonmail-bridge = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Whether to enable the Bridge.";
|
||||
};
|
||||
|
||||
nonInteractive = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Start Bridge entirely noninteractively";
|
||||
};
|
||||
|
||||
logLevel = mkOption {
|
||||
type = types.enum [ "panic" "fatal" "error" "warn" "info" "debug" "debug-client" "debug-server" ];
|
||||
default = "info";
|
||||
description = "The log level";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
##### implementation
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
home.packages = [ pkgs.protonmail-bridge ];
|
||||
|
||||
systemd.user.services.protonmail-bridge = {
|
||||
Unit = {
|
||||
Description = "Protonmail Bridge";
|
||||
After = [ "network.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Restart = "always";
|
||||
ExecStart = "${pkgs.protonmail-bridge}/bin/protonmail-bridge --no-window --log-level ${cfg.logLevel}" + optionalString (cfg.nonInteractive) " --noninteractive";
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
5
modules/nixos/default.nix
Normal file
5
modules/nixos/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue