1
Fork 0

feat: bluetooth, better keybinds for vim and direnv?

This commit is contained in:
Matei Adriel 2022-04-05 20:42:32 +03:00
parent 5c93d9dbed
commit 79b65f3640
14 changed files with 129 additions and 31 deletions

View file

@ -19,6 +19,7 @@
./neovim.nix
./tmux.nix
./kmonad.nix
./direnv.nix
];
}

View file

@ -0,0 +1,10 @@
# https://github.com/nix-community/nix-direnv
{ pkgs, ... }: {
home-manager.users.adrielus = {
programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true;
# optional for nix flakes support in home-manager 21.11, not required in home-manager unstable or 22.05
programs.direnv.nix-direnv.enableFlakes = true;
};
}

View file

@ -1,12 +1,33 @@
{ pkgs, ... }:
let kmonadRoot = ../../dotfiles/kmonad; in
{ pkgs, lib, ... }:
let
kmonadRoot = ../../dotfiles/kmonad;
kmonadInstances = [{
config = kmonadRoot + "/keymap.kbd";
inputDevices = [
"/dev/input/by-path/platform-i8042-serio-0-event-kbd"
];
}];
createKmonadInstances = ({ config, inputDevices }:
let
configContent = builtins.readFile config;
in
lib.lists.map
(device:
"${pkgs.writeTextDir "configs/kmonad.kbd" (builtins.replaceStrings [ "$DEVICE" ] [ device ] configContent)}/kmonad.kbd"
)
inputDevices
);
in
{
users.extraUsers.adrielus.extraGroups = [ "input" "uinput" ];
services = {
kmonad = {
enable = true;
configfiles = [ (kmonadRoot + "/keymap.kbd") ];
# configfiles = lib.lists.concatMap createKmonadInstances kmonadInstances;
configfiles = lib.lists.map ({ config, ... }: config) kmonadInstances;
};
xserver = {

View file

@ -64,6 +64,7 @@ in
purescript-vim # purescript syntax highlighting
nvim-comment # allows toggling line-comments
nvim-treesitter # use treesitter for syntax highlighting
nvim-treesitter-textobjects # the lean plugin told me to add this
startup-nvim # splash screen
vim-devicons # nice looking icons
nvim-web-devicons # fork of vim-devicons?

View file

@ -7,6 +7,7 @@ let
themePackage = builtins.getAttr theme pkgs.myFishPlugins.themes; # Dynamically pick the theme path
in
{
users.defaultUserShell = pkgs.fish;
home-manager.users.adrielus = {
# Source every file in the theme
xdg.configFile."fish/conf.d/plugin-${theme}.fish".text = lib.mkAfter ''