Extract xsession

This commit is contained in:
Cyryl Płotnicki 2019-07-14 09:35:06 +01:00
parent 74b0ab107f
commit 97bd4eba35
2 changed files with 23 additions and 15 deletions

View file

@ -2,7 +2,6 @@
let
unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz;
mod = "Mod4";
in
{
nixpkgs.config = {
@ -30,25 +29,13 @@ in
home.sessionVariables = {
TERMINAL="alacritty";
};
xsession = {
enable = true;
windowManager.i3 = {
enable = true;
config = {
modifier = mod;
keybindings = {
"${mod}+Return" = "exec i3-sensible-terminal";
"${mod}+Shift+q" = "kill";
"${mod}+d" = "exec ${pkgs.rofi}/bin/rofi -show combi -combi-modi window#run#ssh -modi combi";
};
};
};
};
imports = [
./programs/tmux.nix
./programs/zsh.nix
./programs/vim.nix
./programs/alacritty.nix
./user-xsession.nix
];
programs = {

21
nixos/user-xsession.nix Normal file
View file

@ -0,0 +1,21 @@
{ config, pkgs, ... }:
let
mod = "Mod4";
in
{
xsession = {
enable = true;
windowManager.i3 = {
enable = true;
config = {
modifier = mod;
keybindings = {
"${mod}+Return" = "exec i3-sensible-terminal";
"${mod}+Shift+q" = "kill";
"${mod}+d" = "exec ${pkgs.rofi}/bin/rofi -show combi -combi-modi window#run#ssh -modi combi";
"${mod}+f" = "fullscreen toggle";
};
};
};
};
}