nixos-config/configuration.nix

123 lines
2.1 KiB
Nix

{ config, pkgs, ... }:
{
nixpkgs.config.allowUnfree = true;
boot.loader = {
timeout = 1;
efi.canTouchEfiVariables = true;
grub = {
efiSupport = true;
device = "nodev";
configurationLimit = 5;
};
};
powerManagement = {
enable = true;
cpuFreqGovernor = "ondemand";
};
services.acpid = {
enable = true;
logEvents = true;
};
services.logind = {
lidSwitch = "lock";
extraConfig = ''
HandlePowerKey=suspend-then-hibernate
IdleAction=suspend-then-hibernate
'';
};
services.gnome.gnome-keyring.enable = true;
services.resolved = {
enable = true;
dnssec = "false";
};
networking.networkmanager.enable = true;
programs.appgate-sdp.enable = true;
services.xserver = {
enable = true;
windowManager.i3.enable = true;
layout = "de";
xkbVariant = "nodeadkeys";
xkbModel = "pc105";
libinput = {
enable = true;
touchpad = {
horizontalScrolling = false;
naturalScrolling = true;
};
};
displayManager = {
defaultSession = "none+i3";
autoLogin = {
enable = true;
user = "mandlm";
};
};
};
virtualisation.docker.enable = true;
time.timeZone = "Europe/Berlin";
services.timesyncd.enable = true;
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "de-latin1-nodeadkeys";
};
fonts.fonts = with pkgs; [
(nerdfonts.override { fonts = [ "DejaVuSansMono" ]; })
font-awesome
];
hardware.pulseaudio.enable = true;
environment.systemPackages = with pkgs; [
neovim
git
];
services.openssh = {
enable = true;
forwardX11 = true;
};
services.printing = {
enable = true;
};
services.avahi = {
enable = true;
nssmdns = true;
};
nix = {
package = pkgs.nixFlakes;
extraOptions = "experimental-features = nix-command flakes";
autoOptimiseStore = true;
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
};
system.stateVersion = "22.05";
}