keys and git

This commit is contained in:
Mats Rauhala 2021-11-17 21:26:33 +02:00
parent d63f4174a8
commit 374728c009
3 changed files with 83 additions and 1 deletions

View File

@ -22,6 +22,12 @@
outputs = { self, nixpkgs, home-manager, ... } @ inputs: { outputs = { self, nixpkgs, home-manager, ... } @ inputs: {
nixosModules =
let
dirs = builtins.attrNames (builtins.readDir ./modules);
selfModules = map (module: import (./modules + "/${module}")) dirs;
in
selfModules ++ [];
overlays = [ overlays = [
inputs.myEmacs.overlay inputs.myEmacs.overlay
inputs.myVim.overlay inputs.myVim.overlay
@ -49,7 +55,7 @@
configuration = {pkgs,...}: configuration = {pkgs,...}:
{ {
programs.home-manager.enable = true; programs.home-manager.enable = true;
imports = [ imports = self.nixosModules ++ [
./macbook/masse.nix ./macbook/masse.nix
]; ];
}; };

View File

@ -13,4 +13,49 @@
myEmacs myEmacs
myVim myVim
]; ];
services.emacs = {
enable = true;
package = pkgs.myEmacs;
};
services.flameshot = {
enable = true;
};
services.syncthing = {
enable = true;
tray = false;
};
programs.mac-keys.enable = true;
programs.git = {
enable = true;
userName = "Mats Rauhala";
userEmail = "mats.rauhala@iki.fi";
signing = {
key = "2104943D6033C8F4F7D4F560BDA6DFEDBCFB6779";
};
ignores = [
"env"
"*.swp"
"*.swo"
"*.orig"
"*.crt"
"*.key"
"*.log"
"tags"
"result"
"*.pub"
"*.db"
"*.sqlite"
".projectile"
".dir-locals.el"
];
extraConfig = {
push = {
default = "simple";
};
};
};
} }

View File

@ -0,0 +1,31 @@
{ config, lib, pkgs, ...}:
with lib;
let
cfg = config.programs.mac-keys;
in
{
options.programs.mac-keys = {
enable = mkEnableOption "Mac-Keys";
};
config = lib.mkIf cfg.enable {
home.file.".Xmodmap".text = ''
remove Lock = Caps_Lock
add Lock = Escape
keysym Caps_Lock = Escape
keysym Escape = Caps_Lock
clear mod4
keycode 255 = Tab
keycode 23 = Hyper_L
keycode 134 = ISO_Level3_Shift
keycode 108 = Super_R
'';
};
}