nixos-configs/common.nix

88 lines
1.9 KiB
Nix
Raw Permalink Normal View History

2024-08-20 22:58:24 +02:00
{
inputs,
lib,
pkgs,
...
}:
2023-03-20 22:35:11 +01:00
2024-08-20 22:58:24 +02:00
{
imports = [
inputs.home-manager.nixosModules.home-manager
2025-08-26 15:46:52 +02:00
]
++ (lib.my.mapModulesRec' (toString ./modules) import);
2023-03-20 22:35:11 +01:00
nix = {
2024-12-16 21:00:23 +01:00
package = pkgs.nixVersions.stable;
2023-03-20 22:35:11 +01:00
extraOptions = "experimental-features = nix-command flakes";
2024-10-13 22:52:21 +02:00
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
2023-03-20 22:35:11 +01:00
settings = {
substituters = [
"https://nix-community.cachix.org"
"https://cache.nixos.org/"
2025-08-26 15:46:52 +02:00
"https://devenv.cachix.org"
2025-09-09 16:27:22 +02:00
# "ssh://nix-ssh@hel1.banditlair.com"
2023-03-20 22:35:11 +01:00
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
2025-08-26 15:46:52 +02:00
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
"hel1.banditlair.com:stzB4xe5QTFvSABoP11ZpNzLDCRZ93PExk0Z/gOzW3g="
2023-03-20 22:35:11 +01:00
];
auto-optimise-store = true;
};
2025-08-28 23:16:53 +02:00
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
persistent = true;
};
2023-03-20 22:35:11 +01:00
};
2023-03-21 10:37:27 +01:00
2024-08-20 22:58:24 +02:00
system.configurationRevision = lib.mkIf (inputs.self ? rev) inputs.self.rev;
2023-03-20 22:35:11 +01:00
2024-08-20 22:58:24 +02:00
time.timeZone = lib.mkDefault "Europe/Amsterdam";
2023-03-21 10:37:27 +01:00
2024-08-20 22:58:24 +02:00
i18n.defaultLocale = lib.mkDefault "en_US.UTF-8";
2023-03-21 10:37:27 +01:00
2025-09-09 01:40:56 +02:00
zramSwap.enable = true;
zramSwap.memoryPercent = 300;
systemd.oomd.enable = true;
2023-06-10 09:50:14 +02:00
console = {
keyMap = lib.mkDefault "fr";
2024-08-20 22:58:24 +02:00
font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz";
2023-06-10 09:50:14 +02:00
earlySetup = true;
};
2024-08-20 22:58:24 +02:00
fonts.fontconfig.antialias = lib.mkDefault true;
2023-06-10 09:50:14 +02:00
fonts.fontconfig.subpixel = {
2024-08-20 22:58:24 +02:00
rgba = lib.mkDefault "none";
lcdfilter = lib.mkDefault "none";
2023-06-10 09:50:14 +02:00
};
2023-03-21 10:37:27 +01:00
2023-03-20 22:35:11 +01:00
environment.systemPackages = with pkgs; [
git
vim
2023-03-21 14:42:39 +01:00
wget
inetutils
man
2024-02-25 17:56:09 +01:00
htop-vim
2023-03-21 14:42:39 +01:00
ncdu
nload
pciutils
lsof
dnsutils
unzip
2023-03-20 22:35:11 +01:00
];
2023-03-21 14:42:39 +01:00
networking.hosts = {
2024-08-20 22:58:24 +02:00
"127.0.0.1" = [
"localhost"
"membres.yourcoop.local"
];
2023-03-21 14:42:39 +01:00
};
services.resolved.dnssec = "false";
2023-03-20 22:35:11 +01:00
}