This commit is contained in:
Sean Buckley 2021-08-31 18:21:37 -04:00
parent 80259fa056
commit dce8138b43
3 changed files with 39 additions and 5 deletions

View file

@ -21,6 +21,7 @@
nixosModules = {
inherit (impermanence.nixosModules) impermanence;
alacritty = import ./modules/alacritty.nix;
baseline = import ./modules/baseline.nix;
cli = import ./modules/cli.nix;
desktop = import ./modules/desktop.nix;

20
modules/alacritty.nix Normal file
View file

@ -0,0 +1,20 @@
{ config, pkgs, lib, ... }:
{
config = {
programs.bash.interactiveShellInit = ''
function _set_title() {
printf "\033]0;%s@%s:%s\007" "''${USER}" "''${HOSTNAME%%.*}" "''${PWD/#$HOME/\~}"
}
[ -z "$VTE_VERSION" ] && PROMPT_COMMAND="_set_title; $PROMPT_COMMAND"
'';
environment.etc."xdg/alacritty.yml".text = ''
env:
TERM: xterm-256color
key_bindings:
- { key: N, mods: Control|Shift, action: SpawnNewInstance }
- { key: T, mods: Control|Shift, action: SpawnNewInstance }
'';
};
}

View file

@ -35,21 +35,33 @@ in
(
cat '${pkgs.i3}/etc/i3/config' |
sed 's/Mod1/Mod4/' |
sed 's/exec i3-config-wizard//' |
sed 's/^font/#font/' |
sed 's,status_command i3status,status_command i3status -c ${./i3status.conf},' |
sed 's/^exec i3-config-wizard/#&/' |
sed 's/^font.*/font pango:DejaVuSans, FontAwesome5Free 12/' |
sed 's,status_command i3status,status_command i3status-rs \n tray_output primary,' |
sed 's/i3-sensible-terminal/alacritty/' |
sed 's/10%/2%/'
cat '${pkgs.writeText "i3extra" cfg.extraConfig}'
echo 'bindsym XF86MonBrightnessUp exec brightnessctl -n500 -e s -- +10%'
echo 'bindsym XF86MonBrightnessDown exec brightnessctl -n500 -e s -- -10%'
)|
tee "$out"
'';
sconfig.i3.extraConfig = ''
default_border normal 4
default_floating_border normal 4
bindsym Mod4+Escape kill
hide_edge_borders both
bindsym XF86MonBrightnessUp exec brightnessctl -n500 -e s -- +10%
bindsym XF86MonBrightnessDown exec brightnessctl -n500 -e s -- -10%
'';
services.gvfs.enable = true;
networking.networkmanager.enable = true;
fonts.fonts = with pkgs; [
font-awesome
powerline-fonts
];
services.xserver = {
enable = true;
libinput.enable = true;
@ -57,6 +69,7 @@ in
};
environment.systemPackages = with pkgs; [
i3status-rust
alacritty
brightnessctl
numix-icon-theme