Compare commits

...

4 Commits

16 changed files with 828 additions and 100 deletions

66
flake.lock generated
View File

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

View File

@ -2,13 +2,19 @@
description = "My common nixos system";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.url = "github:nix-community/home-manager/release-25.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
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 =
@ -19,7 +25,11 @@
mkNixosSystems = lib.mapAttrs (
name: modules:
lib.nixosSystem {
modules = modules ++ [
modules = [
inputs.musnix.nixosModules.musnix
]
++ modules
++ [
{
imports = [ (import "${inputs.home-manager}/nixos") ];
networking.hostName = name;
@ -31,7 +41,20 @@
);
in
{
formatter.x86_64-linux = inputs.nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
formatter.x86_64-linux =
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 {
polysaa = [

View File

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

View File

@ -13,6 +13,7 @@
./locale.nix
./ssh.nix
./email.nix
./email-filters.nix
./git.nix
];
@ -62,6 +63,8 @@
nano
wget
git
tree
ripgrep
];
# Some programs need SUID wrappers, can be configured further or are
@ -81,7 +84,7 @@
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# 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
# (/run/current-system/configuration.nix). This is useful in case you

View File

@ -0,0 +1,282 @@
{
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,6 +29,19 @@
ens = {
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 = {
@ -50,10 +63,80 @@
junk = {
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 = {
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,6 +16,12 @@
aliases = {
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,6 +8,21 @@
{
# Select internationalisation properties.
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";
i18n.inputMethod = {

View File

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

View File

@ -31,6 +31,21 @@
Port 6962
ConnectTimeout 10
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

@ -0,0 +1,80 @@
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,7 +10,9 @@
{
imports = [
../basic
./kde.nix
./packages.nix
./thunderbird.nix
];
# Enable the X11 windowing system.

View File

@ -0,0 +1,31 @@
{
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,16 +4,24 @@
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; [
discord
];
environment.plasma6.excludePackages = with pkgs.kdePackages; [
elisa
];
home-manager.users.mysaa.home.packages = with pkgs; [
firefox
vlc
@ -27,64 +35,86 @@
edwinkofler.vscode-hyperupcall-pack-java
];
})
keepassxc
libreoffice
#hyphenDicts.fr_FR
hyphenDicts.en_US
hyphenDicts.de_DE
heroic
spotify
kdiff3
pdfarranger
anki-bin # Register addons here (and login to anki-server)
];
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.programs.keepassxc.enable = true;
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;
};
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;
virtualisation.virtualbox.host.enable = true;
users.extraGroups.vboxusers.members = [ "mysaa" ];
virtualisation.virtualbox.host.enableKvm = true;
virtualisation.virtualbox.host.addNetworkInterface = false;
home-manager.users.mysaa.systemd.user.services.heroic-launcher = {
Unit = {
Description = "Launching the heroic game launcher";
After = "network.target";
};
Service = {
Type = "simple";
ExecStart = "${pkgs.heroic}/bin/heroic";
};
};
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.timers.weekly-heroic-launcher = {
Unit = {
Description = "Run the heroic game launcher weekly for downloading the free game";
};
Timer = {
OnCalendar = "Mon *-*-* 08:00:00 Europe/Paris";
Persistent = "true";
Unit = "heroic-launcher.service";
};
Install = {
WantedBy = [ "timers.target" ];
};
};
home-manager.users.mysaa.systemd.user = {
services.check-nixos-git-clean = {
Unit = {
Description = "Sends a notification if /etc/nixos is not clean";
};
})
];
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

@ -0,0 +1,117 @@
{
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" ];
};
};
};
}