Unified home and system modules!

This commit is contained in:
marc
2022-11-19 11:58:21 +01:00
parent cfcc374a69
commit 890b05d352
45 changed files with 389 additions and 566 deletions

62
modules/common.nix Normal file
View File

@@ -0,0 +1,62 @@
# Common module
# -------------
# All configuration common to ANY host is located here.
# General configuration and "bare minimum" tools
{ config, pkgs, lib, ... }:
{
# - Nix ----------------------------------------
system.stateVersion = "22.05";
nix = {
package = pkgs.nixFlakes;
extraOptions = lib.optionalString (config.nix.package == pkgs.nixFlakes)
"experimental-features = nix-command flakes";
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 14d";
};
};
# - Locale -------------------------------------
time.timeZone = "Europe/Madrid";
i18n.defaultLocale = "ca_ES.utf8";
console.keyMap = "es";
services.xserver = {
layout = "es";
xkbVariant = "cat";
};
# - Packages -----------------------------------
environment.pathsToLink = [ "/libexec" ];
environment.systemPackages = with pkgs; [
curl
git
htop
pciutils
psmisc
vim
];
# - Modules ------------------------------------
networking.networkmanager.enable = true;
samfelag.modules = {
shell.utils.enable = true;
shell.zsh.enable = true;
dev.git.enable = true;
# May go away from common if not all hosts use it
system.tailscale.enable = true;
};
}