Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable auto-cpufreq, reenable switcheroo, add firewall rule #8

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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";
}
];
};
};
};
}