From cc0b878532814133894281c8d89f1c3a4037bcf3 Mon Sep 17 00:00:00 2001 From: Ranomier <> Date: Fri, 13 Dec 2024 19:06:00 +0100 Subject: [PATCH] various things because i am lazy --- hosts/crocoite/crocoite.nix | 2 +- .../{specific_hardware => hardware}/bluetooth.nix | 0 .../{specific_hardware => hardware}/default.nix | 2 ++ modules/{specific_hardware => hardware}/fwupd.nix | 0 modules/hardware/gpu.nix | 6 ++++++ .../scan_and_print.nix | 0 modules/hardware/trackpoint.nix | 4 ++++ modules/pkg_mgrmnt/default.nix | 1 + modules/pkg_mgrmnt/garbage-collect.nix | 15 +++++++++++++++ 9 files changed, 29 insertions(+), 1 deletion(-) rename modules/{specific_hardware => hardware}/bluetooth.nix (100%) rename modules/{specific_hardware => hardware}/default.nix (72%) rename modules/{specific_hardware => hardware}/fwupd.nix (100%) create mode 100644 modules/hardware/gpu.nix rename modules/{specific_hardware => hardware}/scan_and_print.nix (100%) create mode 100644 modules/hardware/trackpoint.nix create mode 100644 modules/pkg_mgrmnt/garbage-collect.nix diff --git a/hosts/crocoite/crocoite.nix b/hosts/crocoite/crocoite.nix index bfbafbd..4a75200 100644 --- a/hosts/crocoite/crocoite.nix +++ b/hosts/crocoite/crocoite.nix @@ -67,7 +67,7 @@ ../../modules/users - ../../modules/specific_hardware + ../../modules/hardware ../../modules/sec_auth diff --git a/modules/specific_hardware/bluetooth.nix b/modules/hardware/bluetooth.nix similarity index 100% rename from modules/specific_hardware/bluetooth.nix rename to modules/hardware/bluetooth.nix diff --git a/modules/specific_hardware/default.nix b/modules/hardware/default.nix similarity index 72% rename from modules/specific_hardware/default.nix rename to modules/hardware/default.nix index d64c479..2b92f71 100644 --- a/modules/specific_hardware/default.nix +++ b/modules/hardware/default.nix @@ -3,5 +3,7 @@ ./bluetooth.nix ./fwupd.nix ./scan_and_print.nix + ./trackpoint.nix + ./gpu.nix ]; } diff --git a/modules/specific_hardware/fwupd.nix b/modules/hardware/fwupd.nix similarity index 100% rename from modules/specific_hardware/fwupd.nix rename to modules/hardware/fwupd.nix diff --git a/modules/hardware/gpu.nix b/modules/hardware/gpu.nix new file mode 100644 index 0000000..80d47e7 --- /dev/null +++ b/modules/hardware/gpu.nix @@ -0,0 +1,6 @@ +{ pkgs, ... }:{ + hardware.graphics.enable = true; + hardware.graphics.extraPackages = with pkgs; [ + libvdpau-va-gl + ]; +} diff --git a/modules/specific_hardware/scan_and_print.nix b/modules/hardware/scan_and_print.nix similarity index 100% rename from modules/specific_hardware/scan_and_print.nix rename to modules/hardware/scan_and_print.nix diff --git a/modules/hardware/trackpoint.nix b/modules/hardware/trackpoint.nix new file mode 100644 index 0000000..8c34c03 --- /dev/null +++ b/modules/hardware/trackpoint.nix @@ -0,0 +1,4 @@ +{ ... }:{ + # probably does nothing on my amd laptop. need to check + hardware.trackpoint.speed = 200; +} diff --git a/modules/pkg_mgrmnt/default.nix b/modules/pkg_mgrmnt/default.nix index 85f07d2..57e40d2 100644 --- a/modules/pkg_mgrmnt/default.nix +++ b/modules/pkg_mgrmnt/default.nix @@ -3,5 +3,6 @@ ./flatpak.nix ./podman.nix ./store_pkg_file.nix + ./garbage-collect.nix ]; } diff --git a/modules/pkg_mgrmnt/garbage-collect.nix b/modules/pkg_mgrmnt/garbage-collect.nix new file mode 100644 index 0000000..685be99 --- /dev/null +++ b/modules/pkg_mgrmnt/garbage-collect.nix @@ -0,0 +1,15 @@ +{ ... }: { + nix = { + optimise = { + automatic = true; + dates = [ "16:00" "08:00" ]; + }; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 2d"; + persistent = true; + randomizedDelaySec = "1h"; + }; + }; +}