Added a new host, a lightweight config

This commit is contained in:
Alexandre1a 2026-01-14 19:06:18 +01:00
parent 4c1cdeefb2
commit c890bb46da
No known key found for this signature in database
GPG Key ID: CE01C28FBC5EEF10
5 changed files with 42 additions and 45 deletions

6
hosts/common/modules.nix Normal file
View File

@ -0,0 +1,6 @@
{
imports = [
../../modules/common/nix.nix
../../modules/nixos/locale.nix
];
}

View File

@ -0,0 +1,7 @@
{ pkg, config, ... }:
{
imports = [
./modules.nix
];
}

View File

@ -62,24 +62,7 @@
# Enable required settings # Enable required settings
# TouchID login # TouchID login
security.pam.services.sudo_local.touchIdAuth = true; security.pam.services.sudo_local.touchIdAuth = true;
# Flakes
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
"https://hyprland.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
};
};
# Target arch # Target arch
nixpkgs = { nixpkgs = {
hostPlatform = "aarch64-darwin"; hostPlatform = "aarch64-darwin";

View File

@ -18,33 +18,6 @@
networking.hostName = "nixos"; # Define your hostname. networking.hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Enable Flakes
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
# Limit resource usage to prevent OOM kill
max-jobs = 2;
cores = 4;
# Prevent hanging builds
max-silent-time = 3600;
timeout = 1800;
# Package caches
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
"https://hyprland.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
};
};
# Enables SDDM # Enables SDDM
services = { services = {

28
modules/common/nix.nix Normal file
View File

@ -0,0 +1,28 @@
{ config, ... }:
{
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
# Limit resource usage to prevent Linux OOM
max-jobs = 2;
cores = 4;
max-silent-time = 3600;
timeout = 1800;
# Package caches
substituters = [
"https://cache.nixos.org";
"https://nix-community.cachix.org"
"https://hyprland.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
};
};
}