Compare commits

..

No commits in common. "2abe84b8c22c346c8e53f799bbbd09b3cdaed83f" and "b0d74406fa613d3dc062934260fe6fcd31d88a58" have entirely different histories.

16 changed files with 100 additions and 828 deletions

66
flake.lock generated
View File

@ -25,40 +25,20 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1755928099, "lastModified": 1747688870,
"narHash": "sha256-OILVkfhRCm8u18IZ2DKR8gz8CVZM2ZcJmQBXmjFLIfk=", "narHash": "sha256-ypL9WAZfmJr5V70jEVzqGjjQzF0uCkz+AFQF7n9NmNc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "4a44fb9f7555da362af9d499817084f4288a957f", "rev": "d5f1f641b289553927b3801580598d200a501863",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-25.05", "ref": "release-24.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
}, },
"musnix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1756852730,
"narHash": "sha256-qPere4RBHoZxiEGl8zXU8gjroZg4gkYGEwaAbKmL4vE=",
"owner": "musnix",
"repo": "musnix",
"rev": "7ccc92050e43dc92309396c6f2fe1f542214a242",
"type": "github"
},
"original": {
"owner": "musnix",
"repo": "musnix",
"type": "github"
}
},
"nix-vscode-extensions": { "nix-vscode-extensions": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
@ -67,11 +47,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1756001386, "lastModified": 1755137362,
"narHash": "sha256-QGyQ4kbltilt4Jg6LxaVqwyc7OxAjaDAtdusIW7uL/s=", "narHash": "sha256-3e/S+Q9InEZ+W1YxjrfjkuVz49IsF2vJZx7Id22RCkY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-vscode-extensions", "repo": "nix-vscode-extensions",
"rev": "b9fcd22d7cf5bb1cf75e32fc7ecb5df6156ec504", "rev": "547b299dd5b8ddccf948ff6728d7ec547eee4e02",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -82,16 +62,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1755922037, "lastModified": 1751274312,
"narHash": "sha256-wY1+2JPH0ZZC4BQefoZw/k+3+DowFyfOxv17CN/idKs=", "narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b1b3291469652d5a2edb0becc4ef0246fff97a7c", "rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-25.05", "ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -99,10 +79,8 @@
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"musnix": "musnix",
"nix-vscode-extensions": "nix-vscode-extensions", "nix-vscode-extensions": "nix-vscode-extensions",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs"
"treefmt-nix": "treefmt-nix"
} }
}, },
"systems": { "systems": {
@ -119,26 +97,6 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1758206697,
"narHash": "sha256-/DbPkh6PZOgfueCbs3uzlk4ASU2nPPsiVWhpMCNkAd0=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "128222dc911b8e2e18939537bed1762b7f3a04aa",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@ -2,19 +2,13 @@
description = "My common nixos system"; description = "My common nixos system";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
home-manager.url = "github:nix-community/home-manager/release-25.05"; home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions"; nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
nix-vscode-extensions.inputs.nixpkgs.follows = "nixpkgs"; nix-vscode-extensions.inputs.nixpkgs.follows = "nixpkgs";
treefmt-nix.url = "github:numtide/treefmt-nix";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
musnix.url = "github:musnix/musnix";
musnix.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = outputs =
@ -25,11 +19,7 @@
mkNixosSystems = lib.mapAttrs ( mkNixosSystems = lib.mapAttrs (
name: modules: name: modules:
lib.nixosSystem { lib.nixosSystem {
modules = [ modules = modules ++ [
inputs.musnix.nixosModules.musnix
]
++ modules
++ [
{ {
imports = [ (import "${inputs.home-manager}/nixos") ]; imports = [ (import "${inputs.home-manager}/nixos") ];
networking.hostName = name; networking.hostName = name;
@ -41,20 +31,7 @@
); );
in in
{ {
formatter.x86_64-linux = formatter.x86_64-linux = inputs.nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
inputs.treefmt-nix.lib.mkWrapper (import inputs.nixpkgs { system = "x86_64-linux"; })
{
projectRootFile = "flake.nix";
programs = {
nixfmt.enable = true;
black.enable = true;
};
settings.formatter.black.options = [
"--line-length"
"79"
];
};
nixosConfigurations = mkNixosSystems { nixosConfigurations = mkNixosSystems {
polysaa = [ polysaa = [

View File

@ -84,18 +84,5 @@
}; };
boot.kernelParams = [ "i915.force_probe=7d45" ]; boot.kernelParams = [ "i915.force_probe=7d45" ];
hardware.bluetooth = { system.stateVersion = "24.11";
enable = true;
powerOnBoot = true;
# Not experimental, show charge of devices
settings.General.Experimental = true;
};
# Creates a specialisation for rt kernel
specialisation.zik.configuration = {
musnix.enable = true;
users.users.mysaa.extraGroups = [ "audio" ];
};
system.stateVersion = "25.05";
} }

View File

@ -1,25 +1,31 @@
diff -rp1 -u a/comm/mailnews/base/src/nsMsgIncomingServer.cpp b/comm/mailnews/base/src/nsMsgIncomingServer.cpp diff -x __pycache__ -ru thunderbird-128.10.1/comm/mailnews/base/src/nsMsgIncomingServer.cpp thunderbird/thunderbird-128.10.1/comm/mailnews/base/src/nsMsgIncomingServer.cpp
--- a/comm/mailnews/base/src/nsMsgIncomingServer.cpp 2025-07-21 18:15:26.000000000 +0200 --- thunderbird-128.10.1/comm/mailnews/base/src/nsMsgIncomingServer.cpp 2025-05-13 15:22:25.000000000 +0200
+++ b/comm/mailnews/base/src/nsMsgIncomingServer.cpp 2025-08-24 23:18:34.302163372 +0200 +++ thunderbird/thunderbird-128.10.1/comm/mailnews/base/src/nsMsgIncomingServer.cpp 2025-08-21 03:49:50.217872643 +0200
@@ -51,2 +51,11 @@ @@ -41,6 +41,15 @@
#include "mozilla/Unused.h"
#include "nsIUUIDGenerator.h"
#include "nsIArray.h"
+#include "mozilla/SpinEventLoopUntil.h" +#include "mozilla/SpinEventLoopUntil.h"
+#include "nsIProcess.h" +#include "nsIProcess.h"
+#include "mozilla/RandomNum.h" +#include "mozilla/RandomNum.h"
+#include "nsIServerSocket.h" +#include "nsIServerSocket.h"
+#include "nsIAsyncInputStream.h" +#include "nsIAsyncInputStream.h"
+#include "nsISocketTransport.h" +#include "nsISocketTransport.h"
+#include "nsIBinaryInputStream.h"
+#include "nsIObjectInputStream.h" +#include "nsIObjectInputStream.h"
+#include "nsDirectoryServiceDefs.h" +#include "nsDirectoryServiceDefs.h"
+
#define PORT_NOT_SET -1 #define PORT_NOT_SET -1
@@ -708,2 +717,218 @@ nsresult nsMsgIncomingServer::GetPasswor
@@ -707,12 +716,241 @@
return NS_OK;
}
+nsresult +nsresult
+nsMsgIncomingServer::GetPasswordCommand(nsTArray<nsString> &passwordCommand) { +nsMsgIncomingServer::GetPasswordCommand(nsTArray<nsString> &passwordCommand) {
+ nsAutoCString serializedCommand; + nsString serializedCommand;
+ +
+ nsresult rv = GetStringValue("passwordCommand", serializedCommand); + nsresult rv = GetUnicharValue("passwordCommand", serializedCommand);
+ NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, rv);
+ +
+ if (serializedCommand.Length() == 0) + if (serializedCommand.Length() == 0)
@ -191,8 +197,7 @@ diff -rp1 -u a/comm/mailnews/base/src/nsMsgIncomingServer.cpp b/comm/mailnews/ba
+ nsCOMPtr<nsIFile> executableFile = + nsCOMPtr<nsIFile> executableFile =
+ do_CreateInstance("@mozilla.org/file/local;1", &rv); + do_CreateInstance("@mozilla.org/file/local;1", &rv);
+ NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, rv);
+ rv = executableFile->InitWithPath(executable); + executableFile->InitWithPath(executable);
+ NS_ENSURE_SUCCESS(rv, rv);
+ +
+ nsCOMPtr<nsIProcess> process = + nsCOMPtr<nsIProcess> process =
+ do_CreateInstance("@mozilla.org/process/util;1", &rv); + do_CreateInstance("@mozilla.org/process/util;1", &rv);
@ -232,7 +237,10 @@ diff -rp1 -u a/comm/mailnews/base/src/nsMsgIncomingServer.cpp b/comm/mailnews/ba
+} +}
+ +
NS_IMETHODIMP NS_IMETHODIMP
@@ -714,2 +939,16 @@ nsMsgIncomingServer::GetPasswordWithUI(c nsMsgIncomingServer::GetPasswordWithUI(const nsAString& aPromptMessage,
const nsAString& aPromptTitle,
nsAString& aPassword) {
nsresult rv = NS_OK;
+ nsTArray<nsString> passwordCommand; + nsTArray<nsString> passwordCommand;
+ rv = GetPasswordCommand(passwordCommand); + rv = GetPasswordCommand(passwordCommand);
@ -249,12 +257,18 @@ diff -rp1 -u a/comm/mailnews/base/src/nsMsgIncomingServer.cpp b/comm/mailnews/ba
+ } + }
+ +
if (m_password.IsEmpty()) { if (m_password.IsEmpty()) {
diff -rp1 -u a/comm/mailnews/base/src/nsMsgIncomingServer.h b/comm/mailnews/base/src/nsMsgIncomingServer.h // let's see if we have the password in the password manager and
--- a/comm/mailnews/base/src/nsMsgIncomingServer.h 2025-07-21 18:15:26.000000000 +0200 // can avoid this prompting thing. This makes it easier to get embedders
+++ b/comm/mailnews/base/src/nsMsgIncomingServer.h 2025-08-24 19:21:59.609543392 +0200 diff -x __pycache__ -ru thunderbird-128.10.1/comm/mailnews/base/src/nsMsgIncomingServer.h thunderbird/thunderbird-128.10.1/comm/mailnews/base/src/nsMsgIncomingServer.h
@@ -50,2 +50,5 @@ class nsMsgIncomingServer : public nsIMs --- thunderbird-128.10.1/comm/mailnews/base/src/nsMsgIncomingServer.h 2025-05-13 15:22:25.000000000 +0200
+++ thunderbird/thunderbird-128.10.1/comm/mailnews/base/src/nsMsgIncomingServer.h 2025-08-19 12:39:19.236805257 +0200
@@ -48,6 +48,9 @@
nsCString m_serverKey;
bool m_hasShutDown;
+ nsresult GetPasswordCommand(nsTArray<nsString> &passwordCommand); + nsresult GetPasswordCommand(nsTArray<nsString> &passwordCommand);
+ nsresult RunPasswordCommand(nsTArray<nsString> &passwordCommand, nsAString& password); + nsresult RunPasswordCommand(nsTArray<nsString> &passwordCommand, nsAString& password);
+ +
// Sets m_password, if password found. Can return NS_ERROR_ABORT if the // Sets m_password, if password found. Can return NS_ERROR_ABORT if the
// user cancels the master password dialog.
nsresult GetPasswordWithoutUI();

View File

@ -13,7 +13,6 @@
./locale.nix ./locale.nix
./ssh.nix ./ssh.nix
./email.nix ./email.nix
./email-filters.nix
./git.nix ./git.nix
]; ];
@ -63,8 +62,6 @@
nano nano
wget wget
git git
tree
ripgrep
]; ];
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
@ -84,7 +81,7 @@
# networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether. # Or disable the firewall altogether.
networking.firewall.enable = false; # networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system # Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you # (/run/current-system/configuration.nix). This is useful in case you

View File

@ -1,282 +0,0 @@
{
config,
pkgs,
lib,
...
}:
let
filterToString = (
m: f:
if builtins.isString f then
"(${m},contains,${f})"
else if builtins.isList f then
"OR " + (lib.strings.concatStringsSep " OR " (builtins.map (filterToString m) f))
else
builtins.throw "Wrong filter content"
);
convertFilters = (
filz:
builtins.map (fil: {
enabled = true;
type = "17";
name = "Moving emails to folder " + fil.folder;
action = "Move to folder";
actionValue = "imap://mysaa%40hadoly.fr@imap.hadoly.fr/" + (fil.folderEscaped or fil.folder);
condition = filterToString (fil.matching or "all addresses") fil.email;
}) filz
);
restFilter = (
out: {
enabled = true;
type = "17";
name = "Moving other emails to " + out;
action = "Move to folder";
actionValue = "imap://mysaa%40hadoly.fr@imap.hadoly.fr/INBOX/" + out;
condition = "ALL";
}
);
rules = [
{
folder = "Assos/AliENS";
email = [
"aliens.discussion@ens-lyon.fr"
"aliens.discussion@listes.ens-lyon.fr"
"azertoutes@listes.ens-lyon.fr"
];
}
{
folder = "Assos/AliENS/CA";
email = [
"aliens.ca@ens-lyon.fr"
"aliens.ca@listes.ens-lyon.fr"
"aliens.contact@ens-lyon.fr"
"aliens.contact@listes.ens-lyon.fr"
];
}
{
folder = "Assos/BuL/Murders";
email = [
"bul.murder.decouverte@ens-lyon.fr"
"bul.murder.decouverte@listes.ens-lyon.fr"
"bul.murder@ens-lyon.fr"
"bul.murder@listes.ens-lyon.fr"
];
}
{
folder = "Assos/Démesures";
folderEscaped = "Assos/D&AOk-mesures";
email = [
"demesures@ens-lyon.fr"
"demesures@listes.ens-lyon.fr"
];
}
{
folder = "Assos/Diffs";
email = [
"fede.diffusion@ens-lyon.fr"
"fede.diffusion@listes.ens-lyon.fr"
"info.elus.etudiants@ens-lyon.fr"
"info.elus.etudiants@listes.ens-lyon.fr"
"bde.diffusion@ens-lyon.fr"
"bde.diffusion@listes.ens-lyon.fr"
"bul.diffusion@ens-lyon.fr"
"bul.diffusion@listes.ens-lyon.fr"
"enverts.diffusion@ens-lyon.fr"
"enverts.diffusion@listes.ens-lyon.fr"
"trensistor.diffusion@ens-lyon.fr"
"trensistor.diffusion@listes.ens-lyon.fr"
"aliens.diffusion@ens-lyon.fr"
"aliens.diffusion@listes.ens-lyon.fr"
"bde.foyer.diffusion@ens-lyon.fr"
"bde.foyer.diffusion@listes.ens-lyon.fr"
"bde.kfet.diffusion@ens-lyon.fr"
"bde.kfet.diffusion@listes.ens-lyon.fr"
"as-ensl@ens-lyon.fr"
"as-ensl@listes.ens-lyon.fr"
"bde.foyer@ens-lyon.fr"
"bde.foyer@listes.ens-lyon.fr"
"asset.diffusion@ens-lyon.fr"
"asset.diffusion@listes.ens-lyon.fr"
"echarde.diffusion@framalistes.org"
"echarde.membres@framalistes.org"
"enverts.enselle@ens-lyon.fr"
"enverts.enselle@listes.ens-lyon.fr"
"enverts.engraines.descartes@ens-lyon.fr"
"enverts.engraines.monod@listes.ens-lyon.fr"
"discourse+noreply@openstreetmap.fr"
"grrrndzero@grrrndzero.org"
"info@cinefac.fr"
"arcensiel.diffusion@ens-lyon.fr"
"arcensiel.diffusion@listes.ens-lyon.fr"
"bde.absurde@ens-lyon.fr"
"bde.absurde@listes.ens-lyon.fr"
"presences.diffusion@ens-lyon.fr"
"presences.diffusion@listes.ens-lyon.fr"
];
}
{
folder = "Assos/ENSeigner";
email = [
"enseigner.tuteurices@ens-lyon.fr"
"enseigner.tuteurices@listes.ens-lyon.fr"
];
}
{
folder = "Assos/ENvertS";
email = [
"enverts.bureau@ens-lyon.fr"
"enverts.bureau@listes.ens-lyon.fr"
];
}
{
folder = "Assos/ENvertS/Framavox";
email = [
"notifications@framavox.org"
];
}
{
folder = "Assos/Fédé";
folderEscaped = "Assos/F&AOk-d&AOk-";
email = [
"fede.ca@ens-lyon.fr"
"fede.ca@listes.ens-lyon.fr"
];
}
{
folder = "Assos/Fédé/Art Total";
folderEscaped = "Assos/F&AOk-d&AOk-/Art Total";
email = [
"fede.art-total@ens-lyon.fr"
"fede.art-total@listes.ens-lyon.fr"
];
}
{
folder = "Assos/Fédé/Bureau";
folderEscaped = "Assos/F&AOk-d&AOk-/Bureau";
email = [
"federation@ens-lyon.fr"
"federation@listes.ens-lyon.fr"
"fede.communications@ens-lyon.fr"
];
}
{
folder = "Assos/Fédé/Informatique";
folderEscaped = "Assos/F&AOk-d&AOk-/Informatique";
email = [
"fede.informatique@ens-lyon.fr"
"fede.informatique@listes.ens-lyon.fr"
];
}
{
folder = "Assos/Fédé/Juridique";
folderEscaped = "Assos/F&AOk-d&AOk-/Juridique";
email = [
"fede.juridique@ens-lyon.fr"
"fede.juridique@listes.ens-lyon.fr"
];
}
{
folder = "Assos/Modération";
folderEscaped = "Assos/Mod&AOk-ration";
email = [
"sympa@listes.ens-lyon.fr"
"sympa-request@listes.ens-lyon.fr"
];
}
{
folder = "Assos/Modération";
folderEscaped = "Assos/Mod&AOk-ration";
email = [
"sympa@listes.ens-lyon.fr"
];
matching = "\\\"reply-to\\\"";
}
{
folder = "Assos/tous-spam";
email = [
"tous.ens@ens-lyon.fr"
"tous.ens@listes.ens-lyon.fr"
"tous.culture@ens-lyon.fr"
"tous.culture@listes.ens-lyon.fr"
"tous.manifestations.scientifiques@ens-lyon.fr"
"tous.manifestations.scientifiques@listes.ens-lyon.fr"
"tous.etudiants@ens-lyon.fr"
"tous.etudiants@listes.ens-lyon.fr"
"tous.normaliens-eleves@ens-lyon.fr"
"tous.normaliens-eleves@listes.ens-lyon.fr"
"culture@ens-lyon.fr"
"culture@listes.ens-lyon.fr"
"information.patrimoine@ens-lyon.fr"
"information.patrimoine@listes.ens-lyon.fr"
"tous.transition.ecologique@ens-lyon.fr"
"tous.transition.ecologique@listes.ens-lyon.fr"
"manifestations.ife@ens-lyon.fr"
"manifestations.ife@listes.ens-lyon.fr"
"cercc@ens-lyon.fr"
"cercc@listes.ens-lyon.fr"
"info.syndicat.cgt@ens-lyon.fr"
"info.syndicat.cgt@listes.ens-lyon.fr"
"info.syndicat.sud@ens-lyon.fr"
"info.syndicat.sud@listes.ens-lyon.fr"
"info.syndicat.cfdt@ens-lyon.fr"
"info.syndicat.cfdt@listes.ens-lyon.fr"
"info.syndicat.snesup-fsu@ens-lyon.fr"
"info.syndicat.snesup-fsu@listes.ens-lyon.fr"
"info.syndicat.sud@ens-lyon.fr"
"info.syndicat.sud@listes.ens-lyon.fr"
"newsletter@national.lescrous.fr"
"infos@national.lescrous.fr"
];
}
{
folder = "Notif";
email = [
"nepasrepondre@credit-cooperatif.coop"
"noreply@github.com"
"no-reply@twitch.tv"
"ne_pas_repondre@sfr.fr"
"expiry@letsencrypt.org"
"info@mail.sncfconnect.com"
"service@paypal.fr"
"purchase-noreply@twitch.tv"
"no-reply@doctolib.fr"
"no-reply@canva.com"
"notifications@transifex.com"
"ne-pas-repondre@inscriptionelectorale.service-public.fr"
"noreply@steampowered.com"
"noreply@connect.sncf"
"no-reply@spotify.com"
"messagerie.leboncoin.fr"
"no.reply@leboncoin.fr"
"nepasrepondre-filesender@renater.fr"
"gitlab@aliens-lyon.fr"
"postman@ulule.com"
"no-reply@accounts.google.com"
"notifications@discord.com"
"help@acct.epicgames.com"
"no-reply+framateam@framasoft.org"
];
}
{
folder = "Etudes";
email = [
"types-announce@lists.seas.upenn.edu"
"types-announce@LISTS.SEAS.UPENN.EDU"
"categories@mq.edu.au"
"ice@framalistes.org"
"cashreadinggroup@listes.ens-lyon.fr"
];
}
];
in
{
home-manager.users.mysaa.accounts.email.accounts = {
personal.thunderbird.messageFilters = convertFilters rules ++ [ (restFilter "s@nc") ];
ens.thunderbird.messageFilters = convertFilters rules ++ [ (restFilter "ENS-Lyon") ];
junk.thunderbird.messageFilters = convertFilters rules ++ [ (restFilter "q@nc") ];
google.thunderbird.messageFilters = convertFilters rules ++ [ (restFilter "Google") ];
ecloud.thunderbird.messageFilters = convertFilters rules ++ [ (restFilter "ECloud") ];
hadoly.thunderbird.messageFilters = [ (restFilter "Hadoly") ];
};
}

View File

@ -29,19 +29,6 @@
ens = { ens = {
address = "samy.avrillon@ens-lyon.fr"; address = "samy.avrillon@ens-lyon.fr";
realName = "Samy Avrillon";
imap = {
host = "imaps.ens-lyon.fr";
port = 993;
tls.enable = true;
};
smtp = {
host = "smtp.ens-lyon.fr";
port = 587;
tls.enable = true;
tls.useStartTls = true;
};
userName = "savrillo";
}; };
personal = { personal = {
@ -63,80 +50,10 @@
junk = { junk = {
address = "qqnavrillon@netcourrier.com"; address = "qqnavrillon@netcourrier.com";
realName = "Qqn Avrillon";
imap = {
host = "mail.mailo.com";
port = 993;
tls.enable = true;
};
smtp = {
host = "mail.mailo.com";
port = 465;
tls.enable = true;
};
userName = "qqnavrillon@netcourrier.com";
}; };
google = { google = {
address = "samsouleavr@gmail.com"; address = "samsouleavr@gmail.com";
realName = "Samsoule Avr";
imap = {
host = "imap.gmail.com";
port = 993;
tls.enable = true;
};
smtp = {
host = "smtp.gmail.com";
port = 587;
tls.enable = true;
};
userName = "samsouleavr@gmail.com";
};
bernard = {
address = "bernard.lafayette63@gmail.com";
realName = "Bernard Lafayette";
imap = {
host = "imap.gmail.com";
port = 993;
tls.enable = true;
};
smtp = {
host = "imap.gmail.com";
port = 465;
tls.enable = true;
};
userName = "bernard.lafayette63@gmail.com";
};
dmesures = {
address = "samy.avrillon@dmesures.eu";
realName = "Samy pour Démesures";
imap = {
host = "mail.deady.space";
port = 993;
tls.enable = true;
};
smtp = {
host = "mail.deady.space";
port = 465;
tls.enable = true;
};
userName = "samy.avrillon@dmesures.eu";
};
ecloud = {
address = "mysaa@e.email";
realName = "Mysaa Java";
imap = {
host = "mail.ecloud.global";
port = 993;
tls.enable = true;
};
smtp = {
host = "mail.ecloud.global";
port = 587;
tls.enable = true;
tls.useStartTls = true;
};
userName = "mysaa@e.email";
}; };
}; };

View File

@ -16,12 +16,6 @@
aliases = { aliases = {
l = "log --oneline --graph"; l = "log --oneline --graph";
}; };
extraConfig = {
init.defaultBranch = "main";
# TODO remove that, as it is a fix of https://github.com/input-output-hk/haskell.nix/issues/2214 but for coq-nix-toolbox
safe.directory = "*";
};
}; };
} }

View File

@ -8,21 +8,6 @@
{ {
# Select internationalisation properties. # Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
# Optionally
i18n.extraLocaleSettings = {
LC_CTYPE = "en_US.UTF8";
LC_ADDRESS = "fr_FR.UTF-8";
LC_MEASUREMENT = "fr_FR.UTF-8";
LC_MESSAGES = "en_US.UTF-8";
LC_MONETARY = "fr_FR.UTF-8";
LC_NAME = "fr_FR.UTF-8";
LC_NUMERIC = "fr_FR.UTF-8";
LC_PAPER = "fr_FR.UTF-8";
LC_TELEPHONE = "fr_FR.UTF-8";
LC_TIME = "fr_FR.UTF-8";
LC_COLLATE = "fr_FR.UTF-8";
};
console.keyMap = "fr-bepo"; console.keyMap = "fr-bepo";
i18n.inputMethod = { i18n.inputMethod = {

View File

@ -2,7 +2,7 @@
eduroam-IPv6only = { eduroam-IPv6only = {
"802-1x" = { "802-1x" = {
anonymous-identity = "anonymous@ens-lyon.fr"; anonymous-identity = "anonymous@ens-lyon.fr";
ca-cert = "/etc/ssl/certs/ca-certificates.crt"; ca-cert = "/usr/share/ca-certificates/mozilla/USERTrust_RSA_Certification_Authority.crt";
domain-suffix-match = "ens-lyon.fr"; domain-suffix-match = "ens-lyon.fr";
eap = "peap"; eap = "peap";
identity = "savrillo@ens-lyon.fr"; identity = "savrillo@ens-lyon.fr";
@ -37,7 +37,7 @@
eduroam = { eduroam = {
"802-1x" = { "802-1x" = {
anonymous-identity = "anonymous@ens-lyon.fr"; anonymous-identity = "anonymous@ens-lyon.fr";
ca-cert = "/etc/ssl/certs/ca-certificates.crt"; ca-cert = "/etc/ssl/certs/USERTrust_RSA_Certification_Authority.pem";
domain-suffix-match = "ens-lyon.fr"; domain-suffix-match = "ens-lyon.fr";
eap = "peap"; eap = "peap";
identity = "savrillo@ens-lyon.fr"; identity = "savrillo@ens-lyon.fr";

View File

@ -31,21 +31,6 @@
Port 6962 Port 6962
ConnectTimeout 10 ConnectTimeout 10
AddressFamily inet AddressFamily inet
Host gitlab.aliens-lyon.fr
HostName gitlab.aliens-lyon.fr
User savrillo
IdentityFile /run/secrets/ssh/savrillo@gitlab.ens-lyon.fr
Host teapot
HostName teapot.ens-lyon.fr
User enverts
IdentityFile /run/secrets/ssh/enverts@teapot.ens-lyon.fr
Host gitlab.inria.fr
HostName gitlab.inria.fr
User savrillo
IdentityFile /run/secrets/ssh/savrillo@gitlab.inria.fr
''; '';
}; };

View File

@ -1,80 +0,0 @@
import mailbox
import sys
from imap_tools import A, MailBox
from datetime import date
import os
MDloc = "/home/mysaa/Globox"
MD = mailbox.Maildir(MDloc)
# firstDate = '"1-Sept-2025"'
firstDate = date(day=1, month=9, year=2025)
def parseFolder(folderString):
if folderString[0] == 34: # Double quote
folderString = folderString[1:-1]
folderz = (
folderString.replace(b"&", b"+")
.replace(b",", b"/")
.decode("utf-7")
.split(".")
)
return folderz
def sbdify(name):
if name == "INBOX":
return "Inbox.sbd" # I have no idea why thunderbird uncapitalizes this
return name + ".sbd"
password = sys.argv[1].strip()
with MailBox("imap.hadoly.fr", 993).login("mysaa@hadoly.fr", password) as M:
folders = []
folderzz = []
folderToFolderz = dict()
for f in M.folder.list():
folders.append(f)
print(f)
mdfolders = {"": MD}
folders = sorted(folders, key=lambda f: f.name.count(f.delim))
for f in folders:
print("Checking folder", f)
ff = f.name.split(f.delim)
folderPath = os.path.join(MDloc, *[sbdify(s) for s in ff[:-1]], ff[-1])
if os.path.exists(folderPath):
print("Already exists")
else:
print("Creating the folder", folderPath)
os.makedirs(folderPath)
os.mkdir(os.path.join(folderPath, "tmp"))
os.mkdir(os.path.join(folderPath, "cur"))
mdf = mailbox.Maildir(folderPath, create=True)
mdfolders[f.name] = mdf
print("Now filling the emails")
for f in folders:
mdfolder = mdfolders[f.name]
M.folder.set(f.name)
uids = M.uids(
A(date_lt=firstDate, seen=True, flagged=False, draft=False)
)
print(
"Moving",
len(uids),
"from folder",
f.name,
"out of",
len(M.uids(A(all=True))),
)
for u in uids:
msg = next(M.fetch(A(uid=u)))
msg = mailbox.MaildirMessage(msg.obj.as_bytes())
msg.set_subdir("cur")
msg.set_flags("S")
mdfolder.add(msg)
# Then remove the message
M.delete(u)

View File

@ -10,9 +10,7 @@
{ {
imports = [ imports = [
../basic ../basic
./kde.nix
./packages.nix ./packages.nix
./thunderbird.nix
]; ];
# Enable the X11 windowing system. # Enable the X11 windowing system.

View File

@ -1,31 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
environment.plasma6.excludePackages = with pkgs.kdePackages; [
elisa
];
home-manager.users.mysaa.home.file.".config/kdeglobals".text = lib.generators.toINI { } {
KDE = {
SingleClick = true;
};
};
home-manager.users.mysaa.services.kdeconnect.enable = true;
# We open kdeconnect ports
networking.firewall = rec {
allowedTCPPortRanges = [
{
from = 1714;
to = 1764;
}
];
allowedUDPPortRanges = allowedTCPPortRanges;
};
}

View File

@ -4,24 +4,16 @@
pkgs, pkgs,
... ...
}: }:
let
clean-nixos-git-check-script = pkgs.writers.writeBash "clean-nixos-git-check" ''
if [ -z "$(${pkgs.git}/bin/git -C /etc/nixos status -u --porcelain)" ]
then
echo "/etc/nixos is clean !"
exit 0
else
${pkgs.zenity}/bin/zenity --info --text="/etc/nixos/ is not clean, don't forget to commit !"
exit 0
fi
'';
in
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
discord discord
]; ];
environment.plasma6.excludePackages = with pkgs.kdePackages; [
elisa
];
home-manager.users.mysaa.home.packages = with pkgs; [ home-manager.users.mysaa.home.packages = with pkgs; [
firefox firefox
vlc vlc
@ -35,86 +27,64 @@ in
edwinkofler.vscode-hyperupcall-pack-java edwinkofler.vscode-hyperupcall-pack-java
]; ];
}) })
keepassxc
libreoffice libreoffice
#hyphenDicts.fr_FR #hyphenDicts.fr_FR
hyphenDicts.en_US hyphenDicts.en_US
hyphenDicts.de_DE hyphenDicts.de_DE
heroic
spotify
kdiff3
pdfarranger
anki-bin # Register addons here (and login to anki-server)
]; ];
programs.steam.enable = true; programs.steam.enable = true;
home-manager.users.mysaa.programs.keepassxc.enable = true; home-manager.users.mysaa.services.kdeconnect.enable = true;
home-manager.users.mysaa.programs.keepassxc.settings = { # We open kdeconnect ports
General.NumberOfRememberedLastDatabases = 1; networking.firewall = rec {
General.UseAtomicSaves = false; allowedTCPPortRanges = [
Browser.Enabled = true; {
Browser.AlwaysAllowAccess = true; from = 1714;
Browser.MatchUrlScheme = false; to = 1764;
GUI.MinimizeOnStartup = true; }
GUI.ShowExpiredEntriesOnDatabaseUnlock = false; ];
PasswordGenerator.Length = 24; allowedUDPPortRanges = allowedTCPPortRanges;
}; };
virtualisation.virtualbox.host.enable = true; home-manager.users.mysaa.accounts.email.accounts."hadoly".thunderbird.enable = true;
users.extraGroups.vboxusers.members = [ "mysaa" ]; home-manager.users.mysaa.accounts.email.accounts."personal".thunderbird.enable = true;
home-manager.users.mysaa.programs.thunderbird = {
virtualisation.virtualbox.host.enableKvm = true; enable = true;
virtualisation.virtualbox.host.addNetworkInterface = false; profiles.default = {
isDefault = true;
home-manager.users.mysaa.systemd.user.services.heroic-launcher = { settings =
Unit = { { }
Description = "Launching the heroic game launcher"; // lib.attrsets.concatMapAttrs (
After = "network.target"; _: account:
}; lib.optionalAttrs (account.passwordCommand != null) (
Service = { let
Type = "simple"; id = builtins.hashString "sha256" account.name;
ExecStart = "${pkgs.heroic}/bin/heroic"; command = lib.concatStringsSep " " account.passwordCommand;
}; passwordScript = pkgs.writeShellScript "get-password.sh" ''
}; ${command} | tr -d $'\n' | ${pkgs.netcat}/bin/nc -w 0 -U $1
'';
home-manager.users.mysaa.systemd.user.timers.weekly-heroic-launcher = { in
Unit = { lib.optionalAttrs (account.smtp != null) {
Description = "Run the heroic game launcher weekly for downloading the free game"; "mail.smtpserver.smtp_${id}.passwordCommand" = toString passwordScript;
}; }
Timer = { // lib.optionalAttrs (account.imap != null) {
OnCalendar = "Mon *-*-* 08:00:00 Europe/Paris"; "mail.server.server_${id}.passwordCommand" = toString passwordScript;
Persistent = "true"; }
Unit = "heroic-launcher.service"; )
}; ) config.home-manager.users.mysaa.accounts.email.accounts;
Install = { };
WantedBy = [ "timers.target" ]; };
};
}; home-manager.users.mysaa.nixpkgs.overlays = [
(final: prev: {
home-manager.users.mysaa.systemd.user = { thunderbird-unwrapped = prev.thunderbird-unwrapped.overrideAttrs {
services.check-nixos-git-clean = { patches = (prev.thunderbird-unwrapped.patches or [ ]) ++ [
Unit = { ../../packages/add_passwordcommand_smtp.patch
Description = "Sends a notification if /etc/nixos is not clean"; ../../packages/add_passwordcommand_imap.patch
}; ];
Service = { };
Type = "oneshot"; })
ExecStart = "${clean-nixos-git-check-script}"; ];
};
};
timers.check-nixos-git-clean = {
Unit = {
Description = "Bi-hourly reminder that /etc/nixos should be clean";
};
Timer = {
OnBootSec = "5min";
OnUnitActiveSec = "30min";
Persistent = "true";
Unit = "check-nixos-git-clean.service";
};
Install = {
WantedBy = [ "timers.target" ];
};
};
};
} }

