nix-conf/configuration.nix
2024-10-04 19:08:29 -05:00

128 lines
2.8 KiB
Nix

{ config, pkgs, lib, ... }:
{
imports = [ ./hardware-configuration.nix ];
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
use-xdg-base-directories = true;
};
boot.loader = {
grub.enable = true;
grub.device = "nodev";
grub.efiSupport = true;
grub.useOSProber = true;
efi.canTouchEfiVariables = true;
};
environment.pathsToLink = [ "/libexec" ];
boot.tmp.useTmpfs = true;
networking.hostName = "nixos";
networking.networkmanager.enable = true;
time.timeZone = "America/Chicago";
i18n.defaultLocale = "en_US.UTF-8";
i18n.supportedLocales = [
"en_US.UTF-8/UTF-8"
"ja_JP.UTF-8/UTF-8"
];
services.xserver = {
enable = true;
autorun = false;
displayManager.startx.enable = true;
displayManager.sx.enable = true;
windowManager.awesome.enable = true;
desktopManager.plasma5.enable = true;
autoRepeatDelay = 200;
autoRepeatInterval = 30;
videoDrivers = [ "amdgpu" ];
deviceSection = ''Option "TearFree" "true"'';
};
services.libinput = {
enable = true;
mouse.accelProfile = "flat";
};
services.xserver.wacom.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
security.rtkit.enable = true;
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings.General = {
Enable = "Source,Sink,Media,Socket";
};
};
environment.systemPackages = with pkgs; [
neovim
wget
tree
tmux
git
btop
cryptsetup
man-pages
man-pages-posix
];
documentation.dev.enable = true;
programs.bash = {
completion.enable = true;
promptInit = ''PS1="[\u \W] \[\e[32;1m\]\$\[\e[0m\] "'';
};
environment.etc.bashrc.text = lib.mkAfter ''[ -f ~/.config/bash/bashrc ] && . ~/.config/bash/bashrc'';
environment.localBinInPath = true;
users.users.ahnwuoa = {
isNormalUser = true;
extraGroups = [ "wheel" ];
};
programs.partition-manager = {
enable = true;
package = pkgs.libsForQt5.partitionmanager;
};
services.udisks2.enable = true;
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
security.doas = {
enable = true;
extraRules = [
{ groups = [ "wheel" ]; persist = true; }
];
};
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
source-han-sans
source-han-serif
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
];
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.addons = with pkgs; [
fcitx5-mozc
fcitx5-gtk
];
};
security.polkit.enable = true;
hardware.graphics.enable32Bit = true;
programs.nix-ld.enable = true;
xdg.terminal-exec = {
enable = true;
settings.default = [ "Alacritty.desktop" ];
};
system.stateVersion = "24.05";
}