Skip to content

Commit

Permalink
Enable auto-cpufreq, reenable switcheroo, add firewall rule
Browse files Browse the repository at this point in the history
  • Loading branch information
stusmall committed Jun 10, 2024
1 parent 5439ba0 commit f15d116
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 6 deletions.
19 changes: 16 additions & 3 deletions base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
# Enable the X11 windowing system.
services.xserver.enable = true;

# Needed for smartcard management and the yubikey rust crate
services.pcscd.enable = true;

# Configure keymap in X11
Expand Down Expand Up @@ -104,16 +105,28 @@
];


# Set up auto-cpufreq for better power management.
services.auto-cpufreq.enable = true;
services.auto-cpufreq.settings = {
battery = {
governor = "powersave";
turbo = "never";
};
charger = {
governor = "performance";
turbo = "auto";
};
};
# This is the service that lets you pick power profiles in the gnome UI. It conflicts with auto-cpufreq
services.power-profiles-daemon.enable = false;

# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?



}


4 changes: 2 additions & 2 deletions dell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@
};

# Enable options in Gnome shell to launch an app on the discrete graphics card
# TODO: This package is broken building upstream. Renable once it is fixed
# services.switcherooControl.enable = true;
services.switcherooControl.enable = true;
}

26 changes: 25 additions & 1 deletion modules/rust.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

services.opensnitch.rules = {
rule-500-cargo = {
name = "Allow cargo to reach crates.io";
name = "Allow cargo to reach needed sites";
enabled = true;
action = "allow";
duration = "always";
Expand All @@ -30,5 +30,29 @@
];
};
};
rule-500-rustup = {
name = "Allow rustup to reach needed sites";
enabled = true;
action = "allow";
duration = "always";
operator = {
type = "list";
operand = "list";
list = [
{
type = "simple";
sensitive = false;
operand = "process.path";
data = "${lib.getBin pkgs.rustup}/bin/.rustup-wrapped";
}
{
type = "simple";
operand = "dest.host";
sensitive = false;
data = "static.rust-lang.org";
}
];
};
};
};
}

0 comments on commit f15d116

Please sign in to comment.