nixos-config/hosts/d2nix/nixos/configuration.nix

116 lines
2.8 KiB
Nix
Raw Normal View History

2023-07-15 17:01:55 +00:00
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
<nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix>
./hardware-configuration.nix
./services.nix
2023-07-15 18:55:50 +00:00
./network.nix
2023-07-15 17:01:55 +00:00
modules/common.nix
modules/smtp.nix
2023-07-15 18:55:50 +00:00
];
2023-07-15 17:01:55 +00:00
2023-07-15 18:55:50 +00:00
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
plymouth.enable = true;
tmp.cleanOnBoot = true;
kernelParams = [ "i915.enable_fbc=1" ];
};
2023-07-15 17:01:55 +00:00
2023-07-15 18:55:50 +00:00
hardware = {
# Enable microcode updates for Intel CPU
cpu.intel.updateMicrocode = true;
# Enable Kernel same-page merging
ksm.enable = true;
# Enable all the firmware
enableAllFirmware = true;
# Enable all the firmware with a license allowing redistribution. (i.e. free firmware and firmware-linux-nonfree)
enableRedistributableFirmware = true;
# Enable OpenGL drivers
opengl.enable = true;
opengl.extraPackages = with pkgs; [
vaapiIntel
vaapiVdpau
libvdpau-va-gl
];
pulseaudio = {
enable = true;
};
};
2023-07-15 17:01:55 +00:00
# Set your time zone.
time.timeZone = "Europe/Paris";
nixpkgs.config.allowUnfree = true;
i18n.defaultLocale = "fr_FR.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "fr";
};
2023-07-15 18:55:50 +00:00
fonts = {
fontDir.enable = true;
enableGhostscriptFonts = true;
fonts = with pkgs; [
corefonts
vistafonts
inconsolata
terminus_font
proggyfonts
dejavu_fonts
font-awesome
nerdfonts
source-code-pro
source-sans-pro
source-serif-pro
];
};
2023-07-15 17:01:55 +00:00
2023-07-15 18:55:50 +00:00
programs = {
fish.enable = true;
2023-07-15 19:11:10 +00:00
fish.interactiveShellInit = ''
set -gx EDITOR nvim
'';
2023-07-15 18:55:50 +00:00
ssh = {
setXAuthLocation = true;
forwardX11 = true;
};
};
2023-07-15 17:01:55 +00:00
# Enable sound.
sound.enable = true;
system.stateVersion = "23.05"; # Did you read the comment?
users = {
groups.ntp = {};
defaultUserShell = "/run/current-system/sw/bin/fish";
extraUsers.alexandre = {
isNormalUser = true;
home = "/home/alexandre";
description = "alexandre";
extraGroups = [ "wheel" "networkmanager" "docker" "libvirtd" "scanner" "plocate" "lp" ];
# hashedPassword = "$6$7m77oPQxa$W9YnRLo1X2eqztBHwpoH8diHGkBno5O39AMyL9Qm8y8I6uW63H2Nwx4p239OG5zhOxA8J1lZvHTQ3hKPSP9mT/";
};
};
environment.systemPackages = with pkgs; [
google-fonts
];
2023-07-15 19:11:10 +00:00
environment.variables.EDITOR = "nvim";
2023-07-15 17:01:55 +00:00
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
2023-07-16 09:34:33 +00:00
location = {
provider = "manual";
latitude = 47.77;
longitude = -1.164;
};
2023-07-15 17:01:55 +00:00
}