dotfiles/nixos/configuration.nix

159 lines
3.7 KiB
Nix
Raw Normal View History

2019-03-26 10:12:24 +00:00
{ config, pkgs, ... }:
2019-03-26 12:32:59 +00:00
let
unstableTarball =
fetchTarball
https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz;
2019-04-02 21:00:00 +01:00
2019-03-26 12:32:59 +00:00
in
2019-03-26 10:12:24 +00:00
{
imports =
2019-03-26 12:32:59 +00:00
[
2019-03-26 10:12:24 +00:00
/etc/nixos/hardware-configuration.nix
];
2019-03-26 12:32:59 +00:00
nixpkgs.config = {
2019-04-05 22:02:20 +01:00
allowUnfree = true;
2019-03-26 12:32:59 +00:00
packageOverrides = pkgs: {
2019-04-06 11:29:48 +01:00
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
2019-03-26 12:32:59 +00:00
unstable = import unstableTarball {
config = config.nixpkgs.config;
};
};
};
2019-03-26 10:12:24 +00:00
environment.systemPackages = with pkgs; [
2019-04-13 09:42:13 +01:00
wget git zsh gnupg curl tmux python36Packages.glances
2019-04-03 13:33:44 +01:00
(
vim_configurable.override {
python = python3;
}
)
2019-03-26 10:12:24 +00:00
];
networking.hostName = "skinnyv";
2019-04-12 10:37:23 +01:00
# gsconnect
networking.firewall.allowedTCPPortRanges = [ { from = 1716; to = 1764; } ];
networking.firewall.allowedUDPPortRanges = [ { from = 1716; to = 1764; } ];
2019-04-13 09:42:13 +01:00
2019-04-06 12:55:45 +01:00
i18n.defaultLocale = "en_GB.UTF-8";
2019-03-26 10:12:24 +00:00
users.users.cyryl = {
isNormalUser = true;
2019-04-13 09:42:13 +01:00
extraGroups = [ "wheel" "networkmanager" "video" "scanner" "lp" "docker" "vboxusers"];
2019-03-26 12:32:59 +00:00
packages = with pkgs; [
2019-04-13 09:42:13 +01:00
firefox chromium alacritty zsh keepass fontconfig go nodejs rustup gcc gdb
2019-04-12 10:37:23 +01:00
binutils xclip pkgconfig veracrypt gitAndTools.diff-so-fancy
2019-04-13 09:42:13 +01:00
gnome3.gnome-shell-extensions chrome-gnome-shell gnomeExtensions.clipboard-indicator
2019-04-12 10:37:23 +01:00
gnomeExtensions.caffeine gnomeExtensions.no-title-bar gnomeExtensions.gsconnect
2019-04-13 09:42:13 +01:00
openjdk11 gimp restic glxinfo discord steam unstable.vscode
2019-04-12 10:37:23 +01:00
zoom-us
nodejs-10_x hugo mercurial terraform libreoffice
2019-04-13 09:49:20 +01:00
unzip tor-browser-bundle-bin aria vlc
2019-04-14 14:14:56 +01:00
jetbrains.goland jetbrains.clion
2019-03-26 12:32:59 +00:00
];
2019-03-26 10:12:24 +00:00
uid = 1000;
shell = pkgs.zsh;
};
2019-04-05 22:02:20 +01:00
virtualisation.virtualbox.host = {
enable = true;
enableExtensionPack = true;
2019-04-06 11:29:48 +01:00
enableHardening = false; #needed for 3D acceleration
2019-04-05 22:02:20 +01:00
};
2019-04-12 10:37:23 +01:00
2019-04-03 13:37:24 +01:00
virtualisation.docker = {
enable = true;
autoPrune.enable = true;
};
services = {
gnome3.chrome-gnome-shell.enable = true;
2019-03-26 12:32:59 +00:00
fwupd.enable = true;
2019-04-13 09:42:13 +01:00
printing = {
2019-04-08 11:09:37 +01:00
enable = true;
drivers = [ pkgs.epson-escpr ];
};
avahi = {
enable = true;
nssmdns = true;
};
syncthing = {
enable = true;
user = "cyryl";
dataDir = "/home/cyryl/.syncthing";
openDefaultPorts = true;
};
2019-03-26 10:12:24 +00:00
restic.backups.home = {
passwordFile = "/etc/nixos/secrets/restic-password";
paths = [ "/home" ];
repository = "sftp:fetcher@brix:/mnt/data/backup-targets";
timerConfig = { OnCalendar = "hourly"; };
};
xserver = {
enable = true;
layout = "pl";
libinput.enable = true;
2019-03-26 12:32:59 +00:00
desktopManager = {
gnome3.enable = true;
};
2019-03-26 12:32:59 +00:00
};
2019-03-26 10:12:24 +00:00
};
2019-03-26 12:32:59 +00:00
time.timeZone = "Europe/London";
2019-03-26 10:12:24 +00:00
sound.enable = true;
hardware.pulseaudio.enable = true;
hardware.u2f.enable = true;
hardware.brightnessctl.enable = true;
hardware.cpu.intel.updateMicrocode = true;
2019-04-06 11:29:48 +01:00
hardware.opengl = {
enable = true;
2019-04-06 17:10:03 +01:00
driSupport = true;
driSupport32Bit = true;
2019-04-06 11:29:48 +01:00
extraPackages = with pkgs; [
vaapiIntel
vaapiVdpau
libvdpau-va-gl
2019-04-12 10:37:23 +01:00
intel-media-driver
2019-04-06 11:29:48 +01:00
];
};
hardware.sane.enable = true;
2019-03-26 10:12:24 +00:00
fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];
boot = {
initrd.luks.devices = [
{
name = "root";
device = "/dev/disk/by-uuid/8c76bf01-59b3-4c60-b853-e9cb77f3ca14";
preLVM = true;
allowDiscards = true;
}
];
loader.grub = {
enable = true;
version = 2;
device = "nodev";
efiSupport = true;
};
loader.efi.canTouchEfiVariables = true;
2019-04-06 11:29:48 +01:00
kernelParams = [
"i915.enable_rc6=7"
];
};
2019-03-26 10:12:24 +00:00
2019-04-07 22:42:58 +01:00
nix.gc.automatic = true;
2019-04-05 22:02:20 +01:00
system.autoUpgrade.enable = true;
2019-03-26 10:12:24 +00:00
system.stateVersion = "18.09";
}
2019-03-26 12:32:59 +00:00