View File

@ -1,117 +0,0 @@
{
config,
lib,
pkgs,
...
}:
let
globox-id = "b446944a47d39ae969ebe27f81cf2d8963df7a04dd40e31e61c7c2ecc1ac7437";
archiver = pkgs.writers.writePython3 "mail-archiver" {
libraries = with pkgs.python3Packages; [ imap-tools ];
} (builtins.readFile ./archiver.py);
in
{
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;
package = pkgs.thunderbird.override {
extraPolicies.ExtensionSettings = {
"localfolder@philoux.eu" = {
install_url = "https://addons.thunderbird.net/user-media/addons/_attachments/90003/localfolders-4.2.2-tb.xpi?filehash=sha256%3A71d499b55b360769447e9f08536ee557b0419e84d5914e79c18558d86a21fbd9";
installation_mode = "force_installed";
};
};
};
profiles.default = {
isDefault = true;
accountsOrder = [
"hadoly"
"dmesures"
"bernard"
"ens"
"account_${globox-id}"
"personal"
"junk"
"ecloud"
"google"
];
settings = {
"mail.account.account_${globox-id}.server" = "server_${globox-id}";
"mail.server.server_${globox-id}.directory" = "/home/mysaa/Globox";
#user_pref("mail.server.server1.directory-rel", "[ProfD]../../../Globox");
"mail.server.server_${globox-id}.hostname" = "globox";
"mail.server.server_${globox-id}.name" = "globox";
"mail.server.server_${globox-id}.storeContractID" = "@mozilla.org/msgstore/maildirstore;1";
"mail.server.server_${globox-id}.type" = "none";
"mail.server.server_${globox-id}.userName" = "nobody";
}
// 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.systemd.user = {
services.mail-archiver = {
Unit = {
Description = "Archives emails from Hadoly account to Globox";
};
Service = {
Type = "oneshot";
ExecStart = "${archiver} $(cat /run/secrets/pass/hadoly_password)";
};
};
timers.mail-archiver = {
Unit = {
Description = "Weekly archiving of emails";
};
Timer = {
OnCalendar = "Tue *-*-* 13:00:00";
Persistent = "true";
Unit = "mail-archiver.service";
};
Install = {
WantedBy = [ "timers.target" ];
};
};
};
}