Skip to content

Instantly share code, notes, and snippets.

@bmpvieira
Created February 11, 2019 19:12
Show Gist options
  • Save bmpvieira/4992c59641a31d0f0acb2c65028ec438 to your computer and use it in GitHub Desktop.
Save bmpvieira/4992c59641a31d0f0acb2c65028ec438 to your computer and use it in GitHub Desktop.
# add sound support
hardware.pulseaudio.enable = true;
# to allow control of the screen brightness
hardware.brightnessctl.enable = true;
extraGroups = [
"wheel"
"input"
"tty"
"audio"
"video"
# allow sway's setuid executable
"sway"
"networkmanager"
# allow sudo
"wheel"
];
gitAndTools.gitFull
programs.gnupg.agent.enable = true;
programs.gnupg.agent.enableSSHSupport = true;
services.acpid.enable = true;
services.kmscon.hwRender = true;
services.locate.enable = true;
services.nixosManual.showManual = true;
hardware.pulseaudio.enable = true;
sound.mediaKeys = {
enable = true;
volumeStep = "5%";
};
services.actkbd = {
enable = true;
bindings = [
# "Mute" media key
{ keys = [ 121 ]; events = [ "key" ]; command = "${pkgs.alsaUtils}/bin/amixer -q set Master toggle"; }
# "Lower Volume" media key
{ keys = [ 122 ]; events = [ "key" "rep" ]; command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}- unmute"; }
# "Raise Volume" media key
{ keys = [ 123 ]; events = [ "key" "rep" ]; command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}+ unmute"; }
];
};
powertop --html=<destination>
boot.extraModprobeConfig = "options snd_hda_intel power_save=1";
programs.light.enable = true; # Needed for the /run/wrappers/bin/light SUID wrapper.
services.actkbd = {
enable = true;
bindings = [
{ keys = [ 224 ]; events = [ "key" ]; command = "/run/wrappers/bin/light -A 10"; }
{ keys = [ 225 ]; events = [ "key" ]; command = "/run/wrappers/bin/light -U 10"; }
];
};
https://nixos.wiki/wiki/Actkbd
programs.sway-beta.extraSessionCommands = ''
# Tell toolkits to use wayland
export CLUTTER_BACKEND=wayland
#export QT_QPA_PLATFORM=wayland-egl
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export SDL_VIDEODRIVER=wayland
# Fix krita and other Egl-using apps
export LD_LIBRARY_PATH=/run/opengl-driver/lib
# Disable HiDPI scaling for X apps
# https://wiki.archlinux.org/index.php/HiDPI#GUI_toolkits
export GDK_SCALE=1
export QT_AUTO_SCREEN_SCALE_FACTOR=0
'';
home.packages = with pkgs; [
brightnessctl
dmenu
pavucontrol
playerctl
termite
xdg_utils # needed for termite URL opening
xwayland
] ++ (with waylandPkgs; [
grim # screenshot CLI
i3status-rust # menu bar
kanshi # broken: display configurator
mako # notification manager
redshift-wayland # ???
slurp # dimension-grabbing CLI, to use with grim
swayidle # lock screen manager
wlstream # screen recording CLI
]);
programs.termite.enable = true;
programs.termite.scrollbackLines = 10000;
programs.firefox.enable = true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment