NOflake/systems/NOlaptop.nix

83 lines
2.7 KiB
Nix
Raw Normal View History

2024-02-24 02:30:17 -08:00
{pkgs, ...}: {
2023-07-17 16:41:11 -07:00
environment.systemPackages = with pkgs; [
2023-11-01 18:58:21 -07:00
# prescurve
2023-11-09 11:39:44 -08:00
# libsForQt5.skanpage
2023-11-01 18:58:21 -07:00
intel-gpu-tools
2023-09-28 23:33:56 -07:00
powertop
2024-01-30 09:32:08 -08:00
fw-ectool
2023-07-17 16:41:11 -07:00
];
fileSystems."/home" = {
device = "/dev/disk/by-uuid/e4244a97-9b48-49f0-8093-782163045020";
fsType = "btrfs";
2024-02-24 02:30:17 -08:00
options = ["subvol=home-snaps/0/snapshot" "noatime" "compress-force=zstd:3" "discard=async"];
2023-07-17 16:41:11 -07:00
};
fileSystems."/home/tao/Games" = {
device = "/dev/disk/by-uuid/e4244a97-9b48-49f0-8093-782163045020";
fsType = "btrfs";
2024-02-24 02:30:17 -08:00
options = ["subvol=games" "nosuid" "nodev" "noatime" "compress-force=zstd:3" "users" "rw" "exec" "discard=async"];
2023-07-17 16:41:11 -07:00
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/e4244a97-9b48-49f0-8093-782163045020";
fsType = "btrfs";
2024-02-24 02:30:17 -08:00
options = ["subvol=nixos" "noatime" "compress-force=zstd:3" "discard=async"];
2023-07-17 16:41:11 -07:00
};
2024-02-24 02:30:17 -08:00
swapDevices = [{device = "/dev/disk/by-uuid/ca55d0ea-c0db-44c5-af3a-e38eec803929";}];
2023-07-17 16:41:11 -07:00
2023-07-18 11:12:40 -07:00
services.fprintd.enable = true;
services.fwupd.enable = true;
# services.fstrim.enable = true;
2023-07-27 09:45:05 -07:00
powerManagement.powertop.enable = true;
2023-07-27 10:06:06 -07:00
hardware.sensor.iio.enable = true;
2023-07-18 11:12:40 -07:00
2023-09-28 23:33:56 -07:00
# hardware.sane = {
# enable = true;
# extraBackends = [ pkgs.epkowa ];
# };
2023-08-09 19:05:53 -07:00
2023-09-30 22:09:06 -07:00
services.xserver.displayManager.defaultSession = "plasmawayland";
2023-11-01 02:14:15 -07:00
# systemd.user.services.backlight = {
# # description = "";
# ExecStart = "${pkgs.prescurve}/bin/prescurve_backlight";
# Restart = "on-failure";
# wantedBy = [ "default.target" ];
# };
2023-10-30 14:10:57 -07:00
# SUBSYSTEM=="backlight", GROUP="video", MODE="0664"
services.udev.extraRules = ''
# Ethernet expansion card
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20"
2023-10-30 14:10:57 -07:00
ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chmod g+w /sys/class/backlight/%k/brightness"
'';
boot.kernelPackages = pkgs.linuxPackages_latest;
2023-07-17 16:41:11 -07:00
boot.initrd.availableKernelModules = [
"nvme"
"sd_mod"
"thunderbolt"
"usb_storage"
"xhci_pci"
];
2023-07-11 00:38:39 -07:00
boot.kernelParams = [
"acpi_osi=\"!Windows 2020\""
"mem_sleep_default=s2idle"
2023-07-11 00:38:39 -07:00
"nvme.noacpi=1"
"i915.enable_psr=1"
2023-07-11 00:38:39 -07:00
];
2024-02-24 02:30:17 -08:00
boot.blacklistedKernelModules = ["cros-usbpd-charger"];
boot.extraModprobeConfig = ''options snd-hda-intel model=dell-headset-multi'';
2024-02-24 02:30:17 -08:00
boot.kernelModules = ["kvm-intel"];
2023-07-18 11:12:40 -07:00
powerManagement.cpuFreqGovernor = "powersave";
2024-01-07 13:32:33 -08:00
systemd.sleep.extraConfig = "HibernateDelaySec=180m";
# boot.kernel.sysctl."net.ipv4.ip_forward" = "1";
# boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = "1";
2023-07-17 16:41:11 -07:00
2023-09-28 23:33:56 -07:00
services.pipewire.wireplumber.enable = true;
2023-07-17 16:41:11 -07:00
networking.hostName = "NOlaptop";
2023-07-11 00:38:39 -07:00
}