nix-config/hosts/gwiad/configuration.nix

159 lines
3.2 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
];
# 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";
};
# Sway
programs.sway = {
enable = true;
};
programs.waybar = {
enable = true;
};
# Enable CUPS to print documents.
# services.printing.enable = true;
# For VSCode
nixpkgs = {
config.allowUnfree = true;
overlays = [
inputs.nix-vscode-extensions.overlays.default
outputs.overlays.unstable-packages
];
};
# 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 = unstable.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
];
};
in [
bemenu # slurpshot
grim # slurpshot
slurp # slurpshot
imv # slurpshot
alacritty
chromium
hunspell
hunspellDicts.fr-classique
inkscape
kanshi
libreoffice-fresh
my-vscode
nixfmt
pass-wayland
pulsemixer
pwgen
tex
zathura
# General development
poetry
pre-commit
nodejs
];
};
users.groups.jhemono.gid = 1000;
# System packages
environment.systemPackages = with pkgs; [
android-file-transfer
android-tools
bc
git
htop
jq
ncdu
rclone
tmux
tree
unzip
vim
];
programs.firefox = {
enable = true;
nativeMessagingHosts.packages = with pkgs; [ passff-host ];
};
programs.browserpass.enable = true;
# Fonts
fonts.packages = with pkgs; [
monocraft
];
# GNOME
services.xserver = {
enable = true;
xkb.layout = "fr";
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
};
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;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
system.stateVersion = "24.05";
}