Add TLP
This commit is contained in:
parent
30cad71684
commit
6ab59cf453
8 changed files with 47 additions and 20 deletions
|
@ -19,8 +19,8 @@
|
||||||
libx = import ./lib { inherit inputs outputs stateVersion hmStateVersion; };
|
libx = import ./lib { inherit inputs outputs stateVersion hmStateVersion; };
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
nixos-laptop = libx.mkHost { hostname = "nixos-laptop"; username = "albert"; desktop = "hyprland"; graphics = "nvidia"; };
|
nixos-laptop = libx.mkHost { hostname = "nixos-laptop"; username = "albert"; desktop = "hyprland"; gpu = "intel"; };
|
||||||
nixos-desktop = libx.mkHost { hostname = "nixos-desktop"; username = "albert"; desktop = "gnome"; graphics = "nvidia"; };
|
nixos-desktop = libx.mkHost { hostname = "nixos-desktop"; username = "albert"; desktop = "gnome"; gpu = "nvidia"; };
|
||||||
};
|
};
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
"albert@nixos-laptop" = libx.mkHome { hostname = "nixos-laptop"; username = "albert"; desktop = "hyprland"; };
|
"albert@nixos-laptop" = libx.mkHome { hostname = "nixos-laptop"; username = "albert"; desktop = "hyprland"; };
|
||||||
|
|
|
@ -174,32 +174,51 @@
|
||||||
|
|
||||||
# Laptop specific config
|
# Laptop specific config
|
||||||
# Set up the FN keys:
|
# Set up the FN keys:
|
||||||
|
|
||||||
# F1 - Mute
|
# F1 - Mute
|
||||||
bind = , XF86AudioMute, exec, amixer set Master toggle
|
# bind = , XF86AudioMute, exec, amixer set Master toggle && swayosd --output-volume=mute-toggle
|
||||||
|
bind = , XF86AudioMute, exec, swayosd --output-volume=mute-toggle
|
||||||
|
|
||||||
# F2 - Volume Down
|
# F2 - Volume Down
|
||||||
binde = , XF86AudioLowerVolume, exec, amixer set Master 3%-
|
# binde = , XF86AudioLowerVolume, exec, amixer set Master 3%-
|
||||||
|
binde = , XF86AudioLowerVolume, exec, swayosd --output-volume=lower
|
||||||
|
|
||||||
# F3 - Volume Up
|
# F3 - Volume Up
|
||||||
binde = , XF86AudioRaiseVolume, exec, amixer set Master 3%+
|
# binde = , XF86AudioRaiseVolume, exec, amixer set Master 3%+
|
||||||
|
binde = , XF86AudioRaiseVolume, exec, swayosd --output-volume=raise
|
||||||
|
|
||||||
# F4 - Mute Microphone
|
# F4 - Mute Microphone
|
||||||
bind = , XF86AudioMicMute, exec, amixer set Capture toggle
|
# bind = , XF86AudioMicMute, exec, amixer set Capture toggle
|
||||||
|
bind = , XF86AudioMicMute, exec, swayosd --input-volume=mute-toggle
|
||||||
|
|
||||||
# F5 - Brightness Down
|
# F5 - Brightness Down
|
||||||
binde = , XF86MonBrightnessDown, exec, light -U 5
|
# binde = , XF86MonBrightnessDown, exec, light -U 5
|
||||||
|
binde = , XF86MonBrightnessDown, exec, swayosd --brightness=lower
|
||||||
|
|
||||||
# F6 - Brightness Up
|
# F6 - Brightness Up
|
||||||
binde = , XF86MonBrightnessUp, exec, light -A 5
|
# binde = , XF86MonBrightnessUp, exec, light -A 5
|
||||||
|
binde = , XF86MonBrightnessUp, exec, swayosd --brightness=raise
|
||||||
|
|
||||||
# F7 - External Displays
|
# F7 - External Displays
|
||||||
# bind = , XF86
|
# bind = , XF86
|
||||||
|
|
||||||
# F8 - Airplane Mode
|
# F8 - Airplane Mode
|
||||||
# bind = , XF86
|
# bind = , XF86
|
||||||
|
|
||||||
# F9 - Notifications?
|
# F9 - Notifications?
|
||||||
# bind = , XF86
|
# bind = , XF86
|
||||||
|
|
||||||
# F10 - Call Answer?
|
# F10 - Call Answer?
|
||||||
# bind = , XF86
|
# bind = , XF86
|
||||||
|
|
||||||
# F11 - Call Hang Up?
|
# F11 - Call Hang Up?
|
||||||
# bind = , XF86
|
# bind = , XF86
|
||||||
|
|
||||||
# F12 - Favorites?
|
# F12 - Favorites?
|
||||||
# bind = , XF86
|
# bind = , XF86
|
||||||
|
|
||||||
# Use rofi as an alt-tab switcher
|
# Use rofi as an alt-tab switcher
|
||||||
bind = ALT, TAB, exec, rofi -show window
|
# bind = ALT, TAB, exec, rofi -show window
|
||||||
|
|
||||||
# Start the config:
|
# Start the config:
|
||||||
exec-once=bash ~/.config/hypr/start.sh
|
exec-once=bash ~/.config/hypr/start.sh
|
||||||
|
@ -220,7 +239,11 @@
|
||||||
waybar &
|
waybar &
|
||||||
|
|
||||||
# Set up the idle management daemon
|
# Set up the idle management daemon
|
||||||
swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' before-sleep 'swaylock -f -c 000000'
|
swayidle -w \
|
||||||
|
timeout 300 'swaylock -f' \
|
||||||
|
timeout 600 'swaymsg "output * power off"' \
|
||||||
|
resume 'swaymsg "output * power on"' \
|
||||||
|
before-sleep 'swaylock -f'
|
||||||
mako
|
mako
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
clock = true;
|
clock = true;
|
||||||
timestr = "%R";
|
timestr = "%R";
|
||||||
datestr = "%a, %b %d";
|
datestr = "%a, %b %d";
|
||||||
grace = 15;
|
grace = 5;
|
||||||
|
|
||||||
indicator = true;
|
indicator = true;
|
||||||
indicator-radius = "120";
|
indicator-radius = "120";
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Helper function for generating host configs
|
# Helper function for generating host configs
|
||||||
mkHost = { hostname, username, desktop ? null, installer ? null, graphics ? null }: inputs.nixpkgs.lib.nixosSystem {
|
mkHost = { hostname, username, desktop ? null, installer ? null, gpu ? null }: inputs.nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs outputs desktop hostname username stateVersion graphics;
|
inherit inputs outputs desktop hostname username stateVersion gpu;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
../nixos
|
../nixos
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, config, pkgs, hostname, graphics, ... }: {
|
{ lib, config, pkgs, hostname, gpu, ... }: {
|
||||||
# Enable sound with pipewire.
|
# Enable sound with pipewire.
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
hardware.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = false;
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
xkbVariant = "";
|
xkbVariant = "";
|
||||||
autorun = true;
|
autorun = true;
|
||||||
# When you play games, change this to nvidia
|
# When you play games, change this to nvidia
|
||||||
videoDrivers = [ graphics ];
|
videoDrivers = [ gpu ];
|
||||||
};
|
};
|
||||||
|
|
||||||
##### disable nvidia, very nice battery life.
|
##### disable nvidia, very nice battery life.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{pkgs, graphics, ...}: {
|
{pkgs, gpu, ...}: {
|
||||||
services.xserver.videoDrivers = [ graphics ];
|
services.xserver.videoDrivers = [ gpu ];
|
||||||
|
|
||||||
# tuigreet
|
# tuigreet
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
|
@ -12,6 +12,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.tlp = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Brightness and volume control
|
# Brightness and volume control
|
||||||
# https://haikarainen.github.io/light/
|
# https://haikarainen.github.io/light/
|
||||||
programs.light.enable = true;
|
programs.light.enable = true;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, config, pkgs, hostname, stateVersion, username, desktop, graphics, ... }: {
|
{ lib, config, pkgs, hostname, stateVersion, username, desktop, gpu, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
# Services
|
# Services
|
||||||
./common/services/openssh.nix
|
./common/services/openssh.nix
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, modulesPath, desktop, username, graphics, ... }: {
|
{ config, lib, pkgs, modulesPath, desktop, username, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
../../common/services/powertop.nix
|
../../common/services/powertop.nix
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Fingerprint software
|
# Fingerprint software
|
||||||
fprintd
|
fprintd
|
||||||
# nVidia graphics options
|
# nVidia gpu options
|
||||||
vulkan-loader
|
vulkan-loader
|
||||||
vulkan-validation-layers
|
vulkan-validation-layers
|
||||||
vulkan-tools
|
vulkan-tools
|
||||||
|
|
Loading…
Reference in a new issue