nix-config/hosts/gwiad/configuration.nix
2024-12-04 10:26:51 +01:00

165 lines
3.4 KiB
Nix

# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, inputs, outputs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
# Services
./btrbk.nix
];
# Boot configuration
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 10;
boot.loader.efi.canTouchEfiVariables = true;
# Networking
networking.hostName = "gwiad";
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Paris";
# Console
console = {
keyMap = "fr";
};
# Enable CUPS to print documents.
# services.printing.enable = true;
# For VSCode
nixpkgs = {
config.allowUnfree = true;
overlays = [
inputs.nix-vscode-extensions.overlays.default
];
};
# User account
users.users.jhemono = {
isNormalUser = true;
uid = 1000;
extraGroups = [ "wheel" ]; # Enable 'sudo' for the user.
packages = with pkgs; let
tex = texlive.combine {
inherit (texlive)
scheme-basic
moderncv
fontawesome5
pgf # For tikz.sty
multirow
arydshln;
};
my-vscode = vscode-with-extensions.override {
vscodeExtensions = with vscode-marketplace; [
ms-python.python
ms-python.vscode-pylance
ms-python.debugpy
ms-python.black-formatter
ms-python.isort
ms-vscode-remote.remote-containers
github.copilot
github.copilot-chat
dbaeumer.vscode-eslint
];
};
in [
chromium
docker-compose
drawing
hunspell
hunspellDicts.fr-classique
inkscape
libreoffice-fresh
my-vscode
nixfmt
pass-wayland
pwgen
scribus
tex
# General development
dbeaver-bin
poetry
pre-commit
nodejs
];
};
users.groups.jhemono.gid = 1000;
# System packages
environment.systemPackages = with pkgs; [
android-tools
bc
devenv
git
htop
jq
ncdu
rclone
tmux
tree
unzip
vim
];
programs.firefox = {
enable = true;
nativeMessagingHosts.packages = with pkgs; [ passff-host ];
};
programs.browserpass.enable = true;
virtualisation.docker.rootless = {
enable = true;
setSocketVariable = true;
};
# Fonts
fonts.packages = with pkgs; [
monocraft
];
# GNOME
services.xserver = {
enable = true;
xkb.layout = "fr";
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
excludePackages = with pkgs; [
xterm
];
};
environment.gnome.excludePackages = with pkgs; [
epiphany
geary
gnome-tour
orca
];
environment.variables.EDITOR = "vim";
# Nix configuration
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
nix.settings.auto-optimise-store = true;
nix.settings.trusted-users = [ "jhemono" ];
nix.channel.enable = false;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
programs.gnupg.agent.enable = true;
system.stateVersion = "24.05";
}