dotfiles/config/nix/modules/common.nix

113 lines
2.2 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ pkgs, ... }:
{
boot.loader.grub.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos";
networking.wireless.enable = true; # Enable wireless support via wpa_supplicant
time.timeZone = "Europe/Amsterdam";
# TODO qwerty-fr for console
# Enable CUPS to print documents
services.printing.enable = true;
# Enable passwordless sudo
security.sudo.extraRules = [{
groups = [ "wheel" ];
commands = [{
command = "ALL";
options = [ "NOPASSWD" ];
}];
}];
# Users
users.users.geoffrey = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
packages = with pkgs; [
# dotfiles dependencies
coreutils
bash
gnugrep
gnused
gnutar
openssl
git
wget
curl
python3Packages.pip
ansible # TODO Reevaluate
# shell
zsh-completions
nix-zsh-completions
zsh-history-substring-search
antigen # TODO Reevaluate
powerline-go
# terminal essentials
moreutils
man
visidata
nodePackages.insect
translate-shell
unzip
unrar
p7zip
# remote
openssh
rsync
# DEBUG
tree
lolcat
];
initialPassword = "cartable"; # DEBUG
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPE41gxrO8oZ5n3saapSwZDViOQphm6RzqgsBUyA88pU geoffrey@frogeye.fr"
];
};
environment.systemPackages = with pkgs; [ neovim wget ];
# Enable compilation cache
programs = {
ccache.enable = true;
# TODO Not enough, see https://nixos.wiki/wiki/CCache.
# Might want to see if it's worth using on NixOS
gnupg.agent.enable = true;
# TODO Below should be user config
zsh = {
enable = true;
autosuggestions.enable = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
};
neovim = {
enable = true;
defaultEditor = true;
vimAlias = true;
viAlias = true;
};
};
services = {
# Enable the OpenSSH daemon
openssh.enable = true;
getty.autologinUser = "geoffrey"; # DEBUG
};
# TEST
system.copySystemConfiguration = true;
# Use defaults from
system.stateVersion = "23.05";
}