mirror of
https://github.com/Alexandre1a/NixOSDots.git
synced 2026-03-10 00:09:46 +01:00
Added a new host, a lightweight config
This commit is contained in:
parent
4c1cdeefb2
commit
c890bb46da
6
hosts/common/modules.nix
Normal file
6
hosts/common/modules.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
../../modules/common/nix.nix
|
||||
../../modules/nixos/locale.nix
|
||||
];
|
||||
}
|
||||
7
hosts/light/configuration.nix
Normal file
7
hosts/light/configuration.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{ pkg, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./modules.nix
|
||||
];
|
||||
|
||||
}
|
||||
@ -62,24 +62,7 @@
|
||||
# Enable required settings
|
||||
# TouchID login
|
||||
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
|
||||
nixpkgs = {
|
||||
hostPlatform = "aarch64-darwin";
|
||||
|
||||
@ -18,33 +18,6 @@
|
||||
networking.hostName = "nixos"; # Define your hostname.
|
||||
# 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
|
||||
services = {
|
||||
|
||||
28
modules/common/nix.nix
Normal file
28
modules/common/nix.nix
Normal 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="
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user