Compare commits

..

3 Commits

Author SHA1 Message Date
d1dd741f05 Put my two email addresses 2025-08-15 22:11:32 +02:00
0b5ca6c6be Added usb key to unlock drive 2025-08-15 15:07:35 +02:00
0ee21f2e5d Updated nixpkgs 2025-08-14 23:41:38 +02:00
7 changed files with 112 additions and 12 deletions

18
flake.lock generated
View File

@ -25,11 +25,11 @@
]
},
"locked": {
"lastModified": 1746171682,
"narHash": "sha256-EyXUNSa+H+YvGVuQJP1nZskXAowxKYp79RNUsNdQTj4=",
"lastModified": 1747688870,
"narHash": "sha256-ypL9WAZfmJr5V70jEVzqGjjQzF0uCkz+AFQF7n9NmNc=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "50eee705bbdbac942074a8c120e8194185633675",
"rev": "d5f1f641b289553927b3801580598d200a501863",
"type": "github"
},
"original": {
@ -47,11 +47,11 @@
]
},
"locked": {
"lastModified": 1745546092,
"narHash": "sha256-Q4vPpbuoJOBXRdGW7ZRqlFq1x4FfWKmfyxSVRQZFNCM=",
"lastModified": 1755137362,
"narHash": "sha256-3e/S+Q9InEZ+W1YxjrfjkuVz49IsF2vJZx7Id22RCkY=",
"owner": "nix-community",
"repo": "nix-vscode-extensions",
"rev": "baeaec5a10fb8626bea64ebabdfaecdf64832bf3",
"rev": "547b299dd5b8ddccf948ff6728d7ec547eee4e02",
"type": "github"
},
"original": {
@ -62,11 +62,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1745487689,
"narHash": "sha256-FQoi3R0NjQeBAsEOo49b5tbDPcJSMWc3QhhaIi9eddw=",
"lastModified": 1751274312,
"narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5630cf13cceac06cefe9fc607e8dfa8fb342dde3",
"rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674",
"type": "github"
},
"original": {

View File

@ -21,9 +21,17 @@
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.initrd.luks.devices.cryptroot.device =
"/dev/disk/by-uuid/c75f2769-d32f-4eed-9237-ece7e783fec3";
boot.initrd.kernelModules = [ "dm-snapshot" "uas" "usbcore" "usb_storage" "ext4" "nls_cp437" "nls_iso8859_1"];
boot.initrd.postDeviceCommands = pkgs.lib.mkBefore ''
mkdir -m 0755 -p /run/secrets/
sleep 2
mount -n -t ext4 -o ro `findfs UUID=545bfd15-0973-4395-9d05-6c4c78a9e45c` /run/secrets/
'';
boot.initrd.luks.devices.cryptroot = {
device = "/dev/disk/by-uuid/c75f2769-d32f-4eed-9237-ece7e783fec3";
keyFile = "/run/secrets/polysaa-drive.key";
preLVM = false;
};
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.loader.systemd-boot.enable = true;

View File

@ -9,7 +9,10 @@
}:
{
imports = [
./secrets.nix
./locale.nix
./ssh.nix
./email.nix
];
nix.settings.experimental-features = [

54
profiles/basic/email.nix Normal file
View File

@ -0,0 +1,54 @@
{config, lib, pkgs, sops, ...}: {
home-manager.users.mysaa.accounts.email.accounts = {
hadoly = {
realName = "Mysaa Java";
address = "mysaa@hadoly.fr";
imap = {
host = "imap.hadoly.fr";
port = 993;
tls.enable = true;
};
smtp = {
host = "smtp.hadoly.fr";
port = 443;
tls.enable = true;
};
primary = true;
userName = "mysaa@hadoly.fr";
passwordCommand = ''cat /run/secrets/pass/hadoly_password'';
};
ens = {
address = "samy.avrillon@ens-lyon.fr";
};
personal = {
address = "samyavrillon@netcourrier.com";
realName = "Samy Avrillon";
imap = {
host = "mail.mailo.com";
port = 993;
tls.enable = true;
};
smtp = {
host = "mail.mailo.com";
port = 443;
tls.enable = true;
};
userName = "samyavrillon@netcourrier.com";
passwordCommand = ''cat /run/secrets/pass/netcourrier_password'';
};
junk = {
address = "qqnavrillon@netcourrier.com";
};
google = {
address = "samsouleavr@gmail.com";
};
};
}

View File

@ -0,0 +1,9 @@
{config, lib, pkgs, ...}: {
fileSystems."/run/secrets" = {
device = "/dev/disk/by-uuid/545bfd15-0973-4395-9d05-6c4c78a9e45c";
fsType = "ext4";
options = ["nofail" "noauto" "ro" "x-systemd.automount"];
};
}

12
profiles/basic/ssh.nix Normal file
View File

@ -0,0 +1,12 @@
{config, lib, pkgs, ...}: {
programs.ssh = {
extraConfig = "
Host git-ssh.hadoly.fr
Hostname git-ssh.hadoly.fr
IdentityFile /run/secrets/ssh/mysaa@git.hadoly.fr
Port 6900
";
};
}

View File

@ -5,6 +5,11 @@
...
}:
{
environment.systemPackages = with pkgs; [
discord
];
home-manager.users.mysaa.home.packages = with pkgs; [
firefox
vlc
@ -19,4 +24,13 @@
];
})
];
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;
};
};
}