Skip to content

Commit

Permalink
Wrap Alacritty with nixGL. Now the home manager flake needs to be bui…
Browse files Browse the repository at this point in the history
…ld with --impure

Context: nix-community/nixGL#90
  • Loading branch information
15cm committed Dec 3, 2022
1 parent d2b7d6d commit 9d1676a
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 4 deletions.
40 changes: 40 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,19 @@
url = "github:nix-community/emacs-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
# nixgl is needed for alacritty outside of nixOS
# refer to https://github.com/NixOS/nixpkgs/issues/122671
# https://github.com/guibou/nixGL/#use-an-overlay
nixgl = {
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
url = "github:guibou/nixGL";
};
};

outputs = { nixpkgs, home-manager, emacs-overlay, ... }@inputs:
outputs =
{ nixpkgs, home-manager, emacs-overlay, nixgl, flake-utils, ... }@inputs:
let
supportedSystems = [ "x86_64-linux" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
Expand All @@ -24,9 +34,10 @@
import nixpkgs {
inherit system;
overlays = with overlays; [
emacs-overlay.overlay
additions
modifications
emacs-overlay.overlay
nixgl.overlays.default
];
config.allowUnfree = true;
});
Expand Down
1 change: 1 addition & 0 deletions home/features/app/alacritty/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

let inherit (state) theme;
in {
home.packages = [ pkgs.nixgl.auto.nixGLDefault ];
programs.alacritty = {
enable = true;
settings = {
Expand Down
2 changes: 1 addition & 1 deletion home/features/app/i3/config.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcu
bindsym $mod+v exec wmfocus

# Launcher
bindsym $mod+Return exec alacritty
bindsym $mod+Return exec nixGL alacritty
bindsym $mod+i exec keepassxc
bindsym $mod+y exec i3-quickterm shell
bindsym $mod+e exec splatmoji type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sed -i "s/\(theme.*\)\"[^\"]*\"/\1\"$1\"/" {{statePath}}
home-manager switch --flake {{flakeUri}}
home-manager switch --impure --flake {{flakeUri}}
i3-msg reload
killall -USR2 i3status-rs
powerline-daemon --replace
Expand Down

0 comments on commit 9d1676a

Please sign in to comment.