summaryrefslogtreecommitdiff
path: root/systems/glados/default.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2023-10-30 04:22:32 -0400
committerseth <[email protected]>2023-10-30 09:46:15 +0000
commit10b0df38b4286237b56ff9177f8d4c5676bfb5c1 (patch)
treeab298c74339bf9bc41571fa88746ecd9c522fbdf /systems/glados/default.nix
parent4c2c60a4f2b14c1e6ffaffe5e301dc31ac4fed0f (diff)
tree-wide: refactor
i went overboard on modules. this is much comfier
Diffstat (limited to 'systems/glados/default.nix')
-rw-r--r--systems/glados/default.nix69
1 files changed, 69 insertions, 0 deletions
diff --git a/systems/glados/default.nix b/systems/glados/default.nix
new file mode 100644
index 0000000..e5a275a
--- /dev/null
+++ b/systems/glados/default.nix
@@ -0,0 +1,69 @@
+{
+ lib,
+ self,
+ ...
+}: {
+ imports = [
+ ./boot.nix
+ ./hardware-configuration.nix
+ ../../modules/nixos/features/tailscale.nix
+ ../../modules/nixos/features/virtualisation.nix
+ self.nixosModules.desktop
+ self.nixosModules.gnome
+ ];
+
+ boot = {
+ kernelParams = ["amd_pstate=active"];
+ kernel.sysctl = {
+ "vm.swappiness" = 100;
+ "vm.vfs_cache_pressure" = 500;
+ "vm.dirty_background_ratio" = 1;
+ "vm.dirty_ratio" = 50;
+ };
+ };
+
+ features = {
+ tailscale.enable = true;
+ virtualisation.enable = true;
+ };
+
+ hardware = {
+ nvidia.enable = true;
+ ssd.enable = true;
+ };
+
+ home-manager.users.seth = {
+ desktop.enable = true;
+ };
+
+ networking.hostName = "glados";
+
+ security.tpm2 = {
+ enable = true;
+ abrmd.enable = true;
+ };
+
+ services = {
+ flatpak.enable = true;
+ fwupd.enable = true;
+ };
+
+ systemd = {
+ services."prepare-kexec".wantedBy = ["multi-user.target"];
+ tmpfiles.rules = let
+ nproc = 12;
+ in
+ builtins.map
+ (n: "w /sys/devices/system/cpu/cpu${builtins.toString n}/cpufreq/energy_performance_preference - - - - ${"balance_performance"}")
+ (lib.range 0 (nproc - 1));
+ };
+
+ powerManagement.cpuFreqGovernor = "powersave";
+
+ zramSwap = {
+ enable = true;
+ algorithm = "zstd";
+ swapDevices = 1;
+ memoryPercent = 50;
+ };
+}