nixos/nixos/utils.nix
2025-10-11 08:24:26 +07:00

73 lines
1.6 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ pkgs, config, ... }:
let
hostname = config.var.hostname;
keyboardLayout = config.var.keyboardLayout;
in {
networking.hostName = hostname;
console.keyMap = keyboardLayout;
environment.variables = {
XDG_DATA_HOME = "$HOME/.local/share";
PASSWORD_STORE_DIR = "$HOME/.local/share/password-store";
EDITOR = "nvim";
};
programs.dconf.enable = true;
services = {
libinput.enable = true;
dbus.enable = true;
gvfs.enable = true;
upower.enable = true;
# power-profiles-daemon.enable = true;
udisks2.enable = true;
devmon.enable = true;
journald.extraConfig = ''
SystemMaxUse=1G
'';
};
# Faster rebuilding
documentation = {
enable = true;
doc.enable = false;
man.enable = true;
dev.enable = false;
info.enable = false;
nixos.enable = false;
};
# Better caps2esc
services.interception-tools = {
enable = true;
udevmonConfig = ''
- JOB: "${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.caps2esc}/bin/caps2esc | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE"
DEVICE:
EVENTS:
EV_KEY: [KEY_CAPSLOCK, KEY_ESC]
'';
plugins = [ pkgs.interception-tools-plugins.caps2esc ];
};
environment.systemPackages = with pkgs; [
fd
bc
gcc
git-ignore
xdg-utils
wget
curl
interception-tools
nix-tree
stevenblack-blocklist
wlay
ldns
];
# services.logind.settings.Login = ''
# # dont shutdown when power button is short-pressed
# HandlePowerKey=ignore
# '';
}