{ config, lib, pkgs, ... }: { environment.systemPackages = with pkgs; [ discord ]; 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 heroic spotify kdiff3 ]; programs.steam.enable = true; home-manager.users.mysaa.accounts.email.accounts = { "hadoly".thunderbird.enable = true; "personal".thunderbird.enable = true; "ens".thunderbird.enable = true; "junk".thunderbird.enable = true; "google".thunderbird.enable = true; "bernard".thunderbird.enable = true; "dmesures".thunderbird.enable = true; "ecloud".thunderbird.enable = true; }; home-manager.users.mysaa.programs.thunderbird = { enable = true; profiles.default = { isDefault = true; accountsOrder = [ "hadoly" "dmesures" "bernard" "ens" "personal" "junk" "ecloud" "google" ]; 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" '' echo "Got command $1" >> /tmp/thunderpasswordget ${command} | ${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 # ]; # }; # }) # ]; home-manager.users.mysaa.programs.keepassxc.settings = { General.NumberOfRememberedLastDatabases = 1; General.UseAtomicSaves = false; Browser.Enabled = true; Browser.AlwaysAllowAccess = true; Browser.MatchUrlScheme = false; GUI.MinimizeOnStartup = true; GUI.ShowExpiredEntriesOnDatabaseUnlock = false; PasswordGenerator.Length = 24; }; }