Lilim is dead. Long live Lilim!
This commit is contained in:
parent
134000b409
commit
8606d37717
5 changed files with 20 additions and 65 deletions
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
networking.dhcpcd.extraConfig = "noarp";
|
networking.dhcpcd.extraConfig = "noarp";
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ firmware_surface xdiskusage ];
|
environment.systemPackages = with pkgs; [ xdiskusage ];
|
||||||
|
|
||||||
system.stateVersion = "19.03";
|
system.stateVersion = "19.09";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,77 +1,42 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
let
|
{
|
||||||
musnix_channel = (fetchTarball "https://github.com/musnix/musnix/archive/master.tar.gz");
|
|
||||||
version = "5.0.10";
|
|
||||||
patchlevel = "1";
|
|
||||||
linux-surface = pkgs.fetchFromGitHub {
|
|
||||||
owner = "jakeday";
|
|
||||||
repo = "linux-surface";
|
|
||||||
rev = "${version}-${patchlevel}";
|
|
||||||
sha256 = "1q8dv7j6gwgszqavb35aswwfn7c7mwkc2xqd2v8gvxnjk7sp4747";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildFirmware = (name: subdir: src: pkgs.stdenvNoCC.mkDerivation {
|
|
||||||
name = "${name}-firmware";
|
|
||||||
src = src;
|
|
||||||
nativeBuildInputs = [ pkgs.unzip ];
|
|
||||||
sourceRoot = ".";
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/lib/firmware/${subdir}
|
|
||||||
cp -r * $out/lib/firmware/${subdir}
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
|
|
||||||
i915-firmware = buildFirmware "i915" "i915" "${linux-surface}/firmware/i915_firmware_skl.zip";
|
|
||||||
# vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
|
||||||
in {
|
|
||||||
imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||||||
musnix_channel ];
|
];
|
||||||
|
|
||||||
musnix = {
|
|
||||||
enable = true;
|
|
||||||
alsaSeq.enable = true;
|
|
||||||
ffado.enable = true;
|
|
||||||
soundcardPciId = "00:14.0";
|
|
||||||
kernel.realtime = false;
|
|
||||||
# kernel.packages = pkgs.linuxPackages_4_19_rt;
|
|
||||||
rtirq.enable = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader.systemd-boot.enable = true;
|
loader.systemd-boot = {
|
||||||
|
enable = true;
|
||||||
|
signed = true;
|
||||||
|
signing-key = "/secret/secureboot/db.key";
|
||||||
|
signing-certificate = "/secret/secureboot/db.crt";
|
||||||
|
};
|
||||||
loader.efi.canTouchEfiVariables = true;
|
loader.efi.canTouchEfiVariables = true;
|
||||||
cleanTmpDir = true;
|
cleanTmpDir = true;
|
||||||
kernelPackages = pkgs.linuxPackages_surface; # 4_19 worked
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
initrd.kernelModules = [ "hid-multitouch" ];
|
initrd.availableKernelModules = [ "xhci_pci" "ahci" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||||
initrd.availableKernelModules = [ "hid" "surface_acpi" "hid-microsoft" "hid-multitouch" "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
|
kernelModules = [ "kvm-intel" "uinput" ];
|
||||||
kernelModules = [ "intel_ipts" "kvm-intel" "hid-microsoft" "hid-multitouch" "uinput" ];
|
kernelParams = [ "intel_iommu=on" ];
|
||||||
kernel.sysctl = {
|
kernel.sysctl = {
|
||||||
"kernel.nmi_watchdog" = 0;
|
"kernel.nmi_watchdog" = 0;
|
||||||
"fs.inotify.max_user_watches" = 524288;
|
"fs.inotify.max_user_watches" = 524288;
|
||||||
"vm.dirty_writeback_centisecs" = 1500;
|
"vm.dirty_writeback_centisecs" = 1500;
|
||||||
};
|
};
|
||||||
kernelParams = [ "threadirq" ];
|
|
||||||
extraModulePackages = [ ];
|
|
||||||
extraModprobeConfig = "options snd_hda_intel power_save=1 power_save_controller=Y";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-uuid/8c3a5a07-9ee1-4154-9f3f-6abc379073aa";
|
{ device = "/dev/disk/by-uuid/b37b48a8-5dcb-4f4d-ad71-1b26500b3e5f";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
options = [ "noatime" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-uuid/D2A2-C705";
|
{ device = "/dev/disk/by-uuid/546A-A3D1";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
firmware = with pkgs; [ firmwareLinuxNonfree i915-firmware firmware_surface ];
|
firmware = with pkgs; [ firmwareLinuxNonfree ];
|
||||||
cpu.intel.updateMicrocode = true;
|
cpu.intel.updateMicrocode = true;
|
||||||
enableAllFirmware = true;
|
enableAllFirmware = true;
|
||||||
ksm.enable = true;
|
ksm.enable = true;
|
||||||
|
@ -100,7 +65,7 @@ in {
|
||||||
|
|
||||||
powerManagement = {
|
powerManagement = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# cpuFreqGovernor = "powersave";
|
cpuFreqGovernor = "powersave";
|
||||||
};
|
};
|
||||||
services.upower.enable = true;
|
services.upower.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ with lib;
|
||||||
};
|
};
|
||||||
|
|
||||||
config.system.copySysConf = {
|
config.system.copySysConf = {
|
||||||
enable = true;
|
enable = false;
|
||||||
addToNixPath = false;
|
addToNixPath = false;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,6 @@ in mkIf (elem "desktop" cfg.services) {
|
||||||
i3 = mkIf (elem "i3" cfg.desktop.wms) (import ./desktop/i3.nix { inherit pkgs; });
|
i3 = mkIf (elem "i3" cfg.desktop.wms) (import ./desktop/i3.nix { inherit pkgs; });
|
||||||
default = elemAt cfg.desktop.wms 0;
|
default = elemAt cfg.desktop.wms 0;
|
||||||
};
|
};
|
||||||
# add switch for Lilim
|
|
||||||
multitouch = {
|
multitouch = {
|
||||||
enable = true;
|
enable = true;
|
||||||
invertScroll = true;
|
invertScroll = true;
|
||||||
|
@ -56,8 +55,5 @@ in mkIf (elem "desktop" cfg.services) {
|
||||||
naturalScrolling = false;
|
naturalScrolling = false;
|
||||||
horizontalScrolling = true;
|
horizontalScrolling = true;
|
||||||
};
|
};
|
||||||
# Still waiting for streamlined dpi settings... will write a propper solution once it's done >.<
|
|
||||||
# see https://github.com/NixOS/nixpkgs/pull/25892
|
|
||||||
dpi = ifelse (cfg.hostName == "Lilim") 192 null;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,10 +4,4 @@ with lib;
|
||||||
|
|
||||||
mkIf (elem "udev" config.machine.services) {
|
mkIf (elem "udev" config.machine.services) {
|
||||||
hardware.steam-hardware.enable = true;
|
hardware.steam-hardware.enable = true;
|
||||||
services.udev.extraRules = ''
|
|
||||||
# IPTS Touchscreen (SP2017)
|
|
||||||
SUBSYSTEMS=="input", ATTRS{name}=="ipts 1B96:001F SingleTouch", ENV{ID_INPUT_TOUCHSCREEN}="1", SYMLINK+="input/touchscreen"
|
|
||||||
# IPTS Pen (SP2017)
|
|
||||||
SUBSYSTEMS=="input", ATTRS{name}=="ipts 1B96:001F Pen", SYMLINK+="input/pen"
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue