aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh2
-rw-r--r--configuration.nix10
-rw-r--r--modules/hardware.nix22
3 files changed, 18 insertions, 16 deletions
diff --git a/build.sh b/build.sh
index 0d8d65b..c2229a8 100755
--- a/build.sh
+++ b/build.sh
@@ -9,7 +9,7 @@ config_sync() {
# ssh "$SSH_TARGET" sh -c "nixos-rebuild build --flake 'path:/home/bacchus/nixos#bacchus'"
}
-run_ssh() { ssh "$SSH_TARGET" "$@"; }
+run_ssh() { ssh -t "$SSH_TARGET" "$@"; }
cmd="$1"; shift;
case "$cmd" in
diff --git a/configuration.nix b/configuration.nix
index 65b4910..9d1b067 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -32,16 +32,6 @@
time.timeZone = "Asia/Kolkata";
i18n.defaultLocale = "en_GB.UTF-8";
- # services.logind = {
- # powerKey = "ignore";
- # rebootKey = "ignore";
- # lidSwitch = "ignore";
- # lidSwitchDocked = "ignore";
- # lidSwitchExternalPower = "ignore";
- # hibernateKey = "ignore";
- # suspendKey = "ignore";
- # };
-
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
diff --git a/modules/hardware.nix b/modules/hardware.nix
index f936109..5a20353 100644
--- a/modules/hardware.nix
+++ b/modules/hardware.nix
@@ -1,4 +1,4 @@
-{ lib, pkgs, modulesPath, ... }:
+{ lib, modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
@@ -18,6 +18,22 @@
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ # Power/power state
+ powerManagement = {
+ enable = true;
+ cpuFreqGovernor = "powersave";
+ };
+ services.acpid.enable = true;
+ services.logind = {
+ powerKey = "ignore";
+ rebootKey = "ignore";
+ lidSwitch = "ignore";
+ lidSwitchDocked = "ignore";
+ lidSwitchExternalPower = "ignore";
+ hibernateKey = "ignore";
+ suspendKey = "ignore";
+ };
+
# Bootloader
boot.loader = {
systemd-boot = {
@@ -47,8 +63,4 @@
swapDevices = [{ device = "/dev/disk/by-label/swap"; }];
networking.useDHCP = lib.mkDefault true;
- powerManagement = {
- enable = true;
- cpuFreqGovernor = "powersave";
- };
}