From 65aba3cb3ccd12954645fa0998b3aacf5b9ff137 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Mon, 13 Jan 2025 17:54:43 -0500 Subject: [PATCH 1/7] More touch stuff --- home-manager/machines/crash/home.nix | 5 +++++ nixos/machines/crash/configuration.nix | 1 + 2 files changed, 6 insertions(+) diff --git a/home-manager/machines/crash/home.nix b/home-manager/machines/crash/home.nix index a1a3b1d..29852ad 100644 --- a/home-manager/machines/crash/home.nix +++ b/home-manager/machines/crash/home.nix @@ -59,6 +59,11 @@ Service.ExecStart = lib.mkForce "${pkgs.syncthingtray}/bin/syncthingtray --wait"; }; }; + + home.packages = with pkgs; [ + # Stylus note taking + xournalpp + ]; } ) ]; diff --git a/nixos/machines/crash/configuration.nix b/nixos/machines/crash/configuration.nix index c1a0e76..84f4fb7 100644 --- a/nixos/machines/crash/configuration.nix +++ b/nixos/machines/crash/configuration.nix @@ -154,6 +154,7 @@ # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ + # Touch stuff libinput maliit-keyboard dconf-editor From 9ea0aa1abe7e3aa0b5e3fe1ddfe67a4e137788da Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Mon, 13 Jan 2025 17:59:15 -0500 Subject: [PATCH 2/7] Configure iptsd on crash --- nixos/machines/crash/configuration.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nixos/machines/crash/configuration.nix b/nixos/machines/crash/configuration.nix index 84f4fb7..e47b6bf 100644 --- a/nixos/machines/crash/configuration.nix +++ b/nixos/machines/crash/configuration.nix @@ -160,6 +160,15 @@ dconf-editor ]; + # Setup iptsd for touch and stylus support + services.iptsd = { + enable = true; + config.Touchscreen = { + DisableOnPalm = true; + DisableOnStylus = true; + }; + }; + # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; From d1a386edf57559079d3b476b6ad0744874d3ee2c Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Mon, 13 Jan 2025 19:32:49 -0500 Subject: [PATCH 3/7] More hardware configuration for crash --- nixos/machines/crash/configuration.nix | 15 +++++++++++++++ nixos/machines/crash/machine.nix | 5 +++++ 2 files changed, 20 insertions(+) diff --git a/nixos/machines/crash/configuration.nix b/nixos/machines/crash/configuration.nix index e47b6bf..22e7c76 100644 --- a/nixos/machines/crash/configuration.nix +++ b/nixos/machines/crash/configuration.nix @@ -158,6 +158,7 @@ libinput maliit-keyboard dconf-editor + surface-control ]; # Setup iptsd for touch and stylus support @@ -169,6 +170,20 @@ }; }; + # And thermald + services.thermald = { + enable = true; + }; + + # Nvidia gpu setup + hardware.nvidia = { + open = true; + prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:2:0:0"; + }; + }; + # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; diff --git a/nixos/machines/crash/machine.nix b/nixos/machines/crash/machine.nix index 53690f9..c8f453d 100644 --- a/nixos/machines/crash/machine.nix +++ b/nixos/machines/crash/machine.nix @@ -31,6 +31,11 @@ imports = [ # Hardware support inputs.nixos-hardware.nixosModules.microsoft-surface-common + inputs.nixos-hardware.nixosModules.common-pc + inputs.nixos-hardware.nixosModules.common-pc-laptop + inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd + inputs.nixos-hardware.nixosModules.common-cpu-intel + inputs.nixos-hardware.nixosModules.common-gpu-nvidia # Our modules (import ../../modules/base.nix {inherit inputs;}) (import ./configuration.nix) From 443cf971238c9b2d01aee76219827cef4e5e926b Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Mon, 13 Jan 2025 21:11:31 -0500 Subject: [PATCH 4/7] More power stuff --- nixos/machines/crash/configuration.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/nixos/machines/crash/configuration.nix b/nixos/machines/crash/configuration.nix index 22e7c76..5aa548d 100644 --- a/nixos/machines/crash/configuration.nix +++ b/nixos/machines/crash/configuration.nix @@ -175,6 +175,21 @@ enable = true; }; + # Other power saving goodies + hardware.enableAllFirmware = true; + services.tlp = { + enable = true; + settings = { + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; + }; + }; + powerManagement.enable = true; + services.power-profiles-daemon.enable = false; + # Nvidia gpu setup hardware.nvidia = { open = true; From 471766ef64a7b47202ad540bfcd43983ab8d2cf4 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Tue, 14 Jan 2025 14:08:13 -0500 Subject: [PATCH 5/7] Add cpu-power gui --- nixos/machines/crash/configuration.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/machines/crash/configuration.nix b/nixos/machines/crash/configuration.nix index 5aa548d..2b9fb75 100644 --- a/nixos/machines/crash/configuration.nix +++ b/nixos/machines/crash/configuration.nix @@ -189,6 +189,7 @@ }; powerManagement.enable = true; services.power-profiles-daemon.enable = false; + services.cpupower-gui.enable = true; # Nvidia gpu setup hardware.nvidia = { From e928ecd6672003e9d3bf55396ed038f0f342821b Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Tue, 14 Jan 2025 14:25:30 -0500 Subject: [PATCH 6/7] More crash utilities --- home-manager/machines/crash/home.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/home-manager/machines/crash/home.nix b/home-manager/machines/crash/home.nix index 29852ad..02587e2 100644 --- a/home-manager/machines/crash/home.nix +++ b/home-manager/machines/crash/home.nix @@ -63,6 +63,9 @@ home.packages = with pkgs; [ # Stylus note taking xournalpp + rnote + # System monitoring + nvtopPackages.full ]; } ) From 9b150da119f09a0647a716cbf19e77cf00b319e7 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Tue, 14 Jan 2025 15:03:23 -0500 Subject: [PATCH 7/7] Add minecraft --- home-manager/machines/crash/home.nix | 1 + home-manager/modules/programs/games.nix | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 home-manager/modules/programs/games.nix diff --git a/home-manager/machines/crash/home.nix b/home-manager/machines/crash/home.nix index 02587e2..1386d8f 100644 --- a/home-manager/machines/crash/home.nix +++ b/home-manager/machines/crash/home.nix @@ -35,6 +35,7 @@ (import ../../modules/programs/emacs.nix {}) ../../modules/programs/fonts.nix ../../modules/programs/desktop.nix + ../../modules/programs/games.nix ]; home.username = "nathan"; home.homeDirectory = "/home/nathan/"; diff --git a/home-manager/modules/programs/games.nix b/home-manager/modules/programs/games.nix new file mode 100644 index 0000000..b534464 --- /dev/null +++ b/home-manager/modules/programs/games.nix @@ -0,0 +1,14 @@ +{ + config, + lib, + pkgs, + inputs', + ... +}: { + home.packages = with pkgs; [ + # Minecraft + prismlauncher + zulu + glfw3-minecraft + ]; +}