dotfiles/os/common.nix
2023-12-16 18:58:13 +01:00

75 lines
1.6 KiB
Nix

{ pkgs, lib, ... }:
{
networking.domain = "geoffrey.frogeye.fr";
time.timeZone = "Europe/Amsterdam";
# Might fill emptiness?
boot.consoleLogLevel = 6; # KERN_INFO
# TODO qwerty-fr for console
# Enable CUPS to print documents
services.printing.enable = true;
# Enable passwordless sudo
# TODO execWheelOnly? sudo-rs?
security.sudo.extraRules = [{
groups = [ "wheel" ];
commands = [{
command = "ALL";
options = [ "NOPASSWD" ];
}];
}];
environment.systemPackages = with pkgs; [
wget
kexec-tools
openvpn
# Needed for all the fetchFromGit in this repo on nixos-rebuild
git
];
nixpkgs.config.allowUnfree = true;
programs = {
adb.enable = true;
# Enable compilation cache
ccache.enable = true;
# TODO Not enough, see https://nixos.wiki/wiki/CCache.
# Might want to see if it's worth using on NixOS
less.lessopen = null; # Don't use lessopen
gnupg.agent.enable = true;
# Let users mount disks
udevil.enable = true;
};
services = {
# Enable the OpenSSH daemon
openssh.enable = true;
# Time sychronisation
chrony = {
enable = true;
servers = map (n: "${toString n}.europe.pool.ntp.org") (lib.lists.range 0 3);
};
# Prevent power button from shutting down the computer.
# On Pinebook it's too easy to hit,
# on others I sometimes turn it off when unsuspending.
logind.extraConfig = "HandlePowerKey=ignore";
};
# TODO Hibernation?
# TEST
system.copySystemConfiguration = true;
# Use defaults from
system.stateVersion = "23.11";
}