create xmodmap-arrow config
This commit is contained in:
parent
16fee36e96
commit
afaf3c4697
|
@ -1,25 +1,39 @@
|
|||
{ inputs, lib, pkgs, config, ... }:
|
||||
let
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
# Disko setup
|
||||
fsType = "btrfs"; # one of ext4 or btrfs. Use btrfs if using impermanence
|
||||
dev = "/dev/nvme0n1"; # depends on target hardware
|
||||
encrypted = true; # currrently only applies to btrfs
|
||||
btrfsMountDevice = if encrypted then "/dev/mapper/crypted" else "/dev/root_vg/root";
|
||||
btrfsMountDevice =
|
||||
if encrypted
|
||||
then "/dev/mapper/crypted"
|
||||
else "/dev/root_vg/root";
|
||||
user = "sam";
|
||||
impermanence = true;
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[
|
||||
in {
|
||||
imports = [
|
||||
# Create users for this host
|
||||
../common/users/${user}
|
||||
|
||||
# Disk configuration
|
||||
inputs.disko.nixosModules.disko
|
||||
(import ../common/disks { device = dev; impermanence = impermanence; fsType = fsType; encrypted = encrypted; })
|
||||
(import ../common/disks {
|
||||
device = dev;
|
||||
impermanence = impermanence;
|
||||
fsType = fsType;
|
||||
encrypted = encrypted;
|
||||
})
|
||||
|
||||
# Impermanence
|
||||
(import ../common/disks/btrfs/impermanence.nix { btrfsMountDevice = btrfsMountDevice; lib = lib; })
|
||||
(import ../common/disks/btrfs/impermanence.nix {
|
||||
btrfsMountDevice = btrfsMountDevice;
|
||||
lib = lib;
|
||||
})
|
||||
|
||||
# Import core options
|
||||
./hardware-configuration.nix
|
||||
|
@ -35,7 +49,7 @@ in
|
|||
../common/optional/nfs-mounts/photos.nix
|
||||
../common/optional/printing.nix
|
||||
../common/optional/backlight.nix
|
||||
|
||||
../common/optional/xmodmap-arrow-remaps.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
|
@ -81,16 +95,6 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
# Remap Alt_L +[hjkl] to left down up right
|
||||
services.xserver.displayManager.sessionCommands =
|
||||
"${pkgs.xorg.xmodmap}/bin/xmodmap ${pkgs.writeText "xkb-layout" ''
|
||||
keycode 64 = Mode_switch
|
||||
keycode 43 = h H Left H
|
||||
keycode 44 = j J Down J
|
||||
keycode 45 = k K Up K
|
||||
keycode 46 = l L Right L
|
||||
''}";
|
||||
|
||||
hardware = {
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
{pkgs, ...}: let
|
||||
customLayout = pkgs.writeText "xkb-layout" ''
|
||||
keycode 64 = Mode_switch
|
||||
keycode 43 = h H Left H
|
||||
keycode 44 = j J Down J
|
||||
keycode 45 = k K Up K
|
||||
keycode 46 = l L Right L
|
||||
'';
|
||||
in {
|
||||
# Remap Alt_L +[hjkl] to left down up right
|
||||
services.xserver.displayManager.sessionCommands = "sleep 5 && ${pkgs.xorg.xmodmap}/bin/xmodmap ${customLayout}";
|
||||
}
|
Loading…
Reference in New Issue