Add home-manager for power and screen locking control

This must be paired with adding home-manager to the nixos channels via

sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
sudo nix-channel --update
This commit is contained in:
Eli Ribble 2024-12-18 10:38:59 -07:00
parent 71352b788f
commit a9b58d88b0
1 changed files with 43 additions and 3 deletions

View File

@ -8,6 +8,7 @@
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
<home-manager/nixos>
];
# Use the systemd-boot EFI boot loader.
@ -25,8 +26,46 @@
wget
];
#hardware.pulseaudio.enable = true;
home-manager.useGlobalPkgs = true;
home-manager.users.eliribble = { config, pkgs, ... }: {
imports = [
<plasma-manager/modules>
];
home.homeDirectory = "/home/eliribble";
home.stateVersion = "24.11";
home.username = "eliribble";
programs.fish = {
enable = true;
interactiveShellInit = ''
set fish_greeting # Disable greeting
'';
};
programs.plasma = {
enable = true;
kscreenlocker = {
autoLock = false;
lockOnResume = false;
passwordRequired = false;
timeout = 0;
};
powerdevil = {
AC = {
autoSuspend = {
action = "nothing";
idleTimeout = null;
};
dimDisplay = {
enable = true;
idleTimeout = 600;
};
inhibitLidActionWhenExternalMonitorConnected = true;
turnOffDisplay = {
idleTimeout = "never";
};
};
};
};
};
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
@ -76,10 +115,11 @@
# Define a user account. Don't forget to set a password with passwd.
users.users.eliribble = {
isNormalUser = true;
initialPassword = "let_eliribble_in";
extraGroups = [ "wheel" ]; # Enable sudo for the user.
};
xdg.autostart.enable = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#