From a9b58d88b05a7f76a7b20aa7fc323dc67ef1ab48 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Wed, 18 Dec 2024 10:38:59 -0700 Subject: [PATCH] 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 --- thenix/etc/nixos/configuration.nix | 46 ++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/thenix/etc/nixos/configuration.nix b/thenix/etc/nixos/configuration.nix index e6c6ce8..c8b77fc 100644 --- a/thenix/etc/nixos/configuration.nix +++ b/thenix/etc/nixos/configuration.nix @@ -8,6 +8,7 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + ]; # 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 = [ + + ]; + 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. #