From 5f4466b9bc2f767ff91fe0ec4a90fe64201951c1 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 29 Feb 2020 12:18:25 +0100 Subject: bump sif --- nixpkgs | 2 +- sif.nix | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++------- sif/boot.nix | 2 +- utils | 2 +- 4 files changed, 91 insertions(+), 13 deletions(-) diff --git a/nixpkgs b/nixpkgs index 99a4a736..7948e678 160000 --- a/nixpkgs +++ b/nixpkgs @@ -1 +1 @@ -Subproject commit 99a4a7363ccc565629230ebc8cf8c949da2ffb5e +Subproject commit 7948e6785b4aa6a1289645575816e423d85f6aea diff --git a/sif.nix b/sif.nix index e31f537c..9c9af157 100644 --- a/sif.nix +++ b/sif.nix @@ -2,7 +2,8 @@ { imports = - [ ./sif/hw.nix + [ ./nixpkgs.nix + ./sif/hw.nix ./sif/boot.nix ./users.nix ./custom/zsh.nix @@ -49,11 +50,78 @@ environment.systemPackages = with pkgs; [ git rebuild-system nvtop + brightnessctl ]; - nixpkgs.config.allowUnfree = true; + nixpkgs.config = { + allowUnfree = true; + packageOverrides = pkgs: rec { + libfprint = pkgs.stdenv.mkDerivation rec { + pname = "libfprint"; + version = "1.90.1"; + + src = pkgs.fetchurl { + url = "https://gitlab.freedesktop.org/libfprint/libfprint/uploads/662cd834e76c02c4d74ad01c50412759/libfprint-1.90.1.tar.xz"; + sha256 = "1pv6sd852i5i0sn1ki109jhk9indl21cb4aw7v6xhcnvjmgds0xx"; + }; + + buildInputs = with pkgs; [ libusb pixman glib nss nspr gdk_pixbuf openssl gusb gobject-introspection gtk-doc cairo ]; + nativeBuildInputs = with pkgs; [ pkgconfig meson ninja ]; + + mesonFlags = [ "-Dudev_rules_dir=$(out)/lib/udev/rules.d" "-Ddoc=false" ]; + }; + fprintd = pkgs.stdenv.mkDerivation rec { + pname = "fprintd"; + version = "1.90.1"; + + src = pkgs.fetchurl { + url = "https://gitlab.freedesktop.org/libfprint/fprintd/uploads/a47c31c844e23e070665a8a85dae0144/fprintd-1.90.1.tar.xz"; + sha256 = "03d3r0hz9m3i71wxs5h048kam6k4bdlcg6xvy50kcah5zcfhp55l"; + }; + + buildInputs = (with pkgs; [ glib polkit dbus dbus-glib systemd pam perl libxslt libxml2 python3]) ++ (with pkgs.python3Packages; [pycairo dbus-python python-dbusmock pygobject3 ]) ++ [ libfprint pam_wrapper ]; + nativeBuildInputs = with pkgs; [ pkgconfig meson ninja ]; + + installPhase = '' + install -vm 0755 -d $out/etc/dbus-1/interfaces $out/libexec $out/share/polkit-1/actions $out/share/man/man1 $out/share/man/man8 $out/bin $out/lib/security $out/etc/dbus-1/system.d $out/etc/dbus-1/system-services $out/lib/systemd/system $out/etc $out/share/locale + + install -vt $out/etc/dbus-1/interfaces src/net.reactivated.Fprint.{Manager,Device}.xml + install -vt $out/libexec src/fprintd + install -vt $out/share/polkit-1/actions data/net.reactivated.fprint.device.policy + install -vt $out/share/man/man1 data/fprintd.1 + install -vt $out/share/man/man8 data/pam_fprintd.8 + install -vt $out/bin utils/fprintd-{delete,enroll,list,verify} + install -vt $out/lib/security pam/pam_fprintd.so + + install -vt $out/etc/dbus-1/system.d /build/fprintd-${version}/data/net.reactivated.Fprint.conf + install -vt $out/etc/dbus-1/system-services /build/fprintd-${version}/build/data/net.reactivated.Fprint.service + install -vt $out/lib/systemd/system /build/fprintd-${version}/build/data/fprintd.service + install -vt $out/etc /build/fprintd-${version}/data/fprintd.conf + + for lang in /build/fprintd-${version}/build/po/*.gmo; do + install -vD $lang $out/share/locale/$(basename $lang .gmo)/LC_MESSAGES/fprintd.mo + done + ''; + }; + pam_wrapper = pkgs.stdenv.mkDerivation rec { + pname = "pam_wrapper"; + version = "1.0.7"; + + src = pkgs.fetchurl { + url = "mirror://samba/cwrap/${pname}-${version}.tar.gz"; + sha256 = "06djr20kk5sqgydkmfwllbm5ndv4jaqmkj1kab7ppc6fnqp30dq5"; + }; + + nativeBuildInputs = with pkgs; [ pkgconfig ]; + buildInputs = with pkgs; [ cmake pam python3 ]; + }; + }; + }; services = { + fwupd.enable = true; + fprintd.enable = true; + blueman.enable = true; colord.enable = true; @@ -65,10 +133,11 @@ drivers = with pkgs; [ samsung-unified-linux-driver hplip ]; }; - logind.extraConfig = '' - HandleLidSwitch=hibernate - LidSwitchIgnoreInhibited=no - ''; + logind = { + lidSwitch = "suspend"; + lidSwitchDocked = "lock"; + lidSwitchExternalPower = "lock"; + }; openssh = { enable = true; @@ -125,12 +194,19 @@ dpi = 282; - videoDrivers = [ "nvidiaBeta" "intel" ]; - useGlamor = true; + videoDrivers = [ "intel" "nvidiaBeta" ]; screenSection = '' + Device "Device-nvidia[0]" Option "metamodes" "nvidia-auto-select +0+0 { ForceCompositionPipeline = On }" ''; + + deviceSection = '' + Option "AccelMethod" "SNA" + Option "TearFree" "True" + ''; + + exportConfiguration = true; }; yggdrasilTinc = { @@ -327,8 +403,6 @@ speed = 255; }; - brightnessctl.enable = true; - nvidia = { modesetting.enable = true; prime = { @@ -444,6 +518,10 @@ [ dbus gnome3.dconf ]; + programs = { + light.enable = true; + }; + system.stateVersion = "20.03"; # Did you read the comment? } diff --git a/sif/boot.nix b/sif/boot.nix index d903b16f..fbfcf5cd 100644 --- a/sif/boot.nix +++ b/sif/boot.nix @@ -23,7 +23,7 @@ plymouth.enable = true; kernelPackages = pkgs.linuxPackages_latest; - kernelParams = [ "i915.fastboot=1" "intel_pstate=no_hwp" "quiet" ]; + kernelParams = [ "i915.fastboot=1" "intel_pstate=no_hwp" "acpi_backlight=vendor" "thinkpad-acpi.brightness_enable=1" "quiet" ]; tmpOnTmpfs = true; }; diff --git a/utils b/utils index f55aa62c..b02413ac 160000 --- a/utils +++ b/utils @@ -1 +1 @@ -Subproject commit f55aa62c7dd25d44b37985ef5f109eb8212f5ae7 +Subproject commit b02413acfbbb1e541fcb9218d6930dbf283c7211 -- cgit v1.2.3