dregil: Use home-manager to set keyboard

This commit is contained in:
Alexander Kobjolke 2023-08-01 16:03:32 +02:00
parent f8411ac7e9
commit 53b6e8d5b4
3 changed files with 44 additions and 47 deletions

View file

@ -11,10 +11,8 @@ let
export __VK_LAYER_NV_optimus=NVIDIA_only
exec "$@"
'';
in
{
imports =
[
in {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
# <nixos-hardware/lenovo/legion/15ich>
@ -30,7 +28,8 @@ in
networking.hostName = "dregil"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
networking.networkmanager.enable =
true; # Easiest to use and most distros use this by default.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
@ -38,7 +37,8 @@ in
console = {
font = "Lat2-Terminus16";
useXkbConfig = true; # use xkbOptions in tty.
#useXkbConfig = true; # use xkbOptions in tty.
keyMap = "dvorak";
};
# Enable the X11 windowing system.
@ -47,24 +47,24 @@ in
exportConfiguration = true;
# Configure keymap in X11
layout = "dvorak";
layout = "us";
xkbOptions = "terminate:ctrl_alt_bksp,caps:escape,compose:ralt";
videoDrivers = [ "nvidia" ]; # "modesetting" ];
displayManager.lightdm = {
enable = true;
};
displayManager.lightdm = { enable = true; };
desktopManager.xfce.enable = true;
desktopManager.plasma5.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
libinput = {
enable = true;
touchpad.disableWhileTyping = true;
touchpad.naturalScrolling = true;
mouse.naturalScrolling = config.services.xserver.libinput.touchpad.naturalScrolling;
mouse.naturalScrolling =
config.services.xserver.libinput.touchpad.naturalScrolling;
};
};
@ -90,7 +90,8 @@ in
# Define a user account. Don't forget to set a password with passwd.
users.users.alex = {
isNormalUser = true;
extraGroups = [ "wheel" # Enable sudo for the user.
extraGroups = [
"wheel" # Enable sudo for the user.
"input"
];
};
@ -107,9 +108,7 @@ in
# adjust channels to nixpkgs used on this system via this flake
environment.etc."nix/inputs/nixpkgs".source = inputs.nixpkgs-unstable.outPath;
nix.nixPath = [
"nixpkgs=${inputs.nixpkgs-unstable}"
];
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs-unstable}" ];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
@ -119,13 +118,9 @@ in
enableSSHSupport = true;
};
programs.neovim = {
enable = true;
};
programs.neovim = { enable = true; };
programs.steam = {
enable = true;
};
programs.steam = { enable = true; };
# List services that you want to enable:

View file

@ -6,12 +6,9 @@ let
pkgs = import inputs.nixpkgs-unstable {
inherit system;
config = {
allowUnfree = true;
config = { allowUnfree = true; };
};
};
in
nixosSystem {
in nixosSystem {
inherit system pkgs;
specialArgs = { inherit inputs; };
modules = [

View file

@ -13,6 +13,11 @@ in {
../../home/cli.nix
{
home = {
language.base = "en_US@UTF-8";
keyboard.type = "us";
keyboard.variant = "dvorak";
packages = with pkgs; [
alacritty # fast terminal
firefox # the browser with the fox