Files
nix-config/configuration.nix
T
2025-12-18 11:34:58 +01:00

148 lines
2.8 KiB
Nix

{ pkgs, ... }:
{
imports = [
./hardware-configuration.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos-xenon";
networking.networkmanager.enable = true;
time.timeZone = "Europe/Oslo";
i18n.defaultLocale = "en_US.UTF-8";
console = {
keyMap = "no";
};
nix.settings = {
pure-eval = true;
experimental-features = [
"nix-command"
"flakes"
];
use-xdg-base-directories = true;
};
fonts.fontconfig.enable = true;
fonts.fontconfig.defaultFonts = {
monospace = [
"Hack"
];
sansSerif = [
"Notonoto Sans"
"Noto Sans"
];
serif = [
"Notonoto Serif"
"Noto Serif"
];
emoji = [
"Noto Color Emoji"
];
};
fonts.packages = with pkgs; [
hack-font
nerd-fonts.hack
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-color-emoji
];
environment.sessionVariables = rec {
XDG_CACHE_HOME = "$HOME/.cache";
XDG_CONFIG_HOME = "$HOME/.config";
XDG_DATA_HOME = "$HOME/.local/share";
XDG_STATE_HOME = "$HOME/.local/state";
XDG_BIN_HOME = "$HOME/.local/bin";
PATH = [
"${XDG_BIN_HOME}"
];
HISTFILE = "${XDG_STATE_HOME}/bash/history";
CARGO_HOME = "${XDG_DATA_HOME}/cargo";
};
services.pipewire = {
enable = true;
pulse.enable = true;
audio.enable = true;
};
services.libinput.enable = true;
services.udev.packages = with pkgs; [ light ];
services.keyd = {
enable = true;
keyboards = {
default = {
ids = [ "*" ];
settings = {
main = {
capslock = "esc";
esc = "capslock";
leftalt = "leftmeta";
leftmeta = "leftalt";
};
};
};
};
};
users.users.vbm = {
isNormalUser = true;
extraGroups = [ "wheel" "video" "input" ];
shell = pkgs.nushell;
packages = with pkgs; [
tree
dust
eza
wl-clipboard
ripgrep
fd
keepassxc
btop
fluffychat
cargo
rustc
upx
gcc
nixfmt-rfc-style
imv
unzip
zip
zathura
qbittorrent
];
};
security.doas = {
enable = true;
extraRules = [
{
users = [ "vbm" ];
keepEnv = true;
persist = true;
}
];
};
security.sudo.enable = false;
security.polkit.enable = true;
security.rtkit.enable = true;
programs.light = {
enable = true;
brightnessKeys.enable = true;
};
# Necessary for gtk config, see: https://github.com/nix-community/home-manager/issues/3113
programs.dconf.enable = true;
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "25.05"; # Did you read the comment?
}