nixos-config/backup/modules/system/core/default.nix
2021-11-12 07:23:46 +01:00

73 lines
1.3 KiB
Nix

{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eb.core;
in
{
options.eb.core = {
enable = mkOption {
description = "Enable core options";
type = types.bool;
default = true;
};
};
config = mkIf (cfg.enable) {
nix = {
package = pkgs.nixUnstable;
extraOptions = "experimental-features = nix-command flakes";
gc = {
automatic = true;
options = "--delete-older-than 10d";
};
};
environment.shells = [ pkgs.fish pkgs.zsh pkgs.bash ];
console = {
font = "Lat2-Terminus16";
};
i18n.defaultLocale = "en_US.UTF-8";
time.timeZone = "Europe/Amsterdam";
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
hardware.enableRedistributableFirmware = lib.mkDefault true;
environment.systemPackages = with pkgs; [
unzip
zsh
fish
gawk
gnused
curl
xh
bottom
acpi
pstree
git
patchelf
nix-index
manix
neovim
];
security.sudo.extraConfig = ''Defaults env_reset,timestamp_timeout=5,insults,lecture="always"'';
security.sudo.execWheelOnly = true;
services.openssh.enable = true;
hardware.opengl = {
enable = true;
driSupport = true;
};
};
}