Skip to content

Instantly share code, notes, and snippets.

@tilpner

tilpner/shell Secret

Created December 2, 2019 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tilpner/f44c7aa0b91ddd18b60f93fcce03f46a to your computer and use it in GitHub Desktop.
Save tilpner/f44c7aa0b91ddd18b60f93fcce03f46a to your computer and use it in GitHub Desktop.
xidica build problem
export NIX_PATH=nixpkgs=https://github.com/nixos/nixpkgs/archive/dae3575cee5b88de966d06b11861c602975cb23a.tar.gz:unstable=channel:nixos-unstable:nixos-config=/tmp/xidica.nix:nixos-hardware=https://github.com/nixos/nixos-hardware/archive/master.tar.gz
nix-build '<nixpkgs/nixos>' -A system
=> /nix/store/9439jp11f3dlarp7f3g3dlfzvwq7adwx-nixos-system-nixos-19.09pre-git
{ config, pkgs, ... }:
let
unstable = import <unstable> {};
in
{
imports =
[ # Include the results of the hardware scan.
<nixos-hardware/lenovo/thinkpad/t460s>
];
nixpkgs.config.allowUnfree = true;
#UNCOMMENT THIS TO BREAK THE BUILD
boot.kernelPackages = pkgs.linuxPackages_latest;
#boot.extraModulePackages = with config.boot.kernelPackages; [ virtualbox acpi_call ];
fileSystems."/" = { device = "foo"; };
# usb keyboard support in initrd for luks password
boot.initrd.kernelModules = [
"usbcore"
"usb_common"
"usbhid"
"hid"
"ehci_pci"
"xhci_hcd"
"ohci_hcd"
"uhci_hcd"
"ehci_hcd"
"hid_generic"
"hid_lenovo"
"hid_microsoft"
];
# could be needed if hang on boot
# https://bugzilla.kernel.org/show_bug.cgi?id=110941
boot.kernelParams = [
"intel_pstate=no_hwp"
"i915.enable_psr=0"
"i915.enable_fbc=0"
"i915.enable_guc=2" # https://wiki.archlinux.org/index.php/Intel_graphics#Skylake_support
"i915.modeset=1"
];
# disable atime for performance (also helps SSD)
fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "nodev"; # or "nodev" for efi only
boot.loader.grub.efiSupport = true;
boot.loader.efi.canTouchEfiVariables = true;
# slow if higher res
boot.loader.grub.gfxmodeEfi = "1024x768";
# luks crypto
boot.initrd.luks.devices = [
{
name = "root";
device = "/dev/disk/by-uuid/6a12ceea-f19b-40b6-bb0e-76993bda4764";
preLVM = true;
allowDiscards = true;
}
];
# Set your time zone.
time.timeZone = "Europe/Copenhagen";
# useful base packages
environment.systemPackages = with pkgs; [
bind # to provide dig
busybox
curl
file
fwupd
git
glxinfo
libnotify
linuxPackages.acpi_call
lm_sensors
lsof
neomutt
nox
openssl
pinentry
screen
scrot
sysbench
unstable.brave
vim
wget
whois
];
programs.zsh = {
enable = true;
autosuggestions.enable = true;
enableCompletion = true;
ohMyZsh.enable = true;
ohMyZsh.plugins = [
"git"
"git-prompt"
"jira"
];
ohMyZsh.theme = "";
};
# make vim the default editor
programs.vim.defaultEditor = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
programs.mtr.enable = true;
programs.ssh = {
startAgent = true;
};
# disable suspend when closing lid, it causes hard crashes as something els
# is already trying to suspend
services.logind = {
lidSwitch = "ignore";
lidSwitchDocked = "ignore";
lidSwitchExternalPower = "ignore";
};
# firmware update daemon
services.fwupd.enable = true;
# tlp for power management
services.tlp.enable = true;
# Enable the X11 windowing system.
services.xserver = {
enable = true;
autorun = true;
layout = "us";
useGlamor = true;
xkbOptions = "eurosign:e";
videoDrivers = [
"modesetting"
];
# autolock
xautolock = {
enable = true;
enableNotifier = false;
# currently this just spawns loads of notifiers if left unattended
#notifier = "${pkgs.i3}/bin/i3-nagbar -m \"xautolocking soon\" -t warning";
time = 2; # in minutes
locker = "${pkgs.i3lock}/bin/i3lock";
};
# touchpad support
libinput = {
enable = true;
tapping = false;
tappingDragLock = false;
};
desktopManager = {
default = "none";
xterm.enable = false;
};
displayManager = {
lightdm.enable = true;
};
windowManager.i3 = {
enable = true;
extraPackages = with pkgs; [
dmenu
i3lock
i3status-rust
];
};
};
fonts.fonts = with pkgs; [
dejavu_fonts
powerline-fonts
font-awesome_4
];
# cph
location = {
latitude = 0.0;
longitude = 0.0;
};
services.redshift = {
enable = true;
brightness.day = "1.0";
brightness.night = "1.0";
};
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.stateVersion = "19.09"; # Did you read the comment?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment