templates/system/modules/system/system.nix
Andre 8d2062bd74
Some checks failed
Code Check / Run nixfmt and statix (push) Waiting to run
Code Check / Run nixfmt and statix (pull_request) Has been cancelled
refactor(system): fix conflicts between desktop environment login managers
2024-07-11 17:59:20 -04:00

53 lines
1.2 KiB
Nix

# Base system settings and options
{
pkgs,
config,
lib,
...
}:
let
cfg = config.aux.system;
in
{
options = {
aux.system.packages = lib.mkOption {
description = "Additional system packages to install. This is just a wrapper for environment.systemPackages.";
type = lib.types.listOf lib.types.package;
default = [ ];
example = lib.literalExpression "[ pkgs.firefox pkgs.thunderbird ]";
};
};
config = {
# Install the latest kernel
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
# Set up the environment
environment = {
# Install base packages
systemPackages =
config.aux.system.packages
++ (with pkgs; [
bash
dconf # Needed to fix an issue with Home-manager. See https://github.com/nix-community/home-manager/issues/3113
direnv
git
home-manager
p7zip
]);
};
services = {
# Enable fwupd (firmware updater)
fwupd.enable = true;
# Enable trim on supported drives
fstrim.enable = true;
# Enable disk monitoring
smartd = {
enable = true;
autodetect = true;
};
};
};
}