NOflake/systems/NOcomputer.nix

115 lines
3.4 KiB
Nix
Raw Normal View History

2023-09-30 18:12:42 -07:00
{ pkgs, ... }: {
2023-09-28 23:33:56 -07:00
services.xserver.displayManager = {
autoLogin.enable = true;
autoLogin.user = "tao";
};
2023-07-19 00:52:04 -07:00
environment.systemPackages = with pkgs;
[
# mesa
openrgb
gwe
liquidctl
2023-09-30 22:39:53 -07:00
snapper
# egl-wayland
# nvidia-vaapi-driver
2023-07-19 00:52:04 -07:00
];
2023-07-11 00:38:39 -07:00
2023-09-28 23:33:56 -07:00
environment.sessionVariables = {
# wayland chromium workaround
NIXOS_OZONE_WL = "1";
};
2023-07-11 01:32:48 -07:00
fileSystems."/home" = {
device = "/dev/disk/by-uuid/eb9fcce2-e9f3-438a-b5ce-8f72f32f0e09";
fsType = "btrfs";
options = [ "subvol=home_snaps/0/snapshot" "noatime" "compress-force=zstd:3" ];
};
2023-09-28 23:33:56 -07:00
fileSystems."/home/.snapshots" = {
device = "/dev/disk/by-uuid/eb9fcce2-e9f3-438a-b5ce-8f72f32f0e09";
fsType = "btrfs";
options = [ "subvol=home_snaps/" "noatime" "compress-force=zstd:3" ];
};
2023-07-11 01:32:48 -07:00
fileSystems."/home/tao/Games" = {
device = "/dev/disk/by-uuid/eb9fcce2-e9f3-438a-b5ce-8f72f32f0e09";
fsType = "btrfs";
options = [ "subvol=games" "nosuid" "nodev" "noatime" "compress-force=zstd:3" "users" "rw" "exec" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/2B28-151D";
fsType = "vfat";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/eb9fcce2-e9f3-438a-b5ce-8f72f32f0e09";
fsType = "btrfs";
options = [ "subvol=nixos" "noatime" "compress-force=zstd:3" ];
};
fileSystems."/var" = {
device = "/dev/disk/by-uuid/eb9fcce2-e9f3-438a-b5ce-8f72f32f0e09";
fsType = "btrfs";
options = [ "subvol=nixos/var" "noatime" "compress-force=zstd:3" ];
};
fileSystems."/tmp" = {
device = "/dev/disk/by-uuid/eb9fcce2-e9f3-438a-b5ce-8f72f32f0e09";
fsType = "btrfs";
options = [ "subvol=nixos/tmp" ];
};
2023-07-17 16:41:11 -07:00
swapDevices = [{ device = "/dev/disk/by-uuid/ca0ed3d7-8758-4ac7-b016-8b4cd9608ded"; }];
2023-07-11 01:32:48 -07:00
2023-09-28 23:33:56 -07:00
services.snapper.configs =
{
home = {
SUBVOLUME = "/home";
ALLOW_USERS = [ "tao" ];
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
TIMELINE_LIMIT_HOURLY = "5";
TIMELINE_LIMIT_DAILY = "7";
};
};
services.snapper.snapshotInterval = "*:0/5";
2023-07-29 21:20:44 -07:00
# systemd.user.services.fans = {
# description = "NZXT fans to 69% using liquidctl";
# script = ''
# ${pkgs.liquidctl}/bin/liquidctl -m nzxt set sync speed 69
# '';
# wantedBy = [ "default.target" ];
# };
2023-07-11 00:38:39 -07:00
2023-09-28 23:33:56 -07:00
# boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelPackages = pkgs.unstable.linuxPackages_latest;
2023-07-11 01:32:48 -07:00
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.kernelModules = [ "i2c-dev" "kvm-amd" ];
2023-07-18 22:14:59 -07:00
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
2023-07-18 11:12:40 -07:00
hardware.nvidia = {
modesetting.enable = true;
2023-09-28 23:33:56 -07:00
powerManagement.enable = true;
# package = config.boot.kernelPackages.nvidiaPackages.beta;
2023-10-09 17:54:57 -07:00
package = pkgs.unstable.linuxPackages_latest.nvidiaPackages.vulkan_beta;
2023-07-18 11:12:40 -07:00
};
2023-07-31 17:02:31 -07:00
# enable core and mem freq sliders for nvidia
services.xserver.deviceSection = ''
Option "Coolbits" "8"
'';
systemd.services.nvpl = {
description = "Increase GPU power limit to 400w";
script = "/run/current-system/sw/bin/nvidia-smi -pl=400";
wantedBy = [ "multi-user.target" ];
};
2023-07-18 11:12:40 -07:00
2023-08-09 19:05:53 -07:00
services.udev.packages = [ pkgs.openrgb ];
services.udev.extraRules = ''
KERNEL=="hidraw*", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a3c5", MODE="0666"
'';
2023-09-28 23:33:56 -07:00
time.hardwareClockInLocalTime = true;
2023-07-11 01:00:39 -07:00
networking.hostName = "NOcomputer";
2023-07-11 00:38:39 -07:00
}