Skip to content

Commit

Permalink
use undervolt in my pc cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
Diegopyl1209 committed Oct 18, 2024
1 parent 095bea2 commit 5fbfc1a
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 46 deletions.
6 changes: 5 additions & 1 deletion hosts/pc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
inputs.nixos-hardware.nixosModules.common-gpu-amd
inputs.nixos-hardware.nixosModules.common-pc-ssd
];


services.undervolt = {
enable = true;
turbo = 1; # disabled
};
services.displayManager.autoLogin = {
user = username;
enable = true;
Expand Down
81 changes: 36 additions & 45 deletions hosts/pc/hardware-configuration.nix
Original file line number Diff line number Diff line change
@@ -1,52 +1,43 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:

{
config,
lib,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];

boot.initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];

fileSystems."/" = {
device = "/dev/disk/by-uuid/8d377fbd-2101-434f-a6af-00772955b5d4";
fsType = "btrfs";
options = ["subvol=root"];
};

fileSystems."/home" = {
device = "/dev/disk/by-uuid/8d377fbd-2101-434f-a6af-00772955b5d4";
fsType = "btrfs";
options = ["subvol=home"];
};

fileSystems."/nix" = {
device = "/dev/disk/by-uuid/8d377fbd-2101-434f-a6af-00772955b5d4";
fsType = "btrfs";
options = ["subvol=nix"];
};

fileSystems."/swap" = {
device = "/dev/disk/by-uuid/8d377fbd-2101-434f-a6af-00772955b5d4";
fsType = "btrfs";
options = ["subvol=swap"];
};

fileSystems."/boot" = {
device = "/dev/disk/by-uuid/2F48-A7F2";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
};

swapDevices = [{device = "/swap/swapfile";}];
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];

boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];

fileSystems."/" =
{ device = "/dev/disk/by-uuid/78c6225a-6cb0-4cd4-aa96-30dcf8b85dcc";
fsType = "btrfs";
options = [ "subvol=root" "compress=zstd" ];
};

fileSystems."/home" =
{ device = "/dev/disk/by-uuid/78c6225a-6cb0-4cd4-aa96-30dcf8b85dcc";
fsType = "btrfs";
options = [ "subvol=home" "compress=zstd" ];
};

fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/78c6225a-6cb0-4cd4-aa96-30dcf8b85dcc";
fsType = "btrfs";
options = [ "subvol=nix" "compress=zstd" ];
};

fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/12CE-A600";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};

swapDevices = [];

# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
Expand Down

0 comments on commit 5fbfc1a

Please sign in to comment.