77 lines
2.1 KiB
Nix
77 lines
2.1 KiB
Nix
# Socle commun à toutes les machines de la flotte (repo public).
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
# Toutes les machines de la flotte portent le même nom : pas
|
|
# d'identification individuelle pour l'instant (voir README du repo
|
|
# racine). À revoir plus tard via le numéro de série DMI si un vrai
|
|
# besoin d'identification apparaît.
|
|
networking.hostName = "Nixos_Fleet";
|
|
networking.networkmanager.enable = true;
|
|
|
|
time.timeZone = "Europe/Paris";
|
|
i18n.defaultLocale = "fr_FR.UTF-8";
|
|
i18n.extraLocaleSettings = {
|
|
LC_ADDRESS = "fr_FR.UTF-8";
|
|
LC_IDENTIFICATION = "fr_FR.UTF-8";
|
|
LC_MEASUREMENT = "fr_FR.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";
|
|
};
|
|
services.xserver.xkb = {
|
|
layout = "fr";
|
|
variant = "";
|
|
};
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
boot.loader.systemd-boot.configurationLimit = 10;
|
|
|
|
services.openssh.enable = true;
|
|
networking.firewall.enable = true;
|
|
|
|
# Certains PC du parc n'ont que 4 Go de RAM (Cinnamon + Firefox +
|
|
# LibreOffice + VLC peuvent solliciter la mémoire) — swap compressé en
|
|
# RAM, marche identiquement quelle que soit la machine.
|
|
zramSwap = {
|
|
enable = true;
|
|
memoryPercent = 50;
|
|
};
|
|
|
|
nix.settings.experimental-features = [
|
|
"nix-command"
|
|
"flakes"
|
|
];
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
nix.gc = {
|
|
automatic = true;
|
|
dates = "weekly";
|
|
options = "--delete-older-than 30d";
|
|
};
|
|
|
|
# Convergence : chaque machine de la flotte tire ses mises à jour du
|
|
# même repo public, sans intervention humaine (pas de netrc nécessaire
|
|
# ici, contrairement au repo nixos_users). Voir README pour adapter
|
|
# l'URL réelle du repo.
|
|
system.autoUpgrade = {
|
|
enable = true;
|
|
dates = "daily";
|
|
flake = "git+https://gitea.miniclic.net/Damien/Nixos_Fleet.git#usagers";
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
git
|
|
curl
|
|
wget
|
|
htop
|
|
nixfmt
|
|
];
|
|
|
|
system.stateVersion = "26.05";
|
|
}
|