91 lines
2.4 KiB
Nix
91 lines
2.4 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
{
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
discord
|
|
];
|
|
|
|
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
|
elisa
|
|
];
|
|
|
|
home-manager.users.mysaa.home.packages = with pkgs; [
|
|
firefox
|
|
vlc
|
|
(vscode-with-extensions.override {
|
|
vscode = vscodium;
|
|
vscodeExtensions = with vscode-marketplace; [
|
|
maximedenes.vscoq
|
|
myriad-dreamin.tinymist
|
|
vmware.vscode-boot-dev-pack
|
|
ms-python.python
|
|
edwinkofler.vscode-hyperupcall-pack-java
|
|
];
|
|
})
|
|
keepassxc
|
|
libreoffice
|
|
#hyphenDicts.fr_FR
|
|
hyphenDicts.en_US
|
|
hyphenDicts.de_DE
|
|
];
|
|
|
|
programs.steam.enable = true;
|
|
|
|
home-manager.users.mysaa.services.kdeconnect.enable = true;
|
|
# We open kdeconnect ports
|
|
networking.firewall = rec {
|
|
allowedTCPPortRanges = [
|
|
{
|
|
from = 1714;
|
|
to = 1764;
|
|
}
|
|
];
|
|
allowedUDPPortRanges = allowedTCPPortRanges;
|
|
};
|
|
|
|
home-manager.users.mysaa.accounts.email.accounts."hadoly".thunderbird.enable = true;
|
|
home-manager.users.mysaa.accounts.email.accounts."personal".thunderbird.enable = true;
|
|
home-manager.users.mysaa.programs.thunderbird = {
|
|
enable = true;
|
|
profiles.default = {
|
|
isDefault = true;
|
|
settings =
|
|
{ }
|
|
// lib.attrsets.concatMapAttrs (
|
|
_: account:
|
|
lib.optionalAttrs (account.passwordCommand != null) (
|
|
let
|
|
id = builtins.hashString "sha256" account.name;
|
|
command = lib.concatStringsSep " " account.passwordCommand;
|
|
passwordScript = pkgs.writeShellScript "get-password.sh" ''
|
|
${command} | tr -d $'\n' | ${pkgs.netcat}/bin/nc -w 0 -U $1
|
|
'';
|
|
in
|
|
lib.optionalAttrs (account.smtp != null) {
|
|
"mail.smtpserver.smtp_${id}.passwordCommand" = toString passwordScript;
|
|
}
|
|
// lib.optionalAttrs (account.imap != null) {
|
|
"mail.server.server_${id}.passwordCommand" = toString passwordScript;
|
|
}
|
|
)
|
|
) config.home-manager.users.mysaa.accounts.email.accounts;
|
|
};
|
|
};
|
|
|
|
home-manager.users.mysaa.nixpkgs.overlays = [
|
|
(final: prev: {
|
|
thunderbird-unwrapped = prev.thunderbird-unwrapped.overrideAttrs {
|
|
patches = (prev.thunderbird-unwrapped.patches or [ ]) ++ [
|
|
../../packages/add_passwordcommand_smtp.patch
|
|
../../packages/add_passwordcommand_imap.patch
|
|
];
|
|
};
|
|
})
|
|
];
|
|
}
|